#include <KokkosSideReducer.h>
Public Types | |
| enum | TEST_TYPE { ALL , ANY } |
| A flag changing the behavior of hasBoundary. More... | |
Public Member Functions | |
| SideReducer (const MooseObject *moose_object) | |
| SideReducer (const SideReducer &object) | |
| Copy constructor for parallel dispatch. | |
| virtual ThreadID | numReducerThreads () const override |
| Get the number of threads. | |
| template<typename Derived > | |
| KOKKOS_FUNCTION void | operator() (ReducerLoop, const ThreadID tid, const Derived &reducer, Real *result) const |
| The parallel computation entry function called by Kokkos. | |
| KOKKOS_FUNCTION const Mesh & | kokkosMesh () const |
| Get the const reference of the Kokkos mesh. | |
| KOKKOS_FUNCTION const Assembly & | kokkosAssembly () const |
| Get the const reference of the Kokkos assembly. | |
| virtual const std::set< BoundaryID > & | boundaryIDs () const |
| Return the boundary IDs for this object. | |
| const std::vector< BoundaryName > & | boundaryNames () const |
| Return the boundary names for this object. | |
| unsigned int | numBoundaryIDs () const |
| Return the number of boundaries for this object. | |
| bool | hasBoundary (const BoundaryName &name) const |
| Test if the supplied boundary name is valid for this object. | |
| bool | hasBoundary (const std::vector< BoundaryName > &names) const |
| Test if the supplied vector of boundary names are valid for this object. | |
| bool | hasBoundary (const BoundaryID &id) const |
| Test if the supplied boundary ids are valid for this object. | |
| bool | hasBoundary (const std::vector< BoundaryID > &ids, TEST_TYPE type=ALL) const |
| Test if the supplied vector boundary ids are valid for this object. | |
| bool | hasBoundary (const std::set< BoundaryID > &ids, TEST_TYPE type=ALL) const |
| Test if the supplied set of boundary ids are valid for this object. | |
| bool | isBoundarySubset (const std::set< BoundaryID > &ids) const |
| Test if the class boundary ids are a subset of the supplied objects. | |
| bool | isBoundarySubset (const std::vector< BoundaryID > &ids) const |
| template<typename T , bool is_ad = false> | |
| bool | hasBoundaryMaterialProperty (const std::string &prop_name) const |
| Check if a material property is valid for all boundaries of this object. | |
| virtual bool | boundaryRestricted () const |
| Returns true if this object has been restricted to a boundary. | |
| const std::set< BoundaryID > & | meshBoundaryIDs () const |
| Returns the set of all boundary ids for the entire mesh. | |
| virtual bool | checkVariableBoundaryIntegrity () const |
| Whether integrity/coverage checking should be conducted for moose variables used in this object. | |
| template<typename Derived > | |
| KOKKOS_FUNCTION void | reduce (Datum &, Real *) const |
| Default methods to prevent compile errors even when these methods were not defined in the derived class. | |
| template<typename Derived > | |
| KOKKOS_FUNCTION void | join (Real *, const Real *) const |
| template<typename Derived > | |
| KOKKOS_FUNCTION void | init (Real *) const |
Static Public Member Functions | |
| static InputParameters | validParams () |
| template<typename Derived > | |
| static auto | defaultReduce () |
| Function used to check if users have overriden the hook method. | |
| static bool | restricted (const std::set< BoundaryID > &ids) |
| Helper for determining if the object is boundary restricted. | |
Protected Member Functions | |
| virtual void | computeReducer () |
| Dispatch reduction operation. | |
| void | allocateReductionBuffer (const unsigned int size) |
| Allocate reduction buffer. | |
| bool | hasBoundaryMaterialPropertyHelper (const std::string &prop_name) const |
| A helper method to avoid circular #include problems. | |
| KOKKOS_FUNCTION dof_id_type | numKokkosBoundaryNodes () const |
| Get the number of nodes this Kokkos object is operating on. | |
| KOKKOS_FUNCTION dof_id_type | numKokkosBoundarySides () const |
| Get the number of sides this Kokkos object is operating on. | |
| KOKKOS_FUNCTION ContiguousNodeID | kokkosBoundaryNodeID (Moose::Kokkos::ThreadID tid) const |
| Get the contiguous node ID this Kokkos thread is operating on. | |
| KOKKOS_FUNCTION auto | kokkosBoundaryElementSideID (Moose::Kokkos::ThreadID tid) const |
| Get the contiguous element ID - side index pair this Kokkos thread is operating on. | |
Protected Attributes | |
| const MooseObject * | _reducer_object |
| MOOSE object. | |
| std::unique_ptr< DispatcherBase > | _reducer_dispatcher |
| Kokkos functor dispatcher. | |
| ::Kokkos::View< Real *, ::Kokkos::HostSpace > | _reduction_buffer |
| Reduction buffer. | |
Private Member Functions | |
| void | initializeBoundaryRestrictable () |
| An initialization routine needed for dual constructors. | |
| void | initializeKokkosBoundaryRestrictable () |
Private Attributes | |
| const Mesh & | _mesh_host |
| Host reference of the Kokkos mesh. | |
| const Mesh | _mesh_device |
| Device copy of the Kokkos mesh. | |
| const Assembly & | _assembly_host |
| Host reference of the Kokkos assembly. | |
| const Assembly | _assembly_device |
| Device copy of the Kokkos assembly. | |
| FEProblemBase * | _bnd_feproblem |
| Pointer to FEProblemBase. | |
| MooseMesh * | _bnd_mesh |
| Point to mesh. | |
| std::set< BoundaryID > | _bnd_ids |
| Set of the boundary ids. | |
| std::vector< BoundaryID > | _vec_ids |
| Vector of the boundary ids. | |
| std::vector< BoundaryName > | _boundary_names |
| Vector the the boundary names. | |
| const bool | _bnd_dual_restrictable |
| Flag for allowing dual restriction with BlockRestrictable. | |
| const std::set< SubdomainID > | _empty_block_ids |
| An empty set for referencing when block_ids is not included. | |
| const std::set< SubdomainID > & | _block_ids |
| Reference to the block_ids, defaults to an empty set if not provided. | |
| THREAD_ID | _bnd_tid |
| Thread id for this object. | |
| const MaterialData & | _bnd_material_data |
| Pointer to MaterialData for boundary (. | |
| bool | _bnd_nodal |
| Whether or not this object is restricted to nodesets. | |
| const MooseObject & | _moose_object |
| The moose object that this is an interface for. | |
| Moose::Kokkos::Array< ContiguousNodeID > | _kokkos_node_ids |
| List of contiguous node IDs this Kokkos object is operating on. | |
| Moose::Kokkos::Array< Moose::Kokkos::Pair< ContiguousElementID, unsigned int > > | _kokkos_element_side_ids |
| List of contiguous element ID - side index pairs this Kokkos object is operating on. | |
Definition at line 19 of file KokkosSideReducer.h.
|
inherited |
A flag changing the behavior of hasBoundary.
| Enumerator | |
|---|---|
| ALL | |
| ANY | |
Definition at line 33 of file BoundaryRestrictable.h.
| Moose::Kokkos::SideReducer::SideReducer | ( | const MooseObject * | moose_object | ) |
| Moose::Kokkos::SideReducer::SideReducer | ( | const SideReducer & | object | ) |
Copy constructor for parallel dispatch.
|
inlineprotectedinherited |
Allocate reduction buffer.
Definition at line 89 of file KokkosReducerBase.h.
|
virtualinherited |
Return the boundary IDs for this object.
Definition at line 224 of file BoundaryRestrictable.C.
Referenced by SideUserObject::checkNoInterfaceMaterialPropertyDependencies(), MaterialBase::getGenericZeroMaterialPropertyByName(), BoundaryRestrictable::hasBoundaryMaterialPropertyHelper(), SidesetInfoVectorPostprocessor::initialize(), BoundaryLinearFVFluxIntegral::initialSetup(), SideFVFluxBCIntegral::initialSetup(), InterfaceQpUserObjectBase::initialSetup(), and MaterialBase::registerPropName().
|
inherited |
Return the boundary names for this object.
Definition at line 230 of file BoundaryRestrictable.C.
Referenced by MaterialOutputAction::getParams(), NearestNodeDistanceAux::NearestNodeDistanceAux(), and NearestNodeValueAux::NearestNodeValueAux().
|
virtualinherited |
Returns true if this object has been restricted to a boundary.
Definition at line 242 of file BoundaryRestrictable.C.
Referenced by Moose::Kokkos::Material::checkMaterialProperty(), Material::checkMaterialProperty(), MaterialOutputAction::getParams(), DerivativeMaterialInterface< T >::haveMaterialProperty(), and NodePositions::initialize().
|
inlinevirtualinherited |
Whether integrity/coverage checking should be conducted for moose variables used in this object.
This should return true if variables are only evaluated locally, e.g. on the current node or element. This should return false if evaluation of this object entails non-local variable evaluations
Definition at line 190 of file BoundaryRestrictable.h.
|
protectedvirtualinherited |
Dispatch reduction operation.
|
inlinestaticinherited |
Function used to check if users have overriden the hook method.
Definition at line 71 of file KokkosReducerBase.h.
|
inherited |
Test if the supplied boundary ids are valid for this object.
| id | A BoundaryID to check |
Definition at line 268 of file BoundaryRestrictable.C.
|
inherited |
Test if the supplied boundary name is valid for this object.
| name | A BoundaryName to check |
Definition at line 254 of file BoundaryRestrictable.C.
Referenced by BoundaryRestrictable::hasBoundary(), BoundaryRestrictable::hasBoundary(), BoundaryRestrictable::hasBoundary(), BoundaryRestrictable::hasBoundary(), BoundaryRestrictable::hasBoundaryMaterialPropertyHelper(), NodePositions::initialize(), and AuxKernelBase::initialSetup().
|
inherited |
Test if the supplied set of boundary ids are valid for this object.
| ids | A std::set of BoundaryIDs to check |
| type | A flag for the type of matching to perform: ALL requires that all supplied ids must match those of the object; ANY requires that any one of the supplied ids must match those of the object |
Definition at line 284 of file BoundaryRestrictable.C.
|
inherited |
Test if the supplied vector boundary ids are valid for this object.
| ids | A vector of BoundaryIDs ids to check |
| type | A flag for the type of matching to perform: ALL requires that all supplied ids must match those of the object; ANY requires that any one of the supplied ids must match those of the object |
Definition at line 277 of file BoundaryRestrictable.C.
|
inherited |
Test if the supplied vector of boundary names are valid for this object.
| names | A vector of BoundaryNames to check |
Definition at line 262 of file BoundaryRestrictable.C.
|
inherited |
Check if a material property is valid for all boundaries of this object.
This method returns true if the supplied property name has been declared in a Material object on the boundary ids for this object.
| T | The type of material property |
| prop_name | the name of the property to query |
Definition at line 295 of file BoundaryRestrictable.h.
|
protectedinherited |
A helper method to avoid circular #include problems.
Definition at line 345 of file BoundaryRestrictable.C.
Referenced by BoundaryRestrictable::hasBoundaryMaterialProperty().
|
inlineinherited |
Definition at line 59 of file KokkosReducerBase.h.
|
privateinherited |
An initialization routine needed for dual constructors.
Definition at line 84 of file BoundaryRestrictable.C.
Referenced by BoundaryRestrictable::BoundaryRestrictable(), and BoundaryRestrictable::BoundaryRestrictable().
|
privateinherited |
Referenced by BoundaryRestrictable::initializeBoundaryRestrictable().
|
inherited |
Test if the class boundary ids are a subset of the supplied objects.
| ids | A std::set of boundaries to check |
Definition at line 316 of file BoundaryRestrictable.C.
Referenced by BoundaryRestrictable::isBoundarySubset().
|
inherited |
Definition at line 332 of file BoundaryRestrictable.C.
|
inlineinherited |
Definition at line 53 of file KokkosReducerBase.h.
|
inlineinherited |
Get the const reference of the Kokkos assembly.
Definition at line 634 of file KokkosAssembly.h.
Referenced by Moose::Kokkos::FESystem::getVectorQpADGrad(), Moose::Kokkos::FESystem::getVectorQpADGradFace(), Moose::Kokkos::FESystem::getVectorQpADValue(), Moose::Kokkos::FESystem::getVectorQpADValueFace(), Moose::Kokkos::FESystem::getVectorQpGradFace(), Moose::Kokkos::FESystem::getVectorQpValueFace(), Moose::Kokkos::FESystem::getVectorQpVectorGradFace(), Moose::Kokkos::FESystem::getVectorQpVectorValueFace(), Moose::Kokkos::ElementUserObject::operator()(), Moose::Kokkos::NodalUserObject::operator()(), Moose::Kokkos::SideUserObject::operator()(), Moose::Kokkos::Material::operator()(), Moose::Kokkos::Material::operator()(), Moose::Kokkos::AuxKernel::operator()(), Moose::Kokkos::IntegratedBC::operator()(), Moose::Kokkos::NodalBC::operator()(), Moose::Kokkos::VectorIntegratedBC::operator()(), Moose::Kokkos::VectorNodalBC::operator()(), Moose::Kokkos::Kernel::operator()(), Moose::Kokkos::VectorKernel::operator()(), Moose::Kokkos::NodalKernel::operator()(), Moose::Kokkos::Material::operator()(), Moose::Kokkos::Material::operator()(), Moose::Kokkos::AuxKernel::operator()(), Moose::Kokkos::IntegratedBC::operator()(), Moose::Kokkos::NodalBC::operator()(), Moose::Kokkos::VectorIntegratedBC::operator()(), Moose::Kokkos::VectorNodalBC::operator()(), Moose::Kokkos::Kernel::operator()(), Moose::Kokkos::VectorKernel::operator()(), Moose::Kokkos::NodalKernel::operator()(), Moose::Kokkos::ElementReducer::operator()(), Moose::Kokkos::NodalReducer::operator()(), operator()(), Moose::Kokkos::ADIntegratedBC::operator()(), Moose::Kokkos::ADNodalBC::operator()(), Moose::Kokkos::IntegratedBC::operator()(), Moose::Kokkos::NodalBC::operator()(), Moose::Kokkos::VectorIntegratedBC::operator()(), Moose::Kokkos::VectorNodalBC::operator()(), Moose::Kokkos::ADKernel::operator()(), Moose::Kokkos::Kernel::operator()(), Moose::Kokkos::VectorKernel::operator()(), Moose::Kokkos::NodalKernel::operator()(), Moose::Kokkos::Material::operator()(), and Moose::Kokkos::Material::operator()().
|
inlineprotectedinherited |
Get the contiguous element ID - side index pair this Kokkos thread is operating on.
| tid | The thread ID |
Definition at line 273 of file BoundaryRestrictable.h.
Referenced by Moose::Kokkos::LinearFVBoundaryCondition::operator()(), Moose::Kokkos::LinearFVBoundaryCondition::operator()(), Moose::Kokkos::SideUserObject::operator()(), Moose::Kokkos::IntegratedBC::operator()(), Moose::Kokkos::VectorIntegratedBC::operator()(), Moose::Kokkos::IntegratedBC::operator()(), Moose::Kokkos::VectorIntegratedBC::operator()(), operator()(), Moose::Kokkos::ADIntegratedBC::operator()(), Moose::Kokkos::IntegratedBC::operator()(), and Moose::Kokkos::VectorIntegratedBC::operator()().
|
inlineprotectedinherited |
Get the contiguous node ID this Kokkos thread is operating on.
| tid | The thread ID |
Definition at line 264 of file BoundaryRestrictable.h.
Referenced by Moose::Kokkos::NodalUserObject::operator()(), Moose::Kokkos::NodalBC::operator()(), Moose::Kokkos::VectorNodalBC::operator()(), Moose::Kokkos::NodalKernel::operator()(), Moose::Kokkos::AuxKernel::operator()(), Moose::Kokkos::NodalBC::operator()(), Moose::Kokkos::VectorNodalBC::operator()(), Moose::Kokkos::NodalKernel::operator()(), Moose::Kokkos::NodalReducer::operator()(), Moose::Kokkos::ADNodalBC::operator()(), Moose::Kokkos::NodalBC::operator()(), Moose::Kokkos::VectorNodalBC::operator()(), and Moose::Kokkos::NodalKernel::operator()().
|
inlineinherited |
Get the const reference of the Kokkos mesh.
Definition at line 651 of file KokkosMesh.h.
Referenced by Moose::Kokkos::Assembly::computePhysicalMap(), Moose::Kokkos::Assembly::computePhysicalMap(), Moose::Kokkos::LinearFVFluxKernel::operator()(), Moose::Kokkos::LinearFVBoundaryCondition::operator()(), Moose::Kokkos::LinearFVFluxKernel::operator()(), Moose::Kokkos::LinearFVBoundaryCondition::operator()(), Moose::Kokkos::LinearFVFluxKernel::operator()(), Moose::Kokkos::LinearFVFluxKernel::operator()(), Moose::Kokkos::LinearFVElementalKernel::operator()(), Moose::Kokkos::IntegratedBC::operator()(), Moose::Kokkos::VectorIntegratedBC::operator()(), Moose::Kokkos::Kernel::operator()(), Moose::Kokkos::VectorKernel::operator()(), Moose::Kokkos::LinearFVElementalKernel::operator()(), Moose::Kokkos::Datum::q_point(), and KokkosBoundNodalKernel::skipOnBoundary().
|
inherited |
Returns the set of all boundary ids for the entire mesh.
Definition at line 339 of file BoundaryRestrictable.C.
Referenced by BoundaryRestrictable::hasBoundaryMaterialPropertyHelper().
|
inherited |
Return the number of boundaries for this object.
Definition at line 236 of file BoundaryRestrictable.C.
Referenced by SidesetInfoVectorPostprocessor::initialize().
|
inlineprotectedinherited |
Get the number of nodes this Kokkos object is operating on.
Definition at line 250 of file BoundaryRestrictable.h.
Referenced by Moose::Kokkos::NodalReducer::numReducerThreads(), and Moose::Kokkos::NodalUserObject::numUserObjectThreads().
|
inlineprotectedinherited |
Get the number of sides this Kokkos object is operating on.
Definition at line 255 of file BoundaryRestrictable.h.
Referenced by numReducerThreads(), and Moose::Kokkos::SideUserObject::numUserObjectThreads().
|
inlineoverridevirtual |
Get the number of threads.
Implements Moose::Kokkos::ReducerBase.
Definition at line 31 of file KokkosSideReducer.h.
| KOKKOS_FUNCTION void Moose::Kokkos::SideReducer::operator() | ( | ReducerLoop | , |
| const ThreadID | tid, | ||
| const Derived & | reducer, | ||
| Real * | result | ||
| ) | const |
The parallel computation entry function called by Kokkos.
Definition at line 43 of file KokkosSideReducer.h.
|
inlineinherited |
Default methods to prevent compile errors even when these methods were not defined in the derived class.
Definition at line 47 of file KokkosReducerBase.h.
|
staticinherited |
Helper for determining if the object is boundary restricted.
This is needed for the MaterialPropertyInterface.
Definition at line 248 of file BoundaryRestrictable.C.
Referenced by BoundaryRestrictable::boundaryRestricted(), and moose::internal::boundaryRestricted().
|
static |
|
privateinherited |
Device copy of the Kokkos assembly.
Definition at line 650 of file KokkosAssembly.h.
Referenced by Moose::Kokkos::AssemblyHolder::kokkosAssembly().
|
privateinherited |
Host reference of the Kokkos assembly.
Definition at line 646 of file KokkosAssembly.h.
Referenced by Moose::Kokkos::AssemblyHolder::kokkosAssembly().
|
privateinherited |
Reference to the block_ids, defaults to an empty set if not provided.
Definition at line 215 of file BoundaryRestrictable.h.
Referenced by BoundaryRestrictable::initializeBoundaryRestrictable().
|
privateinherited |
Flag for allowing dual restriction with BlockRestrictable.
Definition at line 209 of file BoundaryRestrictable.h.
Referenced by BoundaryRestrictable::initializeBoundaryRestrictable().
|
privateinherited |
Pointer to FEProblemBase.
Definition at line 194 of file BoundaryRestrictable.h.
Referenced by BoundaryRestrictable::hasBoundaryMaterialPropertyHelper(), and BoundaryRestrictable::initializeBoundaryRestrictable().
|
privateinherited |
Set of the boundary ids.
Definition at line 200 of file BoundaryRestrictable.h.
Referenced by BoundaryRestrictable::boundaryIDs(), BoundaryRestrictable::boundaryRestricted(), BoundaryRestrictable::hasBoundary(), BoundaryRestrictable::hasBoundary(), BoundaryRestrictable::initializeBoundaryRestrictable(), BoundaryRestrictable::isBoundarySubset(), and BoundaryRestrictable::numBoundaryIDs().
|
privateinherited |
Pointer to MaterialData for boundary (.
Definition at line 221 of file BoundaryRestrictable.h.
Referenced by BoundaryRestrictable::hasBoundaryMaterialProperty().
|
privateinherited |
Point to mesh.
Definition at line 197 of file BoundaryRestrictable.h.
Referenced by BoundaryRestrictable::hasBoundary(), BoundaryRestrictable::hasBoundary(), BoundaryRestrictable::initializeBoundaryRestrictable(), BoundaryRestrictable::isBoundarySubset(), and BoundaryRestrictable::meshBoundaryIDs().
|
privateinherited |
Whether or not this object is restricted to nodesets.
Definition at line 224 of file BoundaryRestrictable.h.
Referenced by BoundaryRestrictable::initializeBoundaryRestrictable().
|
privateinherited |
Thread id for this object.
Definition at line 218 of file BoundaryRestrictable.h.
|
privateinherited |
Vector the the boundary names.
Definition at line 206 of file BoundaryRestrictable.h.
Referenced by BoundaryRestrictable::boundaryNames(), and BoundaryRestrictable::initializeBoundaryRestrictable().
|
privateinherited |
An empty set for referencing when block_ids is not included.
Definition at line 212 of file BoundaryRestrictable.h.
|
privateinherited |
List of contiguous element ID - side index pairs this Kokkos object is operating on.
Definition at line 289 of file BoundaryRestrictable.h.
Referenced by BoundaryRestrictable::kokkosBoundaryElementSideID(), and BoundaryRestrictable::numKokkosBoundarySides().
|
privateinherited |
List of contiguous node IDs this Kokkos object is operating on.
Definition at line 284 of file BoundaryRestrictable.h.
Referenced by BoundaryRestrictable::kokkosBoundaryNodeID(), and BoundaryRestrictable::numKokkosBoundaryNodes().
|
privateinherited |
Device copy of the Kokkos mesh.
Definition at line 673 of file KokkosMesh.h.
Referenced by Moose::Kokkos::MeshHolder::kokkosMesh().
|
privateinherited |
Host reference of the Kokkos mesh.
Definition at line 669 of file KokkosMesh.h.
Referenced by Moose::Kokkos::MeshHolder::kokkosMesh().
|
privateinherited |
The moose object that this is an interface for.
Definition at line 227 of file BoundaryRestrictable.h.
Referenced by BoundaryRestrictable::initializeBoundaryRestrictable().
|
protectedinherited |
Kokkos functor dispatcher.
Definition at line 101 of file KokkosReducerBase.h.
|
protectedinherited |
MOOSE object.
Definition at line 97 of file KokkosReducerBase.h.
|
protectedinherited |
Reduction buffer.
Definition at line 105 of file KokkosReducerBase.h.
Referenced by Moose::Kokkos::ReducerBase::allocateReductionBuffer().
|
privateinherited |
Vector of the boundary ids.
Definition at line 203 of file BoundaryRestrictable.h.
Referenced by BoundaryRestrictable::initializeBoundaryRestrictable().