16 #include "libmesh/elem_range.h" 17 #include "libmesh/fe_base.h" 18 #include "libmesh/fe_type.h" 43 #ifdef MOOSE_KOKKOS_SCOPE 115 KOKKOS_FUNCTION
unsigned int getNumDofs(
unsigned int elem_type,
unsigned int fe_type)
const 117 return _n_dofs(elem_type, fe_type);
126 KOKKOS_FUNCTION
const auto &
129 return _phi(subdomain, elem_type, fe_type);
138 KOKKOS_FUNCTION
const auto &
141 return _phi_face(subdomain, elem_type, fe_type);
150 KOKKOS_FUNCTION
const auto &
153 return _grad_phi(subdomain, elem_type, fe_type);
163 unsigned int elem_type,
164 unsigned int fe_type)
const 216 const unsigned int qp,
219 Real3 *
const q_points)
const;
230 const unsigned int side,
231 const unsigned int qp,
234 Real3 *
const q_points)
const;
356 #ifdef MOOSE_KOKKOS_SCOPE 357 KOKKOS_FUNCTION
inline Real 377 KOKKOS_FUNCTION
inline void 379 const unsigned int qp,
382 Real3 *
const q_points)
const 384 auto sid =
info.subdomain;
386 auto elem_type =
info.type;
389 auto & phi =
_map_phi(sid, elem_type);
395 for (
unsigned int node = 0; node < num_nodes; ++node)
400 J += grad_phi(node, qp).cartesian_product(points);
402 xyz += phi(node, qp) * points;
414 KOKKOS_FUNCTION
inline void 416 const unsigned int side,
417 const unsigned int qp,
420 Real3 *
const q_points)
const 422 auto sid =
info.subdomain;
424 auto elem_type =
info.type;
434 for (
unsigned int node = 0; node < num_nodes; ++node)
439 J += grad_phi(node, qp).cartesian_product(points);
442 xyz += phi(node, qp) * points;
456 for (
unsigned int node = 0; node < num_side_nodes; ++node)
460 J += grad_psi(node, qp).cartesian_product(points);
493 #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
Array< dof_id_type > _n_subdomain_qps_face
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_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. ...
Array< Array< Real33 > > _jacobian
Cached physical maps on element quadrature points.
Array2D< Array< Real3 > > _q_points
Quadrature points and weights for reference elements.
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_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_INLINE_FUNCTION Real33 transpose()
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_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...
KOKKOS_INLINE_FUNCTION Real determinant(const unsigned int dim=3)
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.
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
MOOSE now contains C++17 code, so give a reasonable error message stating what the user can do to add...
Array< dof_id_type > _n_subdomain_qps
Array2D< Array< Array2D< Real > > > _map_psi_face
void init()
Initialize assembly.
AssemblyHolder(const Assembly &assembly)
Constructor.
const Assembly _assembly_device
Device copy of the Kokkos assembly.
const Assembly & _assembly_host
Host reference of the Kokkos assembly.
KOKKOS_INLINE_FUNCTION Real33 inverse(const unsigned int dim=3)
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.