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
197 KOKKOS_FUNCTION
const auto &
210 unsigned int elem_type,
211 unsigned int fe_type)
const
223 unsigned int elem_type,
224 unsigned int fe_type)
const
236 unsigned int elem_type,
237 unsigned int fe_type)
const
288 const Real3 point)
const;
298 const unsigned int qp,
301 Real3 *
const q_points)
const;
313 const unsigned int side,
314 const unsigned int qp,
317 Real3 *
const q_points,
318 Real3 *
const normal)
const;
460#ifdef MOOSE_KOKKOS_SCOPE
461KOKKOS_FUNCTION
inline Real
471 (point -
_rz_axis[subdomain].first).cross_product(
_rz_axis[subdomain].second).norm();
475 return 4 * M_PI * point(0) * point(0);
481KOKKOS_FUNCTION
inline void
483 const unsigned int qp,
486 Real3 *
const q_points)
const
488 auto sid = info.subdomain;
490 auto elem_type = info.type;
493 auto & phi =
_map_phi(sid, elem_type);
499 for (
unsigned int node = 0; node < num_nodes; ++node)
504 J += grad_phi(node, qp).cartesian_product(points);
506 xyz += phi(node, qp) * points;
520KOKKOS_FUNCTION
inline void
522 const unsigned int side,
523 const unsigned int qp,
526 Real3 *
const q_points,
527 Real3 *
const normal)
const
529 auto sid = info.subdomain;
531 auto elem_type = info.type;
547 for (
unsigned int node = 0; node < num_nodes; ++node)
552 J += grad_phi(node, qp).cartesian_product(points);
555 xyz += phi(node, qp) * points;
560 dxyz_dxi += normal_dx_dxi(node, qp) * points;
562 dxyz_deta += normal_dx_deta(node, qp) * points;
578 for (
unsigned int node = 0; node < num_side_nodes; ++node)
582 J += grad_psi(node, qp).cartesian_product(points);
597 *normal = side ? dxyz_dxi : -dxyz_dxi;
599 *normal *= 1.0 / normal->
norm();
628#ifdef MOOSE_KOKKOS_SCOPE
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
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...
const Assembly _assembly_device
Device copy of the Kokkos assembly.
AssemblyHolder(const AssemblyHolder &holder)
Copy constructor.
KOKKOS_FUNCTION const Assembly & kokkosAssembly() const
Get the const reference of the Kokkos assembly.
AssemblyHolder(const Assembly &assembly)
Constructor.
const Assembly & _assembly_host
Host reference of the Kokkos assembly.
The Kokkos assembly class.
Array2D< Array< Array2D< Real > > > _normal_dx_deta
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 ...
KOKKOS_FUNCTION dof_id_type getElemFacePropertySize(ContiguousSubdomainID subdomain) const
Get the size of element-constant face material property data storage of a subdomain.
Array< dof_id_type > _n_elem_face_properties
Array2D< Array< Array< Real > > > _weights_face
void init()
Initialize assembly.
Array3D< Array< Array2D< Real3 > > > _grad_phi_face
KOKKOS_FUNCTION const auto & getVectorPhiFace(ContiguousSubdomainID subdomain, unsigned int elem_type, unsigned int fe_type) const
Get the face vector shape functions of a FE type for an element type and subdomain.
Array3D< Array2D< Real33 > > _vector_grad_phi
Array2D< Array< Array< Real3 > > > _q_points_face
Array< Pair< Real3, Real3 > > _rz_axis
General axisymmetric axis of each subdomain in cylindrical coordinate system.
MooseMesh & _mesh
Reference of the MOOSE mesh.
Array3D< Array< Array2D< Real33 > > > _vector_grad_phi_face
Array2D< Array2D< Real3 > > _map_grad_phi
Array3D< Array2D< Real3 > > _grad_phi
Array3D< Array< Array2D< Real > > > _phi_face
std::map< FEType, unsigned int > _fe_type_map
FE type ID map.
Array2D< Array< Real3 > > _q_points
Quadrature points and weights for reference elements.
Array< Moose::CoordinateSystemType > _coord_type
Coordinate system type of each subdomain.
void cachePhysicalMap()
Cache physical maps on element quadrature points.
const auto & getMaterialBoundaries() const
Get the list of boundaries to cache face material properties.
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.
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_FUNCTION unsigned int getMaxQpsPerElem() const
Get the maximum number of quadrature points per element in the current partition.
Array2D< Array2D< Real > > _map_phi
Shape functions for computing reference-to-physical maps.
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.
Assembly(FEProblemBase &problem)
Constructor.
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.
KOKKOS_FUNCTION void operator()(const ThreadID tid) const
Kokkos function for caching physical maps on element quadrature points.
void initQuadrature()
Initialize quadrature data.
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.
unsigned int getFETypeID(FEType type) const
Get the FE type ID.
Array2D< unsigned int > _n_dofs
Array< bool > _is_vector_fe_type
unsigned int _max_qps_per_elem
Array< dof_id_type > _n_subdomain_qps
Array2D< dof_id_type > _elem_face_property_idx
Index into the element-constant face material property data.
KOKKOS_FUNCTION Real getJxW(ElementInfo info, unsigned int qp) const
Get the transformed Jacobian weight of an element quadrature point.
Array2D< dof_id_type > _qp_offset_face
const unsigned int _dimension
Mesh dimension.
KOKKOS_FUNCTION const auto & getVectorGradPhi(ContiguousSubdomainID subdomain, unsigned int elem_type, unsigned int fe_type) const
Get the gradient of vector shape functions of a FE type for an element type and subdomain.
Array2D< Array< Array2D< Real3 > > > _map_grad_phi_face
Array2D< Array< Array2D< Real > > > _map_phi_face
KOKKOS_FUNCTION unsigned int getDimension() const
Get the mesh dimension.
KOKKOS_FUNCTION const auto & getVectorPhi(ContiguousSubdomainID subdomain, unsigned int elem_type, unsigned int fe_type) const
Get the vector shape functions of a FE type for an element type and subdomain.
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.
Array2D< Array< Real > > _weights
Array< Array< Real > > _jxw
FEProblemBase & _problem
Reference of the MOOSE problem.
Array2D< Array< Array2D< Real > > > _normal_dx_dxi
Shape functions for computing normal vectors.
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 unsigned int getNumQps(ElementInfo info) const
Get the number of quadrature points of an element.
Array2D< Array< Array2D< Real3 > > > _map_grad_psi_face
Array3D< Array2D< Real3 > > _vector_phi
Array3D< Array2D< Real > > _phi
Shape functions for reference elements.
KOKKOS_FUNCTION dof_id_type getNumQps(ContiguousSubdomainID subdomain) const
Get the total number of elemental quadrature points in a subdomain.
Array< Array< Real33 > > _jacobian
Cached physical maps on element quadrature points.
KOKKOS_FUNCTION Real33 getJacobian(ElementInfo info, unsigned int qp) const
Get the inverse of Jacobian matrix of an element quadrature point.
Array2D< unsigned int > _n_qps_face
Array< unsigned int > _n_qps
Number of quadrature points.
KOKKOS_FUNCTION const auto & getVectorGradPhiFace(ContiguousSubdomainID subdomain, unsigned int elem_type, unsigned int fe_type) const
Get the gradient of face vector shape functions of a FE type for an element type and subdomain.
Array2D< Array< Array2D< Real > > > _map_psi_face
Array3D< Array< Array2D< Real3 > > > _vector_phi_face
std::set< BoundaryID > _material_boundaries
Boundaries to cache face material properties.
void initShape()
Initialize shape data.
KOKKOS_FUNCTION bool isVectorFEType(unsigned int fe_type) const
Get whether a cached FE type is vector-valued.
KOKKOS_FUNCTION Real coordTransformFactor(const ContiguousSubdomainID subdomain, const Real3 point) const
Get the coordinate transform factor for a point in a subdomain.
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...
Array< dof_id_type > _qp_offset
Starting offset into the global quadrature point index NOTE: The global quadrature point index is sub...
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.
unsigned int _rz_radial_coord
Radial coordinate index in cylindrical coordinate system.
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.
Array< dof_id_type > _n_subdomain_qps_face
KOKKOS_FUNCTION Real3 getQPoint(ElementInfo info, unsigned int qp) const
Get the coordinate of an element quadrature point.
Array< Array< Real3 > > _xyz
The Kokkos interface that holds the host reference of the Kokkos mesh and copies it to device during ...
KOKKOS_FUNCTION const Mesh & kokkosMesh() const
Get the const reference of the Kokkos mesh.
KOKKOS_FUNCTION unsigned int getNumNodes(unsigned int elem_type) const
Get the number of nodes of an element type.
KOKKOS_FUNCTION Real3 getNodePoint(ContiguousNodeID node) const
Get the coordinate of a node.
MOOSE_KOKKOS_INDEX_TYPE ThreadID
const unsigned int invalid_uint
The Kokkos object that contains the information of an element The IDs used in Kokkos are different fr...
KOKKOS_INLINE_FUNCTION Real determinant(const unsigned int dim=3) const
KOKKOS_INLINE_FUNCTION Real33 inverse(const unsigned int dim=3) const
KOKKOS_INLINE_FUNCTION Real33 transpose() const
KOKKOS_INLINE_FUNCTION Real3 row(const unsigned int i) const
KOKKOS_INLINE_FUNCTION Real norm() const
KOKKOS_INLINE_FUNCTION Real3 cross_product(const Real3 vector) const