/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>
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... | |
/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.
A flag changing the behavior of hasBoundary.
Enumerator | |
---|---|
ALL | |
ANY |
Definition at line 34 of file BoundaryRestrictable.h.
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 | The input parameters |
nodal | True indicates that the object is operating on nodesets, false for sidesets |
Definition at line 38 of file BoundaryRestrictable.C.
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 | The input parameters (see the detailed help for additional information) |
block_ids | The block ids that the object is restricted to |
nodal | True indicates that the object is operating on nodesets, false for sidesets |
Definition at line 56 of file BoundaryRestrictable.C.
|
virtual |
|
virtual |
Return the boundary IDs for this object.
Definition at line 170 of file BoundaryRestrictable.C.
Referenced by NonlinearSystemBase::addBoundaryCondition(), NonlinearSystemBase::addInterfaceKernel(), MaterialBase::getZeroMaterialProperty(), hasBoundaryMaterialPropertyHelper(), SidesetInfoVectorPostprocessor::initialize(), InterfaceQpValueUserObject::initialize(), and MaterialBase::registerPropName().
const std::vector< BoundaryName > & BoundaryRestrictable::boundaryNames | ( | ) | const |
Return the boundary names for this object.
Definition at line 176 of file BoundaryRestrictable.C.
Referenced by MaterialOutputAction::getParams(), NearestNodeDistanceAux::NearestNodeDistanceAux(), and NearestNodeValueAux::NearestNodeValueAux().
|
virtual |
Returns true if this object has been restricted to a boundary.
Definition at line 188 of file BoundaryRestrictable.C.
Referenced by MaterialOutputAction::getParams(), and DerivativeMaterialInterface< Material >::haveMaterialProperty().
bool BoundaryRestrictable::hasBoundary | ( | const BoundaryID & | id | ) | const |
Test if the supplied boundary ids are valid for this object.
id | A BoundaryID to check |
Definition at line 214 of file BoundaryRestrictable.C.
bool BoundaryRestrictable::hasBoundary | ( | const BoundaryName & | name | ) | const |
Test if the supplied boundary name is valid for this object.
name | A BoundaryName to check |
Definition at line 200 of file BoundaryRestrictable.C.
Referenced by hasBoundary(), and hasBoundaryMaterialPropertyHelper().
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.
ids | A std::set of BoundaryIDs to check |
type | A flag for the type of matching to perform: ALL requires that all supplied ids must match those of the object; ANY requires that any one of the supplied ids must match those of the object |
Definition at line 230 of file BoundaryRestrictable.C.
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.
ids | A vector of BoundaryIDs ids to check |
type | A flag for the type of matching to perform: ALL requires that all supplied ids must match those of the object; ANY requires that any one of the supplied ids must match those of the object |
Definition at line 223 of file BoundaryRestrictable.C.
bool BoundaryRestrictable::hasBoundary | ( | const std::vector< BoundaryName > & | names | ) | const |
Test if the supplied vector of boundary names are valid for this object.
names | A vector of BoundaryNames to check |
Definition at line 208 of file BoundaryRestrictable.C.
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.
T | The type of material property |
prop_name | the name of the property to query |
Definition at line 224 of file BoundaryRestrictable.h.
|
protected |
A helper method to avoid circular #include problems.
Definition at line 291 of file BoundaryRestrictable.C.
Referenced by hasBoundaryMaterialProperty().
|
private |
An initialization routine needed for dual constructors.
Definition at line 76 of file BoundaryRestrictable.C.
Referenced by BoundaryRestrictable().
bool BoundaryRestrictable::isBoundarySubset | ( | const std::set< BoundaryID > & | ids | ) | const |
Test if the class boundary ids are a subset of the supplied objects.
ids | A std::set of boundaries to check |
Definition at line 262 of file BoundaryRestrictable.C.
Referenced by isBoundarySubset().
bool BoundaryRestrictable::isBoundarySubset | ( | const std::vector< BoundaryID > & | ids | ) | const |
Definition at line 278 of file BoundaryRestrictable.C.
const std::set< BoundaryID > & BoundaryRestrictable::meshBoundaryIDs | ( | ) | const |
Returns the set of all boundary ids for the entire mesh.
Definition at line 285 of file BoundaryRestrictable.C.
Referenced by hasBoundaryMaterialPropertyHelper().
unsigned int BoundaryRestrictable::numBoundaryIDs | ( | ) | const |
Return the number of boundaries for this object.
Definition at line 182 of file BoundaryRestrictable.C.
Referenced by SidesetInfoVectorPostprocessor::initialize().
|
static |
Helper for determining if the object is boundary restricted.
This is needed for the MaterialPropertyInterface.
Definition at line 194 of file BoundaryRestrictable.C.
Referenced by boundaryRestricted().
|
static |
Definition at line 19 of file BoundaryRestrictable.C.
Referenced by NodalUserObject::validParams(), InterfaceKernelBase::validParams(), InitialConditionBase::validParams(), DGKernelBase::validParams(), MaterialBase::validParams(), NodalKernel::validParams(), and AuxKernelTempl< ComputeValueType >::validParams().
|
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().
|
private |
Flag for allowing dual restriction with BlockRestrictable.
Definition at line 192 of file BoundaryRestrictable.h.
Referenced by initializeBoundaryRestrictable().
|
private |
Pointer to FEProblemBase.
Definition at line 180 of file BoundaryRestrictable.h.
Referenced by hasBoundaryMaterialPropertyHelper(), and initializeBoundaryRestrictable().
|
private |
Set of the boundary ids.
Definition at line 186 of file BoundaryRestrictable.h.
Referenced by boundaryIDs(), boundaryRestricted(), hasBoundary(), initializeBoundaryRestrictable(), isBoundarySubset(), and numBoundaryIDs().
|
private |
Pointer to MaterialData for boundary (.
Definition at line 204 of file BoundaryRestrictable.h.
Referenced by hasBoundaryMaterialProperty().
|
private |
Point to mesh.
Definition at line 183 of file BoundaryRestrictable.h.
Referenced by hasBoundary(), initializeBoundaryRestrictable(), isBoundarySubset(), and meshBoundaryIDs().
|
private |
Whether or not this object is restricted to nodesets.
Definition at line 207 of file BoundaryRestrictable.h.
Referenced by initializeBoundaryRestrictable().
|
private |
Thread id for this object.
Definition at line 201 of file BoundaryRestrictable.h.
|
private |
Vector the the boundary names.
Definition at line 189 of file BoundaryRestrictable.h.
Referenced by boundaryNames(), and initializeBoundaryRestrictable().
|
private |
An empty set for referencing when block_ids is not included.
Definition at line 195 of file BoundaryRestrictable.h.