The Kokkos assembly class. More...
#include <KokkosAssembly.h>
Public Member Functions | |
Assembly (FEProblemBase &problem) | |
Constructor. More... | |
void | init () |
Initialize assembly. More... | |
unsigned int | getFETypeID (FEType type) const |
Get the FE type ID. More... | |
KOKKOS_FUNCTION unsigned int | getMaxQpsPerElem () const |
Get the maximum number of quadrature points per element in the current partition. More... | |
KOKKOS_FUNCTION dof_id_type | getNumQps (ContiguousSubdomainID subdomain) const |
Get the total number of elemental quadrature points in a subdomain. More... | |
KOKKOS_FUNCTION unsigned int | getNumQps (ElementInfo info) const |
Get the number of quadrature points of an element. More... | |
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 the real number of facial quadrature points but only counts the facial quadrature points that need global caching, such as face material properties. More... | |
KOKKOS_FUNCTION unsigned int | getNumFaceQps (ElementInfo info, unsigned int side) const |
Get the number of quadrature points of a side of an element. More... | |
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. More... | |
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 index. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
KOKKOS_FUNCTION Real33 | getJacobian (ElementInfo info, unsigned int qp) const |
Get the inverse of Jacobian matrix of an element quadrature point. More... | |
KOKKOS_FUNCTION Real | getJxW (ElementInfo info, unsigned int qp) const |
Get the transformed Jacobian weight of an element quadrature point. More... | |
KOKKOS_FUNCTION Real3 | getQPoint (ElementInfo info, unsigned int qp) const |
Get the coordinate of an element quadrature point. More... | |
KOKKOS_FUNCTION Real | coordTransformFactor (const ContiguousSubdomainID subdomain, const Real3 point) const |
Get the coordinate transform factor for a point in a subdomain. More... | |
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. More... | |
KOKKOS_FUNCTION void | computePhysicalMap (const ElementInfo info, const unsigned int side, const unsigned int qp, Real33 *const jacobian, Real *const JxW, Real3 *const q_points) const |
Compute physical transformation data for a side. More... | |
KOKKOS_FUNCTION void | operator() (const ThreadID tid) const |
Kokkos function for caching physical maps on element quadrature points. More... | |
const auto & | getMaterialBoundaries () const |
Get the list of boundaries to cache face material properties. More... | |
KOKKOS_FUNCTION const Mesh & | kokkosMesh () const |
Get the const reference of the Kokkos mesh. More... | |
Private Member Functions | |
void | initQuadrature () |
Initialize quadrature data. More... | |
void | initShape () |
Initialize shape data. More... | |
void | cachePhysicalMap () |
Cache physical maps on element quadrature points. More... | |
Private Attributes | |
FEProblemBase & | _problem |
Reference of the MOOSE problem. More... | |
MooseMesh & | _mesh |
Reference of the MOOSE mesh. More... | |
std::map< FEType, unsigned int > | _fe_type_map |
FE type ID map. More... | |
const unsigned int | _dimension |
Mesh dimension. More... | |
Array< Moose::CoordinateSystemType > | _coord_type |
Coordinate system type of each subdomain. More... | |
unsigned int | _rz_radial_coord = libMesh::invalid_uint |
Radial coordinate index in cylindrical coordinate system. More... | |
Array< Pair< Real3, Real3 > > | _rz_axis |
General axisymmetric axis of each subdomain in cylindrical coordinate system. More... | |
std::set< BoundaryID > | _material_boundaries |
Boundaries to cache face material properties. More... | |
Array< dof_id_type > | _qp_offset |
Starting offset into the global quadrature point index. More... | |
Array2D< dof_id_type > | _qp_offset_face |
Array< unsigned int > | _n_qps |
Number of quadrature points. More... | |
Array2D< unsigned int > | _n_qps_face |
unsigned int | _max_qps_per_elem = 0 |
Array< dof_id_type > | _n_subdomain_qps |
Array< dof_id_type > | _n_subdomain_qps_face |
Array2D< Array< Real3 > > | _q_points |
Quadrature points and weights for reference elements. More... | |
Array2D< Array< Array< Real3 > > > | _q_points_face |
Array2D< Array< Real > > | _weights |
Array2D< Array< Array< Real > > > | _weights_face |
Array3D< Array2D< Real > > | _phi |
Shape functions for reference elements. More... | |
Array3D< Array< Array2D< Real > > > | _phi_face |
Array3D< Array2D< Real3 > > | _grad_phi |
Array3D< Array< Array2D< Real3 > > > | _grad_phi_face |
Array2D< unsigned int > | _n_dofs |
Array2D< Array2D< Real > > | _map_phi |
Shape functions for computing reference-to-physical maps. More... | |
Array2D< Array< Array2D< Real > > > | _map_phi_face |
Array2D< Array< Array2D< Real > > > | _map_psi_face |
Array2D< Array2D< Real3 > > | _map_grad_phi |
Array2D< Array< Array2D< Real3 > > > | _map_grad_phi_face |
Array2D< Array< Array2D< Real3 > > > | _map_grad_psi_face |
Array< Array< Real33 > > | _jacobian |
Cached physical maps on element quadrature points. More... | |
Array< Array< Real > > | _jxw |
Array< Array< Real3 > > | _xyz |
The Kokkos assembly class.
Definition at line 30 of file KokkosAssembly.h.
Moose::Kokkos::Assembly::Assembly | ( | FEProblemBase & | problem | ) |
Constructor.
problem | The MOOSE problem |
|
private |
Cache physical maps on element quadrature points.
|
inline |
Compute physical transformation data for an element.
info | The element information object |
qp | The local quadrature point index |
jacobian | The pointer to store the inverse of Jacobian matrix |
JxW | The pointer to store transformed Jacobian weight |
q_points | The pointer to store physical quadrature point coordinate |
Definition at line 378 of file KokkosAssembly.h.
Referenced by Moose::Kokkos::Datum::reinitTransform().
|
inline |
Compute physical transformation data for a side.
info | The element information object |
side | The side index |
qp | The local quadrature point index |
jacobian | The pointer to store the inverse of Jacobian matrix |
JxW | The pointer to store transformed Jacobian weight |
q_points | The pointer to store physical quadrature point coordinate |
Definition at line 415 of file KokkosAssembly.h.
|
inline |
Get the coordinate transform factor for a point in a subdomain.
subdomain | The contiguous subdomain ID |
point | The point coordinate |
Definition at line 358 of file KokkosAssembly.h.
Referenced by computePhysicalMap().
|
inline |
Get the FE type ID.
type | The libMesh FEType object |
Definition at line 49 of file KokkosAssembly.h.
|
inline |
Get the gradient of shape functions of a FE type for an element type and subdomain.
subdomain | The contiguous subdomain ID |
elem_type | The element type ID |
fe_type | The FE type ID |
Definition at line 151 of file KokkosAssembly.h.
Referenced by Moose::Kokkos::VariablePhiGradient::operator()(), and Moose::Kokkos::VariableTestGradient::operator()().
|
inline |
Get the gradient of face shape functions of a FE type for an element type and subdomain.
subdomain | The contiguous subdomain ID |
elem_type | The element type ID |
fe_type | The FE type ID |
Definition at line 162 of file KokkosAssembly.h.
Referenced by Moose::Kokkos::System::getVectorQpGradFace(), Moose::Kokkos::VariablePhiGradient::operator()(), and Moose::Kokkos::VariableTestGradient::operator()().
|
inline |
Get the inverse of Jacobian matrix of an element quadrature point.
info | The element information object |
qp | The local quadrature point index |
Definition at line 174 of file KokkosAssembly.h.
Referenced by Moose::Kokkos::Datum::reinitTransform().
|
inline |
Get the transformed Jacobian weight of an element quadrature point.
info | The element information object |
qp | The local quadrature point index |
Definition at line 184 of file KokkosAssembly.h.
Referenced by Moose::Kokkos::Datum::reinitTransform().
|
inline |
Get the list of boundaries to cache face material properties.
Definition at line 245 of file KokkosAssembly.h.
|
inline |
Get the maximum number of quadrature points per element in the current partition.
Definition at line 54 of file KokkosAssembly.h.
|
inline |
Get the number of DOFs of a FE type for an element type.
elem_type | The element type ID |
fe_type | The FE type ID |
Definition at line 115 of file KokkosAssembly.h.
Referenced by Moose::Kokkos::System::getVectorQpGradFace(), and Moose::Kokkos::System::getVectorQpValueFace().
|
inline |
Get the total number of facial quadrature points in a subdomain Note: this number does not represent the real number of facial quadrature points but only counts the facial quadrature points that need global caching, such as face material properties.
subdomain | The contiguous subdomain ID |
Definition at line 77 of file KokkosAssembly.h.
Referenced by Moose::Kokkos::MaterialProperty< T, dimension >::allocate().
|
inline |
Get the number of quadrature points of a side of an element.
info | The element information object |
side | The side index |
Definition at line 87 of file KokkosAssembly.h.
|
inline |
Get the total number of elemental quadrature points in a subdomain.
subdomain | The contiguous subdomain ID |
Definition at line 60 of file KokkosAssembly.h.
Referenced by Moose::Kokkos::MaterialProperty< T, dimension >::allocate().
|
inline |
Get the number of quadrature points of an element.
info | The element information object |
Definition at line 69 of file KokkosAssembly.h.
|
inline |
Get the shape functions of a FE type for an element type and subdomain.
subdomain | The contiguous subdomain ID |
elem_type | The element type ID |
fe_type | The FE type ID |
Definition at line 127 of file KokkosAssembly.h.
Referenced by Moose::Kokkos::VariablePhiValue::operator()(), and Moose::Kokkos::VariableTestValue::operator()().
|
inline |
Get the face shape functions of a FE type for an element type and subdomain.
subdomain | The contiguous subdomain ID |
elem_type | The element type ID |
fe_type | The FE type ID |
Definition at line 139 of file KokkosAssembly.h.
Referenced by Moose::Kokkos::System::getVectorQpValueFace(), Moose::Kokkos::VariablePhiValue::operator()(), and Moose::Kokkos::VariableTestValue::operator()().
|
inline |
Get the starting offset of quadrature points of a side of an element into the global quadrature point index.
info | The element information object |
side | The side index |
Definition at line 105 of file KokkosAssembly.h.
|
inline |
Get the starting offset of quadrature points of an element into the global quadrature point index.
info | The element information object |
Definition at line 97 of file KokkosAssembly.h.
Referenced by getJacobian(), getJxW(), and getQPoint().
|
inline |
Get the coordinate of an element quadrature point.
info | The element information object |
qp | The local quadrature point index |
Definition at line 194 of file KokkosAssembly.h.
Referenced by Moose::Kokkos::Datum::reinitTransform().
void Moose::Kokkos::Assembly::init | ( | ) |
Initialize assembly.
|
private |
Initialize quadrature data.
|
private |
Initialize shape data.
|
inlineinherited |
Get the const reference of the Kokkos mesh.
Definition at line 360 of file KokkosMesh.h.
Referenced by computePhysicalMap().
Kokkos function for caching physical maps on element quadrature points.
|
private |
Coordinate system type of each subdomain.
Definition at line 282 of file KokkosAssembly.h.
Referenced by coordTransformFactor().
|
private |
Mesh dimension.
Definition at line 278 of file KokkosAssembly.h.
Referenced by computePhysicalMap().
|
private |
Definition at line 326 of file KokkosAssembly.h.
Referenced by getGradPhi().
Definition at line 327 of file KokkosAssembly.h.
Referenced by getGradPhiFace().
Cached physical maps on element quadrature points.
Definition at line 345 of file KokkosAssembly.h.
Referenced by getJacobian().
Definition at line 346 of file KokkosAssembly.h.
Referenced by getJxW().
Definition at line 337 of file KokkosAssembly.h.
Referenced by computePhysicalMap().
Definition at line 338 of file KokkosAssembly.h.
Referenced by computePhysicalMap().
Definition at line 339 of file KokkosAssembly.h.
Referenced by computePhysicalMap().
Shape functions for computing reference-to-physical maps.
Definition at line 334 of file KokkosAssembly.h.
Referenced by computePhysicalMap().
Definition at line 335 of file KokkosAssembly.h.
Referenced by computePhysicalMap().
Definition at line 336 of file KokkosAssembly.h.
|
private |
Boundaries to cache face material properties.
Definition at line 353 of file KokkosAssembly.h.
Referenced by getMaterialBoundaries().
|
private |
Definition at line 306 of file KokkosAssembly.h.
Referenced by getMaxQpsPerElem().
|
private |
Reference of the MOOSE mesh.
Definition at line 269 of file KokkosAssembly.h.
Definition at line 328 of file KokkosAssembly.h.
Referenced by getNumDofs().
Number of quadrature points.
Definition at line 303 of file KokkosAssembly.h.
Referenced by getNumQps().
Definition at line 304 of file KokkosAssembly.h.
Referenced by getNumFaceQps().
|
private |
Definition at line 308 of file KokkosAssembly.h.
Referenced by getNumQps().
|
private |
Definition at line 309 of file KokkosAssembly.h.
Referenced by getNumFaceQps().
Shape functions for reference elements.
Definition at line 324 of file KokkosAssembly.h.
Referenced by getPhi().
Definition at line 325 of file KokkosAssembly.h.
Referenced by getPhiFace().
|
private |
Reference of the MOOSE problem.
Definition at line 265 of file KokkosAssembly.h.
Quadrature points and weights for reference elements.
Definition at line 315 of file KokkosAssembly.h.
Definition at line 316 of file KokkosAssembly.h.
|
private |
Starting offset into the global quadrature point index.
Definition at line 296 of file KokkosAssembly.h.
Referenced by getQpOffset().
|
private |
Definition at line 297 of file KokkosAssembly.h.
Referenced by getQpFaceOffset().
General axisymmetric axis of each subdomain in cylindrical coordinate system.
Definition at line 290 of file KokkosAssembly.h.
Referenced by coordTransformFactor().
|
private |
Radial coordinate index in cylindrical coordinate system.
Definition at line 286 of file KokkosAssembly.h.
Referenced by coordTransformFactor().
Definition at line 317 of file KokkosAssembly.h.
Referenced by computePhysicalMap().
Definition at line 318 of file KokkosAssembly.h.
Referenced by computePhysicalMap().
Definition at line 347 of file KokkosAssembly.h.
Referenced by getQPoint().