https://mooseframework.inl.gov
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes | List of all members
Moose::Kokkos::NodalReducer Class Reference

#include <KokkosNodalReducer.h>

Inheritance diagram for Moose::Kokkos::NodalReducer:
[legend]

Public Types

enum  TEST_TYPE { ALL , ANY }
 A flag changing the behavior of hasBoundary. More...
 

Public Member Functions

 NodalReducer (const MooseObject *object)
 
 NodalReducer (const NodalReducer &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 MeshkokkosMesh () const
 Get the const reference of the Kokkos mesh.
 
KOKKOS_FUNCTION const AssemblykokkosAssembly () const
 Get the const reference of the Kokkos assembly.
 
const std::vector< SubdomainName > & blocks () const
 Return the block names for this object.
 
unsigned int numBlocks () const
 Return the number of blocks for this object.
 
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.
 
unsigned int blocksMaxDimension () const
 Return the largest mesh dimension of the elements in the blocks for this object.
 
bool hasBlocks (const SubdomainName &name) const
 Test if the supplied block name is valid for this object.
 
bool hasBlocks (const std::vector< SubdomainName > &names) const
 Test if the supplied vector of block names are valid for this object.
 
bool hasBlocks (const std::set< SubdomainName > &names) const
 Test if the supplied set of block names are valid for this object.
 
bool hasBlocks (SubdomainID id) const
 Test if the supplied block ids are valid for this object.
 
bool hasBlocks (const std::vector< SubdomainID > &ids) const
 Test if the supplied vector block ids are valid for this object.
 
bool hasBlocks (const std::set< SubdomainID > &ids) const
 Test if the supplied set of block ids are valid for this object.
 
bool isBlockSubset (const std::set< SubdomainID > &ids) const
 Test if the class block ids are a subset of the supplied objects.
 
bool isBlockSubset (const std::vector< SubdomainID > &ids) const
 Test if the class block ids are a subset of the supplied objects.
 
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.
 
const std::set< SubdomainID > & meshBlockIDs () const
 Return all of the SubdomainIDs for the mesh.
 
virtual bool blockRestricted () const
 Returns true if this object has been restricted to a block.
 
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.
 
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.
 
virtual bool hasBlockMaterialPropertyHelper (const std::string &prop_name)
 A helper method to allow the Material object to specialize the behavior of hasBlockMaterialProperty.
 
void initializeBlockRestrictable (const MooseObject *moose_object)
 An initialization routine needed for dual constructors.
 
void initializeKokkosBlockRestrictable ()
 
Moose::CoordinateSystemType getBlockCoordSystem ()
 Check if the blocks this object operates on all have the same coordinate system, and if so return it.
 
KOKKOS_FUNCTION dof_id_type numKokkosBlockElements () const
 Get the number of elements this Kokkos object is operating on.
 
KOKKOS_FUNCTION dof_id_type numKokkosBlockNodes () const
 Get the number of nodes this Kokkos object is operating on.
 
KOKKOS_FUNCTION dof_id_type numKokkosBlockSides () const
 Get the number of sides this Kokkos object is operating on.
 
KOKKOS_FUNCTION ContiguousElementID kokkosBlockElementID (Moose::Kokkos::ThreadID tid) const
 Get the contiguous element ID this Kokkos thread is operating on.
 
KOKKOS_FUNCTION ContiguousElementID kokkosBlockNodeID (Moose::Kokkos::ThreadID tid) const
 Get the contiguous node index this Kokkos thread is operating on.
 
KOKKOS_FUNCTION auto kokkosBlockElementSideID (Moose::Kokkos::ThreadID tid) const
 Get the contiguous element ID - side index pair this Kokkos thread is operating on.
 
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 bool _bnd
 Flag whether this object is boundary-restricted.
 
const bool _unique_node_execute
 Flag for enable/disabling multiple execute calls on nodes that share block ids.
 
const MooseObject_reducer_object
 MOOSE object.
 
std::unique_ptr< DispatcherBase_reducer_dispatcher
 Kokkos functor dispatcher.
 
::Kokkos::View< Real *, ::Kokkos::HostSpace > _reduction_buffer
 Reduction buffer.
 
const MaterialData_blk_material_data
 Pointer to the MaterialData class for this object.
 

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.
 
std::set< SubdomainID_blk_ids
 Set of block ids supplied by the user via the input file (for error checking)
 
std::vector< SubdomainID_vec_ids
 Vector of block ids supplied by the user via the input file (for error reporting)
 
std::vector< SubdomainName > _blocks
 Vector the block names supplied by the user via the input file.
 
const bool _blk_dual_restrictable
 Flag for allowing dual restriction.
 
FEProblemBase_blk_feproblem
 Pointer to FEProblemBase.
 
const MooseMesh_blk_mesh
 Pointer to Mesh.
 
const std::set< BoundaryID_empty_boundary_ids
 An empty set for referencing when boundary_ids is not included.
 
const std::set< BoundaryID > & _boundary_ids
 Reference to the boundary_ids, defaults to an empty set if not provided.
 
THREAD_ID _blk_tid
 Thread id for this object.
 
const std::string & _blk_name
 Name of the object.
 
unsigned int _blk_dim
 Largest mesh dimension of the elements in the blocks for this object.
 
const MooseObject_moose_object
 Pointer to the MOOSE object.
 
Moose::Kokkos::Array< ContiguousElementID_kokkos_element_ids
 List of contiguous element IDs this Kokkos object is operating on.
 
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 local element ID - side index pairs this Kokkos object is operating on.
 
FEProblemBase_bnd_feproblem
 Pointer to FEProblemBase.
 
MooseMesh_bnd_mesh
 Point to mesh.
 
std::set< BoundaryID_bnd_ids
 Set 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.
 

Detailed Description

Definition at line 20 of file KokkosNodalReducer.h.

Member Enumeration Documentation

◆ TEST_TYPE

A flag changing the behavior of hasBoundary.

Enumerator
ALL 
ANY 

Definition at line 33 of file BoundaryRestrictable.h.

Constructor & Destructor Documentation

◆ NodalReducer() [1/2]

Moose::Kokkos::NodalReducer::NodalReducer ( const MooseObject object)

◆ NodalReducer() [2/2]

Moose::Kokkos::NodalReducer::NodalReducer ( const NodalReducer object)

Copy constructor for parallel dispatch.

Member Function Documentation

◆ allocateReductionBuffer()

void Moose::Kokkos::ReducerBase::allocateReductionBuffer ( const unsigned int  size)
inlineprotectedinherited

Allocate reduction buffer.

Definition at line 89 of file KokkosReducerBase.h.

90 {
91 ::Kokkos::realloc(_reduction_buffer, size);
92 }
::Kokkos::View< Real *, ::Kokkos::HostSpace > _reduction_buffer
Reduction buffer.

◆ blockIDs()

const std::set< SubdomainID > & BlockRestrictable::blockIDs ( ) const
virtualinherited

Return the block subdomain ids for this object Note, if this is not block restricted, this function returns all mesh subdomain ids.

Returns
a set of SubdomainIDs that are valid for this object

Definition at line 209 of file BlockRestrictable.C.

210{
211 if (_blk_ids.find(Moose::ANY_BLOCK_ID) != _blk_ids.end())
212 return _blk_mesh->meshSubdomains();
213 else
214 return _blk_ids;
215}
std::set< SubdomainID > _blk_ids
Set of block ids supplied by the user via the input file (for error checking)
const MooseMesh * _blk_mesh
Pointer to Mesh.
const std::set< SubdomainID > & meshSubdomains() const
Returns a read-only reference to the set of subdomains currently present in the Mesh.
Definition MooseMesh.C:3272
const SubdomainID ANY_BLOCK_ID
Definition MooseTypes.C:19

Referenced by FunctorMaterial::addFunctorProperty(), DiracKernelBase::addPoint(), DiracKernelBase::addPointWithValidId(), NodalPatchRecoveryAuxBase::blockRestrictElements(), ComboMarker::ComboMarker(), DebugResidualAux::DebugResidualAux(), ElementGroupCentroidPositions::ElementGroupCentroidPositions(), ExtraIDIntegralVectorPostprocessor::ExtraIDIntegralVectorPostprocessor(), BlockRestrictable::getBlockCoordSystem(), MaterialBase::getGenericZeroMaterialPropertyByName(), NEML2FEInterpolation::getMOOSEVariable(), FunctorIC::gradient(), BlockRestrictable::hasBlockMaterialPropertyHelper(), IndicatorMarker::IndicatorMarker(), SubdomainsDivision::initialize(), ElementCentroidPositions::initialize(), FunctorExtremaPositions::initialize(), QuadraturePointsPositions::initialize(), NodalPatchRecoveryAux::NodalPatchRecoveryAux(), PointwiseRenormalizeVector::PointwiseRenormalizeVector(), ProjectedMaterialPropertyNodalPatchRecoveryAux::ProjectedMaterialPropertyNodalPatchRecoveryAux(), MaterialBase::registerPropName(), FVPointValueConstraint::setMyElem(), and FunctorIC::value().

◆ blockRestricted()

bool BlockRestrictable::blockRestricted ( ) const
virtualinherited

◆ blocks()

const std::vector< SubdomainName > & BlockRestrictable::blocks ( ) const
inherited

Return the block names for this object.

Note, if the 'blocks' input parameter was not utilized this will return an empty vector.

Returns
vector of SubdomainNames that are valid for this object

Definition at line 203 of file BlockRestrictable.C.

204{
205 return _blocks;
206}
std::vector< SubdomainName > _blocks
Vector the block names supplied by the user via the input file.

Referenced by MaterialOutputAction::getParams(), SubdomainsDivision::initialize(), and SolutionIC::initialSetup().

◆ blocksMaxDimension()

unsigned int BlockRestrictable::blocksMaxDimension ( ) const
inherited

Return the largest mesh dimension of the elements in the blocks for this object.

Definition at line 386 of file BlockRestrictable.C.

387{
388 mooseAssert(_blk_dim != libMesh::invalid_uint, "Block restriction not initialized");
389 return _blk_dim;
390}
unsigned int _blk_dim
Largest mesh dimension of the elements in the blocks for this object.
const unsigned int invalid_uint

◆ boundaryIDs()

const std::set< BoundaryID > & BoundaryRestrictable::boundaryIDs ( ) const
virtualinherited

◆ boundaryNames()

const std::vector< BoundaryName > & BoundaryRestrictable::boundaryNames ( ) const
inherited

Return the boundary names for this object.

Returns
A set of all boundary names for which the object is restricted

Definition at line 230 of file BoundaryRestrictable.C.

231{
232 return _boundary_names;
233}
std::vector< BoundaryName > _boundary_names
Vector the the boundary names.

Referenced by MaterialOutputAction::getParams(), NearestNodeDistanceAux::NearestNodeDistanceAux(), and NearestNodeValueAux::NearestNodeValueAux().

◆ boundaryRestricted()

bool BoundaryRestrictable::boundaryRestricted ( ) const
virtualinherited

Returns true if this object has been restricted to a boundary.

See also
MooseObject

Definition at line 242 of file BoundaryRestrictable.C.

243{
245}
static bool restricted(const std::set< BoundaryID > &ids)
Helper for determining if the object is boundary restricted.

Referenced by Moose::Kokkos::Material::checkMaterialProperty(), Material::checkMaterialProperty(), MaterialOutputAction::getParams(), DerivativeMaterialInterface< T >::haveMaterialProperty(), and NodePositions::initialize().

◆ checkVariable()

void BlockRestrictable::checkVariable ( const MooseVariableFieldBase variable) const
virtualinherited

Helper for checking that the ids for this object are in agreement with the variables on the supplied variable.

Parameters
variableThe variable to check against.

Reimplemented in DomainUserObject.

Definition at line 358 of file BlockRestrictable.C.

359{
360 // a variable defined on all internal sides does not need this check because
361 // it can be coupled with other variables in DG kernels
362 if (!_blk_mesh->interiorLowerDBlocks().empty() &&
364 return;
365
366 if (!isBlockSubset(variable.activeSubdomains()))
367 {
368 std::string var_ids = Moose::stringify(variable.activeSubdomains(), ", ");
369 std::string obj_ids = Moose::stringify(blockRestricted() ? _blk_ids : meshBlockIDs(), ", ");
370 mooseError("The 'block' parameter of the object '",
371 _blk_name,
372 "' must be a subset of the 'block' parameter of the variable '",
373 variable.name(),
374 "':\n Object '",
375 _blk_name,
376 "': ",
377 obj_ids,
378 "\n Variable '",
379 variable.name(),
380 "': ",
381 var_ids);
382 }
383}
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application.
Definition MooseError.h:311
bool isBlockSubset(const std::set< SubdomainID > &ids) const
Test if the class block ids are a subset of the supplied objects.
const std::string & _blk_name
Name of the object.
const std::set< SubdomainID > & meshBlockIDs() const
Return all of the SubdomainIDs for the mesh.
virtual bool blockRestricted() const
Returns true if this object has been restricted to a block.
const std::string & name() const
Get the name of the class.
Definition MooseBase.h:103
const std::set< SubdomainID > & interiorLowerDBlocks() const
Definition MooseMesh.h:1552
bool activeOnSubdomains(const std::set< SubdomainID > &subdomains) const
Is the variable active on the subdomains?
const std::set< SubdomainID > & activeSubdomains() const
The subdomains the variable is active on.
std::string stringify(const T &t)
conversion to string
Definition Conversion.h:64

Referenced by DomainUserObject::checkVariable().

◆ checkVariableBoundaryIntegrity()

virtual bool BoundaryRestrictable::checkVariableBoundaryIntegrity ( ) const
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.

190{ return true; }

◆ computeReducer()

virtual void Moose::Kokkos::ReducerBase::computeReducer ( )
protectedvirtualinherited

Dispatch reduction operation.

◆ defaultReduce()

template<typename Derived >
static auto Moose::Kokkos::ReducerBase::defaultReduce ( )
inlinestaticinherited

Function used to check if users have overriden the hook method.

Returns
The function pointer of the default hook method

Definition at line 71 of file KokkosReducerBase.h.

72 {
73 return &ReducerBase::reduce<Derived>;
74 }

◆ getBlockCoordSystem()

Moose::CoordinateSystemType BlockRestrictable::getBlockCoordSystem ( )
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.

337{
338 if (!_blk_mesh)
339 mooseError("No mesh available in BlockRestrictable::checkCoordSystem()");
340 if (!_blk_feproblem)
341 mooseError("No problem available in BlockRestrictable::checkCoordSystem()");
342
343 const auto & subdomains = blockRestricted() ? blockIDs() : meshBlockIDs();
344
345 if (subdomains.empty())
346 mooseError("No subdomains found in the problem.");
347
348 // make sure all subdomains are using the same coordinate system
349 auto coord_system = _blk_feproblem->getCoordSystem(*subdomains.begin());
350 for (auto subdomain : subdomains)
351 if (_blk_feproblem->getCoordSystem(subdomain) != coord_system)
352 mooseError("This object requires all subdomains to have the same coordinate system.");
353
354 return coord_system;
355}
if(!dmm->_nl) SETERRQ(PETSC_COMM_WORLD
virtual const std::set< SubdomainID > & blockIDs() const
Return the block subdomain ids for this object Note, if this is not block restricted,...
FEProblemBase * _blk_feproblem
Pointer to FEProblemBase.
Moose::CoordinateSystemType getCoordSystem(SubdomainID sid) const

◆ hasBlockMaterialProperty()

template<typename T , bool is_ad>
bool BlockRestrictable::hasBlockMaterialProperty ( const std::string &  prop_name)
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.

Template Parameters
TThe type of material property
Parameters
prop_namethe name of the property to query
Returns
true if the property exists for all block ids of the object, otherwise false
See also
Material::hasBlockMaterialProperty

Definition at line 360 of file BlockRestrictable.h.

361{
362 mooseAssert(_blk_material_data != NULL, "MaterialData pointer is not defined");
363 return hasBlockMaterialPropertyHelper(prop_name) &&
364 _blk_material_data->haveGenericProperty<T, is_ad>(prop_name);
365}
const MaterialData * _blk_material_data
Pointer to the MaterialData class for this object.
virtual bool hasBlockMaterialPropertyHelper(const std::string &prop_name)
A helper method to allow the Material object to specialize the behavior of hasBlockMaterialProperty.
bool haveGenericProperty(const std::string &prop_name) const

◆ hasBlockMaterialPropertyHelper()

bool BlockRestrictable::hasBlockMaterialPropertyHelper ( const std::string &  prop_name)
protectedvirtualinherited

A helper method to allow the Material object to specialize the behavior of hasBlockMaterialProperty.

It also avoid circular #include problems.

See also
hasBlockMaterialProperty

Definition at line 300 of file BlockRestrictable.C.

301{
302
303 // Reference to MaterialWarehouse for testing and retrieving block ids
305
306 // Complete set of ids that this object is active
307 const std::set<SubdomainID> & ids = blockRestricted() ? blockIDs() : meshBlockIDs();
308
309 // Loop over each id for this object
310 for (const auto & id : ids)
311 {
312 // Storage of material properties that have been DECLARED on this id
313 std::set<std::string> declared_props;
314
315 // If block materials exist, populated the set of properties that were declared
316 if (warehouse.hasActiveBlockObjects(id))
317 {
318 const std::vector<std::shared_ptr<MaterialBase>> & mats = warehouse.getActiveBlockObjects(id);
319 for (const auto & mat : mats)
320 {
321 const std::set<std::string> & mat_props = mat->getSuppliedItems();
322 declared_props.insert(mat_props.begin(), mat_props.end());
323 }
324 }
325
326 // If the supplied property is not in the list of properties on the current id, return false
327 if (declared_props.find(prop_name) == declared_props.end())
328 return false;
329 }
330
331 // If you get here the supplied property is defined on all blocks
332 return true;
333}
const MaterialWarehouse & getMaterialWarehouse() const
MaterialBase objects are special in that they have additional objects created automatically (see FEPr...
const std::map< SubdomainID, std::vector< std::shared_ptr< T > > > & getActiveBlockObjects(THREAD_ID tid=0) const
bool hasActiveBlockObjects(THREAD_ID tid=0) const

Referenced by BlockRestrictable::hasBlockMaterialProperty().

◆ hasBlocks() [1/6]

bool BlockRestrictable::hasBlocks ( const std::set< SubdomainID > &  ids) const
inherited

Test if the supplied set of block ids are valid for this object.

Parameters
idsA std::set of SubdomainIDs to check
Returns
True if all of the given ids are found within the ids for this object
See also
isSubset

Definition at line 262 of file BlockRestrictable.C.

263{
264 if (_blk_ids.empty() || _blk_ids.find(Moose::ANY_BLOCK_ID) != _blk_ids.end())
265 return true;
266 else
267 return std::includes(_blk_ids.begin(), _blk_ids.end(), ids.begin(), ids.end());
268}

◆ hasBlocks() [2/6]

bool BlockRestrictable::hasBlocks ( const std::set< SubdomainName > &  names) const
inherited

Test if the supplied set of block names are valid for this object.

Parameters
namesA set of SubdomainNames to check
Returns
True if the given ids are valid for this object

Definition at line 240 of file BlockRestrictable.C.

241{
242 return hasBlocks(_blk_mesh->getSubdomainIDs(names));
243}
bool hasBlocks(const SubdomainName &name) const
Test if the supplied block name is valid for this object.
std::vector< SubdomainID > getSubdomainIDs(const std::vector< SubdomainName > &subdomain_names) const
Get the associated subdomainIDs for the subdomain names that are passed in.
Definition MooseMesh.C:1726

◆ hasBlocks() [3/6]

bool BlockRestrictable::hasBlocks ( const std::vector< SubdomainID > &  ids) const
inherited

Test if the supplied vector block ids are valid for this object.

Parameters
idsA vector of SubdomainIDs ids to check
Returns
True if all of the given ids are found within the ids for this object

Definition at line 255 of file BlockRestrictable.C.

256{
257 std::set<SubdomainID> ids_set(ids.begin(), ids.end());
258 return hasBlocks(ids_set);
259}

◆ hasBlocks() [4/6]

bool BlockRestrictable::hasBlocks ( const std::vector< SubdomainName > &  names) const
inherited

Test if the supplied vector of block names are valid for this object.

Parameters
namesA vector of SubdomainNames to check
Returns
True if the given ids are valid for this object

Definition at line 234 of file BlockRestrictable.C.

235{
236 return hasBlocks(_blk_mesh->getSubdomainIDs(names));
237}

◆ hasBlocks() [5/6]

bool BlockRestrictable::hasBlocks ( const SubdomainName &  name) const
inherited

Test if the supplied block name is valid for this object.

Parameters
nameA SubdomainName to check
Returns
True if the given id is valid for this object

Definition at line 224 of file BlockRestrictable.C.

225{
226 // Create a vector and utilize the getSubdomainIDs function, which
227 // handles the ANY_BLOCK_ID (getSubdomainID does not)
228 std::vector<SubdomainName> names(1);
229 names[0] = name;
230 return hasBlocks(_blk_mesh->getSubdomainIDs(names));
231}
std::string name(const ElemQuality q)

Referenced by LinearFVFluxKernel::addMatrixContribution(), DiracKernelBase::addPoint(), LinearFVFluxKernel::addRightHandSideContribution(), NodalPatchRecoveryBase::addToQuery(), MultiAppVariableValueSamplePostprocessorTransfer::cacheElemToPostprocessorData(), DomainUserObject::checkVariable(), ComputeJacobianThread::compute(), ComboMarker::computeElementMarker(), GradientJumpIndicator::computeQpIntegral(), ProjectionAux::computeValue(), DebugResidualAux::DebugResidualAux(), DomainUserObject::DomainUserObject(), ProjectionAux::elemOnNodeVariableIsDefinedOn(), MultiAppVariableValueSamplePostprocessorTransfer::execute(), CentroidMultiApp::fillPositions(), QuadraturePointMultiApp::fillPositions(), NodalPatchRecoveryBase::gatherRequestList(), NodalPatchRecoveryBase::getCoefficients(), BlockRestrictable::hasBlocks(), BlockRestrictable::hasBlocks(), BlockRestrictable::hasBlocks(), MooseVariableField< OutputType >::hasBlocks(), BlockRestrictable::hasBlocks(), MeshDivisionFunctorReductionVectorPostprocessor::hasBlocks(), FVFluxKernel::hasFaceSide(), IndicatorMarker::IndicatorMarker(), NodePositions::initialize(), ParsedDownSelectionPositions::initialize(), UpdateErrorVectorsThread::onElement(), PointwiseRenormalizeVector::PointwiseRenormalizeVector(), and BlockRestrictionDebugOutput::printBlockRestrictionMap().

◆ hasBlocks() [6/6]

bool BlockRestrictable::hasBlocks ( SubdomainID  id) const
inherited

Test if the supplied block ids are valid for this object.

Parameters
idA SubdomainID to check
Returns
True if the given id is valid for this object

Definition at line 246 of file BlockRestrictable.C.

247{
248 if (_blk_ids.empty() || _blk_ids.find(Moose::ANY_BLOCK_ID) != _blk_ids.end())
249 return true;
250 else
251 return _blk_ids.find(id) != _blk_ids.end();
252}

◆ hasBoundary() [1/5]

bool BoundaryRestrictable::hasBoundary ( const BoundaryID id) const
inherited

Test if the supplied boundary ids are valid for this object.

Parameters
idA BoundaryID to check
Returns
True if the given id is valid for this object

Definition at line 268 of file BoundaryRestrictable.C.

269{
270 if (_bnd_ids.empty() || _bnd_ids.find(Moose::ANY_BOUNDARY_ID) != _bnd_ids.end())
271 return true;
272 else
273 return _bnd_ids.find(id) != _bnd_ids.end();
274}
const BoundaryID ANY_BOUNDARY_ID
Definition MooseTypes.C:21

◆ hasBoundary() [2/5]

bool BoundaryRestrictable::hasBoundary ( const BoundaryName &  name) const
inherited

Test if the supplied boundary name is valid for this object.

Parameters
nameA BoundaryName to check
Returns
True if the given id is valid for this object

Definition at line 254 of file BoundaryRestrictable.C.

255{
256 // Create a vector and utilize the getBoundaryIDs function, which
257 // handles the ANY_BOUNDARY_ID (getBoundaryID does not)
258 return hasBoundary(_bnd_mesh->getBoundaryIDs({name}));
259}
MooseMesh * _bnd_mesh
Point to mesh.
bool hasBoundary(const BoundaryName &name) const
Test if the supplied boundary name is valid for this object.
std::vector< BoundaryID > getBoundaryIDs(const Elem *const elem, const unsigned short int side) const
Returns a vector of boundary IDs for the requested element on the requested side.
Definition MooseMesh.C:3027

Referenced by BoundaryRestrictable::hasBoundary(), BoundaryRestrictable::hasBoundary(), BoundaryRestrictable::hasBoundary(), BoundaryRestrictable::hasBoundary(), BoundaryRestrictable::hasBoundaryMaterialPropertyHelper(), NodePositions::initialize(), and AuxKernelBase::initialSetup().

◆ hasBoundary() [3/5]

bool BoundaryRestrictable::hasBoundary ( const std::set< BoundaryID > &  ids,
TEST_TYPE  type = ALL 
) const
inherited

Test if the supplied set of boundary ids are valid for this object.

Parameters
idsA std::set of BoundaryIDs to check
typeA 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
Returns
True if the all of the given ids are found within the ids for this object
See also
isSubset

Definition at line 284 of file BoundaryRestrictable.C.

285{
286 // An empty input is assumed to be ANY_BOUNDARY_ID
287 if (ids.empty() || ids.find(Moose::ANY_BOUNDARY_ID) != ids.end())
288 return true;
289
290 // All supplied IDs must match those of the object
291 else if (type == ALL)
292 {
293 if (_bnd_ids.find(Moose::ANY_BOUNDARY_ID) != _bnd_ids.end())
294 return true;
295 else
296 return std::includes(_bnd_ids.begin(), _bnd_ids.end(), ids.begin(), ids.end());
297 }
298 // Any of the supplied IDs must match those of the object
299 else
300 {
301 // Loop through the supplied ids
302 for (const auto & id : ids)
303 {
304 // Test the current supplied id
305 bool test = hasBoundary(id);
306
307 // If the id exists in the stored ids, then return true, otherwise
308 if (test)
309 return true;
310 }
311 return false;
312 }
313}

◆ hasBoundary() [4/5]

bool BoundaryRestrictable::hasBoundary ( const std::vector< BoundaryID > &  ids,
TEST_TYPE  type = ALL 
) const
inherited

Test if the supplied vector boundary ids are valid for this object.

Parameters
idsA vector of BoundaryIDs ids to check
typeA 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
Returns
True if the all of the given ids are found within the ids for this object

Definition at line 277 of file BoundaryRestrictable.C.

278{
279 std::set<BoundaryID> ids_set(ids.begin(), ids.end());
280 return hasBoundary(ids_set, type);
281}

◆ hasBoundary() [5/5]

bool BoundaryRestrictable::hasBoundary ( const std::vector< BoundaryName > &  names) const
inherited

Test if the supplied vector of boundary names are valid for this object.

Parameters
namesA vector of BoundaryNames to check
Returns
True if the given ids are valid for this object

Definition at line 262 of file BoundaryRestrictable.C.

263{
264 return hasBoundary(_bnd_mesh->getBoundaryIDs(names));
265}

◆ hasBoundaryMaterialProperty()

template<typename T , bool is_ad>
bool BoundaryRestrictable::hasBoundaryMaterialProperty ( const std::string &  prop_name) const
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.

Template Parameters
TThe type of material property
Parameters
prop_namethe name of the property to query
Returns
true if the property exists for all boundary ids of the object, otherwise false

Definition at line 295 of file BoundaryRestrictable.h.

296{
297 // If you get here the supplied property is defined on all boundaries, but is still subject
298 // existence in the MateialData class
299 return hasBoundaryMaterialPropertyHelper(prop_name) &&
300 _bnd_material_data.haveGenericProperty<T, is_ad>(prop_name);
301}
bool hasBoundaryMaterialPropertyHelper(const std::string &prop_name) const
A helper method to avoid circular #include problems.
const MaterialData & _bnd_material_data
Pointer to MaterialData for boundary (.

◆ hasBoundaryMaterialPropertyHelper()

bool BoundaryRestrictable::hasBoundaryMaterialPropertyHelper ( const std::string &  prop_name) const
protectedinherited

A helper method to avoid circular #include problems.

See also
hasBoundaryMaterialProperty

Definition at line 345 of file BoundaryRestrictable.C.

346{
347 // Reference to MaterialWarehouse for testing and retrieving boundary ids
349
350 // Complete set of BoundaryIDs that this object is defined
351 const std::set<BoundaryID> & ids =
353
354 // Loop over each BoundaryID for this object
355 for (const auto & id : ids)
356 {
357 // Storage of material properties that have been DECLARED on this BoundaryID
358 std::set<std::string> declared_props;
359
360 // If boundary materials exist, populated the set of properties that were declared
361 if (warehouse.hasActiveBoundaryObjects(id))
362 {
363 const std::vector<std::shared_ptr<MaterialBase>> & mats =
364 warehouse.getActiveBoundaryObjects(id);
365 for (const auto & mat : mats)
366 {
367 const std::set<std::string> & mat_props = mat->getSuppliedItems();
368 declared_props.insert(mat_props.begin(), mat_props.end());
369 }
370 }
371
372 // If the supplied property is not in the list of properties on the current id, return false
373 if (declared_props.find(prop_name) == declared_props.end())
374 return false;
375 }
376
377 // If you get here the supplied property is defined on all boundaries
378 return true;
379}
FEProblemBase * _bnd_feproblem
Pointer to FEProblemBase.
const std::set< BoundaryID > & meshBoundaryIDs() const
Returns the set of all boundary ids for the entire mesh.
virtual const std::set< BoundaryID > & boundaryIDs() const
Return the boundary IDs for this object.
const std::map< BoundaryID, std::vector< std::shared_ptr< T > > > & getActiveBoundaryObjects(THREAD_ID tid=0) const
bool hasActiveBoundaryObjects(THREAD_ID tid=0) const

Referenced by BoundaryRestrictable::hasBoundaryMaterialProperty().

◆ init()

template<typename Derived >
KOKKOS_FUNCTION void Moose::Kokkos::ReducerBase::init ( Real *  ) const
inlineinherited

Definition at line 59 of file KokkosReducerBase.h.

60 {
61 ::Kokkos::abort("Default init() should never be called. Make sure you properly redefined this "
62 "method in your class without typos.");
63 }

◆ initializeBlockRestrictable()

void BlockRestrictable::initializeBlockRestrictable ( const MooseObject moose_object)
protectedinherited

An initialization routine needed for dual constructors.

Definition at line 76 of file BlockRestrictable.C.

77{
78 // If the mesh pointer is not defined, but FEProblemBase is, get it from there
79 if (_blk_feproblem != NULL && _blk_mesh == NULL)
81
82 // Check that the mesh pointer was defined, it is required for this class to operate
83 if (_blk_mesh == NULL)
84 mooseError("The input parameters must contain a pointer to FEProblem via '_fe_problem' or a "
85 "pointer to the MooseMesh via '_mesh'");
86
87 // Populate the MaterialData pointer
88 if (_blk_feproblem != NULL)
89 {
90#ifdef MOOSE_KOKKOS_ENABLED
93 else
94#endif
96 }
97
98 // The 'block' input is defined
99 if (moose_object->isParamValid("block"))
100 {
101 // Extract the blocks from the input
102 _blocks = moose_object->getParam<std::vector<SubdomainName>>("block");
103
104 // Store the IDs in a set, handling ANY_BLOCK_ID if supplied
105 if (std::find(_blocks.begin(), _blocks.end(), "ANY_BLOCK_ID") != _blocks.end())
107 else
108 {
109 // Get the IDs from the supplied names
111 _blk_ids.insert(_vec_ids.begin(), _vec_ids.end());
112 }
113 }
114
115 // When 'blocks' is not set and there is a "variable", use the blocks from the variable
116 else if (moose_object->isParamValid("variable"))
117 {
118 std::string variable_name = moose_object->parameters().getMooseType("variable");
119 if (!variable_name.empty())
121 ->getVariable(_blk_tid,
122 variable_name,
125 .activeSubdomains();
126 }
127
128 // Produce error if the object is not allowed to be both block and boundary restricted
129 if (!_blk_dual_restrictable && !_boundary_ids.empty() && !_boundary_ids.empty())
131 moose_object->paramError("block",
132 "Attempted to restrict the object '",
133 _blk_name,
134 "' to a block, but the object is already restricted by boundary");
135
136 // If no blocks were defined above, specify that it is valid on all blocks
137 if (_blk_ids.empty() && !moose_object->isParamValid("boundary"))
138 {
140 _blocks = {"ANY_BLOCK_ID"};
141 }
142
143 // If this object is block restricted, check that defined blocks exist on the mesh
144 if (_blk_ids.find(Moose::ANY_BLOCK_ID) == _blk_ids.end())
145 {
146 const std::set<SubdomainID> & valid_ids = _blk_mesh->meshSubdomains();
147 std::vector<SubdomainID> diff;
148
149 std::set_difference(_blk_ids.begin(),
150 _blk_ids.end(),
151 valid_ids.begin(),
152 valid_ids.end(),
153 std::back_inserter(diff));
154
155 if (!diff.empty())
156 {
157 std::ostringstream msg;
158 auto sep = " ";
159 msg << "the following blocks (ids) do not exist on the mesh:";
160 for (const auto & id : diff)
161 {
162 if (_blk_name.size() > 0)
163 {
164 auto & name =
165 _blocks.at(std::find(_vec_ids.begin(), _vec_ids.end(), id) - _vec_ids.begin());
166 if (std::to_string(id) != name)
167 msg << sep << name << " (" << id << ")";
168 else
169 msg << sep << id;
170 }
171 else
172 msg << sep << id;
173 sep = ", ";
174 }
175 std::vector<SubdomainID> valid_ids_vec(valid_ids.begin(), valid_ids.end());
176 auto valid_names = _blk_mesh->getSubdomainNames(valid_ids_vec);
177 msg << "\nBlocks names (resp. ids) that do exist: " << Moose::stringify(valid_names) << " ("
178 << Moose::stringify(valid_ids) << ")";
179 moose_object->paramError("block", msg.str());
180 }
181 }
182
183 // Get the mesh dimension for the blocks
184 if (blockRestricted())
186 else
188
189#ifdef MOOSE_KOKKOS_ENABLED
190 if (moose_object->isKokkosObject())
193#endif
194}
THREAD_ID _blk_tid
Thread id for this object.
const bool _blk_dual_restrictable
Flag for allowing dual restriction.
std::vector< SubdomainID > _vec_ids
Vector of block ids supplied by the user via the input file (for error reporting)
const MooseObject * _moose_object
Pointer to the MOOSE object.
void initializeKokkosBlockRestrictable()
const std::set< BoundaryID > & _boundary_ids
Reference to the boundary_ids, defaults to an empty set if not provided.
MaterialData & getMaterialData(Moose::MaterialDataType type, const THREAD_ID tid=0, const MooseObject *object=nullptr) const
MaterialData & getKokkosMaterialData(Moose::MaterialDataType type, const MooseObject *object=nullptr) const
void addKokkosMeshInitializationHook(std::function< void()> function)
Add a function hook that needs to be called after Kokkos mesh initialization.
virtual MooseMesh & mesh() override
std::string getMooseType(const std::string &name) const
Utility functions for retrieving one of the MooseTypes variables into the common "string" base class.
const InputParameters & parameters() const
Get the parameters of the object.
Definition MooseBase.h:131
void paramError(const std::string &param, Args... args) const
Emits an error prefixed with the file and line number of the given param (from the input file) along ...
Definition MooseBase.h:457
const T & getParam(const std::string &name) const
Retrieve a parameter for the object.
Definition MooseBase.h:406
bool isParamValid(const std::string &name) const
Test if the supplied parameter is valid.
Definition MooseBase.h:199
virtual unsigned int dimension() const
Returns MeshBase::mesh_dimension(), (not MeshBase::spatial_dimension()!) of the underlying libMesh me...
Definition MooseMesh.C:2986
std::vector< SubdomainName > getSubdomainNames(const std::vector< SubdomainID > &subdomain_ids) const
Get the associated subdomainNames for the subdomain ids that are passed in.
Definition MooseMesh.C:1757
unsigned int getBlocksMaxDimension(const std::vector< SubdomainName > &blocks) const
Returns the maximum element dimension on the given blocks.
Definition MooseMesh.C:3007
bool isKokkosObject() const
Get whether this object is a Kokkos functor The parameter MooseBase::kokkos_object_param is set by th...
Definition MooseObject.h:63
@ VAR_FIELD_ANY
Definition MooseTypes.h:781
@ BLOCK_MATERIAL_DATA
Definition MooseTypes.h:747
@ VAR_ANY
Definition MooseTypes.h:772

Referenced by BlockRestrictable::BlockRestrictable(), and BlockRestrictable::BlockRestrictable().

◆ initializeBoundaryRestrictable()

void BoundaryRestrictable::initializeBoundaryRestrictable ( )
privateinherited

An initialization routine needed for dual constructors.

Definition at line 84 of file BoundaryRestrictable.C.

85{
86 // The name and id of the object
87 const std::string & name = _moose_object.name();
88
89 // If the mesh pointer is not defined, but FEProblemBase is, get it from there
90 if (_bnd_feproblem != NULL && _bnd_mesh == NULL)
92
93 // Check that the mesh pointer was defined, it is required for this class to operate
94 if (_bnd_mesh == NULL)
95 mooseError("The input parameters must contain a pointer to FEProblemBase via '_fe_problem' or "
96 "a pointer to the MooseMesh via '_mesh'");
97
98 // If the user supplies boundary IDs
99 if (_moose_object.isParamValid("boundary"))
100 {
101 // Extract the blocks from the input
102 _boundary_names = _moose_object.getParam<std::vector<BoundaryName>>("boundary");
103
104 // Get the IDs from the supplied names
106
107 // Store the IDs, handling ANY_BOUNDARY_ID if supplied
108 if (std::find(_boundary_names.begin(), _boundary_names.end(), "ANY_BOUNDARY_ID") !=
109 _boundary_names.end())
111 else
112 _bnd_ids.insert(_vec_ids.begin(), _vec_ids.end());
113 }
114
115 // Produce error if the object is not allowed to be both block and boundary restricted
116 if (!_bnd_dual_restrictable && !_bnd_ids.empty() && !_block_ids.empty())
117 if (!_block_ids.empty() && _block_ids.find(Moose::ANY_BLOCK_ID) == _block_ids.end())
118 _moose_object.paramError("boundary",
119 "Attempted to restrict the object '",
120 name,
121 "' to a boundary, but the object is already restricted by block(s)");
122
123 // Store ANY_BOUNDARY_ID if empty
124 if (_bnd_ids.empty())
125 {
127 _boundary_names = {"ANY_BOUNDARY_ID"};
128 }
129
130 // If this object is block restricted, check that defined blocks exist on the mesh
131 if (_bnd_ids.find(Moose::ANY_BOUNDARY_ID) == _bnd_ids.end())
132 {
133 const std::set<BoundaryID> * valid_ids;
134 const char * message_ptr = nullptr;
135
136 if (_bnd_nodal)
137 {
138 valid_ids = &_bnd_mesh->meshNodesetIds();
139 message_ptr = "node sets";
140 }
141 else
142 {
143 valid_ids = &_bnd_mesh->meshSidesetIds();
144 message_ptr = "side sets";
145 }
146
147 std::vector<BoundaryID> diff;
148
149 std::set_difference(_bnd_ids.begin(),
150 _bnd_ids.end(),
151 valid_ids->begin(),
152 valid_ids->end(),
153 std::back_inserter(diff));
154
155 if (!diff.empty())
156 {
157 std::ostringstream msg;
158 auto sep = " ";
159 msg << "the following " << message_ptr << " (ids) do not exist on the mesh:";
160 for (const auto & id : diff)
161 {
162 if (_boundary_names.size() > 0)
163 {
164 auto & name = _boundary_names.at(std::find(_vec_ids.begin(), _vec_ids.end(), id) -
165 _vec_ids.begin());
166 if (std::to_string(id) != name)
167 msg << sep << name << " (" << id << ")";
168 else
169 msg << sep << id;
170 }
171 else
172 msg << sep << id;
173 sep = ", ";
174 }
175
176 const auto & other_ids =
178 std::vector<BoundaryID> other_boundary_ids;
179 std::set_intersection(diff.begin(),
180 diff.end(),
181 other_ids.begin(),
182 other_ids.end(),
183 std::back_inserter(other_boundary_ids));
184 if (!other_boundary_ids.empty())
185 {
186 msg << "\n\nThe following boundary ";
187 if (other_boundary_ids.size() == 1)
188 msg << "id exists";
189 else
190 msg << "ids exist";
191 if (other_boundary_ids.size() == 1)
192 msg << " as " << (_bnd_nodal ? "a side set" : "a node set")
193 << " but is being requested as " << (_bnd_nodal ? "a node set" : "a side set") << ":";
194 else
195 msg << " as " << (_bnd_nodal ? "side sets" : "node sets")
196 << " but are being requested as " << (_bnd_nodal ? "node sets" : "side sets") << ":";
197
198 sep = " ";
199 for (const auto id : other_boundary_ids)
200 {
201 msg << sep << id;
202 sep = ", ";
203 }
204
205 if (!_bnd_nodal)
206 msg << "\n\nTry setting Mesh/construct_side_list_from_node_list=true if you want side "
207 "sets constructed from node sets.";
208 }
209
210 _moose_object.paramError("boundary", msg.str());
211 }
212 }
213
214#ifdef MOOSE_KOKKOS_ENABLED
218#endif
219}
const bool _bnd_dual_restrictable
Flag for allowing dual restriction with BlockRestrictable.
void initializeKokkosBoundaryRestrictable()
const std::set< SubdomainID > & _block_ids
Reference to the block_ids, defaults to an empty set if not provided.
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.
std::vector< BoundaryID > _vec_ids
Vector of the boundary ids.
const std::set< BoundaryID > & meshNodesetIds() const
Returns a read-only reference to the set of nodesets currently present in the Mesh.
Definition MooseMesh.C:3290
const std::set< BoundaryID > & meshSidesetIds() const
Returns a read-only reference to the set of sidesets currently present in the Mesh.
Definition MooseMesh.C:3284

Referenced by BoundaryRestrictable::BoundaryRestrictable(), and BoundaryRestrictable::BoundaryRestrictable().

◆ initializeKokkosBlockRestrictable()

void BlockRestrictable::initializeKokkosBlockRestrictable ( )
protectedinherited

◆ initializeKokkosBoundaryRestrictable()

void BoundaryRestrictable::initializeKokkosBoundaryRestrictable ( )
privateinherited

◆ isBlockSubset() [1/2]

bool BlockRestrictable::isBlockSubset ( const std::set< SubdomainID > &  ids) const
inherited

Test if the class block ids are a subset of the supplied objects.

Parameters
idsA std::set of Subdomains to check
Returns
True if all of the block ids for this class are found within the given ids (opposite of hasBlocks)
See also
hasBlocks

Definition at line 271 of file BlockRestrictable.C.

272{
273 // An empty input is assumed to be ANY_BLOCK_ID
274 if (ids.empty() || ids.find(Moose::ANY_BLOCK_ID) != ids.end())
275 return true;
276
277 if (_blk_ids.find(Moose::ANY_BLOCK_ID) != _blk_ids.end())
278 return std::includes(ids.begin(),
279 ids.end(),
280 _blk_mesh->meshSubdomains().begin(),
281 _blk_mesh->meshSubdomains().end());
282 else
283 return std::includes(ids.begin(), ids.end(), _blk_ids.begin(), _blk_ids.end());
284}

Referenced by BlockRestrictable::checkVariable(), BlockRestrictable::isBlockSubset(), NodalPatchRecoveryAux::NodalPatchRecoveryAux(), and ProjectedMaterialPropertyNodalPatchRecoveryAux::ProjectedMaterialPropertyNodalPatchRecoveryAux().

◆ isBlockSubset() [2/2]

bool BlockRestrictable::isBlockSubset ( const std::vector< SubdomainID > &  ids) const
inherited

Test if the class block ids are a subset of the supplied objects.

Parameters
idsA std::vector of Subdomains to check
Returns
True if all of the block ids for this class are found within the given ids (opposite of hasBlocks)
See also
hasBlocks

Definition at line 287 of file BlockRestrictable.C.

288{
289 std::set<SubdomainID> ids_set(ids.begin(), ids.end());
290 return isBlockSubset(ids_set);
291}

◆ isBoundarySubset() [1/2]

bool BoundaryRestrictable::isBoundarySubset ( const std::set< BoundaryID > &  ids) const
inherited

Test if the class boundary ids are a subset of the supplied objects.

Parameters
idsA std::set of boundaries to check
Returns
True if all of the boundary ids for this class are found within the given ids (opposite of hasBoundary)
See also
hasBoundary

Definition at line 316 of file BoundaryRestrictable.C.

317{
318 // An empty input is assumed to be ANY_BOUNDARY_ID
319 if (ids.empty() || ids.find(Moose::ANY_BOUNDARY_ID) != ids.end())
320 return true;
321
322 if (_bnd_ids.find(Moose::ANY_BOUNDARY_ID) != _bnd_ids.end())
323 return std::includes(ids.begin(),
324 ids.end(),
325 _bnd_mesh->meshBoundaryIds().begin(),
326 _bnd_mesh->meshBoundaryIds().end());
327 else
328 return std::includes(ids.begin(), ids.end(), _bnd_ids.begin(), _bnd_ids.end());
329}
const std::set< BoundaryID > & meshBoundaryIds() const
Returns a read-only reference to the set of boundary IDs currently present in the Mesh.
Definition MooseMesh.C:3278

Referenced by BoundaryRestrictable::isBoundarySubset().

◆ isBoundarySubset() [2/2]

bool BoundaryRestrictable::isBoundarySubset ( const std::vector< BoundaryID > &  ids) const
inherited

Definition at line 332 of file BoundaryRestrictable.C.

333{
334 std::set<BoundaryID> ids_set(ids.begin(), ids.end());
335 return isBoundarySubset(ids_set);
336}
bool isBoundarySubset(const std::set< BoundaryID > &ids) const
Test if the class boundary ids are a subset of the supplied objects.

◆ join()

template<typename Derived >
KOKKOS_FUNCTION void Moose::Kokkos::ReducerBase::join ( Real *  ,
const Real *   
) const
inlineinherited

Definition at line 53 of file KokkosReducerBase.h.

54 {
55 ::Kokkos::abort("Default join() should never be called. Make sure you properly redefined this "
56 "method in your class without typos.");
57 }

◆ kokkosAssembly()

KOKKOS_FUNCTION const Assembly & Moose::Kokkos::AssemblyHolder::kokkosAssembly ( ) const
inlineinherited

Get the const reference of the Kokkos assembly.

Returns
The const reference of the Kokkos assembly depending on the architecture this function is being called on

Definition at line 634 of file KokkosAssembly.h.

635 {
636 KOKKOS_IF_ON_HOST(return _assembly_host;)
637
638 return _assembly_device;
639 }
const Assembly _assembly_device
Device copy of the Kokkos assembly.
const Assembly & _assembly_host
Host reference of the Kokkos assembly.

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()(), operator()(), Moose::Kokkos::SideReducer::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()().

◆ kokkosBlockElementID()

KOKKOS_FUNCTION ContiguousElementID BlockRestrictable::kokkosBlockElementID ( Moose::Kokkos::ThreadID  tid) const
inlineprotectedinherited

◆ kokkosBlockElementSideID()

KOKKOS_FUNCTION auto BlockRestrictable::kokkosBlockElementSideID ( Moose::Kokkos::ThreadID  tid) const
inlineprotectedinherited

Get the contiguous element ID - side index pair this Kokkos thread is operating on.

Parameters
tidThe thread ID
Returns
The contiguous element ID - side index pair

Definition at line 298 of file BlockRestrictable.h.

299 {
300 return _kokkos_element_side_ids[tid];
301 }
Moose::Kokkos::Array< Moose::Kokkos::Pair< ContiguousElementID, unsigned int > > _kokkos_element_side_ids
List of contiguous local element ID - side index pairs this Kokkos object is operating on.

◆ kokkosBlockNodeID()

KOKKOS_FUNCTION ContiguousElementID BlockRestrictable::kokkosBlockNodeID ( Moose::Kokkos::ThreadID  tid) const
inlineprotectedinherited

Get the contiguous node index this Kokkos thread is operating on.

Parameters
tidThe thread ID
Returns
the contiguous node ID

Definition at line 289 of file BlockRestrictable.h.

290 {
291 return _kokkos_node_ids[tid];
292 }
Moose::Kokkos::Array< ContiguousNodeID > _kokkos_node_ids
List of contiguous node IDs this Kokkos object is operating on.

Referenced by Moose::Kokkos::NodalUserObject::operator()(), Moose::Kokkos::NodalKernel::operator()(), Moose::Kokkos::AuxKernel::operator()(), Moose::Kokkos::NodalKernel::operator()(), operator()(), and Moose::Kokkos::NodalKernel::operator()().

◆ kokkosBoundaryElementSideID()

KOKKOS_FUNCTION auto BoundaryRestrictable::kokkosBoundaryElementSideID ( Moose::Kokkos::ThreadID  tid) const
inlineprotectedinherited

Get the contiguous element ID - side index pair this Kokkos thread is operating on.

Parameters
tidThe thread ID
Returns
The contiguous element ID - side index pair

Definition at line 273 of file BoundaryRestrictable.h.

274 {
275 return _kokkos_element_side_ids[tid];
276 }
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.

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()(), Moose::Kokkos::SideReducer::operator()(), Moose::Kokkos::ADIntegratedBC::operator()(), Moose::Kokkos::IntegratedBC::operator()(), and Moose::Kokkos::VectorIntegratedBC::operator()().

◆ kokkosBoundaryNodeID()

KOKKOS_FUNCTION ContiguousNodeID BoundaryRestrictable::kokkosBoundaryNodeID ( Moose::Kokkos::ThreadID  tid) const
inlineprotectedinherited

◆ kokkosMesh()

KOKKOS_FUNCTION const Mesh & Moose::Kokkos::MeshHolder::kokkosMesh ( ) const
inlineinherited

Get the const reference of the Kokkos mesh.

Returns
The const reference of the Kokkos mesh depending on the architecture this function is being called on

Definition at line 651 of file KokkosMesh.h.

652 {
653 KOKKOS_IF_ON_HOST(
655 "kokkosMesh() was called too early. Kokkos mesh is available after problem "
656 "initialization. Override initialSetup() if you need to setup your object data "
657 "using the Kokkos mesh.");
658
659 return _mesh_host;)
660
661 return _mesh_device;
662 }
const Mesh & _mesh_host
Host reference of the Kokkos mesh.
Definition KokkosMesh.h:669
const Mesh _mesh_device
Device copy of the Kokkos mesh.
Definition KokkosMesh.h:673
bool initialized() const
Get whether the mesh was initialized.
Definition KokkosMesh.h:68

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().

◆ meshBlockIDs()

const std::set< SubdomainID > & BlockRestrictable::meshBlockIDs ( ) const
inherited

Return all of the SubdomainIDs for the mesh.

Returns
A set of all subdomians for the entire mesh

Definition at line 294 of file BlockRestrictable.C.

295{
296 return _blk_mesh->meshSubdomains();
297}

Referenced by BlockRestrictable::checkVariable(), ElementGroupCentroidPositions::ElementGroupCentroidPositions(), BlockRestrictable::getBlockCoordSystem(), BlockRestrictable::hasBlockMaterialPropertyHelper(), and SolutionIC::initialSetup().

◆ meshBoundaryIDs()

const std::set< BoundaryID > & BoundaryRestrictable::meshBoundaryIDs ( ) const
inherited

Returns the set of all boundary ids for the entire mesh.

Returns
A const reference the the boundary ids for the entire mesh

Definition at line 339 of file BoundaryRestrictable.C.

340{
341 return _bnd_mesh->getBoundaryIDs();
342}

Referenced by BoundaryRestrictable::hasBoundaryMaterialPropertyHelper().

◆ numBlocks()

unsigned int BlockRestrictable::numBlocks ( ) const
inherited

Return the number of blocks for this object.

Returns
The number of subdomains

Definition at line 218 of file BlockRestrictable.C.

219{
220 return (unsigned int)_blk_ids.size();
221}

Referenced by ElementCentroidPositions::initialize(), and QuadraturePointsPositions::initialize().

◆ numBoundaryIDs()

unsigned int BoundaryRestrictable::numBoundaryIDs ( ) const
inherited

Return the number of boundaries for this object.

Returns
The number of boundary ids

Definition at line 236 of file BoundaryRestrictable.C.

237{
238 return (unsigned int)_bnd_ids.size();
239}

Referenced by SidesetInfoVectorPostprocessor::initialize().

◆ numKokkosBlockElements()

KOKKOS_FUNCTION dof_id_type BlockRestrictable::numKokkosBlockElements ( ) const
inlineprotectedinherited

Get the number of elements this Kokkos object is operating on.

Returns
The number of elements local to this process

Definition at line 261 of file BlockRestrictable.h.

261{ return _kokkos_element_ids.size(); }
KOKKOS_FUNCTION index_type size() const
Get the total array size.

Referenced by Moose::Kokkos::ElementReducer::numReducerThreads(), and Moose::Kokkos::ElementUserObject::numUserObjectThreads().

◆ numKokkosBlockNodes()

KOKKOS_FUNCTION dof_id_type BlockRestrictable::numKokkosBlockNodes ( ) const
inlineprotectedinherited

Get the number of nodes this Kokkos object is operating on.

Returns
The number of nodes local to this process

Definition at line 266 of file BlockRestrictable.h.

266{ return _kokkos_node_ids.size(); }

Referenced by numReducerThreads(), and Moose::Kokkos::NodalUserObject::numUserObjectThreads().

◆ numKokkosBlockSides()

KOKKOS_FUNCTION dof_id_type BlockRestrictable::numKokkosBlockSides ( ) const
inlineprotectedinherited

Get the number of sides this Kokkos object is operating on.

Returns
The number of sides local to this process

Definition at line 271 of file BlockRestrictable.h.

272 {
274 }

◆ numKokkosBoundaryNodes()

KOKKOS_FUNCTION dof_id_type BoundaryRestrictable::numKokkosBoundaryNodes ( ) const
inlineprotectedinherited

Get the number of nodes this Kokkos object is operating on.

Returns
The number of nodes local to this process

Definition at line 250 of file BoundaryRestrictable.h.

250{ return _kokkos_node_ids.size(); }

Referenced by numReducerThreads(), and Moose::Kokkos::NodalUserObject::numUserObjectThreads().

◆ numKokkosBoundarySides()

KOKKOS_FUNCTION dof_id_type BoundaryRestrictable::numKokkosBoundarySides ( ) const
inlineprotectedinherited

Get the number of sides this Kokkos object is operating on.

Returns
The number of sides local to this process

Definition at line 255 of file BoundaryRestrictable.h.

256 {
258 }

Referenced by Moose::Kokkos::SideReducer::numReducerThreads(), and Moose::Kokkos::SideUserObject::numUserObjectThreads().

◆ numReducerThreads()

virtual ThreadID Moose::Kokkos::NodalReducer::numReducerThreads ( ) const
inlineoverridevirtual

Get the number of threads.

Implements Moose::Kokkos::ReducerBase.

Definition at line 32 of file KokkosNodalReducer.h.

33 {
35 }
KOKKOS_FUNCTION dof_id_type numKokkosBlockNodes() const
Get the number of nodes this Kokkos object is operating on.
KOKKOS_FUNCTION dof_id_type numKokkosBoundaryNodes() const
Get the number of nodes this Kokkos object is operating on.
const bool _bnd
Flag whether this object is boundary-restricted.

◆ operator()()

template<typename Derived >
KOKKOS_FUNCTION void Moose::Kokkos::NodalReducer::operator() ( ReducerLoop  ,
const ThreadID  tid,
const Derived &  reducer,
Real *  result 
) const

The parallel computation entry function called by Kokkos.

Definition at line 57 of file KokkosNodalReducer.h.

61{
62 auto node = _bnd ? kokkosBoundaryNodeID(tid) : kokkosBlockNodeID(tid);
63
64 Datum datum(node, kokkosAssembly(), kokkosSystems());
65
66 reducer.template reduce<Derived>(datum, result);
67}
KOKKOS_FUNCTION ContiguousElementID kokkosBlockNodeID(Moose::Kokkos::ThreadID tid) const
Get the contiguous node index this Kokkos thread 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 const Assembly & kokkosAssembly() const
Get the const reference of the Kokkos assembly.
The Kokkos object that holds thread-private data in the parallel operations of any Kokkos object.

◆ reduce()

template<typename Derived >
KOKKOS_FUNCTION void Moose::Kokkos::ReducerBase::reduce ( Datum ,
Real *   
) const
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.

48 {
49 ::Kokkos::abort("Default reduce() should never be called. Make sure you properly redefined "
50 "this method in your class without typos.");
51 }

◆ restricted()

bool BoundaryRestrictable::restricted ( const std::set< BoundaryID > &  ids)
staticinherited

Helper for determining if the object is boundary restricted.

This is needed for the MaterialPropertyInterface.

Definition at line 248 of file BoundaryRestrictable.C.

249{
250 return ids.find(Moose::ANY_BOUNDARY_ID) == ids.end();
251}

Referenced by BoundaryRestrictable::boundaryRestricted(), and moose::internal::boundaryRestricted().

◆ validParams()

static InputParameters Moose::Kokkos::NodalReducer::validParams ( )
static

Member Data Documentation

◆ _assembly_device

const Assembly Moose::Kokkos::AssemblyHolder::_assembly_device
privateinherited

Device copy of the Kokkos assembly.

Definition at line 650 of file KokkosAssembly.h.

Referenced by Moose::Kokkos::AssemblyHolder::kokkosAssembly().

◆ _assembly_host

const Assembly& Moose::Kokkos::AssemblyHolder::_assembly_host
privateinherited

Host reference of the Kokkos assembly.

Definition at line 646 of file KokkosAssembly.h.

Referenced by Moose::Kokkos::AssemblyHolder::kokkosAssembly().

◆ _blk_dim

unsigned int BlockRestrictable::_blk_dim
privateinherited

Largest mesh dimension of the elements in the blocks for this object.

Definition at line 336 of file BlockRestrictable.h.

Referenced by BlockRestrictable::blocksMaxDimension(), and BlockRestrictable::initializeBlockRestrictable().

◆ _blk_dual_restrictable

const bool BlockRestrictable::_blk_dual_restrictable
privateinherited

Flag for allowing dual restriction.

Definition at line 315 of file BlockRestrictable.h.

Referenced by BlockRestrictable::initializeBlockRestrictable().

◆ _blk_feproblem

FEProblemBase* BlockRestrictable::_blk_feproblem
privateinherited

◆ _blk_ids

std::set<SubdomainID> BlockRestrictable::_blk_ids
privateinherited

◆ _blk_material_data

const MaterialData* BlockRestrictable::_blk_material_data
protectedinherited

Pointer to the MaterialData class for this object.

Definition at line 232 of file BlockRestrictable.h.

Referenced by BlockRestrictable::hasBlockMaterialProperty(), and BlockRestrictable::initializeBlockRestrictable().

◆ _blk_mesh

const MooseMesh* BlockRestrictable::_blk_mesh
privateinherited

◆ _blk_name

const std::string& BlockRestrictable::_blk_name
privateinherited

Name of the object.

Definition at line 333 of file BlockRestrictable.h.

Referenced by BlockRestrictable::checkVariable(), and BlockRestrictable::initializeBlockRestrictable().

◆ _blk_tid

THREAD_ID BlockRestrictable::_blk_tid
privateinherited

Thread id for this object.

Definition at line 330 of file BlockRestrictable.h.

Referenced by BlockRestrictable::initializeBlockRestrictable().

◆ _block_ids

const std::set<SubdomainID>& BoundaryRestrictable::_block_ids
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().

◆ _blocks

std::vector<SubdomainName> BlockRestrictable::_blocks
privateinherited

Vector the block names supplied by the user via the input file.

Definition at line 312 of file BlockRestrictable.h.

Referenced by BlockRestrictable::blocks(), and BlockRestrictable::initializeBlockRestrictable().

◆ _bnd

const bool Moose::Kokkos::NodalReducer::_bnd
protected

Flag whether this object is boundary-restricted.

Definition at line 48 of file KokkosNodalReducer.h.

Referenced by numReducerThreads(), Moose::Kokkos::NodalUserObject::numUserObjectThreads(), Moose::Kokkos::NodalUserObject::operator()(), and operator()().

◆ _bnd_dual_restrictable

const bool BoundaryRestrictable::_bnd_dual_restrictable
privateinherited

Flag for allowing dual restriction with BlockRestrictable.

Definition at line 209 of file BoundaryRestrictable.h.

Referenced by BoundaryRestrictable::initializeBoundaryRestrictable().

◆ _bnd_feproblem

FEProblemBase* BoundaryRestrictable::_bnd_feproblem
privateinherited

◆ _bnd_ids

std::set<BoundaryID> BoundaryRestrictable::_bnd_ids
privateinherited

◆ _bnd_material_data

const MaterialData& BoundaryRestrictable::_bnd_material_data
privateinherited

Pointer to MaterialData for boundary (.

See also
hasBoundaryMaterialProperty)

Definition at line 221 of file BoundaryRestrictable.h.

Referenced by BoundaryRestrictable::hasBoundaryMaterialProperty().

◆ _bnd_mesh

MooseMesh* BoundaryRestrictable::_bnd_mesh
privateinherited

◆ _bnd_nodal

bool BoundaryRestrictable::_bnd_nodal
privateinherited

Whether or not this object is restricted to nodesets.

Definition at line 224 of file BoundaryRestrictable.h.

Referenced by BoundaryRestrictable::initializeBoundaryRestrictable().

◆ _bnd_tid

THREAD_ID BoundaryRestrictable::_bnd_tid
privateinherited

Thread id for this object.

Definition at line 218 of file BoundaryRestrictable.h.

◆ _boundary_ids

const std::set<BoundaryID>& BlockRestrictable::_boundary_ids
privateinherited

Reference to the boundary_ids, defaults to an empty set if not provided.

Definition at line 327 of file BlockRestrictable.h.

Referenced by BlockRestrictable::initializeBlockRestrictable().

◆ _boundary_names

std::vector<BoundaryName> BoundaryRestrictable::_boundary_names
privateinherited

◆ _empty_block_ids

const std::set<SubdomainID> BoundaryRestrictable::_empty_block_ids
privateinherited

An empty set for referencing when block_ids is not included.

Definition at line 212 of file BoundaryRestrictable.h.

◆ _empty_boundary_ids

const std::set<BoundaryID> BlockRestrictable::_empty_boundary_ids
privateinherited

An empty set for referencing when boundary_ids is not included.

Definition at line 324 of file BlockRestrictable.h.

◆ _kokkos_element_ids

Moose::Kokkos::Array<ContiguousElementID> BlockRestrictable::_kokkos_element_ids
privateinherited

List of contiguous element IDs this Kokkos object is operating on.

Definition at line 345 of file BlockRestrictable.h.

Referenced by BlockRestrictable::kokkosBlockElementID(), and BlockRestrictable::numKokkosBlockElements().

◆ _kokkos_element_side_ids

Moose::Kokkos::Array<Moose::Kokkos::Pair<ContiguousElementID, unsigned int> > BlockRestrictable::_kokkos_element_side_ids
privateinherited

List of contiguous local element ID - side index pairs this Kokkos object is operating on.

Definition at line 354 of file BlockRestrictable.h.

Referenced by BlockRestrictable::kokkosBlockElementSideID(), and BlockRestrictable::numKokkosBlockSides().

◆ _kokkos_node_ids

Moose::Kokkos::Array<ContiguousNodeID> BlockRestrictable::_kokkos_node_ids
privateinherited

List of contiguous node IDs this Kokkos object is operating on.

Definition at line 349 of file BlockRestrictable.h.

Referenced by BlockRestrictable::kokkosBlockNodeID(), and BlockRestrictable::numKokkosBlockNodes().

◆ _mesh_device

const Mesh Moose::Kokkos::MeshHolder::_mesh_device
privateinherited

Device copy of the Kokkos mesh.

Definition at line 673 of file KokkosMesh.h.

Referenced by Moose::Kokkos::MeshHolder::kokkosMesh().

◆ _mesh_host

const Mesh& Moose::Kokkos::MeshHolder::_mesh_host
privateinherited

Host reference of the Kokkos mesh.

Definition at line 669 of file KokkosMesh.h.

Referenced by Moose::Kokkos::MeshHolder::kokkosMesh().

◆ _moose_object

const MooseObject* BlockRestrictable::_moose_object
privateinherited

◆ _reducer_dispatcher

std::unique_ptr<DispatcherBase> Moose::Kokkos::ReducerBase::_reducer_dispatcher
protectedinherited

Kokkos functor dispatcher.

Definition at line 101 of file KokkosReducerBase.h.

◆ _reducer_object

const MooseObject* Moose::Kokkos::ReducerBase::_reducer_object
protectedinherited

MOOSE object.

Definition at line 97 of file KokkosReducerBase.h.

◆ _reduction_buffer

::Kokkos::View<Real *, ::Kokkos::HostSpace> Moose::Kokkos::ReducerBase::_reduction_buffer
protectedinherited

Reduction buffer.

Definition at line 105 of file KokkosReducerBase.h.

Referenced by Moose::Kokkos::ReducerBase::allocateReductionBuffer().

◆ _unique_node_execute

const bool Moose::Kokkos::NodalReducer::_unique_node_execute
protected

Flag for enable/disabling multiple execute calls on nodes that share block ids.

Definition at line 52 of file KokkosNodalReducer.h.

◆ _vec_ids

std::vector<SubdomainID> BlockRestrictable::_vec_ids
privateinherited

Vector of block ids supplied by the user via the input file (for error reporting)

Definition at line 309 of file BlockRestrictable.h.

Referenced by BlockRestrictable::initializeBlockRestrictable().


The documentation for this class was generated from the following file: