GEOS
|
Class to hold the path to a collection of mesh objects. More...
#include <MeshObjectPath.hpp>
Public Types | |
enum class | ObjectTypes : int { nodes , edges , faces , elems , invalid } |
Contains enums for the types of objects. More... | |
using | permutationMapType = std::map< string, std::map< string, std::map< string, std::vector< string > > > > |
The container type that holds the path information The first key is the name of a MeshBody The second key is the name of a MeshLevel The third key is the name of an ElementRegion The third value is a vector of subregion names. | |
Public Member Functions | |
MeshObjectPath (string const path, dataRepository::Group const &meshBodies) | |
Construct a new Mesh Object Path object. More... | |
void | processPath (string const path, dataRepository::Group const &meshBodies) |
Processes the path string into the permutation container. More... | |
ObjectTypes const & | getObjectType () const |
Get the Object Type object. More... | |
permutationMapType const & | pathPermutations () const |
Get the m_pathPermutations object. More... | |
bool | containsMeshLevel (MeshLevel const &meshLevel) const |
Helper function to decide whether a given meshLevel is in the objectPath. More... | |
template<typename OBJECT_TYPE = dataRepository::Group, typename FUNC > | |
void | forObjectsInPath (dataRepository::Group &meshBodies, FUNC &&func) const |
LLoop over objects in the path and execute a callback function. More... | |
template<typename OBJECT_TYPE = dataRepository::Group, typename FUNC > | |
void | forObjectsInPath (dataRepository::Group const &meshBodies, FUNC &&func) const |
Loop over objects in the path and execute a callback function. More... | |
template<typename OBJECT_TYPE = dataRepository::Group, typename FUNC > | |
void | forObjectsInPath (MeshLevel &level, FUNC &&func) const |
Loop over objects in the path and execute a callback function. More... | |
Class to hold the path to a collection of mesh objects.
Definition at line 36 of file MeshObjectPath.hpp.
|
strong |
Contains enums for the types of objects.
Enumerator | |
---|---|
nodes | |
edges | an EdgeManager |
faces | |
elems | a ElementManager |
invalid | an invalide object |
Definition at line 52 of file MeshObjectPath.hpp.
geos::MeshObjectPath::MeshObjectPath | ( | string const | path, |
dataRepository::Group const & | meshBodies | ||
) |
Construct a new Mesh Object Path object.
path | The path string |
meshBodies | The Group that contains all MeshBody objects |
InputError | when the input path is wrong. |
bool geos::MeshObjectPath::containsMeshLevel | ( | MeshLevel const & | meshLevel | ) | const |
Helper function to decide whether a given meshLevel is in the objectPath.
[in] | meshLevel | the mesh level that we want to search for in the objectPath |
An example use case is in the validation of boundary conditions
void geos::MeshObjectPath::forObjectsInPath | ( | dataRepository::Group & | meshBodies, |
FUNC && | func | ||
) | const |
LLoop over objects in the path and execute a callback function.
OBJECT_TYPE | The type of object to loop over |
FUNC | The type of function that is executed on the OBJECT_TYPE. Takes a single OBJECT_TYPE as an argument. func( dynamic_cast< OBJECT_TYPE & >(object) ); |
meshBodies | Group that contains the MeshBody objects. |
func | The function that is executed on the OBJECT_TYPE |
Definition at line 336 of file MeshObjectPath.hpp.
void geos::MeshObjectPath::forObjectsInPath | ( | dataRepository::Group const & | meshBodies, |
FUNC && | func | ||
) | const |
Loop over objects in the path and execute a callback function.
OBJECT_TYPE | The type of object to loop over |
FUNC | The type of function that is executed on the OBJECT_TYPE. Takes a single OBJECT_TYPE as an argument. func( dynamic_cast< OBJECT_TYPE & >(object) ); |
meshBodies | Group that contains the MeshBody objects. |
func | The function that is executed on the OBJECT_TYPE |
Definition at line 347 of file MeshObjectPath.hpp.
void geos::MeshObjectPath::forObjectsInPath | ( | MeshLevel & | level, |
FUNC && | func | ||
) | const |
Loop over objects in the path and execute a callback function.
OBJECT_TYPE | The type of object to loop over |
FUNC | The type of function that is executed on the OBJECT_TYPE. Takes a single OBJECT_TYPE as an argument. func( dynamic_cast< OBJECT_TYPE & >(object) ); |
level | The MeshLevel that contains OBJECT_TYPE to be executed on. |
func | The function that is executed on the OBJECT_TYPE |
Definition at line 364 of file MeshObjectPath.hpp.
|
inline |
Get the Object Type object.
Definition at line 84 of file MeshObjectPath.hpp.
|
inline |
Get the m_pathPermutations object.
Definition at line 94 of file MeshObjectPath.hpp.
void geos::MeshObjectPath::processPath | ( | string const | path, |
dataRepository::Group const & | meshBodies | ||
) |
Processes the path string into the permutation container.
path | The path string |
meshBodies | The Group that contains all MeshBody objects |