GEOS
|
#include <Group.hpp>
Classes | |
struct | viewKeyStruct |
Structure to hold scoped key names. More... | |
Public Types | |
using | subGroupMap = MappedVector< Group, Group *, keyType, indexType > |
The template specialization of MappedVector to use for the collection of sub-Group objects. | |
using | wrapperMap = MappedVector< WrapperBase, WrapperBase *, keyType, indexType > |
The template specialization of MappedVector to use for the collection wrappers objects. | |
Public Member Functions | |
template<typename LOG_LEVEL_INFO > | |
std::enable_if_t< geos::is_log_level_info< LOG_LEVEL_INFO >, void > | addLogLevel () |
Append a levelCondition and a log description to the description of the wrapped object given a log info struct. Must be called in constructor. More... | |
virtual bool | registerCallback (void *func, const std::type_info &funcType) |
Register a callback function on the group. More... | |
virtual void | reinit () |
Performs re-initialization of certain variable depending on the solver being used. | |
Constructors/destructor | |
Group (string const &name, Group *const parent) | |
Constructor. More... | |
Group (string const &name, conduit::Node &rootNode) | |
Constructor. More... | |
Group (Group &&source)=default | |
Move constructor. More... | |
virtual | ~Group () |
Destructor, deletes all Groups and Wrappers owned by this Group. | |
Group ()=delete | |
Deleted default constructor. | |
Group (Group const &)=delete | |
Deleted copy constructor. | |
Group & | operator= (Group const &)=delete |
Deleted copy assignment operator. More... | |
Group & | operator= (Group &&)=delete |
Deleted move assignment operator. More... | |
Miscellaneous | |
void | printDataHierarchy (integer indent=0) const |
Prints the data hierarchy recursively. More... | |
string | dumpInputOptions () const |
string | dumpSubGroupsNames () const |
string | dumpWrappersNames () const |
Sub-group registration interface | |
template<typename T = Group> | |
T & | registerGroup (string const &name, std::unique_ptr< T > newObject) |
Register a new Group as a sub-group of current Group. More... | |
template<typename T = Group> | |
T & | registerGroup (string const &name, T *newObject) |
Register a new Group as a sub-group of current Group. More... | |
template<typename T = Group> | |
T & | registerGroup (string const &name) |
Register a new Group as a sub-group of current Group. More... | |
template<typename T = Group> | |
T & | registerGroup (subGroupMap::KeyIndex const &keyIndex) |
Register a new Group as a sub-group of current Group. More... | |
template<typename T = Group, typename TBASE = Group> | |
T & | registerGroup (string const &name, string const &catalogName) |
Register a new Group as a sub-group of current Group. More... | |
void | deregisterGroup (string const &name) |
Removes a child group from this group. More... | |
virtual Group * | createChild (string const &childKey, string const &childName) |
Creates a new sub-Group using the ObjectCatalog functionality. More... | |
Sub-group retrieval methods. | |
This collection of functions are used to get a sub-Group from the current group. Various methods for performing the lookup are provided (localIndex, string, KeyIndex), and each have their advantages and costs. The lowest cost lookup is the "localIndex" lookup. The KeyIndex lookup will add a cost for checking to make sure the index stored in KeyIndex is valid (a string compare, and a hash if it is incorrect). The string lookup is the full cost hash lookup every time that it is called. The template parameter specifies the "type" that the caller expects to lookup, and thus attempts to cast the pointer that is stored in m_subGroups to a pointer of the desired type. If this cast fails, then a | |
template<typename T = Group, typename KEY = void> | |
T * | getGroupPointer (KEY const &key) |
Return a pointer to a sub-group of the current Group. More... | |
template<typename T = Group, typename KEY = void> | |
T const * | getGroupPointer (KEY const &key) const |
Return a pointer to a sub-group of the current Group. More... | |
template<typename T = Group, typename KEY = void> | |
T & | getGroup (KEY const &key) |
Return a reference to a sub-group of the current Group. More... | |
template<typename T = Group, typename KEY = void> | |
T const & | getGroup (KEY const &key) const |
Return a reference to a sub-group of the current Group. More... | |
template<typename T = Group> | |
T & | getGroupByPath (string const &path) |
Retrieve a group from the hierarchy using a path. More... | |
template<typename T = Group> | |
T const & | getGroupByPath (string const &path) const |
Retrieve a group from the hierarchy using a path. More... | |
subGroupMap & | getSubGroups () |
Get the subgroups object. More... | |
subGroupMap const & | getSubGroups () const |
Get the subgroups object. More... | |
localIndex | numSubGroups () const |
return the number of sub groups in this Group More... | |
std::vector< string > | getSubGroupsNames () const |
template<typename T = Group> | |
bool | hasGroup (string const &name) const |
Check whether a sub-group exists. More... | |
template<typename T > | |
bool | hasSubGroupOfType () const |
Check whether a sub-group exists by type. More... | |
Functor-based subgroup iteration | |
These functions loop over sub-groups and executes a functor that uses the sub-group as an argument. The functor is only executed if the group can be cast to a certain type specified by the | |
template<typename GROUPTYPE = Group, typename ... GROUPTYPES, typename LAMBDA > | |
void | forSubGroups (LAMBDA &&lambda) |
Apply the given functor to subgroups that can be casted to one of specified types. More... | |
template<typename GROUPTYPE = Group, typename ... GROUPTYPES, typename LAMBDA > | |
void | forSubGroups (LAMBDA &&lambda) const |
Apply the given functor to subgroups that can be casted to one of specified types. More... | |
template<typename GROUPTYPE = Group, typename ... GROUPTYPES, typename LAMBDA > | |
void | forSubGroupsIndex (LAMBDA &&lambda) |
Apply the given functor to subgroups that can be casted to one of specified types. More... | |
template<typename GROUPTYPE = Group, typename ... GROUPTYPES, typename LAMBDA > | |
void | forSubGroupsIndex (LAMBDA &&lambda) const |
Apply the given functor to subgroups that can be casted to one of specified types. More... | |
template<typename GROUPTYPE = Group, typename ... GROUPTYPES, typename LOOKUP_CONTAINER , typename LAMBDA > | |
void | forSubGroups (LOOKUP_CONTAINER const &subGroupKeys, LAMBDA &&lambda) |
Apply the given functor to subgroups that can be casted to one of specified types. More... | |
template<typename GROUPTYPE = Group, typename ... GROUPTYPES, typename LOOKUP_CONTAINER , typename LAMBDA > | |
void | forSubGroups (LOOKUP_CONTAINER const &subGroupKeys, LAMBDA &&lambda) const |
Apply the given functor to subgroups that can be casted to one of specified types. More... | |
Functor-based wrapper iteration | |
These functions loop over the wrappers contained in this group, and executes a functor that uses the Wrapper as an argument. The functor is only executed if the Wrapper can be casted to a certain type specified by the | |
template<typename LAMBDA > | |
void | forWrappers (LAMBDA &&lambda) |
Apply the given functor to wrappers. More... | |
template<typename LAMBDA > | |
void | forWrappers (LAMBDA &&lambda) const |
Apply the given functor to wrappers. More... | |
template<typename TYPE , typename ... TYPES, typename LAMBDA > | |
void | forWrappers (LAMBDA &&lambda) |
Apply the given functor to wrappers that can be cast to one of specified types. More... | |
template<typename TYPE , typename ... TYPES, typename LAMBDA > | |
void | forWrappers (LAMBDA &&lambda) const |
Apply the given functor to wrappers that can be cast to one of specified types. More... | |
Initialization and data registration | |
virtual void | initialize_postMeshGeneration () |
initialization post generation of the mesh. | |
void | initialize () |
Run initialization functions on this and all subgroups. More... | |
virtual void | initializationOrder (string_array &order) |
Sets the initialization order for sub-Groups. More... | |
void | initializePostInitialConditions () |
Initialization routine to be called after calling ApplyInitialConditions(). More... | |
void | postRestartInitializationRecursive () |
Initialization routine to be called after calling reading a restart file. More... | |
void | processInputFileRecursive (xmlWrapper::xmlDocument &xmlDocument, xmlWrapper::xmlNode &targetNode) |
Recursively read values using ProcessInputFile() from the input file and put them into the wrapped values for this group. Also add the includes content to the xmlDocument when Include nodes are encountered. More... | |
void | processInputFileRecursive (xmlWrapper::xmlDocument &xmlDocument, xmlWrapper::xmlNode &targetNode, xmlWrapper::xmlNodePos const &nodePos) |
Same as processInputFileRecursive(xmlWrapper::xmlDocument &, xmlWrapper::xmlNode &) but allow to reuse an existing xmlNodePos. More... | |
void | postInputInitializationRecursive () |
Recursively call postInputInitialization() to apply post processing after reading input values. | |
Wrapper registration interface | |
template<typename T , typename TBASE = T> | |
Wrapper< TBASE > & | registerWrapper (string const &name, wrapperMap::KeyIndex::index_type *const rkey=nullptr) |
Create and register a Wrapper around a new object. More... | |
template<typename T , typename TBASE = T> | |
Wrapper< TBASE > & | registerWrapper (Group::wrapperMap::KeyIndex const &viewKey) |
Create and register a Wrapper around a new object. More... | |
template<typename T > | |
Wrapper< T > & | registerWrapper (string const &name, std::unique_ptr< T > newObject) |
Register a Wrapper around a given object and take ownership. More... | |
template<typename T > | |
Wrapper< T > & | registerWrapper (string const &name, T *newObject) |
Register a Wrapper around an existing object, does not take ownership of the object. More... | |
WrapperBase & | registerWrapper (std::unique_ptr< WrapperBase > wrapper) |
Register and take ownership of an existing Wrapper. More... | |
void | deregisterWrapper (string const &name) |
Removes a Wrapper from this group. More... | |
Schema generation methods | |
void | generateDataStructureSkeleton (integer const level) |
Build a complete datastructure for schema generation. More... | |
virtual void | expandObjectCatalogs () |
Expand any catalogs in the data structure. | |
virtual void | setSchemaDeviations (xmlWrapper::xmlNode schemaRoot, xmlWrapper::xmlNode schemaParent, integer documentationType) |
Inform the schema generator of any deviations between the xml and GEOS data structures. More... | |
Mesh data registration | |
virtual void | registerDataOnMeshRecursive (Group &meshBodies) |
Calls RegisterDataOnMesh() recursively. More... | |
virtual void | registerDataOnMesh (Group &meshBodies) |
Register data on mesh entities. More... | |
Packing/upacking methods | |
virtual localIndex | packSize (string_array const &wrapperNames, integer const recursive, bool onDevice, parallelDeviceEvents &events) const |
Get the size required to pack a list of wrappers. More... | |
virtual localIndex | packSize (string_array const &wrapperNames, arrayView1d< localIndex const > const &packList, integer const recursive, bool onDevice, parallelDeviceEvents &events) const |
Get the size required to pack a list of indices within a list of wrappers. More... | |
localIndex | packSize (arrayView1d< localIndex const > const &packList, integer const recursive, bool onDevice, parallelDeviceEvents &events) const |
Get the size required to pack a list of indices for all registered wrappers. More... | |
virtual localIndex | pack (buffer_unit_type *&buffer, string_array const &wrapperNames, integer const recursive, bool onDevice, parallelDeviceEvents &events) const |
Pack a list of wrappers to a buffer. More... | |
virtual localIndex | pack (buffer_unit_type *&buffer, string_array const &wrapperNames, arrayView1d< localIndex const > const &packList, integer const recursive, bool onDevice, parallelDeviceEvents &events) const |
Pack a list of indices within a list of wrappers. More... | |
localIndex | pack (buffer_unit_type *&buffer, arrayView1d< localIndex const > const &packList, integer const recursive, bool onDevice, parallelDeviceEvents &events) const |
Pack a list of indices for all registered wrappers. More... | |
virtual localIndex | unpack (buffer_unit_type const *&buffer, arrayView1d< localIndex > &packList, integer const recursive, bool onDevice, parallelDeviceEvents &events, MPI_Op op=MPI_REPLACE) |
Unpack a buffer. More... | |
Untyped wrapper retrieval methods | |
These functions query the collection of Wrapper objects for the given index/name/KeyIndex and returns a WrapperBase pointer to the object if it exists. If it is not found, nullptr is returned. | |
template<typename KEY > | |
WrapperBase const & | getWrapperBase (KEY const &key) const |
Return a reference to a WrapperBase stored in this group. More... | |
template<typename KEY > | |
WrapperBase & | getWrapperBase (KEY const &key) |
Return a reference to a WrapperBase stored in this group. More... | |
indexType | getWrapperIndex (string const &name) const |
wrapperMap const & | wrappers () const |
Get access to the internal wrapper storage. More... | |
wrapperMap & | wrappers () |
Get access to the internal wrapper storage. More... | |
indexType | numWrappers () const |
Return the number of wrappers. More... | |
std::vector< string > | getWrappersNames () const |
Typed wrapper retrieval methods | |
These functions query the collection of Wrapper objects for the given index/key and returns a Wrapper<T> pointer to the object if it exists. The template parameter | |
template<typename LOOKUP_TYPE > | |
bool | hasWrapper (LOOKUP_TYPE const &lookup) const |
Check if a wrapper exists. More... | |
template<typename T , typename LOOKUP_TYPE > | |
Wrapper< T > const & | getWrapper (LOOKUP_TYPE const &index) const |
Retrieve a Wrapper stored in this group. More... | |
template<typename T , typename LOOKUP_TYPE > | |
Wrapper< T > & | getWrapper (LOOKUP_TYPE const &index) |
Retrieve a Wrapper stored in this group. More... | |
template<typename T , typename LOOKUP_TYPE > | |
Wrapper< T > const * | getWrapperPointer (LOOKUP_TYPE const &index) const |
Retrieve a Wrapper stored in this group. More... | |
template<typename T , typename LOOKUP_TYPE > | |
Wrapper< T > * | getWrapperPointer (LOOKUP_TYPE const &index) |
Retrieve a Wrapper stored in this group. More... | |
Wrapper data access methods. | |
These functions can be used to get referece/pointer access to the data stored by wrappers in this group. They are essentially just shortcuts for | |
template<typename T , typename LOOKUP_TYPE > | |
GEOS_DECLTYPE_AUTO_RETURN | getReference (LOOKUP_TYPE const &lookup) const |
Look up a wrapper and get reference to wrapped object. More... | |
template<typename T , typename LOOKUP_TYPE > | |
T & | getReference (LOOKUP_TYPE const &lookup) |
Look up a wrapper and get reference to wrapped object. More... | |
Size/capacity management | |
virtual void | resize (localIndex const newSize) |
Resize the group and all contained wrappers that resize with parent. More... | |
virtual void | reserve (indexType const newsize) |
Set the new capacity and reserve it in all wrappers that resize with parent. More... | |
localIndex | capacity () const |
Get the "capacity" of the group, which determines the capacity of resizable wrappers. More... | |
localIndex | size () const |
Get the "size" of the group, which determines the number of elements in resizable wrappers. More... | |
Basic group properties | |
string const & | getName () const |
Get group name. More... | |
string | getPath () const |
Return the path of this Group in the data repository. Starts with '/' followed by the hierarchy of the children of the "Problem" in which the Group is. More... | |
DataContext const & | getDataContext () const |
template<typename KEY > | |
DataContext const & | getWrapperDataContext (KEY key) const |
Group & | getParent () |
Access the group's parent. More... | |
Group const & | getParent () const |
Access the group's parent. More... | |
bool | hasParent () const |
localIndex | getIndexInParent () const |
Get the group's index within its parent group. More... | |
localIndex | getSubGroupIndex (keyType const &key) const |
Get the index of a sub-Group within this group. More... | |
int | sizedFromParent () const |
Check whether this Group is resized when its parent is resized. More... | |
Group & | setSizedFromParent (int val) |
Set whether this wrapper is resized when its parent is resized. More... | |
RestartFlags | getRestartFlags () const |
Get flags that control restart output of this group. More... | |
void | setRestartFlags (RestartFlags flags) |
Set flags that control restart output of this group. More... | |
InputFlags | getInputFlags () const |
Get input flags for schema generation. More... | |
void | setInputFlags (InputFlags flags) |
Set input flags for schema generation. More... | |
Restart output methods | |
conduit::Node & | getConduitNode () |
Return the Conduit node object associated with this group. More... | |
conduit::Node const & | getConduitNode () const |
Return the Conduit node object associated with this group. More... | |
void | prepareToWrite () |
Register the group and its wrappers with Conduit. | |
void | finishWriting () |
Write the group and its wrappers into Conduit. | |
void | loadFromConduit () |
Read the group and its wrappers from Conduit. | |
void | enableLogLevelInput () |
void | setLogLevel (integer const logLevel) |
Set verbosity level. More... | |
integer | getLogLevel () const |
Static Public Member Functions | |
Functor application helpers | |
This function is useful when trying to apply a functor that passes a pointer to an container, but it is desired that the functor is only executed if the container can be casted to a certain type. The variadic list consisting of CASTTYPE/S will be used recursively to check if the container is able to be casted to the one of these types. The first type in the CASTTYPE/S list will be used to execute the functor, and the function will return true. | |
template<typename T0 , typename T1 , typename ... CASTTYPES, typename CONTAINERTYPE , typename LAMBDA > | |
static bool | applyLambdaToContainer (CONTAINERTYPE &container, LAMBDA &&lambda) |
Apply a given functor to a container if the container can be cast to one of the specified types. More... | |
Protected Member Functions | |
Overridable initialization hooks | |
Return PyGroup type.
These methods can be overridden by derived classes to customize input post processing and object initialization. | |
virtual void | postInputInitialization () |
virtual void | initializePreSubGroups () |
Called by Initialize() prior to initializing sub-Groups. | |
virtual void | initializePostSubGroups () |
Called by Initialize() after to initializing sub-Groups. | |
virtual void | initializePostInitialConditionsPreSubGroups () |
Called by InitializePostInitialConditions() prior to initializing sub-Groups. | |
virtual void | initializePostInitialConditionsPostSubGroups () |
Called by InitializePostInitialConditions() after to initializing sub-Groups. | |
virtual void | postRestartInitialization () |
Performs initialization required after reading from a restart file. | |
Static Factory Catalog Functions | |
using | CatalogInterface = dataRepository::CatalogInterface< Group, string const &, Group *const > |
Type alias for catalog interface used by this class. See CatalogInterface. | |
static CatalogInterface::CatalogType & | getCatalog () |
Get the singleton catalog for this Group. More... | |
The Group class serves as a "node" in a hierarchy of the dataRepository. The data structure is built as a hierarchy of Group objects, or objects derived from group objects.
|
explicit |
|
default |
Move constructor.
[in] | source | source Group |
std::enable_if_t< geos::is_log_level_info< LOG_LEVEL_INFO >, void > geos::dataRepository::Group::addLogLevel |
|
inlinestatic |
Apply a given functor to a container if the container can be cast to one of the specified types.
CASTTYPE | the first type that will be used in the attempted casting of container |
CASTTYPES | a variadic list of types that will be used in the attempted casting of container |
CONTAINERTYPE | the type of container |
LAMBDA | the type of lambda function to call in the function |
[in] | container | a pointer to the container which will be passed to the lambda function |
[in] | lambda | the lambda function to call in the function |
|
inline |
|
virtual |
Creates a new sub-Group using the ObjectCatalog functionality.
[in] | childKey | The name of the new object type's key in the ObjectCatalog. |
[in] | childName | The name of the new object in the collection of sub-Groups. |
Reimplemented in geos::FunctionManager, geos::PhysicsSolverManager, geos::PhysicsSolverBase, geos::WellSolverBase, geos::GeometricObjectManager, geos::ParticleManager, geos::MeshManager, geos::WellGeneratorBase, geos::ParticleMeshGenerator, geos::ParticleBlockManager, geos::MeshGeneratorBase, geos::CellBlockManager, geos::ElementRegionManager, geos::ProblemManager, geos::FiniteVolumeManager, geos::OutputManager, geos::FieldSpecificationManager, geos::TasksManager, geos::EventManager, geos::EventBase, and geos::NumericalMethodsManager.
void geos::dataRepository::Group::deregisterGroup | ( | string const & | name | ) |
Removes a child group from this group.
name | the name of the child group to remove from this group. |
void geos::dataRepository::Group::deregisterWrapper | ( | string const & | name | ) |
string geos::dataRepository::Group::dumpInputOptions | ( | ) | const |
string geos::dataRepository::Group::dumpSubGroupsNames | ( | ) | const |
string geos::dataRepository::Group::dumpWrappersNames | ( | ) | const |
void geos::dataRepository::Group::enableLogLevelInput | ( | ) |
|
inline |
Apply the given functor to subgroups that can be casted to one of specified types.
GROUPTYPE | the first type that will be used in the attempted casting of group. |
GROUPTYPES | a variadic list of types that will be used in the attempted casting of group. |
LAMBDA | the type of functor to call |
[in] | lambda | the functor to call on subgroups |
|
inline |
Apply the given functor to subgroups that can be casted to one of specified types.
GROUPTYPE | the first type that will be used in the attempted casting of group. |
GROUPTYPES | a variadic list of types that will be used in the attempted casting of group. |
LAMBDA | the type of functor to call |
[in] | lambda | the functor to call on subgroups |
|
inline |
Apply the given functor to subgroups that can be casted to one of specified types.
GROUPTYPE | the first type that will be used in the attempted casting of group. |
GROUPTYPES | a variadic list of types that will be used in the attempted casting of group. |
LOOKUP_CONTAINER | type of container of subgroup lookup keys (names or indices), must support range-based for loop |
LAMBDA | type of functor callable with an index in lookup container and a reference to casted subgroup |
[in] | subGroupKeys | container with subgroup lookup keys (e.g. names or indices) to apply the functor to |
[in] | lambda | the functor to call |
|
inline |
Apply the given functor to subgroups that can be casted to one of specified types.
GROUPTYPE | the first type that will be used in the attempted casting of group. |
GROUPTYPES | a variadic list of types that will be used in the attempted casting of group. |
LOOKUP_CONTAINER | type of container of subgroup lookup keys (names or indices), must support range-based for loop |
LAMBDA | type of functor callable with an index in lookup container and a reference to casted subgroup |
[in] | subGroupKeys | container with subgroup lookup keys (e.g. names or indices) to apply the functor to |
[in] | lambda | the functor to call |
|
inline |
Apply the given functor to subgroups that can be casted to one of specified types.
GROUPTYPE | the first type that will be used in the attempted casting of group. |
GROUPTYPES | a variadic list of types that will be used in the attempted casting of group. |
LAMBDA | the type of functor to call |
[in] | lambda | the functor to call on subgroups |
|
inline |
Apply the given functor to subgroups that can be casted to one of specified types.
GROUPTYPE | the first type that will be used in the attempted casting of group. |
GROUPTYPES | a variadic list of types that will be used in the attempted casting of group. |
LAMBDA | the type of functor to call |
[in] | lambda | the functor to call on subgroups |
|
inline |
|
inline |
Apply the given functor to wrappers that can be cast to one of specified types.
TYPE | the first type that will be used in the attempted casting of Wrapper |
TYPES | a variadic list of types that will be used in the attempted casting of Wrapper |
LAMBDA | the type of functor to call |
[in] | lambda | the functor to call |
|
inline |
|
inline |
Apply the given functor to wrappers that can be cast to one of specified types.
TYPE | the first type that will be used in the attempted casting of Wrapper |
TYPES | a variadic list of types that will be used in the attempted casting of Wrapper |
LAMBDA | the type of functor to call |
[in] | lambda | the functor to call |
|
inline |
|
static |
Get the singleton catalog for this Group.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Retrieve a group from the hierarchy using a path.
T | type of subgroup |
[in] | path | a unix-style string (absolute, relative paths valid) to lookup the Group to return. Absolute paths search from the tree root, while relative - from current group. |
T
that refers to the sub-group. std::domain_error | If the Group doesn't exist. |
|
inline |
Retrieve a group from the hierarchy using a path.
T | type of subgroup |
[in] | path | a unix-style string (absolute, relative paths valid) to lookup the Group to return. Absolute paths search from the tree root, while relative - from current group. |
T
that refers to the sub-group. std::domain_error | If the Group doesn't exist. |
|
inline |
Return a pointer to a sub-group of the current Group.
T | The type of subgroup. |
KEY | The type of the lookup. |
key | The key used to perform the lookup. |
T
that refers to the sub-group, if the Group does not exist or it has an incompatible type a nullptr
is returned.
|
inline |
Return a pointer to a sub-group of the current Group.
T | The type of subgroup. |
KEY | The type of the lookup. |
key | The key used to perform the lookup. |
T
that refers to the sub-group, if the Group does not exist or it has an incompatible type a nullptr
is returned.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
string geos::dataRepository::Group::getPath | ( | ) | const |
|
inline |
Look up a wrapper and get reference to wrapped object.
T | return value type |
WRAPPEDTYPE | wrapped value type (by default, same as return) |
LOOKUP_TYPE | type of value used for wrapper lookup |
lookup | value for wrapper lookup |
T
A | std::domain_error if the Wrapper does not exist. |
|
inline |
Look up a wrapper and get reference to wrapped object.
T | return value type |
WRAPPEDTYPE | wrapped value type (by default, same as return) |
LOOKUP_TYPE | type of value used for wrapper lookup |
lookup | value for wrapper lookup |
T
A | std::domain_error if the Wrapper does not exist. |
|
inline |
localIndex geos::dataRepository::Group::getSubGroupIndex | ( | keyType const & | key | ) | const |
Get the index of a sub-Group within this group.
key | The key of the sub-Group |
|
inline |
|
inline |
std::vector< string > geos::dataRepository::Group::getSubGroupsNames | ( | ) | const |
|
inline |
Retrieve a Wrapper stored in this group.
T | the object type contained in the Wrapper |
LOOKUP_TYPE | the type of key used to perform the lookup |
[in] | index | a lookup value used to search the collection of wrappers |
std::domain_error | if the Wrapper doesn't exist. |
|
inline |
Retrieve a Wrapper stored in this group.
T | the object type contained in the Wrapper |
LOOKUP_TYPE | the type of key used to perform the lookup |
[in] | index | a lookup value used to search the collection of wrappers |
std::domain_error | if the Wrapper doesn't exist. |
|
inline |
Return a reference to a WrapperBase stored in this group.
KEY | The lookup type. |
key | The value used to lookup the wrapper. |
std::domain_error | if the wrapper doesn't exist. |
|
inline |
Return a reference to a WrapperBase stored in this group.
KEY | The lookup type. |
key | The value used to lookup the wrapper. |
std::domain_error | if the wrapper doesn't exist. |
|
inline |
KEY | The lookup type. |
key | The value used to lookup the wrapper. |
std::domain_error | if the wrapper doesn't exist. |
|
inline |
Retrieve a Wrapper stored in this group.
T | the object type contained in the Wrapper |
LOOKUP_TYPE | the type of key used to perform the lookup |
[in] | index | a lookup value used to search the collection of wrappers |
nullptr
is returned.
|
inline |
Retrieve a Wrapper stored in this group.
T | the object type contained in the Wrapper |
LOOKUP_TYPE | the type of key used to perform the lookup |
[in] | index | a lookup value used to search the collection of wrappers |
nullptr
is returned. std::vector< string > geos::dataRepository::Group::getWrappersNames | ( | ) | const |
|
inline |
|
inline |
|
inline |
|
inline |
|
virtual |
Sets the initialization order for sub-Groups.
[out] | order | An array of strings that define the iteration order. |
This function will fill the order
array that is used to specify the order in which the Initialize() function loops over sub-Groups. If a custom order is required by a derived type, this function should be overridden with a implementation that specifies the desired order.
Reimplemented in geos::DomainPartition, and geos::ProblemManager.
void geos::dataRepository::Group::initialize | ( | ) |
Run initialization functions on this and all subgroups.
[in] | root | A group that is passed in to the initialization functions in order to facilitate the initialization. |
This function will first call initializePreSubGroups() on this Group, then loop over all subgroups and call Initialize() on them, then call InitializePostSubGroups() on this Group.
void geos::dataRepository::Group::initializePostInitialConditions | ( | ) |
Initialization routine to be called after calling ApplyInitialConditions().
This function provides a capability for post-initial condition problem initialization. First the InitializePostInitialConditions_PreSubGroups() function is called on this Group. Then there is a loop over all subgroups and InitializePostInitialConditions() is called on them. Finally, the InitializePostInitialConditions_PostSubGroups() function is called this Group.
|
inline |
|
inline |
Deleted move assignment operator.
Deleted copy assignment operator.
localIndex geos::dataRepository::Group::pack | ( | buffer_unit_type *& | buffer, |
arrayView1d< localIndex const > const & | packList, | ||
integer const | recursive, | ||
bool | onDevice, | ||
parallelDeviceEvents & | events | ||
) | const |
Pack a list of indices for all registered wrappers.
[in,out] | buffer | the buffer that will be packed. |
[in] | packList | the list of indices to pack |
[in] | recursive | whether or not to perform a recursive pack. |
[in] | onDevice | whether to use device-based packing functions (buffer must be either pinned or a device pointer) |
[out] | events | a collection of events to poll for completion of async packing kernels ( device packing is incomplete until all events are finalized ) |
This function takes in a reference to a pointer buffer
, and packs data specified by wrapperNames
, packList
, and recursive
to that pointer location. The pointer is altered and returned to the new location corresponding the original value of buffer
plus the size of data packed to the buffer.
|
virtual |
Pack a list of indices within a list of wrappers.
[in,out] | buffer | the buffer that will be packed. |
[in] | wrapperNames | an array that contains the names of the wrappers to pack. |
[in] | packList | the list of indices to pack |
[in] | recursive | whether or not to perform a recursive pack. |
[in] | onDevice | whether to use device-based packing functions (buffer must be either pinned or a device pointer) |
[out] | events | a collection of events to poll for completion of async packing kernels ( device packing is incomplete until all events are finalized ) |
This function takes in a reference to a pointer buffer
, and packs data specified by wrapperNames
, packList
, and recursive
to that pointer location. The pointer is altered and returned to the new location corresponding the original value of buffer
plus the size of data packed to the buffer.
Reimplemented in geos::ObjectManagerBase.
|
virtual |
Pack a list of wrappers to a buffer.
[in,out] | buffer | the buffer that will be packed. |
[in] | wrapperNames | an array that contains the names of the wrappers to pack. |
[in] | recursive | whether or not to perform a recursive pack. |
[in] | onDevice | whether to use device-based packing functions (buffer must be either pinned or a device pointer) |
[out] | events | a collection of events to poll for completion of async packing kernels ( device packing is incomplete until all events are finalized ) |
This function takes in a reference to a pointer buffer
, and packs data specified by wrapperNames
, and recursive
to that pointer location. The pointer is altered and returned to the new location corresponding the original value of buffer
plus the size of data packed to the buffer.
localIndex geos::dataRepository::Group::packSize | ( | arrayView1d< localIndex const > const & | packList, |
integer const | recursive, | ||
bool | onDevice, | ||
parallelDeviceEvents & | events | ||
) | const |
Get the size required to pack a list of indices for all registered wrappers.
[in] | packList | the list of indices to pack |
[in] | recursive | whether or not to perform a recursive pack. |
[in] | onDevice | whether to use device-based packing functions (buffer must be either pinned or a device pointer) |
[out] | events | a collection of events to poll for completion of async packing kernels ( device packing is incomplete until all events are finalized ) |
|
virtual |
Get the size required to pack a list of indices within a list of wrappers.
[in] | wrapperNames | an array that contains the names of the wrappers to pack. |
[in] | packList | the list of indices to pack |
[in] | recursive | whether or not to perform a recursive pack. |
[in] | onDevice | whether to use device-based packing functions (buffer must be either pinned or a device pointer) |
[out] | events | a collection of events to poll for completion of async packing kernels ( device packing is incomplete until all events are finalized ) |
Reimplemented in geos::ObjectManagerBase.
|
virtual |
Get the size required to pack a list of wrappers.
[in] | wrapperNames | an array that contains the names of the wrappers to pack. |
[in] | recursive | whether or not to perform a recursive pack. |
[in] | onDevice | whether to use device-based packing functions (buffer must be either pinned or a device pointer) |
[out] | events | a collection of events to poll for completion of async packing kernels ( device packing is incomplete until all events are finalized ) |
|
inlineprotectedvirtual |
This function provides capability to post process input values prior to any other initialization operations.
Reimplemented in geos::ElasticWaveEquationSEM, geos::ElasticFirstOrderWaveEquationSEM, geos::CoupledWaveSolver< SOLVERS >, geos::CoupledWaveSolver< AcousticWaveEquationSEM, ElasticWaveEquationSEM >, geos::AcousticWaveEquationSEM, geos::AcousticVTIWaveEquationSEM, geos::AcousticFirstOrderWaveEquationSEM, geos::SurfaceGenerator, geos::SolidMechanicsMPM, geos::PhaseFieldDamageFEM, geos::SinglePhasePoromechanicsEmbeddedFractures, geos::PhaseFieldFractureSolver, geos::HydrofractureSolver< POROMECHANICS_SOLVER >, geos::SolidMechanicsEmbeddedFractures, geos::ThickPlane, geos::Rectangle, geos::Disc, geos::CustomPolarObject, geos::Box, geos::InternalWellboreGenerator, geos::ProblemManager, geos::TractionBoundaryCondition, geos::PerfectlyMatchedLayer, geos::EquilibriumInitialCondition, geos::AquiferBoundaryCondition, geos::WaveSolverBase, geos::SolidMechanicsLagrangianFEM, geos::NonlinearSolverParameters, geos::SinglePhasePoromechanics< FLOW_SOLVER, MECHANICS_SOLVER >, geos::SinglePhasePoromechanics< SinglePhaseBase, SolidMechanicsEmbeddedFractures >, geos::SinglePhasePoromechanics< SinglePhaseBase, SolidMechanicsLagrangeContact >, geos::MultiphasePoromechanics< FLOW_SOLVER, MECHANICS_SOLVER >, geos::CoupledSolver< SOLVERS >, geos::CoupledSolver< SinglePhaseBase, SolidMechanicsLagrangianFEM >, geos::CoupledSolver< SolidMechanicsLagrangianFEM, PhaseFieldDamageFEM >, geos::CoupledSolver< ProppantTransport, FlowSolverBase >, geos::CoupledSolver< RESERVOIR_SOLVER, WELL_SOLVER >, geos::CoupledSolver< CompositionalMultiphaseBase, SolidMechanicsLagrangianFEM >, geos::CoupledSolver< SinglePhaseBase, SolidMechanicsEmbeddedFractures >, geos::CoupledSolver< FLOW_SOLVER, SolidMechanicsLagrangianFEM >, geos::CoupledSolver< SinglePhaseBase, SolidMechanicsLagrangeContact >, geos::LinearSolverParametersInput, geos::SeismicityRate, geos::WellSolverBase, geos::WellControls, geos::CompositionalMultiphaseWell, geos::ProppantTransport, geos::CompositionalMultiphaseFVM, geos::CompositionalMultiphaseBase, geos::FieldStatisticsBase< SOLVER >, geos::FieldStatisticsBase< FlowSolverBase >, geos::FieldStatisticsBase< CompositionalMultiphaseBase >, geos::FieldStatisticsBase< SolidMechanicsLagrangianFEM >, geos::FieldStatisticsBase< SinglePhaseBase >, geos::ContactSolverBase, geos::Perforation, geos::WellGeneratorBase, geos::ParticleMeshGenerator, geos::InternalWellGenerator, geos::InternalMeshGenerator, geos::ExternalMeshGeneratorBase, geos::FunctionBase, geos::VTKOutput, and geos::TaskBase.
void geos::dataRepository::Group::postRestartInitializationRecursive | ( | ) |
Initialization routine to be called after calling reading a restart file.
This functions recurses and calls postRestartInitialization() on nested sub-groups at any depth, providing a capability to add custom post-restart initialization.
void geos::dataRepository::Group::printDataHierarchy | ( | integer | indent = 0 | ) | const |
Prints the data hierarchy recursively.
[in] | indent | The level of indentation to add to this level of output. |
void geos::dataRepository::Group::processInputFileRecursive | ( | xmlWrapper::xmlDocument & | xmlDocument, |
xmlWrapper::xmlNode & | targetNode | ||
) |
Recursively read values using ProcessInputFile() from the input file and put them into the wrapped values for this group. Also add the includes content to the xmlDocument when Include
nodes are encountered.
[in] | xmlDocument | the XML document that contains the targetNode. |
[in] | targetNode | the XML node that to extract input values from. |
void geos::dataRepository::Group::processInputFileRecursive | ( | xmlWrapper::xmlDocument & | xmlDocument, |
xmlWrapper::xmlNode & | targetNode, | ||
xmlWrapper::xmlNodePos const & | nodePos | ||
) |
Same as processInputFileRecursive(xmlWrapper::xmlDocument &, xmlWrapper::xmlNode &) but allow to reuse an existing xmlNodePos.
[in] | xmlDocument | the XML document that contains the targetNode. |
[in] | targetNode | the XML node that to extract input values from. |
[in] | nodePos | the target node position, typically obtained with xmlDocument::getNodePosition(). |
|
inlinevirtual |
Register a callback function on the group.
func | the function to register |
funcType | the type of the function to register |
Reimplemented in geos::PhysicsSolverBase.
|
inlinevirtual |
Register data on mesh entities.
[in,out] | meshBodies | the group of MeshBody objects to register data on. |
This function is used to register data on mesh entities such as the NodeManager, FaceManager...etc.
Reimplemented in geos::SurfaceGenerator, geos::EmbeddedSurfaceGenerator, geos::ElasticWaveEquationSEM, geos::ElasticFirstOrderWaveEquationSEM, geos::AcousticElasticWaveEquationSEM, geos::AcousticWaveEquationSEM, geos::AcousticVTIWaveEquationSEM, geos::AcousticFirstOrderWaveEquationSEM, geos::SolidMechanicsMPM, geos::PhaseFieldDamageFEM, geos::LaplaceBaseH1, geos::HydrofractureSolver< POROMECHANICS_SOLVER >, geos::SolidMechanicsLagrangeContactBubbleStab, geos::SolidMechanicsLagrangeContact, geos::WaveSolverBase, geos::SolidMechanicsLagrangianFEM, geos::PhysicsSolverBase, geos::SeismicityRate, geos::QuasiDynamicEQ, geos::WellSolverBase, geos::SinglePhaseWell, geos::CompositionalMultiphaseWell, geos::SinglePhaseHybridFVM, geos::SinglePhaseBase, geos::ReactiveCompositionalMultiphaseOBL, geos::ProppantTransport, geos::FlowSolverBase, geos::CompositionalMultiphaseHybridFVM, geos::CompositionalMultiphaseBase, geos::SinglePhasePoromechanicsEmbeddedFractures, geos::SolidMechanicsEmbeddedFractures, geos::SolidMechanicsAugmentedLagrangianContact, geos::PoromechanicsSolver< FLOW_SOLVER, MECHANICS_SOLVER >, geos::PoromechanicsSolver< SinglePhaseBase, SolidMechanicsLagrangianFEM >, geos::PoromechanicsSolver< CompositionalMultiphaseBase, SolidMechanicsLagrangianFEM >, geos::PoromechanicsSolver< SinglePhaseBase, SolidMechanicsEmbeddedFractures >, geos::PoromechanicsSolver< SinglePhaseBase, SolidMechanicsLagrangeContact >, and geos::ContactSolverBase.
|
virtual |
Calls RegisterDataOnMesh() recursively.
[in,out] | meshBodies | the group of MeshBody objects to register data on. |
|
inline |
Register a new Group as a sub-group of current Group.
T | The type of the Group to add/register. This should be a type that derives from Group. |
[in] | name | The name of the group to use as a string key. |
Creates and registers a Group or class derived from Group as a subgroup of this Group.
|
inline |
Register a new Group as a sub-group of current Group.
T | The type of the Group to add/register. This should be a type that derives from Group. |
[in] | name | The name of the group to use as a string key. |
[in] | newObject | A unique_ptr to the object that is being registered. |
Registers a Group or class derived from Group as a subgroup of this Group and takes ownership.
|
inline |
Register a new Group as a sub-group of current Group.
T | The type of the Group to add/register. This should be a type that derives from Group. |
TBASE | The type whose type catalog will be used to look up the new sub-group type |
[in] | name | The name of the group to use as a string key. |
[in] | catalogName | The catalog name of the new type. |
Creates and registers a Group or class derived from Group as a subgroup of this Group.
|
inline |
Register a new Group as a sub-group of current Group.
T | The type of the Group to add/register. This should be a type that derives from Group. |
[in] | name | The name of the group to use as a string key. |
[in] | newObject | A unique_ptr to the object that is being registered. |
Registers a Group or class derived from Group as a subgroup of this Group but does not take ownership.
|
inline |
Register a new Group as a sub-group of current Group.
T | The type of the Group to add/register. This should be a type that derives from Group. |
keyIndex | A KeyIndexT object that will be used to specify the name of the new group. The index of the KeyIndex will also be set. |
nullptr
if no group was registered.Creates and registers a Group or class derived from Group as a subgroup of this Group.
Wrapper< TBASE > & geos::dataRepository::Group::registerWrapper | ( | Group::wrapperMap::KeyIndex const & | viewKey | ) |
WrapperBase& geos::dataRepository::Group::registerWrapper | ( | std::unique_ptr< WrapperBase > | wrapper | ) |
Register and take ownership of an existing Wrapper.
wrapper | A pointer to the an existing wrapper. |
Wrapper< T > & geos::dataRepository::Group::registerWrapper | ( | string const & | name, |
std::unique_ptr< T > | newObject | ||
) |
Register a Wrapper around a given object and take ownership.
T | the type of the wrapped object |
[in] | name | the name of the wrapper to use as a string key |
[in] | newObject | an owning pointer to the object that is being registered |
WrapperBase
instance. Use dedicated member function instead. Wrapper< T > & geos::dataRepository::Group::registerWrapper | ( | string const & | name, |
T * | newObject | ||
) |
Register a Wrapper around an existing object, does not take ownership of the object.
T | the type of the wrapped object |
[in] | name | the name of the wrapper to use as a string key |
[in] | newObject | a pointer to the object that is being registered |
WrapperBase
instance. Use dedicated member function instead. Wrapper< TBASE >& geos::dataRepository::Group::registerWrapper | ( | string const & | name, |
wrapperMap::KeyIndex::index_type *const | rkey = nullptr |
||
) |
Create and register a Wrapper around a new object.
T | The type of the object allocated. |
TBASE | The type of the object that the Wrapper holds. |
[in] | name | the name of the wrapper to use as a string key |
[out] | rkey | a pointer to a index type that will be filled with the new Wrapper index in this Group |
|
virtual |
Set the new capacity and reserve it in all wrappers that resize with parent.
newsize | the new capacity of the group |
|
virtual |
Resize the group and all contained wrappers that resize with parent.
newSize | the new size of the group |
Reimplemented in geos::NodeManager, geos::FaceManager, geos::EmbeddedSurfaceNodeManager, geos::EdgeManager, geos::ParticleBlock, and geos::CellBlock.
|
inline |
|
inline |
|
inline |
|
inlinevirtual |
Inform the schema generator of any deviations between the xml and GEOS data structures.
schemaRoot | XML node corresponding to the root |
schemaParent | XML node for the parent node |
documentationType | type of XML schema generated |
Reimplemented in geos::ParticleManager, geos::ElementRegionManager, and geos::ProblemManager.
|
inline |
|
inline |
|
inline |
|
virtual |
Unpack a buffer.
[in,out] | buffer | the buffer to unpack |
[in,out] | packList | the list of indices that will be unpacked. |
[in] | recursive | whether or not to perform a recursive unpack. |
[in] | onDevice | whether to use device-based packing functions (buffer must be either pinned or a device pointer) |
[out] | events | a collection of events to poll for completion of async packing kernels ( device packing is incomplete until all events are finalized ) |
[in] | op | the operation to perform while unpacking |
This function takes a reference to a pointer to const buffer type, and unpacks data from that buffer into the current Group. If packList
is non-empty, then a check is made to ensure that the data that is unpacked matches packList
. If packList
is empty, the values of the indices that are unpacked are stored and returned in packList.
Reimplemented in geos::ObjectManagerBase.
|
inline |
|
inline |