GEOSX
Public Types | Public Member Functions | List of all members
geos::dataRepository::Group Class Reference

#include <Group.hpp>

Inheritance diagram for geos::dataRepository::Group:
Inheritance graph
[legend]

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

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.
 
Groupoperator= (Group const &)=delete
 Deleted copy assignment operator. More...
 
Groupoperator= (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 GroupcreateChild (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 nullptr is returned. If no template parameter is specified then a default type of Group is assumed.

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>
const T * 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>
const T & 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>
const T & getGroupByPath (string const &path) const
 Retrieve a group from the hierarchy using a path. More...
 
subGroupMapgetSubGroups ()
 Get the subgroups object. More...
 
const subGroupMapgetSubGroups () const
 Get the subgroups object. More...
 
localIndex numSubGroups () const
 return the number of sub groups in this Group More...
 
std::vector< stringgetSubGroupsNames () 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 ROUPTYPE/S pack. The variadic list consisting of GROUPTYPE/S will be used recursively to check if the group is able to be cast to the one of these types. The first type in the GROUPTYPE/S list will be used to execute the functor, and the next sub-group will be processed.

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 TYPE/S pack. The variadic list consisting of TYPE/S will be used recursively to check if the Wrapper is able to be casted to the one of these types. The first type in the WRAPPERTYPE/S list will be used to execute the functor, and the next Wrapper will be processed.

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 postProcessInputRecursive ()
 Recursively call postProcessInput() 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...
 
WrapperBaseregisterWrapper (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 >
const WrapperBasegetWrapperBase (KEY const &key) const
 Return a reference to a WrapperBase stored in this group. More...
 
template<typename KEY >
WrapperBasegetWrapperBase (KEY const &key)
 Return a reference to a WrapperBase stored in this group. More...
 
indexType getWrapperIndex (string const &name) const
 
const wrapperMapwrappers () const
 Get access to the internal wrapper storage. More...
 
wrapperMapwrappers ()
 Get access to the internal wrapper storage. More...
 
indexType numWrappers () const
 Return the number of wrappers. More...
 
std::vector< stringgetWrappersNames () 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 T is used to perform a cast on the WrapperBase pointer that is returned by the lookup, into a Wrapper<T> pointer. If the wrapper is not found, or the WrapperBase pointer cannot be cast to a Wrapper<T> pointer, then nullptr is returned.

template<typename LOOKUP_TYPE >
bool hasWrapper (LOOKUP_TYPE const &lookup) const
 Check if a wrapper exists. More...
 
template<typename T , typename LOOKUP_TYPE >
const Wrapper< T > & 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 >
const Wrapper< T > * 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 Group::getWrapper() and Wrapper<T>::getReference(). An additional template parameter can be provided to cast the return pointer or reference to a base class pointer or reference (e.g. Array to ArrayView).

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
const stringgetName () 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...
 
const DataContextgetDataContext () const
 
template<typename KEY >
const DataContextgetWrapperDataContext (KEY key) const
 
GroupgetParent ()
 Access the group's parent. More...
 
const GroupgetParent () 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...
 
GroupsetSizedFromParent (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...
 
const conduit::Node & 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 ()
 Enable verbosity input for object.
 
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.

Returns
Return PyGroup type.

These methods can be overridden by derived classes to customize input post processing and object initialization.

virtual void postProcessInput ()
 
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::CatalogTypegetCatalog ()
 Get the singleton catalog for this class. More...
 

Detailed Description

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.

Definition at line 64 of file Group.hpp.

Constructor & Destructor Documentation

◆ Group() [1/3]

geos::dataRepository::Group::Group ( string const &  name,
Group *const  parent 
)
explicit

Constructor.

Parameters
nameThe name of this Group.
parentThe parent Group.

◆ Group() [2/3]

geos::dataRepository::Group::Group ( string const &  name,
conduit::Node &  rootNode 
)
explicit

Constructor.

Parameters
nameThe name of this Group.
rootNodeThe root node of the data repository.
Note
This Group will not have a parent group.

◆ Group() [3/3]

geos::dataRepository::Group::Group ( Group &&  source)
default

Move constructor.

Parameters
[in]sourcesource Group

Member Function Documentation

◆ applyLambdaToContainer()

template<typename T0 , typename T1 , typename ... CASTTYPES, typename CONTAINERTYPE , typename LAMBDA >
static bool geos::dataRepository::Group::applyLambdaToContainer ( CONTAINERTYPE &  container,
LAMBDA &&  lambda 
)
inlinestatic

Apply a given functor to a container if the container can be cast to one of the specified types.

Template Parameters
CASTTYPEthe first type that will be used in the attempted casting of container
CASTTYPESa variadic list of types that will be used in the attempted casting of container
CONTAINERTYPEthe type of container
LAMBDAthe type of lambda function to call in the function
Parameters
[in]containera pointer to the container which will be passed to the lambda function
[in]lambdathe lambda function to call in the function
Returns
a boolean to indicate whether the lambda was successfully applied to the container.

Definition at line 472 of file Group.hpp.

◆ capacity()

localIndex geos::dataRepository::Group::capacity ( ) const
inline

Get the "capacity" of the group, which determines the capacity of resizable wrappers.

Returns
capacity of this group

Definition at line 1287 of file Group.hpp.

◆ createChild()

virtual Group* geos::dataRepository::Group::createChild ( string const &  childKey,
string const &  childName 
)
virtual

Creates a new sub-Group using the ObjectCatalog functionality.

Parameters
[in]childKeyThe name of the new object type's key in the ObjectCatalog.
[in]childNameThe name of the new object in the collection of sub-Groups.
Returns
A pointer to the new Group created by this function.

Reimplemented in geos::ElementRegionManager, geos::ParticleManager, geos::MeshGeneratorBase, geos::WellGeneratorBase, geos::GeometricObjectManager, geos::ParticleMeshGenerator, geos::FiniteVolumeManager, geos::MeshManager, geos::OutputManager, geos::CellBlockManager, and geos::ParticleBlockManager.

◆ deregisterGroup()

void geos::dataRepository::Group::deregisterGroup ( string const &  name)

Removes a child group from this group.

Parameters
namethe name of the child group to remove from this group.

◆ deregisterWrapper()

void geos::dataRepository::Group::deregisterWrapper ( string const &  name)

Removes a Wrapper from this group.

Parameters
namethe name of the Wrapper to remove from this group.

◆ dumpInputOptions()

string geos::dataRepository::Group::dumpInputOptions ( ) const
Returns
a table formatted string containing all input options.

◆ dumpSubGroupsNames()

string geos::dataRepository::Group::dumpSubGroupsNames ( ) const
Returns
a comma separated string containing all sub groups name.

◆ dumpWrappersNames()

string geos::dataRepository::Group::dumpWrappersNames ( ) const
Returns
a comma separated string containing all wrappers name.

◆ forSubGroups() [1/4]

template<typename GROUPTYPE = Group, typename ... GROUPTYPES, typename LAMBDA >
void geos::dataRepository::Group::forSubGroups ( LAMBDA &&  lambda)
inline

Apply the given functor to subgroups that can be casted to one of specified types.

Template Parameters
GROUPTYPEthe first type that will be used in the attempted casting of group.
GROUPTYPESa variadic list of types that will be used in the attempted casting of group.
LAMBDAthe type of functor to call
Parameters
[in]lambdathe functor to call on subgroups

Definition at line 508 of file Group.hpp.

◆ forSubGroups() [2/4]

template<typename GROUPTYPE = Group, typename ... GROUPTYPES, typename LAMBDA >
void geos::dataRepository::Group::forSubGroups ( LAMBDA &&  lambda) const
inline

Apply the given functor to subgroups that can be casted to one of specified types.

Template Parameters
GROUPTYPEthe first type that will be used in the attempted casting of group.
GROUPTYPESa variadic list of types that will be used in the attempted casting of group.
LAMBDAthe type of functor to call
Parameters
[in]lambdathe functor to call on subgroups

Definition at line 523 of file Group.hpp.

◆ forSubGroups() [3/4]

template<typename GROUPTYPE = Group, typename ... GROUPTYPES, typename LOOKUP_CONTAINER , typename LAMBDA >
void geos::dataRepository::Group::forSubGroups ( LOOKUP_CONTAINER const &  subGroupKeys,
LAMBDA &&  lambda 
)
inline

Apply the given functor to subgroups that can be casted to one of specified types.

Template Parameters
GROUPTYPEthe first type that will be used in the attempted casting of group.
GROUPTYPESa variadic list of types that will be used in the attempted casting of group.
LOOKUP_CONTAINERtype of container of subgroup lookup keys (names or indices), must support range-based for loop
LAMBDAtype of functor callable with an index in lookup container and a reference to casted subgroup
Parameters
[in]subGroupKeyscontainer with subgroup lookup keys (e.g. names or indices) to apply the functor to
[in]lambdathe functor to call

Definition at line 587 of file Group.hpp.

◆ forSubGroups() [4/4]

template<typename GROUPTYPE = Group, typename ... GROUPTYPES, typename LOOKUP_CONTAINER , typename LAMBDA >
void geos::dataRepository::Group::forSubGroups ( LOOKUP_CONTAINER const &  subGroupKeys,
LAMBDA &&  lambda 
) const
inline

Apply the given functor to subgroups that can be casted to one of specified types.

Template Parameters
GROUPTYPEthe first type that will be used in the attempted casting of group.
GROUPTYPESa variadic list of types that will be used in the attempted casting of group.
LOOKUP_CONTAINERtype of container of subgroup lookup keys (names or indices), must support range-based for loop
LAMBDAtype of functor callable with an index in lookup container and a reference to casted subgroup
Parameters
[in]subGroupKeyscontainer with subgroup lookup keys (e.g. names or indices) to apply the functor to
[in]lambdathe functor to call

Definition at line 612 of file Group.hpp.

◆ forSubGroupsIndex() [1/2]

template<typename GROUPTYPE = Group, typename ... GROUPTYPES, typename LAMBDA >
void geos::dataRepository::Group::forSubGroupsIndex ( LAMBDA &&  lambda)
inline

Apply the given functor to subgroups that can be casted to one of specified types.

Template Parameters
GROUPTYPEthe first type that will be used in the attempted casting of group.
GROUPTYPESa variadic list of types that will be used in the attempted casting of group.
LAMBDAthe type of functor to call
Parameters
[in]lambdathe functor to call on subgroups

Definition at line 543 of file Group.hpp.

◆ forSubGroupsIndex() [2/2]

template<typename GROUPTYPE = Group, typename ... GROUPTYPES, typename LAMBDA >
void geos::dataRepository::Group::forSubGroupsIndex ( LAMBDA &&  lambda) const
inline

Apply the given functor to subgroups that can be casted to one of specified types.

Template Parameters
GROUPTYPEthe first type that will be used in the attempted casting of group.
GROUPTYPESa variadic list of types that will be used in the attempted casting of group.
LAMBDAthe type of functor to call
Parameters
[in]lambdathe functor to call on subgroups

Definition at line 561 of file Group.hpp.

◆ forWrappers() [1/4]

template<typename LAMBDA >
void geos::dataRepository::Group::forWrappers ( LAMBDA &&  lambda)
inline

Apply the given functor to wrappers.

Template Parameters
LAMBDAthe type of functor to call
Parameters
[in]lambdathe functor to call

Definition at line 644 of file Group.hpp.

◆ forWrappers() [2/4]

template<typename TYPE , typename ... TYPES, typename LAMBDA >
void geos::dataRepository::Group::forWrappers ( LAMBDA &&  lambda)
inline

Apply the given functor to wrappers that can be cast to one of specified types.

Template Parameters
TYPEthe first type that will be used in the attempted casting of Wrapper
TYPESa variadic list of types that will be used in the attempted casting of Wrapper
LAMBDAthe type of functor to call
Parameters
[in]lambdathe functor to call

Definition at line 672 of file Group.hpp.

◆ forWrappers() [3/4]

template<typename LAMBDA >
void geos::dataRepository::Group::forWrappers ( LAMBDA &&  lambda) const
inline

Apply the given functor to wrappers.

Template Parameters
LAMBDAthe type of functor to call
Parameters
[in]lambdathe functor to call

Definition at line 656 of file Group.hpp.

◆ forWrappers() [4/4]

template<typename TYPE , typename ... TYPES, typename LAMBDA >
void geos::dataRepository::Group::forWrappers ( LAMBDA &&  lambda) const
inline

Apply the given functor to wrappers that can be cast to one of specified types.

Template Parameters
TYPEthe first type that will be used in the attempted casting of Wrapper
TYPESa variadic list of types that will be used in the attempted casting of Wrapper
LAMBDAthe type of functor to call
Parameters
[in]lambdathe functor to call

Definition at line 689 of file Group.hpp.

◆ generateDataStructureSkeleton()

void geos::dataRepository::Group::generateDataStructureSkeleton ( integer const  level)
inline

Build a complete datastructure for schema generation.

Parameters
levelindent level for printing out the structure

Definition at line 866 of file Group.hpp.

◆ getCatalog()

static CatalogInterface::CatalogType& geos::dataRepository::Group::getCatalog ( )
static

Get the singleton catalog for this class.

Returns
reference to the catalog object

◆ getConduitNode() [1/2]

conduit::Node& geos::dataRepository::Group::getConduitNode ( )
inline

Return the Conduit node object associated with this group.

Returns
The Conduit node object associated with this group.

Definition at line 1441 of file Group.hpp.

◆ getConduitNode() [2/2]

const conduit::Node& geos::dataRepository::Group::getConduitNode ( ) const
inline

Return the Conduit node object associated with this group.

Returns
The Conduit node object associated with this group.

Definition at line 1445 of file Group.hpp.

◆ getDataContext()

const DataContext& geos::dataRepository::Group::getDataContext ( ) const
inline
Returns
DataContext object that that stores contextual information on this group that can be used in output messages.

Definition at line 1322 of file Group.hpp.

◆ getGroup() [1/2]

template<typename T = Group, typename KEY = void>
T& geos::dataRepository::Group::getGroup ( KEY const &  key)
inline

Return a reference to a sub-group of the current Group.

Template Parameters
TThe type of subgroup.
KEYThe type of the lookup.
Parameters
keyThe key used to perform the lookup.
Returns
A reference to T that refers to the sub-group.
Exceptions
std::domain_errorIf the Group does not exist is thrown.

Definition at line 333 of file Group.hpp.

◆ getGroup() [2/2]

template<typename T = Group, typename KEY = void>
const T& geos::dataRepository::Group::getGroup ( KEY const &  key) const
inline

Return a reference to a sub-group of the current Group.

Template Parameters
TThe type of subgroup.
KEYThe type of the lookup.
Parameters
keyThe key used to perform the lookup.
Returns
A reference to T that refers to the sub-group.
Exceptions
std::domain_errorIf the Group does not exist is thrown.

Definition at line 348 of file Group.hpp.

◆ getGroupByPath() [1/2]

template<typename T = Group>
T& geos::dataRepository::Group::getGroupByPath ( string const &  path)
inline

Retrieve a group from the hierarchy using a path.

Template Parameters
Ttype of subgroup
Parameters
[in]patha 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.
Returns
A reference to T that refers to the sub-group.
Exceptions
std::domain_errorIf the Group doesn't exist.

Definition at line 369 of file Group.hpp.

◆ getGroupByPath() [2/2]

template<typename T = Group>
const T& geos::dataRepository::Group::getGroupByPath ( string const &  path) const
inline

Retrieve a group from the hierarchy using a path.

Template Parameters
Ttype of subgroup
Parameters
[in]patha 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.
Returns
A reference to T that refers to the sub-group.
Exceptions
std::domain_errorIf the Group doesn't exist.

Definition at line 376 of file Group.hpp.

◆ getGroupPointer() [1/2]

template<typename T = Group, typename KEY = void>
T* geos::dataRepository::Group::getGroupPointer ( KEY const &  key)
inline

Return a pointer to a sub-group of the current Group.

Template Parameters
TThe type of subgroup.
KEYThe type of the lookup.
Parameters
keyThe key used to perform the lookup.
Returns
A pointer to T that refers to the sub-group, if the Group does not exist or it has an incompatible type a nullptr is returned.

Definition at line 314 of file Group.hpp.

◆ getGroupPointer() [2/2]

template<typename T = Group, typename KEY = void>
const T* geos::dataRepository::Group::getGroupPointer ( KEY const &  key) const
inline

Return a pointer to a sub-group of the current Group.

Template Parameters
TThe type of subgroup.
KEYThe type of the lookup.
Parameters
keyThe key used to perform the lookup.
Returns
A pointer to T that refers to the sub-group, if the Group does not exist or it has an incompatible type a nullptr is returned.

Definition at line 321 of file Group.hpp.

◆ getIndexInParent()

localIndex geos::dataRepository::Group::getIndexInParent ( ) const
inline

Get the group's index within its parent group.

Returns
integral index of current group within its parent

Definition at line 1366 of file Group.hpp.

◆ getInputFlags()

InputFlags geos::dataRepository::Group::getInputFlags ( ) const
inline

Get input flags for schema generation.

Returns
the current value of input flags

Definition at line 1409 of file Group.hpp.

◆ getLogLevel()

integer geos::dataRepository::Group::getLogLevel ( ) const
inline
Returns
The verbosity level

Definition at line 1473 of file Group.hpp.

◆ getName()

const string& geos::dataRepository::Group::getName ( ) const
inline

Get group name.

Returns
group name

Definition at line 1308 of file Group.hpp.

◆ getParent() [1/2]

Group& geos::dataRepository::Group::getParent ( )
inline

Access the group's parent.

Returns
reference to parent Group
Exceptions
std::domain_errorif the Group doesn't have a parent.

Definition at line 1341 of file Group.hpp.

◆ getParent() [2/2]

const Group& geos::dataRepository::Group::getParent ( ) const
inline

Access the group's parent.

Returns
reference to parent Group
Exceptions
std::domain_errorif the Group doesn't have a parent.

Definition at line 1350 of file Group.hpp.

◆ getPath()

string geos::dataRepository::Group::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.

Returns
The path of this group in the data repository.

◆ getReference() [1/2]

template<typename T , typename LOOKUP_TYPE >
T& geos::dataRepository::Group::getReference ( LOOKUP_TYPE const &  lookup)
inline

Look up a wrapper and get reference to wrapped object.

Template Parameters
Treturn value type
WRAPPEDTYPEwrapped value type (by default, same as return)
LOOKUP_TYPEtype of value used for wrapper lookup
Parameters
lookupvalue for wrapper lookup
Returns
reference to T
Exceptions
Astd::domain_error if the Wrapper does not exist.

Definition at line 1259 of file Group.hpp.

◆ getReference() [2/2]

template<typename T , typename LOOKUP_TYPE >
GEOS_DECLTYPE_AUTO_RETURN geos::dataRepository::Group::getReference ( LOOKUP_TYPE const &  lookup) const
inline

Look up a wrapper and get reference to wrapped object.

Template Parameters
Treturn value type
WRAPPEDTYPEwrapped value type (by default, same as return)
LOOKUP_TYPEtype of value used for wrapper lookup
Parameters
lookupvalue for wrapper lookup
Returns
reference to T
Exceptions
Astd::domain_error if the Wrapper does not exist.

Definition at line 1252 of file Group.hpp.

◆ getRestartFlags()

RestartFlags geos::dataRepository::Group::getRestartFlags ( ) const
inline

Get flags that control restart output of this group.

Returns
the current value of restart flags

Definition at line 1397 of file Group.hpp.

◆ getSubGroupIndex()

localIndex geos::dataRepository::Group::getSubGroupIndex ( keyType const &  key) const

Get the index of a sub-Group within this group.

Parameters
keyThe key of the sub-Group
Returns
The index of the sub-Group.

◆ getSubGroups() [1/2]

subGroupMap& geos::dataRepository::Group::getSubGroups ( )
inline

Get the subgroups object.

Returns
a reference to the sub-group map.

Definition at line 385 of file Group.hpp.

◆ getSubGroups() [2/2]

const subGroupMap& geos::dataRepository::Group::getSubGroups ( ) const
inline

Get the subgroups object.

Returns
a reference to const that points to the sub-group map.

Definition at line 392 of file Group.hpp.

◆ getSubGroupsNames()

std::vector< string > geos::dataRepository::Group::getSubGroupsNames ( ) const
Returns
An array containing all sub groups keys

◆ getWrapper() [1/2]

template<typename T , typename LOOKUP_TYPE >
Wrapper< T >& geos::dataRepository::Group::getWrapper ( LOOKUP_TYPE const &  index)
inline

Retrieve a Wrapper stored in this group.

Template Parameters
Tthe object type contained in the Wrapper
LOOKUP_TYPEthe type of key used to perform the lookup
Parameters
[in]indexa lookup value used to search the collection of wrappers
Returns
A reference to the Wrapper<T> that resulted from the lookup.
Exceptions
std::domain_errorif the Wrapper doesn't exist.

Definition at line 1203 of file Group.hpp.

◆ getWrapper() [2/2]

template<typename T , typename LOOKUP_TYPE >
const Wrapper< T >& geos::dataRepository::Group::getWrapper ( LOOKUP_TYPE const &  index) const
inline

Retrieve a Wrapper stored in this group.

Template Parameters
Tthe object type contained in the Wrapper
LOOKUP_TYPEthe type of key used to perform the lookup
Parameters
[in]indexa lookup value used to search the collection of wrappers
Returns
A reference to the Wrapper<T> that resulted from the lookup.
Exceptions
std::domain_errorif the Wrapper doesn't exist.

Definition at line 1193 of file Group.hpp.

◆ getWrapperBase() [1/2]

template<typename KEY >
WrapperBase& geos::dataRepository::Group::getWrapperBase ( KEY const &  key)
inline

Return a reference to a WrapperBase stored in this group.

Template Parameters
KEYThe lookup type.
Parameters
keyThe value used to lookup the wrapper.
Returns
A reference to the WrapperBase that resulted from the lookup.
Exceptions
std::domain_errorif the wrapper doesn't exist.

Definition at line 1115 of file Group.hpp.

◆ getWrapperBase() [2/2]

template<typename KEY >
const WrapperBase& geos::dataRepository::Group::getWrapperBase ( KEY const &  key) const
inline

Return a reference to a WrapperBase stored in this group.

Template Parameters
KEYThe lookup type.
Parameters
keyThe value used to lookup the wrapper.
Returns
A reference to the WrapperBase that resulted from the lookup.
Exceptions
std::domain_errorif the wrapper doesn't exist.

Definition at line 1100 of file Group.hpp.

◆ getWrapperDataContext()

template<typename KEY >
const DataContext& geos::dataRepository::Group::getWrapperDataContext ( KEY  key) const
inline
Returns
DataContext object that that stores contextual information on a wrapper contained by this group that can be used in output messages.
Template Parameters
KEYThe lookup type.
Parameters
keyThe value used to lookup the wrapper.
Exceptions
std::domain_errorif the wrapper doesn't exist.

Definition at line 1333 of file Group.hpp.

◆ getWrapperIndex()

indexType geos::dataRepository::Group::getWrapperIndex ( string const &  name) const
inline
Parameters
name
Returns

Definition at line 1131 of file Group.hpp.

◆ getWrapperPointer() [1/2]

template<typename T , typename LOOKUP_TYPE >
Wrapper< T >* geos::dataRepository::Group::getWrapperPointer ( LOOKUP_TYPE const &  index)
inline

Retrieve a Wrapper stored in this group.

Template Parameters
Tthe object type contained in the Wrapper
LOOKUP_TYPEthe type of key used to perform the lookup
Parameters
[in]indexa lookup value used to search the collection of wrappers
Returns
A pointer to the Wrapper<T> that resulted from the lookup, if the Wrapper doesn't exist or has a different type a nullptr is returned.

Definition at line 1225 of file Group.hpp.

◆ getWrapperPointer() [2/2]

template<typename T , typename LOOKUP_TYPE >
const Wrapper< T >* geos::dataRepository::Group::getWrapperPointer ( LOOKUP_TYPE const &  index) const
inline

Retrieve a Wrapper stored in this group.

Template Parameters
Tthe object type contained in the Wrapper
LOOKUP_TYPEthe type of key used to perform the lookup
Parameters
[in]indexa lookup value used to search the collection of wrappers
Returns
A pointer to the Wrapper<T> that resulted from the lookup, if the Wrapper doesn't exist or has a different type a nullptr is returned.

Definition at line 1218 of file Group.hpp.

◆ getWrappersNames()

std::vector< string > geos::dataRepository::Group::getWrappersNames ( ) const
Returns
An array containing all wrappers keys

◆ hasGroup()

template<typename T = Group>
bool geos::dataRepository::Group::hasGroup ( string const &  name) const
inline

Check whether a sub-group exists.

Parameters
namethe name of sub-group to search for
Returns
true if sub-group exists, false otherwise

Definition at line 412 of file Group.hpp.

◆ hasParent()

bool geos::dataRepository::Group::hasParent ( ) const
inline
Returns
true if this group has a parent.

Definition at line 1359 of file Group.hpp.

◆ hasSubGroupOfType()

template<typename T >
bool geos::dataRepository::Group::hasSubGroupOfType ( ) const
inline

Check whether a sub-group exists by type.

Template Parameters
TThe type of sub-group to search for
Returns
true if sub-group of type T exists, false otherwise

Definition at line 421 of file Group.hpp.

◆ hasWrapper()

template<typename LOOKUP_TYPE >
bool geos::dataRepository::Group::hasWrapper ( LOOKUP_TYPE const &  lookup) const
inline

Check if a wrapper exists.

Template Parameters
LOOKUP_TYPEthe type of key used to perform the lookup.
Parameters
[in]lookupa lookup value used to search the collection of wrappers
Returns
true if wrapper exists (regardless of type), false otherwise

Definition at line 1181 of file Group.hpp.

◆ initializationOrder()

virtual void geos::dataRepository::Group::initializationOrder ( string_array order)
virtual

Sets the initialization order for sub-Groups.

Parameters
[out]orderAn 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.

◆ initialize()

void geos::dataRepository::Group::initialize ( )

Run initialization functions on this and all subgroups.

Parameters
[in]rootA 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.

Note
The order in which the sub-Groups are iterated over is defined by InitializationOrder().

◆ initializePostInitialConditions()

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.

Note
The order in which the sub-Groups are iterated over is defined by InitializationOrder().

◆ numSubGroups()

localIndex geos::dataRepository::Group::numSubGroups ( ) const
inline

return the number of sub groups in this Group

Returns
number of sub groups in this Group

Definition at line 399 of file Group.hpp.

◆ numWrappers()

indexType geos::dataRepository::Group::numWrappers ( ) const
inline

Return the number of wrappers.

Returns
The number of wrappers.

Definition at line 1151 of file Group.hpp.

◆ operator=() [1/2]

Group& geos::dataRepository::Group::operator= ( Group &&  )
delete

Deleted move assignment operator.

Returns

◆ operator=() [2/2]

Group& geos::dataRepository::Group::operator= ( Group const &  )
delete

Deleted copy assignment operator.

Returns

◆ pack() [1/3]

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.

Parameters
[in,out]bufferthe buffer that will be packed.
[in]packListthe list of indices to pack
[in]recursivewhether or not to perform a recursive pack.
[in]onDevicewhether to use device-based packing functions (buffer must be either pinned or a device pointer)
[out]eventsa collection of events to poll for completion of async packing kernels ( device packing is incomplete until all events are finalized )
Returns
the size of data packed to the buffer.

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.

◆ pack() [2/3]

virtual localIndex geos::dataRepository::Group::pack ( buffer_unit_type *&  buffer,
string_array const &  wrapperNames,
arrayView1d< localIndex const > const &  packList,
integer const  recursive,
bool  onDevice,
parallelDeviceEvents &  events 
) const
virtual

Pack a list of indices within a list of wrappers.

Parameters
[in,out]bufferthe buffer that will be packed.
[in]wrapperNamesan array that contains the names of the wrappers to pack.
[in]packListthe list of indices to pack
[in]recursivewhether or not to perform a recursive pack.
[in]onDevicewhether to use device-based packing functions (buffer must be either pinned or a device pointer)
[out]eventsa collection of events to poll for completion of async packing kernels ( device packing is incomplete until all events are finalized )
Returns
the size of data packed to the buffer.

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.

◆ pack() [3/3]

virtual localIndex geos::dataRepository::Group::pack ( buffer_unit_type *&  buffer,
string_array const &  wrapperNames,
integer const  recursive,
bool  onDevice,
parallelDeviceEvents &  events 
) const
virtual

Pack a list of wrappers to a buffer.

Parameters
[in,out]bufferthe buffer that will be packed.
[in]wrapperNamesan array that contains the names of the wrappers to pack.
[in]recursivewhether or not to perform a recursive pack.
[in]onDevicewhether to use device-based packing functions (buffer must be either pinned or a device pointer)
[out]eventsa collection of events to poll for completion of async packing kernels ( device packing is incomplete until all events are finalized )
Returns
the size of data packed to the buffer.

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.

◆ packSize() [1/3]

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.

Parameters
[in]packListthe list of indices to pack
[in]recursivewhether or not to perform a recursive pack.
[in]onDevicewhether to use device-based packing functions (buffer must be either pinned or a device pointer)
[out]eventsa collection of events to poll for completion of async packing kernels ( device packing is incomplete until all events are finalized )
Returns
the size of the buffer required to pack the wrapper indices.

◆ packSize() [2/3]

virtual localIndex geos::dataRepository::Group::packSize ( string_array const &  wrapperNames,
arrayView1d< localIndex const > const &  packList,
integer const  recursive,
bool  onDevice,
parallelDeviceEvents &  events 
) const
virtual

Get the size required to pack a list of indices within a list of wrappers.

Parameters
[in]wrapperNamesan array that contains the names of the wrappers to pack.
[in]packListthe list of indices to pack
[in]recursivewhether or not to perform a recursive pack.
[in]onDevicewhether to use device-based packing functions (buffer must be either pinned or a device pointer)
[out]eventsa collection of events to poll for completion of async packing kernels ( device packing is incomplete until all events are finalized )
Returns
the size of the buffer required to pack the wrapper indices.

Reimplemented in geos::ObjectManagerBase.

◆ packSize() [3/3]

virtual localIndex geos::dataRepository::Group::packSize ( string_array const &  wrapperNames,
integer const  recursive,
bool  onDevice,
parallelDeviceEvents &  events 
) const
virtual

Get the size required to pack a list of wrappers.

Parameters
[in]wrapperNamesan array that contains the names of the wrappers to pack.
[in]recursivewhether or not to perform a recursive pack.
[in]onDevicewhether to use device-based packing functions (buffer must be either pinned or a device pointer)
[out]eventsa collection of events to poll for completion of async packing kernels ( device packing is incomplete until all events are finalized )
Returns
the size of the buffer required to pack the wrappers.

◆ postProcessInput()

virtual void geos::dataRepository::Group::postProcessInput ( )
inlineprotectedvirtual

◆ postRestartInitializationRecursive()

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.

◆ printDataHierarchy()

void geos::dataRepository::Group::printDataHierarchy ( integer  indent = 0) const

Prints the data hierarchy recursively.

Parameters
[in]indentThe level of indentation to add to this level of output.

◆ processInputFileRecursive() [1/2]

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.

Parameters
[in]xmlDocumentthe XML document that contains the targetNode.
[in]targetNodethe XML node that to extract input values from.

◆ processInputFileRecursive() [2/2]

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.

Parameters
[in]xmlDocumentthe XML document that contains the targetNode.
[in]targetNodethe XML node that to extract input values from.
[in]nodePosthe target node position, typically obtained with xmlDocument::getNodePosition().

◆ registerCallback()

virtual bool geos::dataRepository::Group::registerCallback ( void *  func,
const std::type_info &  funcType 
)
inlinevirtual

Register a callback function on the group.

Parameters
functhe function to register
funcTypethe type of the function to register
Returns
true if successful, false else

Definition at line 1425 of file Group.hpp.

◆ registerDataOnMesh()

virtual void geos::dataRepository::Group::registerDataOnMesh ( Group meshBodies)
inlinevirtual

Register data on mesh entities.

Parameters
[in,out]meshBodiesthe group of MeshBody objects to register data on.

This function is used to register data on mesh entities such as the NodeManager, FaceManager...etc.

Definition at line 918 of file Group.hpp.

◆ registerDataOnMeshRecursive()

virtual void geos::dataRepository::Group::registerDataOnMeshRecursive ( Group meshBodies)
virtual

Calls RegisterDataOnMesh() recursively.

Parameters
[in,out]meshBodiesthe group of MeshBody objects to register data on.

◆ registerGroup() [1/5]

template<typename T = Group>
T& geos::dataRepository::Group::registerGroup ( string const &  name)
inline

Register a new Group as a sub-group of current Group.

Template Parameters
TThe type of the Group to add/register. This should be a type that derives from Group.
Parameters
[in]nameThe name of the group to use as a string key.
Returns
A pointer to the newly registered Group.

Creates and registers a Group or class derived from Group as a subgroup of this Group.

Definition at line 228 of file Group.hpp.

◆ registerGroup() [2/5]

template<typename T = Group>
T& geos::dataRepository::Group::registerGroup ( string const &  name,
std::unique_ptr< T >  newObject 
)
inline

Register a new Group as a sub-group of current Group.

Template Parameters
TThe type of the Group to add/register. This should be a type that derives from Group.
Parameters
[in]nameThe name of the group to use as a string key.
[in]newObjectA unique_ptr to the object that is being registered.
Returns
A pointer to the newly registered Group.

Registers a Group or class derived from Group as a subgroup of this Group and takes ownership.

Definition at line 197 of file Group.hpp.

◆ registerGroup() [3/5]

template<typename T = Group, typename TBASE = Group>
T& geos::dataRepository::Group::registerGroup ( string const &  name,
string const &  catalogName 
)
inline

Register a new Group as a sub-group of current Group.

Template Parameters
TThe type of the Group to add/register. This should be a type that derives from Group.
TBASEThe type whose type catalog will be used to look up the new sub-group type
Parameters
[in]nameThe name of the group to use as a string key.
[in]catalogNameThe catalog name of the new type.
Returns
A pointer to the newly registered Group.

Creates and registers a Group or class derived from Group as a subgroup of this Group.

Definition at line 261 of file Group.hpp.

◆ registerGroup() [4/5]

template<typename T = Group>
T& geos::dataRepository::Group::registerGroup ( string const &  name,
T *  newObject 
)
inline

Register a new Group as a sub-group of current Group.

Template Parameters
TThe type of the Group to add/register. This should be a type that derives from Group.
Parameters
[in]nameThe name of the group to use as a string key.
[in]newObjectA unique_ptr to the object that is being registered.
Returns
A pointer to the newly registered Group.

Registers a Group or class derived from Group as a subgroup of this Group but does not take ownership.

Definition at line 214 of file Group.hpp.

◆ registerGroup() [5/5]

template<typename T = Group>
T& geos::dataRepository::Group::registerGroup ( subGroupMap::KeyIndex const &  keyIndex)
inline

Register a new Group as a sub-group of current Group.

Template Parameters
TThe type of the Group to add/register. This should be a type that derives from Group.
Parameters
keyIndexA KeyIndexT object that will be used to specify the name of the new group. The index of the KeyIndex will also be set.
Returns
A pointer to the newly registered Group, or nullptr if no group was registered.

Creates and registers a Group or class derived from Group as a subgroup of this Group.

Definition at line 242 of file Group.hpp.

◆ registerWrapper() [1/5]

template<typename T , typename TBASE >
Wrapper< TBASE > & geos::dataRepository::Group::registerWrapper ( Group::wrapperMap::KeyIndex const &  viewKey)

Create and register a Wrapper around a new object.

Template Parameters
Tthe type of the wrapped object
TBASEthe base type to cast the returned wrapper to
Parameters
[in]viewKeyThe KeyIndex that contains the name of the new Wrapper.
Returns
A reference to the newly registered/created Wrapper

Definition at line 1653 of file Group.hpp.

◆ registerWrapper() [2/5]

WrapperBase& geos::dataRepository::Group::registerWrapper ( std::unique_ptr< WrapperBase wrapper)

Register and take ownership of an existing Wrapper.

Parameters
wrapperA pointer to the an existing wrapper.
Returns
An un-typed pointer to the newly registered/created wrapper

◆ registerWrapper() [3/5]

template<typename T >
Wrapper< T > & geos::dataRepository::Group::registerWrapper ( string const &  name,
std::unique_ptr< T >  newObject 
)

Register a Wrapper around a given object and take ownership.

Template Parameters
Tthe type of the wrapped object
Parameters
[in]namethe name of the wrapper to use as a string key
[in]newObjectan owning pointer to the object that is being registered
Returns
A reference to the newly registered/created Wrapper
Note
Not intended to register a WrapperBase instance. Use dedicated member function instead.

Definition at line 1664 of file Group.hpp.

◆ registerWrapper() [4/5]

template<typename T >
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.

Template Parameters
Tthe type of the wrapped object
Parameters
[in]namethe name of the wrapper to use as a string key
[in]newObjecta pointer to the object that is being registered
Returns
A reference to the newly registered/created Wrapper
Note
Not intended to register a WrapperBase instance. Use dedicated member function instead.

Definition at line 1681 of file Group.hpp.

◆ registerWrapper() [5/5]

template<typename T , typename TBASE = T>
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.

Template Parameters
TThe type of the object allocated.
TBASEThe type of the object that the Wrapper holds.
Parameters
[in]namethe name of the wrapper to use as a string key
[out]rkeya pointer to a index type that will be filled with the new Wrapper index in this Group
Returns
A reference to the newly registered/created Wrapper

◆ reserve()

virtual void geos::dataRepository::Group::reserve ( indexType const  newsize)
virtual

Set the new capacity and reserve it in all wrappers that resize with parent.

Parameters
newsizethe new capacity of the group

◆ resize()

virtual void geos::dataRepository::Group::resize ( localIndex const  newSize)
virtual

Resize the group and all contained wrappers that resize with parent.

Parameters
newSizethe new size of the group

Reimplemented in geos::FaceManager, geos::NodeManager, geos::EdgeManager, geos::EmbeddedSurfaceNodeManager, geos::ParticleBlock, and geos::CellBlock.

◆ setInputFlags()

void geos::dataRepository::Group::setInputFlags ( InputFlags  flags)
inline

Set input flags for schema generation.

Parameters
flagsthe new value of input flags

Definition at line 1415 of file Group.hpp.

◆ setLogLevel()

void geos::dataRepository::Group::setLogLevel ( integer const  logLevel)
inline

Set verbosity level.

Parameters
logLevelnew verbosity level value

Definition at line 1470 of file Group.hpp.

◆ setRestartFlags()

void geos::dataRepository::Group::setRestartFlags ( RestartFlags  flags)
inline

Set flags that control restart output of this group.

Parameters
flagsthe new value of restart flags

Definition at line 1403 of file Group.hpp.

◆ setSchemaDeviations()

virtual void geos::dataRepository::Group::setSchemaDeviations ( xmlWrapper::xmlNode  schemaRoot,
xmlWrapper::xmlNode  schemaParent,
integer  documentationType 
)
inlinevirtual

Inform the schema generator of any deviations between the xml and GEOS data structures.

Parameters
schemaRootXML node corresponding to the root
schemaParentXML node for the parent node
documentationTypetype of XML schema generated

Reimplemented in geos::ElementRegionManager, and geos::ParticleManager.

Definition at line 889 of file Group.hpp.

◆ setSizedFromParent()

Group& geos::dataRepository::Group::setSizedFromParent ( int  val)
inline

Set whether this wrapper is resized when its parent is resized.

Parameters
valan int that is converted into a bool
Returns
a pointer to this Group

Definition at line 1388 of file Group.hpp.

◆ size()

localIndex geos::dataRepository::Group::size ( ) const
inline

Get the "size" of the group, which determines the number of elements in resizable wrappers.

Returns
size of this group

Definition at line 1294 of file Group.hpp.

◆ sizedFromParent()

int geos::dataRepository::Group::sizedFromParent ( ) const
inline

Check whether this Group is resized when its parent is resized.

Returns
true if Group is resized with parent group, false otherwise

Definition at line 1380 of file Group.hpp.

◆ unpack()

virtual localIndex geos::dataRepository::Group::unpack ( buffer_unit_type const *&  buffer,
arrayView1d< localIndex > &  packList,
integer const  recursive,
bool  onDevice,
parallelDeviceEvents &  events,
MPI_Op  op = MPI_REPLACE 
)
virtual

Unpack a buffer.

Parameters
[in,out]bufferthe buffer to unpack
[in,out]packListthe list of indices that will be unpacked.
[in]recursivewhether or not to perform a recursive unpack.
[in]onDevicewhether to use device-based packing functions (buffer must be either pinned or a device pointer)
[out]eventsa collection of events to poll for completion of async packing kernels ( device packing is incomplete until all events are finalized )
[in]opthe operation to perform while unpacking
Returns
the number of bytes unpacked.

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.

◆ wrappers() [1/2]

wrapperMap& geos::dataRepository::Group::wrappers ( )
inline

Get access to the internal wrapper storage.

Returns
a reference to wrapper map

Definition at line 1144 of file Group.hpp.

◆ wrappers() [2/2]

const wrapperMap& geos::dataRepository::Group::wrappers ( ) const
inline

Get access to the internal wrapper storage.

Returns
a reference to wrapper map

Definition at line 1138 of file Group.hpp.


The documentation for this class was generated from the following file: