#include <KokkosElementReducer.h>
Public Member Functions | |
| ElementReducer (const MooseObject *object) | |
| ElementReducer (const ElementReducer &object) | |
| Copy constructor for parallel dispatch. More... | |
| virtual ThreadID | numReducerThreads () const override |
| Get the number of threads. More... | |
| 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. More... | |
| KOKKOS_FUNCTION const Mesh & | kokkosMesh () const |
| Get the const reference of the Kokkos mesh. More... | |
| KOKKOS_FUNCTION const Assembly & | kokkosAssembly () const |
| Get the const reference of the Kokkos assembly. More... | |
| KOKKOS_FUNCTION const Array< System > & | kokkosSystems () const |
| Get the const reference of the Kokkos systems. More... | |
| Array< System > & | kokkosSystems () |
| Get the writeable host reference of the Kokkos systems. More... | |
| KOKKOS_FUNCTION const System & | kokkosSystem (unsigned int sys) const |
| Get the const reference of a Kokkos system. More... | |
| System & | kokkosSystem (unsigned int sys) |
| Get the writeable reference of a Kokkos system. More... | |
| const std::vector< SubdomainName > & | blocks () const |
| Return the block names for this object. More... | |
| unsigned int | numBlocks () const |
| Return the number of blocks for this object. More... | |
| virtual const std::set< SubdomainID > & | blockIDs () const |
| Return the block subdomain ids for this object Note, if this is not block restricted, this function returns all mesh subdomain ids. More... | |
| unsigned int | blocksMaxDimension () const |
| Return the largest mesh dimension of the elements in the blocks for this object. More... | |
| bool | hasBlocks (const SubdomainName &name) const |
| Test if the supplied block name is valid for this object. More... | |
| bool | hasBlocks (const std::vector< SubdomainName > &names) const |
| Test if the supplied vector of block names are valid for this object. More... | |
| bool | hasBlocks (const std::set< SubdomainName > &names) const |
| Test if the supplied set of block names are valid for this object. More... | |
| bool | hasBlocks (SubdomainID id) const |
| Test if the supplied block ids are valid for this object. More... | |
| bool | hasBlocks (const std::vector< SubdomainID > &ids) const |
| Test if the supplied vector block ids are valid for this object. More... | |
| bool | hasBlocks (const std::set< SubdomainID > &ids) const |
| Test if the supplied set of block ids are valid for this object. More... | |
| bool | isBlockSubset (const std::set< SubdomainID > &ids) const |
| Test if the class block ids are a subset of the supplied objects. More... | |
| bool | isBlockSubset (const std::vector< SubdomainID > &ids) const |
| Test if the class block ids are a subset of the supplied objects. More... | |
| template<typename T , bool is_ad = false> | |
| bool | hasBlockMaterialProperty (const std::string &prop_name) |
| Check if a material property is valid for all blocks of this object. More... | |
| const std::set< SubdomainID > & | meshBlockIDs () const |
| Return all of the SubdomainIDs for the mesh. More... | |
| virtual bool | blockRestricted () const |
| Returns true if this object has been restricted to a block. More... | |
| virtual void | checkVariable (const MooseVariableFieldBase &variable) const |
| Helper for checking that the ids for this object are in agreement with the variables on the supplied variable. More... | |
| 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. More... | |
| 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. More... | |
Protected Member Functions | |
| virtual void | computeReducer () |
| Dispatch reduction operation. More... | |
| void | allocateReductionBuffer (const unsigned int size) |
| Allocate reduction buffer. More... | |
| virtual bool | hasBlockMaterialPropertyHelper (const std::string &prop_name) |
| A helper method to allow the Material object to specialize the behavior of hasBlockMaterialProperty. More... | |
| void | initializeBlockRestrictable (const MooseObject *moose_object) |
| An initialization routine needed for dual constructors. More... | |
| void | initializeKokkosBlockRestrictable () |
| Moose::CoordinateSystemType | getBlockCoordSystem () |
| Check if the blocks this object operates on all have the same coordinate system, and if so return it. More... | |
| KOKKOS_FUNCTION dof_id_type | numKokkosBlockElements () const |
| Get the number of elements this Kokkos object is operating on. More... | |
| KOKKOS_FUNCTION dof_id_type | numKokkosBlockNodes () const |
| Get the number of nodes this Kokkos object is operating on. More... | |
| KOKKOS_FUNCTION dof_id_type | numKokkosBlockSides () const |
| Get the number of sides this Kokkos object is operating on. More... | |
| KOKKOS_FUNCTION ContiguousElementID | kokkosBlockElementID (Moose::Kokkos::ThreadID tid) const |
| Get the contiguous element ID this Kokkos thread is operating on. More... | |
| KOKKOS_FUNCTION ContiguousElementID | kokkosBlockNodeID (Moose::Kokkos::ThreadID tid) const |
| Get the contiguous node index this Kokkos thread is operating on. More... | |
| KOKKOS_FUNCTION auto | kokkosBlockElementSideID (Moose::Kokkos::ThreadID tid) const |
| Get the contiguous element ID - side index pair this Kokkos thread is operating on. More... | |
Protected Attributes | |
| const MooseObject * | _reducer_object |
| MOOSE object. More... | |
| std::unique_ptr< DispatcherBase > | _reducer_dispatcher |
| Kokkos functor dispatcher. More... | |
| ::Kokkos::View< Real *, ::Kokkos::HostSpace > | _reduction_buffer |
| Reduction buffer. More... | |
| const MaterialData * | _blk_material_data |
| Pointer to the MaterialData class for this object. More... | |
Definition at line 19 of file KokkosElementReducer.h.
| Moose::Kokkos::ElementReducer::ElementReducer | ( | const MooseObject * | object | ) |
| Moose::Kokkos::ElementReducer::ElementReducer | ( | const ElementReducer & | object | ) |
Copy constructor for parallel dispatch.
|
inlineprotectedinherited |
Allocate reduction buffer.
Definition at line 88 of file KokkosReducerBase.h.
|
virtualinherited |
Return the block subdomain ids for this object Note, if this is not block restricted, this function returns all mesh subdomain ids.
Definition at line 209 of file BlockRestrictable.C.
Referenced by FunctorMaterial::addFunctorProperty(), DiracKernelBase::addPoint(), DiracKernelBase::addPointWithValidId(), NodalPatchRecoveryAuxBase::blockRestrictElements(), MooseMesh::cacheFaceInfoVariableOwnership(), MooseMesh::cacheFVElementalDoFs(), ComboMarker::ComboMarker(), ElementGroupCentroidPositions::ElementGroupCentroidPositions(), ExtraIDIntegralVectorPostprocessor::ExtraIDIntegralVectorPostprocessor(), BlockRestrictable::getBlockCoordSystem(), MaterialBase::getGenericZeroMaterialPropertyByName(), NEML2FEInterpolation::getMOOSEVariable(), FunctorIC::gradient(), BlockRestrictable::hasBlockMaterialPropertyHelper(), IndicatorMarker::IndicatorMarker(), SubdomainsDivision::initialize(), ElementCentroidPositions::initialize(), QuadraturePointsPositions::initialize(), FunctorExtremaPositions::initialize(), NodalPatchRecoveryAux::NodalPatchRecoveryAux(), PointwiseRenormalizeVector::PointwiseRenormalizeVector(), ProjectedMaterialPropertyNodalPatchRecoveryAux::ProjectedMaterialPropertyNodalPatchRecoveryAux(), MaterialBase::registerPropName(), FVPointValueConstraint::setMyElem(), and FunctorIC::value().
|
virtualinherited |
Returns true if this object has been restricted to a block.
Definition at line 197 of file BlockRestrictable.C.
Referenced by NodalPatchRecoveryAuxBase::blockRestrictElements(), BlockRestrictable::checkVariable(), SubdomainsDivision::divisionIndex(), ElementGroupCentroidPositions::ElementGroupCentroidPositions(), BlockRestrictable::getBlockCoordSystem(), FunctorIC::gradient(), BlockRestrictable::hasBlockMaterialPropertyHelper(), SubdomainsDivision::initialize(), ElementCentroidPositions::initialize(), QuadraturePointsPositions::initialize(), BlockRestrictable::initializeBlockRestrictable(), SolutionIC::initialSetup(), FVPointValueConstraint::setMyElem(), and FunctorIC::value().
|
inherited |
Return the block names for this object.
Note, if the 'blocks' input parameter was not utilized this will return an empty vector.
Definition at line 203 of file BlockRestrictable.C.
Referenced by MaterialOutputAction::getParams(), SubdomainsDivision::initialize(), and SolutionIC::initialSetup().
|
inherited |
Return the largest mesh dimension of the elements in the blocks for this object.
Definition at line 386 of file BlockRestrictable.C.
|
virtualinherited |
Helper for checking that the ids for this object are in agreement with the variables on the supplied variable.
| variable | The variable to check against. |
Reimplemented in DomainUserObject.
Definition at line 358 of file BlockRestrictable.C.
Referenced by DomainUserObject::checkVariable().
|
protectedvirtualinherited |
Dispatch reduction operation.
|
inlinestaticinherited |
Function used to check if users have overriden the hook method.
Definition at line 70 of file KokkosReducerBase.h.
|
protectedinherited |
Check if the blocks this object operates on all have the same coordinate system, and if so return it.
Definition at line 336 of file BlockRestrictable.C.
|
inherited |
Check if a material property is valid for all blocks of this object.
This method returns true if the supplied property name has been declared in a Material object on the block ids for this object.
| T | The type of material property |
| prop_name | the name of the property to query |
Definition at line 360 of file BlockRestrictable.h.
|
protectedvirtualinherited |
A helper method to allow the Material object to specialize the behavior of hasBlockMaterialProperty.
It also avoid circular #include problems.
Definition at line 300 of file BlockRestrictable.C.
Referenced by BlockRestrictable::hasBlockMaterialProperty().
|
inherited |
Test if the supplied block name is valid for this object.
| name | A SubdomainName to check |
Definition at line 224 of file BlockRestrictable.C.
Referenced by LinearFVFluxKernel::addMatrixContribution(), DiracKernelBase::addPoint(), LinearFVFluxKernel::addRightHandSideContribution(), NodalPatchRecoveryBase::addToQuery(), MultiAppVariableValueSamplePostprocessorTransfer::cacheElemToPostprocessorData(), DomainUserObject::checkVariable(), ComputeJacobianThread::compute(), ComboMarker::computeElementMarker(), GradientJumpIndicator::computeQpIntegral(), ProjectionAux::computeValue(), DomainUserObject::DomainUserObject(), ProjectionAux::elemOnNodeVariableIsDefinedOn(), MultiAppVariableValueSamplePostprocessorTransfer::execute(), QuadraturePointMultiApp::fillPositions(), CentroidMultiApp::fillPositions(), NodalPatchRecoveryBase::gatherRequestList(), NodalPatchRecoveryBase::getCoefficients(), MeshDivisionFunctorReductionVectorPostprocessor::hasBlocks(), BlockRestrictable::hasBlocks(), MooseVariableField< Real >::hasBlocks(), FVFluxKernel::hasFaceSide(), IndicatorMarker::IndicatorMarker(), NodePositions::initialize(), ParsedDownSelectionPositions::initialize(), UpdateErrorVectorsThread::onElement(), PointwiseRenormalizeVector::PointwiseRenormalizeVector(), and BlockRestrictionDebugOutput::printBlockRestrictionMap().
|
inherited |
Test if the supplied vector of block names are valid for this object.
| names | A vector of SubdomainNames to check |
Definition at line 234 of file BlockRestrictable.C.
|
inherited |
Test if the supplied set of block names are valid for this object.
| names | A set of SubdomainNames to check |
Definition at line 240 of file BlockRestrictable.C.
|
inherited |
Test if the supplied block ids are valid for this object.
| id | A SubdomainID to check |
Definition at line 246 of file BlockRestrictable.C.
|
inherited |
Test if the supplied vector block ids are valid for this object.
| ids | A vector of SubdomainIDs ids to check |
Definition at line 255 of file BlockRestrictable.C.
|
inherited |
Test if the supplied set of block ids are valid for this object.
| ids | A std::set of SubdomainIDs to check |
Definition at line 262 of file BlockRestrictable.C.
|
inlineinherited |
Definition at line 58 of file KokkosReducerBase.h.
|
protectedinherited |
An initialization routine needed for dual constructors.
Definition at line 76 of file BlockRestrictable.C.
Referenced by BlockRestrictable::BlockRestrictable().
|
protectedinherited |
Referenced by BlockRestrictable::initializeBlockRestrictable().
|
inherited |
Test if the class block ids are a subset of the supplied objects.
| ids | A std::set of Subdomains to check |
Definition at line 271 of file BlockRestrictable.C.
Referenced by BlockRestrictable::checkVariable(), BlockRestrictable::isBlockSubset(), NodalPatchRecoveryAux::NodalPatchRecoveryAux(), and ProjectedMaterialPropertyNodalPatchRecoveryAux::ProjectedMaterialPropertyNodalPatchRecoveryAux().
|
inherited |
Test if the class block ids are a subset of the supplied objects.
| ids | A std::vector of Subdomains to check |
Definition at line 287 of file BlockRestrictable.C.
|
inlineinherited |
Definition at line 52 of file KokkosReducerBase.h.
|
inlineinherited |
Get the const reference of the Kokkos assembly.
Definition at line 569 of file KokkosAssembly.h.
Referenced by Moose::Kokkos::System::getVectorQpADGrad(), Moose::Kokkos::System::getVectorQpADGradFace(), Moose::Kokkos::System::getVectorQpADValue(), Moose::Kokkos::System::getVectorQpADValueFace(), Moose::Kokkos::System::getVectorQpGradFace(), Moose::Kokkos::System::getVectorQpValueFace(), operator()(), Moose::Kokkos::SideReducer::operator()(), Moose::Kokkos::NodalReducer::operator()(), Moose::Kokkos::NodalUserObject::operator()(), Moose::Kokkos::SideUserObject::operator()(), Moose::Kokkos::ElementUserObject::operator()(), Moose::Kokkos::ADNodalBC::operator()(), Moose::Kokkos::ADKernel::operator()(), Moose::Kokkos::ADIntegratedBC::operator()(), Moose::Kokkos::AuxKernel::operator()(), Moose::Kokkos::Material::operator()(), Moose::Kokkos::NodalBC::operator()(), Moose::Kokkos::NodalKernel::operator()(), Moose::Kokkos::IntegratedBC::operator()(), and Moose::Kokkos::Kernel::operator()().
|
inlineprotectedinherited |
Get the contiguous element ID this Kokkos thread is operating on.
| tid | The thread ID |
Definition at line 280 of file BlockRestrictable.h.
Referenced by operator()(), Moose::Kokkos::ElementUserObject::operator()(), Moose::Kokkos::ADKernel::operator()(), Moose::Kokkos::AuxKernel::operator()(), and Moose::Kokkos::Kernel::operator()().
|
inlineprotectedinherited |
Get the contiguous element ID - side index pair this Kokkos thread is operating on.
| tid | The thread ID |
Definition at line 298 of file BlockRestrictable.h.
|
inlineprotectedinherited |
Get the contiguous node index this Kokkos thread is operating on.
| tid | The thread ID |
Definition at line 289 of file BlockRestrictable.h.
Referenced by Moose::Kokkos::NodalReducer::operator()(), Moose::Kokkos::NodalUserObject::operator()(), Moose::Kokkos::AuxKernel::operator()(), and Moose::Kokkos::NodalKernel::operator()().
|
inlineinherited |
Get the const reference of the Kokkos mesh.
Definition at line 452 of file KokkosMesh.h.
Referenced by Moose::Kokkos::Assembly::computePhysicalMap(), Moose::Kokkos::Kernel::operator()(), Moose::Kokkos::IntegratedBC::operator()(), Moose::Kokkos::Datum::q_point(), and KokkosBoundNodalKernel::skipOnBoundary().
|
inlineinherited |
Get the const reference of a Kokkos system.
| sys | The system number |
Definition at line 792 of file KokkosSystem.h.
Referenced by Moose::Kokkos::ResidualObject::accumulateTaggedElementalMatrix(), Moose::Kokkos::ResidualObject::accumulateTaggedElementalResidual(), Moose::Kokkos::ResidualObject::accumulateTaggedNodalMatrix(), Moose::Kokkos::ResidualObject::accumulateTaggedNodalResidual(), KokkosCopyValueAux::computeElementInternal(), KokkosCopyValueAux::computeNodeInternal(), KokkosExtraIDIntegralVectorPostprocessor::execute(), Moose::Kokkos::ADNodalBC::operator()(), Moose::Kokkos::AuxKernel::operator()(), Moose::Kokkos::NodalBC::operator()(), Moose::Kokkos::NodalKernel::operator()(), Moose::Kokkos::Kernel::operator()(), Moose::Kokkos::IntegratedBC::operator()(), KokkosExtraIDIntegralVectorPostprocessor::reduce(), Moose::Kokkos::AuxKernel::setElementSolution(), and Moose::Kokkos::AuxKernel::setNodeSolution().
Get the writeable reference of a Kokkos system.
| sys | The system number |
Definition at line 803 of file KokkosSystem.h.
|
inlineinherited |
Get the const reference of the Kokkos systems.
Definition at line 775 of file KokkosSystem.h.
Referenced by operator()(), Moose::Kokkos::SideReducer::operator()(), Moose::Kokkos::NodalReducer::operator()(), Moose::Kokkos::NodalUserObject::operator()(), Moose::Kokkos::SideUserObject::operator()(), Moose::Kokkos::ElementUserObject::operator()(), Moose::Kokkos::ADNodalBC::operator()(), Moose::Kokkos::ADKernel::operator()(), Moose::Kokkos::ADIntegratedBC::operator()(), Moose::Kokkos::AuxKernel::operator()(), Moose::Kokkos::Material::operator()(), Moose::Kokkos::NodalBC::operator()(), Moose::Kokkos::NodalKernel::operator()(), Moose::Kokkos::IntegratedBC::operator()(), and Moose::Kokkos::Kernel::operator()().
Get the writeable host reference of the Kokkos systems.
Definition at line 785 of file KokkosSystem.h.
|
inherited |
Return all of the SubdomainIDs for the mesh.
Definition at line 294 of file BlockRestrictable.C.
Referenced by BlockRestrictable::checkVariable(), ElementGroupCentroidPositions::ElementGroupCentroidPositions(), BlockRestrictable::getBlockCoordSystem(), BlockRestrictable::hasBlockMaterialPropertyHelper(), and SolutionIC::initialSetup().
|
inherited |
Return the number of blocks for this object.
Definition at line 218 of file BlockRestrictable.C.
Referenced by ElementCentroidPositions::initialize(), and QuadraturePointsPositions::initialize().
|
inlineprotectedinherited |
Get the number of elements this Kokkos object is operating on.
Definition at line 261 of file BlockRestrictable.h.
Referenced by numReducerThreads(), and Moose::Kokkos::ElementUserObject::numUserObjectThreads().
|
inlineprotectedinherited |
Get the number of nodes this Kokkos object is operating on.
Definition at line 266 of file BlockRestrictable.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 271 of file BlockRestrictable.h.
|
inlineoverridevirtual |
Get the number of threads.
Implements Moose::Kokkos::ReducerBase.
Definition at line 31 of file KokkosElementReducer.h.
| KOKKOS_FUNCTION void Moose::Kokkos::ElementReducer::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 KokkosElementReducer.h.
|
inlineinherited |
Default methods to prevent compile errors even when these methods were not defined in the derived class.
Definition at line 46 of file KokkosReducerBase.h.
|
static |
|
protectedinherited |
Pointer to the MaterialData class for this object.
Definition at line 232 of file BlockRestrictable.h.
Referenced by BlockRestrictable::hasBlockMaterialProperty(), and BlockRestrictable::initializeBlockRestrictable().
|
protectedinherited |
Kokkos functor dispatcher.
Definition at line 100 of file KokkosReducerBase.h.
|
protectedinherited |
MOOSE object.
Definition at line 96 of file KokkosReducerBase.h.
|
protectedinherited |
Reduction buffer.
Definition at line 104 of file KokkosReducerBase.h.
Referenced by Moose::Kokkos::ReducerBase::allocateReductionBuffer().
1.8.14