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 | getDimension () const |
Get the mesh dimension. 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 383 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 420 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 363 of file KokkosAssembly.h.
Referenced by computePhysicalMap().
|
inline |
Get the mesh dimension.
Definition at line 54 of file KokkosAssembly.h.
Referenced by Moose::Kokkos::Datum::J().
|
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 156 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 167 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 179 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 189 of file KokkosAssembly.h.
Referenced by Moose::Kokkos::Datum::reinitTransform().
|
inline |
Get the list of boundaries to cache face material properties.
Definition at line 250 of file KokkosAssembly.h.
|
inline |
Get the maximum number of quadrature points per element in the current partition.
Definition at line 59 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 120 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 82 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 92 of file KokkosAssembly.h.
|
inline |
Get the total number of elemental quadrature points in a subdomain.
subdomain | The contiguous subdomain ID |
Definition at line 65 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 74 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 132 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 144 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 110 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 102 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 199 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(), KokkosBoundNodalKernel< KokkosUpperBoundNodalKernel >::KokkosBoundNodalKernel(), Moose::Kokkos::IntegratedBC::operator()(), Moose::Kokkos::Kernel::operator()(), and Moose::Kokkos::Datum::q_point().
Kokkos function for caching physical maps on element quadrature points.
|
private |
Coordinate system type of each subdomain.
Definition at line 287 of file KokkosAssembly.h.
Referenced by coordTransformFactor().
|
private |
Mesh dimension.
Definition at line 283 of file KokkosAssembly.h.
Referenced by computePhysicalMap(), and getDimension().
|
private |
Definition at line 331 of file KokkosAssembly.h.
Referenced by getGradPhi().
Definition at line 332 of file KokkosAssembly.h.
Referenced by getGradPhiFace().
Cached physical maps on element quadrature points.
Definition at line 350 of file KokkosAssembly.h.
Referenced by getJacobian().
Definition at line 351 of file KokkosAssembly.h.
Referenced by getJxW().
Definition at line 342 of file KokkosAssembly.h.
Referenced by computePhysicalMap().
Definition at line 343 of file KokkosAssembly.h.
Referenced by computePhysicalMap().
Definition at line 344 of file KokkosAssembly.h.
Referenced by computePhysicalMap().
Shape functions for computing reference-to-physical maps.
Definition at line 339 of file KokkosAssembly.h.
Referenced by computePhysicalMap().
Definition at line 340 of file KokkosAssembly.h.
Referenced by computePhysicalMap().
Definition at line 341 of file KokkosAssembly.h.
|
private |
Boundaries to cache face material properties.
Definition at line 358 of file KokkosAssembly.h.
Referenced by getMaterialBoundaries().
|
private |
Definition at line 311 of file KokkosAssembly.h.
Referenced by getMaxQpsPerElem().
|
private |
Reference of the MOOSE mesh.
Definition at line 274 of file KokkosAssembly.h.
Definition at line 333 of file KokkosAssembly.h.
Referenced by getNumDofs().
Number of quadrature points.
Definition at line 308 of file KokkosAssembly.h.
Referenced by getNumQps().
Definition at line 309 of file KokkosAssembly.h.
Referenced by getNumFaceQps().
|
private |
Definition at line 313 of file KokkosAssembly.h.
Referenced by getNumQps().
|
private |
Definition at line 314 of file KokkosAssembly.h.
Referenced by getNumFaceQps().
Shape functions for reference elements.
Definition at line 329 of file KokkosAssembly.h.
Referenced by getPhi().
Definition at line 330 of file KokkosAssembly.h.
Referenced by getPhiFace().
|
private |
Reference of the MOOSE problem.
Definition at line 270 of file KokkosAssembly.h.
Quadrature points and weights for reference elements.
Definition at line 320 of file KokkosAssembly.h.
Definition at line 321 of file KokkosAssembly.h.
|
private |
Starting offset into the global quadrature point index.
Definition at line 301 of file KokkosAssembly.h.
Referenced by getQpOffset().
|
private |
Definition at line 302 of file KokkosAssembly.h.
Referenced by getQpFaceOffset().
General axisymmetric axis of each subdomain in cylindrical coordinate system.
Definition at line 295 of file KokkosAssembly.h.
Referenced by coordTransformFactor().
|
private |
Radial coordinate index in cylindrical coordinate system.
Definition at line 291 of file KokkosAssembly.h.
Referenced by coordTransformFactor().
Definition at line 322 of file KokkosAssembly.h.
Referenced by computePhysicalMap().
Definition at line 323 of file KokkosAssembly.h.
Referenced by computePhysicalMap().
Definition at line 352 of file KokkosAssembly.h.
Referenced by getQPoint().