16 #include "libmesh/elem_range.h" 17 #include "libmesh/fe_base.h" 18 #include "libmesh/fe_type.h" 41 #ifdef MOOSE_KOKKOS_SCOPE 137 KOKKOS_FUNCTION
unsigned int getNumDofs(
unsigned int elem_type,
unsigned int fe_type)
const 139 return _n_dofs(elem_type, fe_type);
148 KOKKOS_FUNCTION
const auto &
151 return _phi(subdomain, elem_type, fe_type);
160 KOKKOS_FUNCTION
const auto &
163 return _phi_face(subdomain, elem_type, fe_type);
172 KOKKOS_FUNCTION
const auto &
175 return _grad_phi(subdomain, elem_type, fe_type);
185 unsigned int elem_type,
186 unsigned int fe_type)
const 238 const unsigned int qp,
241 Real3 *
const q_points)
const;
253 const unsigned int side,
254 const unsigned int qp,
257 Real3 *
const q_points,
258 Real3 *
const normal)
const;
395 #ifdef MOOSE_KOKKOS_SCOPE 396 KOKKOS_FUNCTION
inline Real 416 KOKKOS_FUNCTION
inline void 418 const unsigned int qp,
421 Real3 *
const q_points)
const 423 auto sid =
info.subdomain;
425 auto elem_type =
info.type;
428 auto & phi =
_map_phi(sid, elem_type);
434 for (
unsigned int node = 0; node < num_nodes; ++node)
439 J += grad_phi(node, qp).cartesian_product(points);
441 xyz += phi(node, qp) * points;
455 KOKKOS_FUNCTION
inline void 457 const unsigned int side,
458 const unsigned int qp,
461 Real3 *
const q_points,
462 Real3 *
const normal)
const 464 auto sid =
info.subdomain;
466 auto elem_type =
info.type;
482 for (
unsigned int node = 0; node < num_nodes; ++node)
487 J += grad_phi(node, qp).cartesian_product(points);
490 xyz += phi(node, qp) * points;
495 dxyz_dxi += normal_dx_dxi(node, qp) * points;
497 dxyz_deta += normal_dx_deta(node, qp) * points;
513 for (
unsigned int node = 0; node < num_side_nodes; ++node)
517 J += grad_psi(node, qp).cartesian_product(points);
532 *normal = side ? dxyz_dxi : -dxyz_dxi;
534 *normal *= 1.0 / normal->
norm();
563 #ifdef MOOSE_KOKKOS_SCOPE Array2D< Array< Real > > _weights
KOKKOS_FUNCTION const auto & getPhi(ContiguousSubdomainID subdomain, unsigned int elem_type, unsigned int fe_type) const
Get the shape functions of a FE type for an element type and subdomain.
std::map< FEType, unsigned int > _fe_type_map
FE type ID map.
AssemblyHolder(const AssemblyHolder &holder)
Copy constructor.
Array2D< Array< Array2D< Real3 > > > _map_grad_psi_face
unsigned int _rz_radial_coord
Radial coordinate index in cylindrical coordinate system.
Array2D< Array< Array2D< Real > > > _map_phi_face
The Kokkos assembly class.
The Kokkos object that contains the information of an element The IDs used in Kokkos are different fr...
Assembly(FEProblemBase &problem)
Constructor.
Array2D< unsigned int > _n_qps_face
const unsigned int invalid_uint
KOKKOS_FUNCTION dof_id_type getQpOffset(ElementInfo info) const
Get the starting offset of quadrature points of an element into the global quadrature point index...
KOKKOS_FUNCTION const Assembly & kokkosAssembly() const
Get the const reference of the Kokkos assembly.
FEProblemBase & _problem
Reference of the MOOSE problem.
KOKKOS_FUNCTION unsigned int getNumQps(ElementInfo info) const
Get the number of quadrature points of an element.
Array3D< Array< Array2D< Real > > > _phi_face
Array< Array< Real > > _jxw
Array2D< dof_id_type > _qp_offset_face
KOKKOS_INLINE_FUNCTION Real33 inverse(const unsigned int dim=3) const
Array2D< Array< Array2D< Real > > > _normal_dx_deta
Array< dof_id_type > _n_subdomain_qps_face
KOKKOS_FUNCTION unsigned int getDimension() const
Get the mesh dimension.
KOKKOS_FUNCTION void operator()(const ThreadID tid) const
Kokkos function for caching physical maps on element quadrature points.
const unsigned int _dimension
Mesh dimension.
KOKKOS_FUNCTION const auto & getGradPhiFace(ContiguousSubdomainID subdomain, unsigned int elem_type, unsigned int fe_type) const
Get the gradient of face shape functions of a FE type for an element type and subdomain.
KOKKOS_FUNCTION const auto & getGradPhi(ContiguousSubdomainID subdomain, unsigned int elem_type, unsigned int fe_type) const
Get the gradient of shape functions of a FE type for an element type and subdomain.
unsigned int getFETypeID(FEType type) const
Get the FE type ID.
KOKKOS_FUNCTION unsigned int getNumDofs(unsigned int elem_type, unsigned int fe_type) const
Get the number of DOFs of a FE type for an element type.
Array2D< Array< Array< Real > > > _weights_face
The Kokkos interface that holds the host reference of the Kokkos mesh and copies it to device during ...
KOKKOS_FUNCTION Real coordTransformFactor(const ContiguousSubdomainID subdomain, const Real3 point) const
Get the coordinate transform factor for a point in a subdomain.
Array< unsigned int > _n_qps
Number of quadrature points.
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
Array2D< unsigned int > _n_dofs
Array2D< Array2D< Real > > _map_phi
Shape functions for computing reference-to-physical maps.
KOKKOS_INLINE_FUNCTION Real norm() const
KOKKOS_FUNCTION const auto & getPhiFace(ContiguousSubdomainID subdomain, unsigned int elem_type, unsigned int fe_type) const
Get the face shape functions of a FE type for an element type and subdomain.
void cachePhysicalMap()
Cache physical maps on element quadrature points.
Array2D< Array< Array2D< Real3 > > > _map_grad_phi_face
Array< Pair< Real3, Real3 > > _rz_axis
General axisymmetric axis of each subdomain in cylindrical coordinate system.
KOKKOS_FUNCTION unsigned int getNumNodes(unsigned int elem_type) const
Get the number of nodes of an element type.
KOKKOS_FUNCTION unsigned int getMaxQpsPerElem() const
Get the maximum number of quadrature points per element in the current partition. ...
MOOSE_KOKKOS_INDEX_TYPE ThreadID
Array2D< Array< Array2D< Real > > > _normal_dx_dxi
Shape functions for computing normal vectors.
Array< Array< Real33 > > _jacobian
Cached physical maps on element quadrature points.
Array2D< Array< Real3 > > _q_points
Quadrature points and weights for reference elements.
KOKKOS_INLINE_FUNCTION Real3 cross_product(const Real3 vector) const
Array3D< Array< Array2D< Real3 > > > _grad_phi_face
MooseMesh wraps a libMesh::Mesh object and enhances its capabilities by caching additional data and s...
The Kokkos interface that holds the host reference of the Kokkos assembly and copies it to device dur...
Array3D< Array2D< Real > > _phi
Shape functions for reference elements.
KOKKOS_INLINE_FUNCTION Real33 transpose() const
KOKKOS_FUNCTION dof_id_type getNumFaceQps(ContiguousSubdomainID subdomain) const
Get the total number of facial quadrature points in a subdomain NOTE: This number does not represent ...
unsigned int _max_qps_per_elem
Array2D< Array< Array< Real3 > > > _q_points_face
void initQuadrature()
Initialize quadrature data.
KOKKOS_FUNCTION Real3 getNodePoint(ContiguousNodeID node) const
Get the coordinate of a node.
Array3D< Array2D< Real3 > > _grad_phi
KOKKOS_FUNCTION Real getJxW(ElementInfo info, unsigned int qp) const
Get the transformed Jacobian weight of an element quadrature point.
KOKKOS_INLINE_FUNCTION Real determinant(const unsigned int dim=3) const
KOKKOS_FUNCTION dof_id_type getElemFacePropertySize(ContiguousSubdomainID subdomain) const
Get the size of element-constant face material property data storage of a subdomain.
KOKKOS_FUNCTION const Mesh & kokkosMesh() const
Get the const reference of the Kokkos mesh.
MooseMesh & _mesh
Reference of the MOOSE mesh.
const auto & getMaterialBoundaries() const
Get the list of boundaries to cache face material properties.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
KOKKOS_FUNCTION dof_id_type getQpFaceOffset(ElementInfo info, unsigned int side) const
Get the starting offset of quadrature points of a side of an element into the global quadrature point...
void initShape()
Initialize shape data.
CTSub CT_OPERATOR_BINARY CTMul CTCompareLess CTCompareGreater CTCompareEqual _arg template * sqrt(_arg)) *_arg.template D< dtag >()) CT_SIMPLE_UNARY_FUNCTION(tanh
Array2D< Array2D< Real3 > > _map_grad_phi
Array< dof_id_type > _qp_offset
Starting offset into the global quadrature point index NOTE: The global quadrature point index is sub...
KOKKOS_FUNCTION dof_id_type getNumQps(ContiguousSubdomainID subdomain) const
Get the total number of elemental quadrature points in a subdomain.
std::set< BoundaryID > _material_boundaries
Boundaries to cache face material properties.
Array< Moose::CoordinateSystemType > _coord_type
Coordinate system type of each subdomain.
Array< Array< Real3 > > _xyz
Array< dof_id_type > _n_subdomain_qps
Array2D< Array< Array2D< Real > > > _map_psi_face
KOKKOS_FUNCTION dof_id_type getElemFacePropertyIndex(ElementInfo info, unsigned int side) const
Get the index of a side of an element into the element-constant face material property data...
KOKKOS_INLINE_FUNCTION Real3 row(const unsigned int i) const
void init()
Initialize assembly.
AssemblyHolder(const Assembly &assembly)
Constructor.
const Assembly _assembly_device
Device copy of the Kokkos assembly.
Array< dof_id_type > _n_elem_face_properties
const Assembly & _assembly_host
Host reference of the Kokkos assembly.
Array2D< dof_id_type > _elem_face_property_idx
Index into the element-constant face material property data.
KOKKOS_FUNCTION Real33 getJacobian(ElementInfo info, unsigned int qp) const
Get the inverse of Jacobian matrix of an element quadrature point.
KOKKOS_FUNCTION void computePhysicalMap(const ElementInfo info, const unsigned int qp, Real33 *const jacobian, Real *const JxW, Real3 *const q_points) const
Compute physical transformation data for an element.
KOKKOS_FUNCTION unsigned int getNumFaceQps(ElementInfo info, unsigned int side) const
Get the number of quadrature points of a side of an element.
KOKKOS_FUNCTION Real3 getQPoint(ElementInfo info, unsigned int qp) const
Get the coordinate of an element quadrature point.