https://mooseframework.inl.gov
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Private Attributes | List of all members
BlockRestrictable Class Reference

An interface that restricts an object to subdomains via the 'blocks' input parameter. More...

#include <BlockRestrictable.h>

Inheritance diagram for BlockRestrictable:
[legend]

Public Member Functions

 BlockRestrictable (const MooseObject *moose_object, bool initialize=true)
 Class constructor Populates the 'block' input parameters, see the general class documentation for details. More...
 
 BlockRestrictable (const MooseObject *moose_object, const std::set< BoundaryID > &boundary_ids)
 Class constructor Populates the 'block' input parameters when an object is also boundary restricted, see the general class documentation for details. More...
 
 BlockRestrictable (const BlockRestrictable &object, const Moose::Kokkos::FunctorCopy &key)
 Special constructor used for Kokkos functor copy during parallel dispatch. More...
 
virtual ~BlockRestrictable ()
 Destructor: does nothing but needs to be marked as virtual since this class defines virtual functions. 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...
 

Static Public Member Functions

static InputParameters validParams ()
 

Protected Member Functions

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 (const Moose::Kokkos::Mesh *mesh)
 
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 (ThreadID tid) const
 Get the contiguous element ID this Kokkos thread is operating on. More...
 
KOKKOS_FUNCTION ContiguousElementID kokkosBlockNodeID (ThreadID tid) const
 Get the contiguous node index this Kokkos thread is operating on. More...
 
KOKKOS_FUNCTION auto kokkosBlockElementSideID (ThreadID tid) const
 Get the contiguous element ID - side index pair this Kokkos thread is operating on. More...
 

Protected Attributes

const MaterialData_blk_material_data
 Pointer to the MaterialData class for this object. More...
 

Private Attributes

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

Detailed Description

An interface that restricts an object to subdomains via the 'blocks' input parameter.

This class adds the 'blocks' input parameter and checks that it is populated, if it is not populated it will be populated with all valid block ids via two methods:

  1. If a 'variable' parameter is present in the input parameters then by default the 'block' input is set to all blocks associated with the variable.
  2. If no 'variable' parameter is present then it utilizes all available blocks for the associated mesh.

When using with an object with a 'variable' parameter (e.g., Kernel), the following must also exist within the input parameters for the class to operate correctly

In the general case (i.e., no 'variable') either one of the following must also exist within the input parameters for proper operation of the class:

When creating a new object, generally, this class should be inherited following MooseObject. Also, the BlockRestricted::validParams() must be added to any other parameters for the the class being created, since this is where the 'blocks' input parameter is created.

See also
Kernel
SideSetsAroundSubdomain

Definition at line 68 of file BlockRestrictable.h.

Constructor & Destructor Documentation

◆ BlockRestrictable() [1/3]

BlockRestrictable::BlockRestrictable ( const MooseObject moose_object,
bool  initialize = true 
)

Class constructor Populates the 'block' input parameters, see the general class documentation for details.

Parameters
parametersThe input parameters (see the detailed help for additional information)
initializeDisable initialization, MooseVariableBase was converted to a MooseObject, this flag allows it to be constructed as if it wasn't to maintain backward compatibility, this will be removed in the fugure. TODO:MooseVariableToMooseObject (see #10601)

Definition at line 40 of file BlockRestrictable.C.

41  : _blk_dual_restrictable(moose_object->getParam<bool>("_dual_restrictable")),
42  _blk_feproblem(moose_object->isParamValid("_fe_problem_base")
43  ? moose_object->getParam<FEProblemBase *>("_fe_problem_base")
44  : NULL),
45  _blk_mesh(moose_object->isParamValid("_mesh") ? moose_object->getParam<MooseMesh *>("_mesh")
46  : NULL),
48  _blk_tid(moose_object->isParamValid("_tid") ? moose_object->getParam<THREAD_ID>("_tid") : 0),
49  _blk_name(moose_object->name()),
51  _moose_object(moose_object)
52 {
53  if (initialize)
55 }
unsigned int _blk_dim
Largest mesh dimension of the elements in the blocks for this object.
const bool _blk_dual_restrictable
Flag for allowing dual restriction.
const unsigned int invalid_uint
const T & getParam(const std::string &name) const
Retrieve a parameter for the object.
Definition: MooseBase.h:388
FEProblemBase * _blk_feproblem
Pointer to FEProblemBase.
const MooseObject * _moose_object
Pointer to the MOOSE object.
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
void initializeBlockRestrictable(const MooseObject *moose_object)
An initialization routine needed for dual constructors.
const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:103
MooseMesh wraps a libMesh::Mesh object and enhances its capabilities by caching additional data and s...
Definition: MooseMesh.h:92
THREAD_ID _blk_tid
Thread id for this object.
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.
bool isParamValid(const std::string &name) const
Test if the supplied parameter is valid.
Definition: MooseBase.h:199
const std::string & _blk_name
Name of the object.
unsigned int THREAD_ID
Definition: MooseTypes.h:209

◆ BlockRestrictable() [2/3]

BlockRestrictable::BlockRestrictable ( const MooseObject moose_object,
const std::set< BoundaryID > &  boundary_ids 
)

Class constructor Populates the 'block' input parameters when an object is also boundary restricted, see the general class documentation for details.

Parameters
parametersThe input parameters (see the detailed help for additional information)
boundary_idsThe boundary ids that the object is restricted to

Definition at line 58 of file BlockRestrictable.C.

60  : _blk_dual_restrictable(moose_object->getParam<bool>("_dual_restrictable")),
61  _blk_feproblem(moose_object->isParamValid("_fe_problem_base")
62  ? moose_object->getParam<FEProblemBase *>("_fe_problem_base")
63  : NULL),
64  _blk_mesh(moose_object->isParamValid("_mesh") ? moose_object->getParam<MooseMesh *>("_mesh")
65  : NULL),
66  _boundary_ids(boundary_ids),
67  _blk_tid(moose_object->isParamValid("_tid") ? moose_object->getParam<THREAD_ID>("_tid") : 0),
68  _blk_name(moose_object->name()),
70  _moose_object(moose_object)
71 {
73 }
unsigned int _blk_dim
Largest mesh dimension of the elements in the blocks for this object.
const bool _blk_dual_restrictable
Flag for allowing dual restriction.
const unsigned int invalid_uint
const T & getParam(const std::string &name) const
Retrieve a parameter for the object.
Definition: MooseBase.h:388
FEProblemBase * _blk_feproblem
Pointer to FEProblemBase.
const MooseObject * _moose_object
Pointer to the MOOSE object.
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
void initializeBlockRestrictable(const MooseObject *moose_object)
An initialization routine needed for dual constructors.
const std::string & name() const
Get the name of the class.
Definition: MooseBase.h:103
MooseMesh wraps a libMesh::Mesh object and enhances its capabilities by caching additional data and s...
Definition: MooseMesh.h:92
THREAD_ID _blk_tid
Thread id for this object.
const MooseMesh * _blk_mesh
Pointer to Mesh.
const std::set< BoundaryID > & _boundary_ids
Reference to the boundary_ids, defaults to an empty set if not provided.
bool isParamValid(const std::string &name) const
Test if the supplied parameter is valid.
Definition: MooseBase.h:199
const std::string & _blk_name
Name of the object.
unsigned int THREAD_ID
Definition: MooseTypes.h:209

◆ BlockRestrictable() [3/3]

BlockRestrictable::BlockRestrictable ( const BlockRestrictable object,
const Moose::Kokkos::FunctorCopy key 
)

Special constructor used for Kokkos functor copy during parallel dispatch.

◆ ~BlockRestrictable()

virtual BlockRestrictable::~BlockRestrictable ( )
inlinevirtual

Destructor: does nothing but needs to be marked as virtual since this class defines virtual functions.

Definition at line 104 of file BlockRestrictable.h.

104 {}

Member Function Documentation

◆ blockIDs()

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

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 208 of file BlockRestrictable.C.

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

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

◆ blockRestricted()

bool BlockRestrictable::blockRestricted ( ) const
virtual

◆ blocks()

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

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 202 of file BlockRestrictable.C.

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

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

◆ blocksMaxDimension()

unsigned int BlockRestrictable::blocksMaxDimension ( ) const

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

Definition at line 385 of file BlockRestrictable.C.

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

◆ checkVariable()

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

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 357 of file BlockRestrictable.C.

Referenced by DomainUserObject::checkVariable().

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

◆ getBlockCoordSystem()

Moose::CoordinateSystemType BlockRestrictable::getBlockCoordSystem ( )
protected

Check if the blocks this object operates on all have the same coordinate system, and if so return it.

Definition at line 335 of file BlockRestrictable.C.

336 {
337  if (!_blk_mesh)
338  mooseError("No mesh available in BlockRestrictable::checkCoordSystem()");
339  if (!_blk_feproblem)
340  mooseError("No problem available in BlockRestrictable::checkCoordSystem()");
341 
342  const auto & subdomains = blockRestricted() ? blockIDs() : meshBlockIDs();
343 
344  if (subdomains.empty())
345  mooseError("No subdomains found in the problem.");
346 
347  // make sure all subdomains are using the same coordinate system
348  auto coord_system = _blk_feproblem->getCoordSystem(*subdomains.begin());
349  for (auto subdomain : subdomains)
350  if (_blk_feproblem->getCoordSystem(subdomain) != coord_system)
351  mooseError("This object requires all subdomains to have the same coordinate system.");
352 
353  return coord_system;
354 }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:323
FEProblemBase * _blk_feproblem
Pointer to FEProblemBase.
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.
virtual bool blockRestricted() const
Returns true if this object has been restricted to a block.
const MooseMesh * _blk_mesh
Pointer to Mesh.
const std::set< SubdomainID > & meshBlockIDs() const
Return all of the SubdomainIDs for the mesh.
Moose::CoordinateSystemType getCoordSystem(SubdomainID sid) const
Definition: SubProblem.C:1278

◆ hasBlockMaterialProperty()

template<typename T , bool is_ad>
bool BlockRestrictable::hasBlockMaterialProperty ( const std::string &  prop_name)

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 }
bool haveGenericProperty(const std::string &prop_name) const
Definition: MaterialData.h:362
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.

◆ hasBlockMaterialPropertyHelper()

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

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 299 of file BlockRestrictable.C.

Referenced by hasBlockMaterialProperty().

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

◆ hasBlocks() [1/6]

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

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 223 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(), hasBlocks(), MooseVariableField< Real >::hasBlocks(), FVFluxKernel::hasFaceSide(), IndicatorMarker::IndicatorMarker(), NodePositions::initialize(), ParsedDownSelectionPositions::initialize(), UpdateErrorVectorsThread::onElement(), PointwiseRenormalizeVector::PointwiseRenormalizeVector(), and BlockRestrictionDebugOutput::printBlockRestrictionMap().

224 {
225  // Create a vector and utilize the getSubdomainIDs function, which
226  // handles the ANY_BLOCK_ID (getSubdomainID does not)
227  std::vector<SubdomainName> names(1);
228  names[0] = name;
229  return hasBlocks(_blk_mesh->getSubdomainIDs(names));
230 }
std::string name(const ElemQuality q)
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:1775
const MooseMesh * _blk_mesh
Pointer to Mesh.
bool hasBlocks(const SubdomainName &name) const
Test if the supplied block name is valid for this object.

◆ hasBlocks() [2/6]

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

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 233 of file BlockRestrictable.C.

234 {
235  return hasBlocks(_blk_mesh->getSubdomainIDs(names));
236 }
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:1775
const MooseMesh * _blk_mesh
Pointer to Mesh.
bool hasBlocks(const SubdomainName &name) const
Test if the supplied block name is valid for this object.

◆ hasBlocks() [3/6]

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

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 239 of file BlockRestrictable.C.

240 {
241  return hasBlocks(_blk_mesh->getSubdomainIDs(names));
242 }
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:1775
const MooseMesh * _blk_mesh
Pointer to Mesh.
bool hasBlocks(const SubdomainName &name) const
Test if the supplied block name is valid for this object.

◆ hasBlocks() [4/6]

bool BlockRestrictable::hasBlocks ( SubdomainID  id) const

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 245 of file BlockRestrictable.C.

246 {
247  if (_blk_ids.empty() || _blk_ids.find(Moose::ANY_BLOCK_ID) != _blk_ids.end())
248  return true;
249  else
250  return _blk_ids.find(id) != _blk_ids.end();
251 }
const SubdomainID ANY_BLOCK_ID
Definition: MooseTypes.C:19
std::set< SubdomainID > _blk_ids
Set of block ids supplied by the user via the input file (for error checking)

◆ hasBlocks() [5/6]

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

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 254 of file BlockRestrictable.C.

255 {
256  std::set<SubdomainID> ids_set(ids.begin(), ids.end());
257  return hasBlocks(ids_set);
258 }
bool hasBlocks(const SubdomainName &name) const
Test if the supplied block name is valid for this object.

◆ hasBlocks() [6/6]

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

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 261 of file BlockRestrictable.C.

262 {
263  if (_blk_ids.empty() || _blk_ids.find(Moose::ANY_BLOCK_ID) != _blk_ids.end())
264  return true;
265  else
266  return std::includes(_blk_ids.begin(), _blk_ids.end(), ids.begin(), ids.end());
267 }
const SubdomainID ANY_BLOCK_ID
Definition: MooseTypes.C:19
std::set< SubdomainID > _blk_ids
Set of block ids supplied by the user via the input file (for error checking)

◆ initializeBlockRestrictable()

void BlockRestrictable::initializeBlockRestrictable ( const MooseObject moose_object)
protected

An initialization routine needed for dual constructors.

Definition at line 76 of file BlockRestrictable.C.

Referenced by BlockRestrictable().

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())
130  if (!_boundary_ids.empty() && _boundary_ids.find(Moose::ANY_BOUNDARY_ID) == _boundary_ids.end())
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({}))
192 #endif
193 }
std::string name(const ElemQuality q)
std::string getMooseType(const std::string &name) const
Utility functions for retrieving one of the MooseTypes variables into the common "string" base class...
unsigned int _blk_dim
Largest mesh dimension of the elements in the blocks for this object.
KOKKOS_INLINE_FUNCTION const T * find(const T &target, const T *const begin, const T *const end)
Find a value in an array.
Definition: KokkosUtils.h:30
const bool _blk_dual_restrictable
Flag for allowing dual restriction.
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:439
const T & getParam(const std::string &name) const
Retrieve a parameter for the object.
Definition: MooseBase.h:388
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:323
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseBase.h:131
FEProblemBase * _blk_feproblem
Pointer to FEProblemBase.
const MooseObject * _moose_object
Pointer to the MOOSE object.
virtual bool blockRestricted() const
Returns true if this object has been restricted to a block.
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:1775
const Moose::Kokkos::Mesh * getKokkosMesh() const
Accessor for Kokkos mesh object.
Definition: MooseMesh.h:674
std::vector< SubdomainID > _vec_ids
Vector of block ids supplied by the user via the input file (for error reporting) ...
virtual unsigned int dimension() const
Returns MeshBase::mesh_dimension(), (not MeshBase::spatial_dimension()!) of the underlying libMesh me...
Definition: MooseMesh.C:2968
void initializeKokkosBlockRestrictable(const Moose::Kokkos::Mesh *mesh)
THREAD_ID _blk_tid
Thread id for this object.
std::vector< SubdomainName > _blocks
Vector the block names supplied by the user via the input file.
bool isKokkosObject(IsKokkosObjectKey &&) const
Get whether this object is a Kokkos functor The parameter is set by the Kokkos base classes: ...
Definition: MooseObject.h:72
std::string stringify(const T &t)
conversion to string
Definition: Conversion.h:64
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:1807
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
const MooseMesh * _blk_mesh
Pointer to Mesh.
const SubdomainID ANY_BLOCK_ID
Definition: MooseTypes.C:19
unsigned int getBlocksMaxDimension(const std::vector< SubdomainName > &blocks) const
Returns the maximum element dimension on the given blocks.
Definition: MooseMesh.C:2989
const MaterialData * _blk_material_data
Pointer to the MaterialData class for this object.
virtual MooseMesh & mesh() override
const std::set< BoundaryID > & _boundary_ids
Reference to the boundary_ids, defaults to an empty set if not provided.
bool isParamValid(const std::string &name) const
Test if the supplied parameter is valid.
Definition: MooseBase.h:199
std::set< SubdomainID > _blk_ids
Set of block ids supplied by the user via the input file (for error checking)
const std::string & _blk_name
Name of the object.
const BoundaryID ANY_BOUNDARY_ID
Definition: MooseTypes.C:21
const std::set< SubdomainID > & meshSubdomains() const
Returns a read-only reference to the set of subdomains currently present in the Mesh.
Definition: MooseMesh.C:3211

◆ initializeKokkosBlockRestrictable()

void BlockRestrictable::initializeKokkosBlockRestrictable ( const Moose::Kokkos::Mesh mesh)
protected

◆ isBlockSubset() [1/2]

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

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 270 of file BlockRestrictable.C.

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

