www.mooseframework.org
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
BoundaryRestrictable Class Reference

/class BoundaryRestrictable /brief Provides functionality for limiting the object to certain boundary ids The is class the inheriting class with methods useful for limiting an object to certain boundaries. More...

#include <BoundaryRestrictable.h>

Inheritance diagram for BoundaryRestrictable:
[legend]

Public Types

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

Public Member Functions

 BoundaryRestrictable (const MooseObject *moose_object, bool nodal)
 Class constructor Populates the _bnd_ids for the given boundary names supplied with the 'boundary' input parameter. More...
 
 BoundaryRestrictable (const MooseObject *moose_object, const std::set< SubdomainID > &block_ids, bool nodal)
 Class constructor Populates the 'block' input parameters when an object is also block restricted, see the general class documentation for details. More...
 
virtual ~BoundaryRestrictable ()
 Empty class destructor. More...
 
const virtual std::set< BoundaryID > & boundaryIDs () const
 Return the boundary IDs for this object. More...
 
const std::vector< BoundaryName > & boundaryNames () const
 Return the boundary names for this object. More...
 
unsigned int numBoundaryIDs () const
 Return the number of boundaries for this object. More...
 
bool hasBoundary (const BoundaryName &name) const
 Test if the supplied boundary name is valid for this object. More...
 
bool hasBoundary (const std::vector< BoundaryName > &names) const
 Test if the supplied vector of boundary names are valid for this object. More...
 
bool hasBoundary (const BoundaryID &id) const
 Test if the supplied boundary ids are valid for this object. More...
 
bool hasBoundary (const std::vector< BoundaryID > &ids, TEST_TYPE type=ALL) const
 Test if the supplied vector boundary ids are valid for this object. More...
 
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. More...
 
bool isBoundarySubset (const std::set< BoundaryID > &ids) const
 Test if the class boundary ids are a subset of the supplied objects. More...
 
bool isBoundarySubset (const std::vector< BoundaryID > &ids) const
 
template<typename T >
bool hasBoundaryMaterialProperty (const std::string &prop_name) const
 Check if a material property is valid for all boundaries of this object. More...
 
virtual bool boundaryRestricted () const
 Returns true if this object has been restricted to a boundary. More...
 
const std::set< BoundaryID > & meshBoundaryIDs () const
 Returns the set of all boundary ids for the entire mesh. More...
 

Static Public Member Functions

static InputParameters validParams ()
 
static bool restricted (const std::set< BoundaryID > &ids)
 Helper for determining if the object is boundary restricted. More...
 

Protected Member Functions

bool hasBoundaryMaterialPropertyHelper (const std::string &prop_name) const
 A helper method to avoid circular #include problems. More...
 

Private Member Functions

void initializeBoundaryRestrictable (const MooseObject *moose_object)
 An initialization routine needed for dual constructors. More...
 

Private Attributes

FEProblemBase_bnd_feproblem
 Pointer to FEProblemBase. More...
 
MooseMesh_bnd_mesh
 Point to mesh. More...
 
std::set< BoundaryID_bnd_ids
 Set of the boundary ids. More...
 
std::vector< BoundaryName > _boundary_names
 Vector the the boundary names. More...
 
const bool _bnd_dual_restrictable
 Flag for allowing dual restriction with BlockRestrictable. More...
 
const std::set< SubdomainID_empty_block_ids
 An empty set for referencing when block_ids is not included. More...
 
const std::set< SubdomainID > & _block_ids
 Reference to the block_ids, defaults to an empty set if not provided. More...
 
THREAD_ID _bnd_tid
 Thread id for this object. More...
 
std::shared_ptr< MaterialData_bnd_material_data
 Pointer to MaterialData for boundary (. More...
 
bool _bnd_nodal
 Whether or not this object is restricted to nodesets. More...
 

Detailed Description

/class BoundaryRestrictable /brief Provides functionality for limiting the object to certain boundary ids The is class the inheriting class with methods useful for limiting an object to certain boundaries.

The parameters "_boundary_id" and "boundary", which are created with validParams<BoundaryRestrictable> are used the framework.

Definition at line 30 of file BoundaryRestrictable.h.

Member Enumeration Documentation

◆ TEST_TYPE

A flag changing the behavior of hasBoundary.

Enumerator
ALL 
ANY 

Definition at line 34 of file BoundaryRestrictable.h.

35  {
36  ALL,
37  ANY
38  };

Constructor & Destructor Documentation

◆ BoundaryRestrictable() [1/2]

BoundaryRestrictable::BoundaryRestrictable ( const MooseObject moose_object,
bool  nodal 
)

Class constructor Populates the _bnd_ids for the given boundary names supplied with the 'boundary' input parameter.

Parameters
parametersThe input parameters
nodalTrue indicates that the object is operating on nodesets, false for sidesets

Definition at line 38 of file BoundaryRestrictable.C.

39  : _bnd_feproblem(moose_object->isParamValid("_fe_problem_base")
40  ? moose_object->getParamTempl<FEProblemBase *>("_fe_problem_base")
41  : NULL),
42  _bnd_mesh(moose_object->isParamValid("_mesh")
43  ? moose_object->getParamTempl<MooseMesh *>("_mesh")
44  : NULL),
45  _bnd_dual_restrictable(moose_object->getParamTempl<bool>("_dual_restrictable")),
47  _bnd_tid(moose_object->isParamValid("_tid") ? moose_object->getParamTempl<THREAD_ID>("_tid")
48  : 0),
50  _bnd_nodal(nodal)
51 {
52  initializeBoundaryRestrictable(moose_object);
53 }

◆ BoundaryRestrictable() [2/2]

BoundaryRestrictable::BoundaryRestrictable ( const MooseObject moose_object,
const std::set< SubdomainID > &  block_ids,
bool  nodal 
)

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

Parameters
parametersThe input parameters (see the detailed help for additional information)
block_idsThe block ids that the object is restricted to
nodalTrue indicates that the object is operating on nodesets, false for sidesets

Definition at line 56 of file BoundaryRestrictable.C.

59  : _bnd_feproblem(moose_object->isParamValid("_fe_problem_base")
60  ? moose_object->getParamTempl<FEProblemBase *>("_fe_problem_base")
61  : NULL),
62  _bnd_mesh(moose_object->isParamValid("_mesh")
63  ? moose_object->getParamTempl<MooseMesh *>("_mesh")
64  : NULL),
65  _bnd_dual_restrictable(moose_object->getParamTempl<bool>("_dual_restrictable")),
66  _block_ids(block_ids),
67  _bnd_tid(moose_object->isParamValid("_tid") ? moose_object->getParamTempl<THREAD_ID>("_tid")
68  : 0),
70  _bnd_nodal(nodal)
71 {
72  initializeBoundaryRestrictable(moose_object);
73 }

◆ ~BoundaryRestrictable()

BoundaryRestrictable::~BoundaryRestrictable ( )
virtual

Empty class destructor.

Definition at line 167 of file BoundaryRestrictable.C.

167 {}

Member Function Documentation

◆ boundaryIDs()

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

◆ boundaryNames()

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

Return the boundary names for this object.

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

Definition at line 176 of file BoundaryRestrictable.C.

177 {
178  return _boundary_names;
179 }

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

◆ boundaryRestricted()

bool BoundaryRestrictable::boundaryRestricted ( ) const
virtual

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

See also
MooseObject

Definition at line 188 of file BoundaryRestrictable.C.

189 {
191 }

Referenced by MaterialOutputAction::getParams(), and DerivativeMaterialInterface< Material >::haveMaterialProperty().

◆ hasBoundary() [1/5]

bool BoundaryRestrictable::hasBoundary ( const BoundaryID id) const

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 214 of file BoundaryRestrictable.C.

215 {
216  if (_bnd_ids.empty() || _bnd_ids.find(Moose::ANY_BOUNDARY_ID) != _bnd_ids.end())
217  return true;
218  else
219  return _bnd_ids.find(id) != _bnd_ids.end();
220 }

◆ hasBoundary() [2/5]

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

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 200 of file BoundaryRestrictable.C.

201 {
202  // Create a vector and utilize the getBoundaryIDs function, which
203  // handles the ANY_BOUNDARY_ID (getBoundaryID does not)
204  return hasBoundary(_bnd_mesh->getBoundaryIDs({name}));
205 }

Referenced by hasBoundary(), and hasBoundaryMaterialPropertyHelper().

◆ hasBoundary() [3/5]

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

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 230 of file BoundaryRestrictable.C.

231 {
232  // An empty input is assumed to be ANY_BOUNDARY_ID
233  if (ids.empty() || ids.find(Moose::ANY_BOUNDARY_ID) != ids.end())
234  return true;
235 
236  // All supplied IDs must match those of the object
237  else if (type == ALL)
238  {
239  if (_bnd_ids.find(Moose::ANY_BOUNDARY_ID) != _bnd_ids.end())
240  return true;
241  else
242  return std::includes(_bnd_ids.begin(), _bnd_ids.end(), ids.begin(), ids.end());
243  }
244  // Any of the supplied IDs must match those of the object
245  else
246  {
247  // Loop through the supplied ids
248  for (const auto & id : ids)
249  {
250  // Test the current supplied id
251  bool test = hasBoundary(id);
252 
253  // If the id exists in the stored ids, then return true, otherwise
254  if (test)
255  return true;
256  }
257  return false;
258  }
259 }

◆ hasBoundary() [4/5]

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

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 223 of file BoundaryRestrictable.C.

224 {
225  std::set<BoundaryID> ids_set(ids.begin(), ids.end());
226  return hasBoundary(ids_set, type);
227 }

◆ hasBoundary() [5/5]

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

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

209 {
210  return hasBoundary(_bnd_mesh->getBoundaryIDs(names));
211 }

◆ hasBoundaryMaterialProperty()

template<typename T >
bool BoundaryRestrictable::hasBoundaryMaterialProperty ( const std::string &  prop_name) const

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 224 of file BoundaryRestrictable.h.

225 {
226  // If you get here the supplied property is defined on all boundaries, but is still subject
227  // existence in the MateialData class
228  return hasBoundaryMaterialPropertyHelper(prop_name) &&
229  _bnd_material_data->haveProperty<T>(prop_name);
230 }

◆ hasBoundaryMaterialPropertyHelper()

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

A helper method to avoid circular #include problems.

See also
hasBoundaryMaterialProperty

Definition at line 291 of file BoundaryRestrictable.C.

292 {
293  // Reference to MaterialWarehouse for testing and retrieving boundary ids
295 
296  // Complete set of BoundaryIDs that this object is defined
297  const std::set<BoundaryID> & ids =
299 
300  // Loop over each BoundaryID for this object
301  for (const auto & id : ids)
302  {
303  // Storage of material properties that have been DECLARED on this BoundaryID
304  std::set<std::string> declared_props;
305 
306  // If boundary materials exist, populated the set of properties that were declared
307  if (warehouse.hasActiveBoundaryObjects(id))
308  {
309  const std::vector<std::shared_ptr<MaterialBase>> & mats =
310  warehouse.getActiveBoundaryObjects(id);
311  for (const auto & mat : mats)
312  {
313  const std::set<std::string> & mat_props = mat->getSuppliedItems();
314  declared_props.insert(mat_props.begin(), mat_props.end());
315  }
316  }
317 
318  // If the supplied property is not in the list of properties on the current id, return false
319  if (declared_props.find(prop_name) == declared_props.end())
320  return false;
321  }
322 
323  // If you get here the supplied property is defined on all boundaries
324  return true;
325 }

Referenced by hasBoundaryMaterialProperty().

◆ initializeBoundaryRestrictable()

void BoundaryRestrictable::initializeBoundaryRestrictable ( const MooseObject moose_object)
private

An initialization routine needed for dual constructors.

Definition at line 76 of file BoundaryRestrictable.C.

77 {
78  // The name and id of the object
79  const std::string & name = moose_object->getParamTempl<std::string>("_object_name");
80 
81  // If the mesh pointer is not defined, but FEProblemBase is, get it from there
82  if (_bnd_feproblem != NULL && _bnd_mesh == NULL)
84 
85  // Check that the mesh pointer was defined, it is required for this class to operate
86  if (_bnd_mesh == NULL)
87  mooseError("The input parameters must contain a pointer to FEProblemBase via '_fe_problem' or "
88  "a pointer to the MooseMesh via '_mesh'");
89 
90  // If the user supplies boundary IDs
91  if (moose_object->isParamValid("boundary"))
92  {
93  // Extract the blocks from the input
94  _boundary_names = moose_object->getParamTempl<std::vector<BoundaryName>>("boundary");
95 
96  // Get the IDs from the supplied names
97  std::vector<BoundaryID> vec_ids = _bnd_mesh->getBoundaryIDs(_boundary_names, true);
98 
99  // Store the IDs, handling ANY_BOUNDARY_ID if supplied
100  if (std::find(_boundary_names.begin(), _boundary_names.end(), "ANY_BOUNDARY_ID") !=
101  _boundary_names.end())
103  else
104  _bnd_ids.insert(vec_ids.begin(), vec_ids.end());
105  }
106 
107  // Produce error if the object is not allowed to be both block and boundary restricted
108  if (!_bnd_dual_restrictable && !_bnd_ids.empty() && !_block_ids.empty())
109  if (!_block_ids.empty() && _block_ids.find(Moose::ANY_BLOCK_ID) == _block_ids.end())
110  moose_object->paramError("boundary",
111  "Attempted to restrict the object '",
112  name,
113  "' to a boundary, but the object is already restricted by block(s)");
114 
115  // Store ANY_BOUNDARY_ID if empty
116  if (_bnd_ids.empty())
117  {
119  _boundary_names = {"ANY_BOUNDARY_ID"};
120  }
121 
122  // If this object is block restricted, check that defined blocks exist on the mesh
123  if (_bnd_ids.find(Moose::ANY_BOUNDARY_ID) == _bnd_ids.end())
124  {
125  const std::set<BoundaryID> * valid_ids;
126  const char * message_ptr = nullptr;
127 
128  if (_bnd_nodal)
129  {
130  valid_ids = &_bnd_mesh->meshNodesetIds();
131  message_ptr = "node set";
132  }
133  else
134  {
135  valid_ids = &_bnd_mesh->meshSidesetIds();
136  message_ptr = "side set";
137  }
138 
139  std::vector<BoundaryID> diff;
140 
141  std::set_difference(_bnd_ids.begin(),
142  _bnd_ids.end(),
143  valid_ids->begin(),
144  valid_ids->end(),
145  std::back_inserter(diff));
146 
147  if (!diff.empty())
148  {
149  std::ostringstream msg;
150  msg << "the following " << message_ptr << " ids do not exist on the mesh:";
151  for (const auto & id : diff)
152  msg << " " << id;
153 
154  if (!_bnd_nodal)
155  // Diagnostic message
156  msg << "\n\nMOOSE distinguishes between \"node sets\" and \"side sets\" depending on "
157  "whether \nyou are using \"Nodal\" or \"Integrated\" BCs respectively. Node sets "
158  "corresponding \nto your side sets are constructed for you by default.\n\n"
159  "Try setting \"Mesh/construct_side_set_from_node_set=true\" if you see this error.\n"
160  "Note: If you are running with adaptivity you should prefer using side sets.";
161 
162  moose_object->paramError("boundary", msg.str());
163  }
164  }
165 }

Referenced by BoundaryRestrictable().

◆ isBoundarySubset() [1/2]

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

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 262 of file BoundaryRestrictable.C.

263 {
264  // An empty input is assumed to be ANY_BOUNDARY_ID
265  if (ids.empty() || ids.find(Moose::ANY_BOUNDARY_ID) != ids.end())
266  return true;
267 
268  if (_bnd_ids.find(Moose::ANY_BOUNDARY_ID) != _bnd_ids.end())
269  return std::includes(ids.begin(),
270  ids.end(),
271  _bnd_mesh->meshBoundaryIds().begin(),
272  _bnd_mesh->meshBoundaryIds().end());
273  else
274  return std::includes(ids.begin(), ids.end(), _bnd_ids.begin(), _bnd_ids.end());
275 }

Referenced by isBoundarySubset().

◆ isBoundarySubset() [2/2]

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

Definition at line 278 of file BoundaryRestrictable.C.

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

◆ meshBoundaryIDs()

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

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 285 of file BoundaryRestrictable.C.

286 {
287  return _bnd_mesh->getBoundaryIDs();
288 }

Referenced by hasBoundaryMaterialPropertyHelper().

◆ numBoundaryIDs()

unsigned int BoundaryRestrictable::numBoundaryIDs ( ) const

Return the number of boundaries for this object.

Returns
The number of boundary ids

Definition at line 182 of file BoundaryRestrictable.C.

183 {
184  return (unsigned int)_bnd_ids.size();
185 }

Referenced by SidesetInfoVectorPostprocessor::initialize().

◆ restricted()

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

Helper for determining if the object is boundary restricted.

This is needed for the MaterialPropertyInterface.

Definition at line 194 of file BoundaryRestrictable.C.

195 {
196  return ids.find(Moose::ANY_BOUNDARY_ID) == ids.end();
197 }

Referenced by boundaryRestricted().

◆ validParams()

InputParameters BoundaryRestrictable::validParams ( )
static

Definition at line 19 of file BoundaryRestrictable.C.

20 {
21 
22  // Create instance of InputParameters
24 
25  // Create user-facing 'boundary' input for restricting inheriting object to boundaries
26  params.addParam<std::vector<BoundaryName>>(
27  "boundary", "The list of boundary IDs from the mesh where this boundary condition applies");
28 
29  // A parameter for disabling error message for objects restrictable by boundary and block,
30  // if the parameter is valid it was already set so don't do anything
31  if (!params.isParamValid("_dual_restrictable"))
32  params.addPrivateParam<bool>("_dual_restrictable", false);
33 
34  return params;
35 }

Referenced by NodalUserObject::validParams(), InterfaceKernelBase::validParams(), InitialConditionBase::validParams(), DGKernelBase::validParams(), MaterialBase::validParams(), NodalKernel::validParams(), and AuxKernelTempl< ComputeValueType >::validParams().

Member Data Documentation

◆ _block_ids

const std::set<SubdomainID>& BoundaryRestrictable::_block_ids
private

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

Definition at line 198 of file BoundaryRestrictable.h.

Referenced by initializeBoundaryRestrictable().

◆ _bnd_dual_restrictable

const bool BoundaryRestrictable::_bnd_dual_restrictable
private

Flag for allowing dual restriction with BlockRestrictable.

Definition at line 192 of file BoundaryRestrictable.h.

Referenced by initializeBoundaryRestrictable().

◆ _bnd_feproblem

FEProblemBase* BoundaryRestrictable::_bnd_feproblem
private

◆ _bnd_ids

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

◆ _bnd_material_data

std::shared_ptr<MaterialData> BoundaryRestrictable::_bnd_material_data
private

Pointer to MaterialData for boundary (.

See also
hasBoundaryMaterialProperty)

Definition at line 204 of file BoundaryRestrictable.h.

Referenced by hasBoundaryMaterialProperty().

◆ _bnd_mesh

MooseMesh* BoundaryRestrictable::_bnd_mesh
private

Point to mesh.

Definition at line 183 of file BoundaryRestrictable.h.

Referenced by hasBoundary(), initializeBoundaryRestrictable(), isBoundarySubset(), and meshBoundaryIDs().

◆ _bnd_nodal

bool BoundaryRestrictable::_bnd_nodal
private

Whether or not this object is restricted to nodesets.

Definition at line 207 of file BoundaryRestrictable.h.

Referenced by initializeBoundaryRestrictable().

◆ _bnd_tid

THREAD_ID BoundaryRestrictable::_bnd_tid
private

Thread id for this object.

Definition at line 201 of file BoundaryRestrictable.h.

◆ _boundary_names

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

Vector the the boundary names.

Definition at line 189 of file BoundaryRestrictable.h.

Referenced by boundaryNames(), and initializeBoundaryRestrictable().

◆ _empty_block_ids

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

An empty set for referencing when block_ids is not included.

Definition at line 195 of file BoundaryRestrictable.h.


The documentation for this class was generated from the following files:
BoundaryRestrictable::_bnd_dual_restrictable
const bool _bnd_dual_restrictable
Flag for allowing dual restriction with BlockRestrictable.
Definition: BoundaryRestrictable.h:192
MooseObjectWarehouseBase::getActiveBoundaryObjects
const std::map< BoundaryID, std::vector< std::shared_ptr< T > > > & getActiveBoundaryObjects(THREAD_ID tid=0) const
Definition: MooseObjectWarehouseBase.h:368
FEProblemBase::getMaterialWarehouse
const MaterialWarehouse & getMaterialWarehouse() const
Definition: FEProblemBase.h:1454
type
MatType type
Definition: PetscDMMoose.C:1477
THREAD_ID
unsigned int THREAD_ID
Definition: MooseTypes.h:196
BoundaryRestrictable::_bnd_tid
THREAD_ID _bnd_tid
Thread id for this object.
Definition: BoundaryRestrictable.h:201
MooseObject::isParamValid
bool isParamValid(const std::string &name) const
Test if the supplied parameter is valid.
Definition: MooseObject.h:100
BoundaryRestrictable::_block_ids
const std::set< SubdomainID > & _block_ids
Reference to the block_ids, defaults to an empty set if not provided.
Definition: BoundaryRestrictable.h:198
emptyInputParameters
InputParameters emptyInputParameters()
Definition: InputParameters.C:24
BoundaryRestrictable::ANY
Definition: BoundaryRestrictable.h:37
BoundaryRestrictable::_bnd_ids
std::set< BoundaryID > _bnd_ids
Set of the boundary ids.
Definition: BoundaryRestrictable.h:186
MaterialWarehouse
MaterialBase objects are special in that they have additional objects created automatically (see FEPr...
Definition: MaterialWarehouse.h:26
Moose::ANY_BLOCK_ID
const SubdomainID ANY_BLOCK_ID
Definition: MooseTypes.C:17
InputParameters::addParam
void addParam(const std::string &name, const S &value, const std::string &doc_string)
These methods add an option parameter and a documentation string to the InputParameters object.
Definition: InputParameters.h:1198
BoundaryRestrictable::restricted
static bool restricted(const std::set< BoundaryID > &ids)
Helper for determining if the object is boundary restricted.
Definition: BoundaryRestrictable.C:194
MooseObjectWarehouseBase::hasActiveBoundaryObjects
bool hasActiveBoundaryObjects(THREAD_ID tid=0) const
Definition: MooseObjectWarehouseBase.h:442
BoundaryRestrictable::_bnd_nodal
bool _bnd_nodal
Whether or not this object is restricted to nodesets.
Definition: BoundaryRestrictable.h:207
MooseMesh::meshSidesetIds
const std::set< BoundaryID > & meshSidesetIds() const
Returns a read-only reference to the set of sidesets currently present in the Mesh.
Definition: MooseMesh.C:2350
BoundaryRestrictable::hasBoundaryMaterialPropertyHelper
bool hasBoundaryMaterialPropertyHelper(const std::string &prop_name) const
A helper method to avoid circular #include problems.
Definition: BoundaryRestrictable.C:291
BoundaryRestrictable::initializeBoundaryRestrictable
void initializeBoundaryRestrictable(const MooseObject *moose_object)
An initialization routine needed for dual constructors.
Definition: BoundaryRestrictable.C:76
MooseObject::paramError
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: MooseObject.h:215
mooseError
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application.
Definition: MooseError.h:210
BoundaryRestrictable::boundaryIDs
const virtual std::set< BoundaryID > & boundaryIDs() const
Return the boundary IDs for this object.
Definition: BoundaryRestrictable.C:170
InputParameters
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
Definition: InputParameters.h:53
Moose::BOUNDARY_MATERIAL_DATA
Definition: MooseTypes.h:586
Moose::ANY_BOUNDARY_ID
const BoundaryID ANY_BOUNDARY_ID
Definition: MooseTypes.C:19
BoundaryRestrictable::_bnd_feproblem
FEProblemBase * _bnd_feproblem
Pointer to FEProblemBase.
Definition: BoundaryRestrictable.h:180
FEProblemBase::getMaterialData
std::shared_ptr< MaterialData > getMaterialData(Moose::MaterialDataType type, THREAD_ID tid=0)
Definition: FEProblemBase.C:2729
BoundaryRestrictable::isBoundarySubset
bool isBoundarySubset(const std::set< BoundaryID > &ids) const
Test if the class boundary ids are a subset of the supplied objects.
Definition: BoundaryRestrictable.C:262
BoundaryRestrictable::meshBoundaryIDs
const std::set< BoundaryID > & meshBoundaryIDs() const
Returns the set of all boundary ids for the entire mesh.
Definition: BoundaryRestrictable.C:285
InputParameters::isParamValid
bool isParamValid(const std::string &name) const
This method returns parameters that have been initialized in one fashion or another,...
Definition: InputParameters.C:257
MooseObject::getParamTempl
const T & getParamTempl(const std::string &name) const
Retrieve a parameter for the object.
Definition: MooseObject.h:208
MooseMesh::meshBoundaryIds
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:2344
BoundaryRestrictable::_bnd_material_data
std::shared_ptr< MaterialData > _bnd_material_data
Pointer to MaterialData for boundary (.
Definition: BoundaryRestrictable.h:204
MooseMesh::meshNodesetIds
const std::set< BoundaryID > & meshNodesetIds() const
Returns a read-only reference to the set of nodesets currently present in the Mesh.
Definition: MooseMesh.C:2356
BoundaryRestrictable::_boundary_names
std::vector< BoundaryName > _boundary_names
Vector the the boundary names.
Definition: BoundaryRestrictable.h:189
BoundaryRestrictable::_empty_block_ids
const std::set< SubdomainID > _empty_block_ids
An empty set for referencing when block_ids is not included.
Definition: BoundaryRestrictable.h:195
MooseMesh
MooseMesh wraps a libMesh::Mesh object and enhances its capabilities by caching additional data and s...
Definition: MooseMesh.h:74
BoundaryRestrictable::hasBoundary
bool hasBoundary(const BoundaryName &name) const
Test if the supplied boundary name is valid for this object.
Definition: BoundaryRestrictable.C:200
BoundaryRestrictable::ALL
Definition: BoundaryRestrictable.h:36
InputParameters::addPrivateParam
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...
Definition: InputParameters.h:1308
MooseMesh::getBoundaryIDs
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:2169
FEProblemBase
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
Definition: FEProblemBase.h:139
BoundaryRestrictable::_bnd_mesh
MooseMesh * _bnd_mesh
Point to mesh.
Definition: BoundaryRestrictable.h:183
FEProblemBase::mesh
virtual MooseMesh & mesh() override
Definition: FEProblemBase.h:148