GEOSX
|
#include <Group.hpp>
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 | |
Constructors/destructor | |
Group (std::string const &name, Group *const parent) | |
Constructor. More... | |
Group (Group &&source) | |
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 (Group const &&)=delete | |
Deleted move constructor. | |
Group & | operator= (Group const &)=delete |
Deleted copy assignment operator. More... | |
Group & | operator= (Group &&)=delete |
Deleted move assignment operator. More... | |
Miscellaneous | |
virtual const std::type_info & | get_typeid () const |
Get typeid for current group. More... | |
bool | CheckTypeID (std::type_info const &typeToCheck) const |
Check a type_info against the type_info of this Group. More... | |
void | PrintDataHierarchy (integer indent=0) |
Prints the data hierarchy recursively. More... | |
string | dumpInputOptions () const |
Sub-group registration interface | |
template<typename T = Group> | |
T * | RegisterGroup (std::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 (std::string const &name, T *newObject) |
Register a new Group as a sub-group of current Group. More... | |
template<typename T = Group> | |
T * | RegisterGroup (std::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 (std::string const &name, std::string const &catalogName) |
Register a new Group as a sub-group of current Group. More... | |
void | deregisterGroup (std::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> | |
T * | GetGroup (localIndex index) |
Retrieve a sub-group from the current Group using an index. More... | |
template<typename T = Group> | |
T const * | GetGroup (localIndex index) const |
Retrieve a sub-group from the current Group using an index. More... | |
template<typename T = Group> | |
T * | GetGroup (string const &name) |
Retrieve a sub-group from the current Group using a string. More... | |
template<typename T = Group> | |
T const * | GetGroup (string const &name) const |
Retrieve a sub-group from the current Group using a string. More... | |
template<typename T = Group> | |
T & | getGroupReference (string const &key) |
template<typename T = Group> | |
T const & | getGroupReference (string const &key) const |
template<typename T = Group> | |
T & | GetGroupReference (subGroupMap::KeyIndex const &key) |
template<typename T = Group> | |
T const & | GetGroupReference (subGroupMap::KeyIndex const &key) const |
template<typename T = Group> | |
T * | GetGroup (subGroupMap::KeyIndex const &key) |
Retrieve a sub-group from the current Group using a KeyIndexT. More... | |
template<typename T = Group> | |
T const * | GetGroup (subGroupMap::KeyIndex const &key) const |
Retrieve a sub-group from the current Group using a KeyIndexT. 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... | |
bool | hasGroup (std::string const &name) const |
Check whether a sub-group exists. 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 LOOKUP_CONTAINER , typename LAMBDA > | |
void | forSubGroups (LOOKUP_CONTAINER const &subGroupKeys, LAMBDA lambda) |
template<typename GROUPTYPE = Group, typename ... GROUPTYPES, typename LOOKUP_CONTAINER , typename LAMBDA > | |
void | forSubGroups (LOOKUP_CONTAINER const &subGroupKeys, LAMBDA lambda) const |
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 | |
void | Initialize (Group *const group) |
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 (Group *const group) |
Initialization routine to be called after calling ApplyInitialConditions(). More... | |
void | postRestartInitializationRecursive (Group *const domain) |
Initialization routine to be called after calling reading a restart file. More... | |
void | ProcessInputFileRecursive (xmlWrapper::xmlNode &targetNode) |
Recursively read values using ProcessInputFile() from the input file and put them into the wrapped values for this group. More... | |
void | PostProcessInputRecursive () |
Recursively call PostProcessInput() to apply post processing after reading input values. | |
Wrapper registration interface | |
template<typename T , typename TBASE = T> | |
Wrapper< TBASE > * | registerWrapper (std::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) |
template<typename T > | |
Wrapper< T > * | registerWrapper (std::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 (std::string const &name, T *newObject) |
Register a Wrapper around an existing object, does not take ownership of the object. More... | |
WrapperBase * | registerWrapper (string const &name, 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 *const meshBodies) |
Calls RegisterDataOnMesh() recursively. More... | |
virtual void | RegisterDataOnMesh (Group *const meshBodies) |
Register data on mesh entities. More... | |
Packing/upacking methods | |
virtual localIndex | PackSize (string_array const &wrapperNames, integer const recursive, bool on_device=false) 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 on_device=false) const |
Get the size required to pack a list of indices within a list of wrappers. More... | |
virtual localIndex | Pack (buffer_unit_type *&buffer, string_array const &wrapperNames, integer const recursive, bool on_device=false) 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 on_device=false) const |
Pack a list of indices within a list of wrappers. More... | |
virtual localIndex | Unpack (buffer_unit_type const *&buffer, arrayView1d< localIndex > &packList, integer const recursive, bool on_device=false) |
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. | |
WrapperBase const * | getWrapperBase (indexType const index) const |
Retrieve a WrapperBase stored in this group. More... | |
WrapperBase * | getWrapperBase (indexType const index) |
Retrieve a WrapperBase stored in this group. More... | |
WrapperBase const * | getWrapperBase (std::string const &name) const |
Retrieve a WrapperBase stored in this group. More... | |
WrapperBase * | getWrapperBase (std::string const &name) |
Retrieve a WrapperBase stored in this group. More... | |
WrapperBase const * | getWrapperBase (wrapperMap::KeyIndex const &keyIndex) const |
Retrieve a WrapperBase stored in this group. More... | |
WrapperBase * | getWrapperBase (wrapperMap::KeyIndex const &keyIndex) |
Retrieve a WrapperBase stored in this group. More... | |
indexType | getWrapperIndex (std::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... | |
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 > | |
Wrapper< T > const * | getWrapper (char const *const key) const |
Retrieve a Wrapper stored in this group. More... | |
template<typename T > | |
Wrapper< T > * | getWrapper (char const *const key) |
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 > | |
GEOSX_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... | |
template<typename T > | |
GEOSX_DECLTYPE_AUTO_RETURN | getReference (char const *const name) const |
template<typename T > | |
T & | getReference (char const *const name) |
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 | |
const string | getName () const |
Get group name. More... | |
Group * | getParent () |
Access the group's parent. More... | |
Group const * | getParent () const |
Access the group's parent. More... | |
localIndex | getIndexInParent () const |
Get the group's index withing its parent group. More... | |
integer | 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 () |
Get 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 () |
Enable verbosity input for object. | |
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 | |
These methods can be overridden by derived classes to customize input post processing and object initialization. | |
virtual void | PostProcessInput () |
virtual void | InitializePreSubGroups (Group *const group) |
Called by Initialize() prior to initializing sub-Groups. More... | |
virtual void | InitializePostSubGroups (Group *const group) |
Called by Initialize() after to initializing sub-Groups. More... | |
virtual void | InitializePostInitialConditions_PreSubGroups (Group *const group) |
Called by InitializePostInitialConditions() prior to initializing sub-Groups. More... | |
virtual void | InitializePostInitialConditions_PostSubGroups (Group *const group) |
Called by InitializePostInitialConditions() after to initializing sub-Groups. More... | |
virtual void | postRestartInitialization (Group *const domain) |
Performs initialization required after reading from a restart file. More... | |
Static Factory Catalog Functions | |
using | CatalogInterface = dataRepository::CatalogInterface< Group, std::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 class. More... | |
Group type-casting methods | |
template<typename T > | |
T | group_cast () |
Downcast this Group. More... | |
template<typename T > | |
T | group_cast () const |
Downcast this Group. More... | |
template<typename T > | |
static T | group_cast (Group *group) |
Downcast a Group *. More... | |
template<typename T > | |
static T | group_cast (Group const *group) |
Downcast a Group const *. 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 |
Constructor.
[in] | name | the name of this object manager |
[in] | parent | the parent Group |
geosx::dataRepository::Group::Group | ( | Group && | source | ) |
Move constructor.
[in] | source | source Group |
|
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 |
|
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 geosx::ElementRegionManager, geosx::InternalWellGenerator, geosx::InternalMeshGenerator, geosx::EventBase, geosx::ProblemManager, geosx::PAMELAMeshGenerator, geosx::CellBlockManager, geosx::FunctionManager, geosx::FieldSpecificationManager, geosx::EventManager, geosx::FiniteVolumeManager, geosx::GeometricObjectManager, geosx::NumericalMethodsManager, geosx::MeshManager, geosx::OutputManager, and geosx::TasksManager.
void geosx::dataRepository::Group::deregisterGroup | ( | std::string const & | name | ) |
Removes a child group from this group.
name | the name of the child group to remove from this group. |
void geosx::dataRepository::Group::deregisterWrapper | ( | string const & | name | ) |
string geosx::dataRepository::Group::dumpInputOptions | ( | ) | const |
|
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 |
|
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 |
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 |
|
inlinevirtual |
|
static |
Get the singleton catalog for this class.
|
inline |
|
inline |
|
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 T const * geosx::dataRepository::Group::GetGroupByPath | ( | string const & | path | ) | const |
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
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
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
|
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
|
inline |
Look up a wrapper and get reference to wrapped object.
T | return value type |
WRAPPEDTYPE | wrapped value type (by default, same as return) |
name | name of the wrapper |
T
|
inline |
Look up a wrapper and get reference to wrapped object.
T | return value type |
WRAPPEDTYPE | wrapped value type (by default, same as return) |
name | name of the wrapper |
T
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Retrieve a WrapperBase stored in this group.
[in] | index | an integral lookup value used to search the collection of wrappers. |
|
inline |
Retrieve a WrapperBase stored in this group.
[in] | index | an integral lookup value used to search the collection of wrappers. |
|
inline |
Retrieve a WrapperBase stored in this group.
[in] | name | a string lookup value used to search the collection of wrappers. |
|
inline |
Retrieve a WrapperBase stored in this group.
[in] | name | a string lookup value used to search the collection of wrappers. |
|
inline |
Retrieve a WrapperBase stored in this group.
[in] | keyIndex | a KeyIndex lookup value used to search the collection of wrappers. |
|
inline |
Retrieve a WrapperBase stored in this group.
[in] | keyIndex | a KeyIndex lookup value used to search the collection of wrappers. |
|
inline |
|
inlinestatic |
|
inlinestatic |
|
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 geosx::ProblemManager, and geosx::DomainPartition.
void geosx::dataRepository::Group::Initialize | ( | Group *const | group | ) |
Run initialization functions on this and all subgroups.
[in] | group | 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 geosx::dataRepository::Group::InitializePostInitialConditions | ( | Group *const | group | ) |
Initialization routine to be called after calling ApplyInitialConditions().
[in] | group | A group that is passed in to the initialization functions in order to facilitate the initialization. |
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.
|
inlineprotectedvirtual |
Called by InitializePostInitialConditions() after to initializing sub-Groups.
[in] | group | A group that is passed in to the initialization functions in order to facilitate the initialization. |
Reimplemented in geosx::MeshLevel.
|
inlineprotectedvirtual |
Called by InitializePostInitialConditions() prior to initializing sub-Groups.
[in] | group | A group that is passed in to the initialization functions in order to facilitate the initialization. |
Reimplemented in geosx::FluxApproximationBase.
|
inlineprotectedvirtual |
Called by Initialize() after to initializing sub-Groups.
[in] | group | A group that is passed in to the initialization functions in order to facilitate the initialization. |
Reimplemented in geosx::TimeHistoryOutput, geosx::HistoryCollection, and geosx::PackCollection.
|
inlineprotectedvirtual |
Called by Initialize() prior to initializing sub-Groups.
[in] | group | A group that is passed in to the initialization functions in order to facilitate the initialization. |
Reimplemented in geosx::SurfaceElementRegion, geosx::FaceElementRegion, geosx::EmbeddedSurfaceRegion, geosx::OutputBase, and geosx::SourceFluxBoundaryCondition.
|
inline |
Deleted copy assignment operator.
Deleted move assignment operator.
|
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] | on_device | whether to use device-based packing functions (buffer must be either pinned or a device pointer) |
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.
|
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] | on_device | whether to use device-based packing functions (buffer must be either pinned or a device pointer) |
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 geosx::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] | on_device | whether to use device-based packing functions (buffer must be either pinned or a device pointer) |
|
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] | on_device | whether to use device-based packing functions (buffer must be either pinned or a device pointer) |
Reimplemented in geosx::ObjectManagerBase.
|
inlineprotectedvirtual |
This function provides capability to post process input values prior to any other initialization operations.
Reimplemented in geosx::FieldSpecificationBase, geosx::ProblemManager, geosx::InternalWellGenerator, geosx::FunctionBase, geosx::Perforation, geosx::BoundedPlane, geosx::InternalMeshGenerator, geosx::ThickPlane, geosx::PAMELAMeshGenerator, geosx::Box, and geosx::TaskBase.
|
inlineprotectedvirtual |
void geosx::dataRepository::Group::postRestartInitializationRecursive | ( | Group *const | domain | ) |
Initialization routine to be called after calling reading a restart file.
domain | the physical domain |
This functions recurses and calls postRestartInitialization() on nested sub-groups at any depth, providing a capability to add custom post-restart initialization.
void geosx::dataRepository::Group::PrintDataHierarchy | ( | integer | indent = 0 | ) |
Prints the data hierarchy recursively.
[in] | indent | The level of indentation to add to this level of output. |
void geosx::dataRepository::Group::ProcessInputFileRecursive | ( | xmlWrapper::xmlNode & | targetNode | ) |
Recursively read values using ProcessInputFile() from the input file and put them into the wrapped values for this group.
[in] | targetNode | the XML node that to extract input values from. |
|
virtual |
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 geosx::FluxApproximationBase.
|
virtual |
Calls RegisterDataOnMesh() recursively.
[in,out] | meshBodies | the group of MeshBody objects to register data on. |
Reimplemented in geosx::DomainPartition.
T * geosx::dataRepository::Group::RegisterGroup | ( | std::string const & | name, |
std::unique_ptr< T > | newObject | ||
) |
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.
T * geosx::dataRepository::Group::RegisterGroup | ( | std::string const & | name, |
T * | newObject | ||
) |
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. |
[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,out] | 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. |
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. |
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.
Wrapper< TBASE >* geosx::dataRepository::Group::registerWrapper | ( | std::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 |
Wrapper< TBASE > * geosx::dataRepository::Group::registerWrapper | ( | Group::wrapperMap::KeyIndex const & | viewKey | ) |
Wrapper< T > * geosx::dataRepository::Group::registerWrapper | ( | std::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 |
Wrapper< T > * geosx::dataRepository::Group::registerWrapper | ( | std::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* geosx::dataRepository::Group::registerWrapper | ( | string const & | name, |
std::unique_ptr< WrapperBase > | wrapper | ||
) |
Register and take ownership of an existing Wrapper.
name | the name of the wrapper to use as a string key |
wrapper | a pointer to the an existing wrapper. |
|
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 geosx::FaceManager, geosx::NodeManager, and geosx::EdgeManager.
|
inline |
|
inline |
|
virtual |
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 geosx::ElementRegionManager, and geosx::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] | on_device | whether to use device-based packing functions (buffer must be either pinned or a device pointer) |
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 geosx::ObjectManagerBase.
|
inline |
|
inline |