271 {
272  // An empty input is assumed to be ANY_BLOCK_ID
273  if (ids.empty() || ids.find(Moose::ANY_BLOCK_ID) != ids.end())
274  return true;
275 
276  if (_blk_ids.find(Moose::ANY_BLOCK_ID) != _blk_ids.end())
277  return std::includes(ids.begin(),
278  ids.end(),
279  _blk_mesh->meshSubdomains().begin(),
280  _blk_mesh->meshSubdomains().end());
281  else
282  return std::includes(ids.begin(), ids.end(), _blk_ids.begin(), _blk_ids.end());
283 }
const MooseMesh * _blk_mesh
Pointer to Mesh.
const SubdomainID ANY_BLOCK_ID
Definition: MooseTypes.C:19
std::set< SubdomainID > _blk_ids
Set of block ids supplied by the user via the input file (for error checking)
const std::set< SubdomainID > & meshSubdomains() const
Returns a read-only reference to the set of subdomains currently present in the Mesh.
Definition: MooseMesh.C:3211

◆ isBlockSubset() [2/2]

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

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 286 of file BlockRestrictable.C.

287 {
288  std::set<SubdomainID> ids_set(ids.begin(), ids.end());
289  return isBlockSubset(ids_set);
290 }
bool isBlockSubset(const std::set< SubdomainID > &ids) const
Test if the class block ids are a subset of the supplied objects.

◆ kokkosBlockElementID()

KOKKOS_FUNCTION ContiguousElementID BlockRestrictable::kokkosBlockElementID ( ThreadID  tid) const
inlineprotected

Get the contiguous element ID this Kokkos thread is operating on.

Parameters
tidThe thread ID
Returns
The contiguous element ID

Definition at line 280 of file BlockRestrictable.h.

Referenced by Moose::Kokkos::Kernel::operator()().

281  {
282  return _kokkos_element_ids[tid];
283  }
Moose::Kokkos::Array< ContiguousElementID > _kokkos_element_ids
List of contiguous element IDs this Kokkos object is operating on.

◆ kokkosBlockElementSideID()

KOKKOS_FUNCTION auto BlockRestrictable::kokkosBlockElementSideID ( ThreadID  tid) const
inlineprotected

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 ( ThreadID  tid) const
inlineprotected

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.

Referenced by Moose::Kokkos::NodalKernel::operator()().

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.

◆ meshBlockIDs()

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

Return all of the SubdomainIDs for the mesh.

Returns
A set of all subdomians for the entire mesh

Definition at line 293 of file BlockRestrictable.C.

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

294 {
295  return _blk_mesh->meshSubdomains();
296 }
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:3211

◆ numBlocks()

unsigned int BlockRestrictable::numBlocks ( ) const

Return the number of blocks for this object.

Returns
The number of subdomains

Definition at line 217 of file BlockRestrictable.C.

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

218 {
219  return (unsigned int)_blk_ids.size();
220 }
std::set< SubdomainID > _blk_ids
Set of block ids supplied by the user via the input file (for error checking)

◆ numKokkosBlockElements()

KOKKOS_FUNCTION dof_id_type BlockRestrictable::numKokkosBlockElements ( ) const
inlineprotected

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(); }
Moose::Kokkos::Array< ContiguousElementID > _kokkos_element_ids
List of contiguous element IDs this Kokkos object is operating on.

◆ numKokkosBlockNodes()

KOKKOS_FUNCTION dof_id_type BlockRestrictable::numKokkosBlockNodes ( ) const
inlineprotected

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(); }
Moose::Kokkos::Array< ContiguousNodeID > _kokkos_node_ids
List of contiguous node IDs this Kokkos object is operating on.

◆ numKokkosBlockSides()

KOKKOS_FUNCTION dof_id_type BlockRestrictable::numKokkosBlockSides ( ) const
inlineprotected

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  {
273  return _kokkos_element_side_ids.size();
274  }
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...

◆ validParams()

InputParameters BlockRestrictable::validParams ( )
static

Definition at line 21 of file BlockRestrictable.C.

Referenced by SubdomainsDivision::validParams(), QuadraturePointMultiApp::validParams(), CentroidMultiApp::validParams(), ElementCentroidPositions::validParams(), ElementGroupCentroidPositions::validParams(), NodePositions::validParams(), QuadraturePointsPositions::validParams(), FunctorExtremaPositions::validParams(), ParsedDownSelectionPositions::validParams(), KernelBase::validParams(), ProjectedStatefulMaterialStorageAction::validParams(), DiracKernelBase::validParams(), LinearFVKernel::validParams(), InternalSideUserObject::validParams(), NodalUserObject::validParams(), NodalKernelBase::validParams(), ElementUserObject::validParams(), Indicator::validParams(), FVKernel::validParams(), LineMaterialSamplerBase< Real >::validParams(), DGKernelBase::validParams(), MooseVariableBase::validParams(), FVInitialConditionBase::validParams(), DomainUserObject::validParams(), Marker::validParams(), InitialConditionBase::validParams(), AuxKernelTempl< Real >::validParams(), and MaterialBase::validParams().

22 {
23  // Create InputParameters object that will be appended to the parameters for the inheriting object
25 
26  // Add the user-facing 'block' input parameter
27  params.addParam<std::vector<SubdomainName>>(
28  "block", "The list of blocks (ids or names) that this object will be applied");
29 
30  // A parameter for disabling error message for objects restrictable by boundary and block,
31  // if the parameter is valid it was already set so don't do anything
32  if (!params.have_parameter<bool>("_dual_restrictable"))
33  params.addPrivateParam<bool>("_dual_restrictable", false);
34 
35  // Return the parameters
36  return params;
37 }
void addPrivateParam(const std::string &name, const T &value)
These method add a parameter to the InputParameters object which can be retrieved like any other para...
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
InputParameters emptyInputParameters()
bool have_parameter(std::string_view name) const
A wrapper around the Parameters base class method.
void addParam(const std::string &name, const S &value, const std::string &doc_string)
These methods add an optional parameter and a documentation string to the InputParameters object...

Member Data Documentation

◆ _blk_dim

unsigned int BlockRestrictable::_blk_dim
private

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

Definition at line 336 of file BlockRestrictable.h.

Referenced by blocksMaxDimension(), and initializeBlockRestrictable().

◆ _blk_dual_restrictable

const bool BlockRestrictable::_blk_dual_restrictable
private

Flag for allowing dual restriction.

Definition at line 315 of file BlockRestrictable.h.

Referenced by initializeBlockRestrictable().

◆ _blk_feproblem

FEProblemBase* BlockRestrictable::_blk_feproblem
private

◆ _blk_ids

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

Set of block ids supplied by the user via the input file (for error checking)

Definition at line 306 of file BlockRestrictable.h.

Referenced by blockIDs(), blockRestricted(), checkVariable(), hasBlocks(), initializeBlockRestrictable(), isBlockSubset(), and numBlocks().

◆ _blk_material_data

const MaterialData* BlockRestrictable::_blk_material_data
protected

Pointer to the MaterialData class for this object.

Definition at line 232 of file BlockRestrictable.h.

Referenced by hasBlockMaterialProperty(), and initializeBlockRestrictable().

◆ _blk_mesh

const MooseMesh* BlockRestrictable::_blk_mesh
private

◆ _blk_name

const std::string& BlockRestrictable::_blk_name
private

Name of the object.

Definition at line 333 of file BlockRestrictable.h.

Referenced by checkVariable(), and initializeBlockRestrictable().

◆ _blk_tid

THREAD_ID BlockRestrictable::_blk_tid
private

Thread id for this object.

Definition at line 330 of file BlockRestrictable.h.

Referenced by initializeBlockRestrictable().

◆ _blocks

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

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

Definition at line 312 of file BlockRestrictable.h.

Referenced by blocks(), and initializeBlockRestrictable().

◆ _boundary_ids

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

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

Definition at line 327 of file BlockRestrictable.h.

Referenced by initializeBlockRestrictable().

◆ _empty_boundary_ids

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

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
private

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

Definition at line 345 of file BlockRestrictable.h.

Referenced by kokkosBlockElementID(), and numKokkosBlockElements().

◆ _kokkos_element_side_ids

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

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 kokkosBlockElementSideID(), and numKokkosBlockSides().

◆ _kokkos_node_ids

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

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

Definition at line 349 of file BlockRestrictable.h.

Referenced by kokkosBlockNodeID(), and numKokkosBlockNodes().

◆ _moose_object

const MooseObject* BlockRestrictable::_moose_object
private

Pointer to the MOOSE object.

Definition at line 339 of file BlockRestrictable.h.

Referenced by BlockRestrictable(), and initializeBlockRestrictable().

◆ _vec_ids

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

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


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