GEOS
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
geos::dataRepository::WrapperBase Class Referenceabstract

Base class for all wrappers containing common operations. More...

#include <WrapperBase.hpp>

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

Public Member Functions

virtual bool hasDefaultValue () const =0
 Return true iff this wrapper has a valid default value. More...
 
virtual string getDefaultValueString () const =0
 Return a string representing the default value. More...
 
virtual bool processInputFile (xmlWrapper::xmlNode const &targetNode, xmlWrapper::xmlNodePos const &nodePos)=0
 Initialize the wrapper from the input xml node. More...
 
virtual void addBlueprintField (conduit::Node &fields, string const &name, string const &topology, std::vector< string > const &componentNames={}) const =0
 Push the data in the wrapper into a Conduit blueprint field. More...
 
virtual void populateMCArray (conduit::Node &node, std::vector< string > const &componentNames={}) const =0
 Push the data in the wrapper into a Conduit Blueprint mcarray. More...
 
virtual std::unique_ptr< WrapperBaseaverageOverSecondDim (string const &name, Group &group) const =0
 Create a new Wrapper with values averaged over the second dimension. More...
 
virtual HistoryMetadata getHistoryMetadata (localIndex const packCount) const =0
 Get a description of the wrapped data for time history collection/output. More...
 
Constructor, desctructor
 WrapperBase (string const &name, Group &parent, string const &rtTypeName)
 Constructor. More...
 
virtual ~WrapperBase ()
 Default destructor.
 
Methods that delegate to the wrapped type

These functions will call the corresponding method on the wrapped object, if such method is declared in wrapped type.

virtual localIndex size () const =0
 Calls T::size() More...
 
virtual void const * voidPointer () const =0
 
virtual localIndex elementByteSize () const =0
 
virtual size_t bytesAllocated () const =0
 
virtual void resize (int num_dims, localIndex const *const dims)=0
 Calls T::resize( num_dims, dims ) More...
 
virtual void reserve (localIndex const newCapacity)=0
 Calls T::reserve( newCapacity ) if it exists, otherwise a no-op. More...
 
virtual localIndex capacity () const =0
 
virtual void resize (localIndex newsize)=0
 Calls T::resize(newsize) if it exists. More...
 
void resize ()
 Calls resize(newsize) where newsize is taken from the parent Group.
 
virtual void copy (localIndex const sourceIndex, localIndex const destIndex)=0
 Calls T::copy(sourceIndex, destIndex) More...
 
virtual void erase (std::set< localIndex > const &indicesToErase)=0
 Calls T::erase(indicesToErase) More...
 
virtual void move (LvArray::MemorySpace const space, bool const touch) const =0
 Calls T::move(space, touch) More...
 
virtual Regex const & getTypeRegex () const =0
 
string const & getRTTypeName () const
 
WrapperBasesetRTTypeName (string_view rtTypeName)
 override the rtType to use when parsing an input value to the wrapped object. It can be useful to change the used regex to validate the input value. More...
 
Restart output methods
virtual void registerToWrite () const =0
 Register the wrapper's data for writing with Conduit.
 
virtual void finishWriting () const =0
 Write the wrapped data into Conduit.
 
virtual bool loadFromConduit ()=0
 Read the wrapped data from Conduit. More...
 
Methods for buffer packing/unpacking

This group of functions is used to pack/unpack wrapped object to/from binary buffers

virtual bool isPackable (bool onDevice) const =0
 Check whether wrapped type is can be packed into a buffer on host or device. More...
 
template<bool DO_PACKING>
localIndex pack (buffer_unit_type *&buffer, bool withMetadata, bool onDevice, parallelDeviceEvents &events) const
 Concrete implementation of the packing method. More...
 
template<bool DO_PACKING>
localIndex packByIndex (buffer_unit_type *&buffer, arrayView1d< localIndex const > const &packList, bool withMetadata, bool onDevice, parallelDeviceEvents &events) const
 Concrete implementation of the packing by index method. More...
 
virtual localIndex unpack (buffer_unit_type const *&buffer, bool withMetadata, bool onDevice, parallelDeviceEvents &events)=0
 Unpack the entire wrapped object from a buffer. More...
 
virtual localIndex unpackByIndex (buffer_unit_type const *&buffer, arrayView1d< localIndex const > const &unpackIndices, bool withMetadata, bool onDevice, parallelDeviceEvents &events, MPI_Op op=MPI_REPLACE)=0
 For indexable types, unpack selected indices of wrapped object from a buffer. More...
 
Wrapper attribute getters and setters
int sizedFromParent () const
 Check whether this wrapper is resized when its parent is resized. More...
 
WrapperBasesetSizedFromParent (int val)
 Set whether this wrapper is resized when its parent is resized. More...
 
RestartFlags getRestartFlags () const
 Get the RestartFlags of the wrapper. More...
 
WrapperBasesetRestartFlags (RestartFlags flags)
 Set the RestartFlags of the wrapper. More...
 
PlotLevel getPlotLevel () const
 Get PlotLevel for this wrapper. More...
 
WrapperBasesetPlotLevel (PlotLevel const flag)
 Set the PlotLevel of the wrapper. More...
 
string const & getName () const
 Get name of the wrapper. More...
 
string getPath () const
 Return the path to this Wrapper in the data repository. More...
 
DataContext const & getDataContext () const
 
GroupgetParent ()
 
Group const & getParent () const
 
WrapperBasesetInputFlag (InputFlags const input)
 Set the InputFlag of the wrapper. More...
 
InputFlags getInputFlag () const
 Get the InputFlag of the wrapper. More...
 
bool getSuccessfulReadFromInput () const
 Returns flag that indicates whether the contents of the wrapper have been successfully read from the input file. More...
 
WrapperBasesetDescription (string const &description)
 Set the description string of the wrapper. More...
 
WrapperBaseappendDescription (string const &description)
 Add up more text to the existing description string of the wrapper. More...
 
string const & getDescription () const
 Get the description string of the wrapper. More...
 
string dumpInputOptions (bool const outputHeader) const
 
std::set< string > const & getRegisteringObjects () const
 Get the list of names of groups that registered this wrapper. More...
 
WrapperBasesetRegisteringObjects (string const &objectName)
 Add a new name to the list of groups that register this wrapper. More...
 
Miscellaneous
virtual void copyWrapperAttributes (WrapperBase const &source)
 Copy attributes from another wrapper. More...
 
virtual std::unique_ptr< WrapperBaseclone (string const &name, Group &parent)=0
 Creates a clone of *this WrapperBase. More...
 
virtual void copyData (WrapperBase const &source)=0
 Copy the the data contained in another wrapper into this wrapper. More...
 
virtual void copyWrapper (WrapperBase const &source)=0
 Copies the contents of a Wrapper into *this. More...
 
virtual std::type_info const & getTypeId () const =0
 Get the typeid of T. More...
 
virtual int numArrayDims () const =0
 Return the number of dimensions of the array. More...
 
virtual localIndex numArrayComp () const =0
 Return the number of components in a multidimensional array. More...
 
virtual WrapperBasesetDimLabels (integer dim, Span< string const > labels)=0
 Set dimension labels for an array. More...
 
virtual Span< string const > getDimLabels (integer dim) const =0
 Get dimension labels of an array. More...
 

Protected Member Functions

void createDataContext (xmlWrapper::xmlNode const &targetNode, xmlWrapper::xmlNodePos const &nodePos)
 Sets the m_dataContext to a DataFileContext by retrieving the attribute file line. More...
 

Protected Attributes

string m_name
 Name of the object that is being wrapped.
 
Groupm_parent
 Pointer to Group that holds this WrapperBase.
 
int m_sizedFromParent
 Integer to indicate whether or not this wrapped object should be resized when m_parent is resized.
 
RestartFlags m_restart_flags
 Flag to determine the restart behavior for this wrapped object.
 
PlotLevel m_plotLevel
 Flag to store the plotLevel.
 
InputFlags m_inputFlag
 Flag to store if this wrapped object should be read from input.
 
bool m_successfulReadFromInput
 Flag to indicate if wrapped object was successfully read from input.
 
string m_description
 A string description of the wrapped object.
 
string m_rtTypeName
 A string regex to validate the input values string to parse for the wrapped object.
 
std::set< stringm_registeringObjects
 A vector of the names of the objects that created this Wrapper.
 
conduit::Node & m_conduitNode
 A reference to the corresponding conduit::Node.
 
std::unique_ptr< DataContextm_dataContext
 A DataContext object that can helps to contextualize this Group.
 

Detailed Description

Base class for all wrappers containing common operations.

Definition at line 55 of file WrapperBase.hpp.

Constructor & Destructor Documentation

◆ WrapperBase()

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

Constructor.

Parameters
[in]namename of the object
[in]parentpointer to Group that holds this WrapperBase
[in]rtTypeNamethe name of the rtType to use (given by rtType::CustomTypes or rtType::getTypeName())

Member Function Documentation

◆ addBlueprintField()

virtual void geos::dataRepository::WrapperBase::addBlueprintField ( conduit::Node &  fields,
string const &  name,
string const &  topology,
std::vector< string > const &  componentNames = {} 
) const
pure virtual

Push the data in the wrapper into a Conduit blueprint field.

Parameters
fieldsThe Conduit Node containg the blueprint fields.
nameThe name of the field.
topologyThe topology associated with the field.
componentNamesThe name of the components, if not specified they are auto generated.
Note
This wrapper must hold an LvArray::Array.

Implemented in geos::dataRepository::Wrapper< T >.

◆ appendDescription()

WrapperBase& geos::dataRepository::WrapperBase::appendDescription ( string const &  description)
inline

Add up more text to the existing description string of the wrapper.

Parameters
descriptionthe description to add to the end of the previous one.
Returns
a pointer to this wrapper

Definition at line 517 of file WrapperBase.hpp.

◆ averageOverSecondDim()

virtual std::unique_ptr< WrapperBase > geos::dataRepository::WrapperBase::averageOverSecondDim ( string const &  name,
Group group 
) const
pure virtual

Create a new Wrapper with values averaged over the second dimension.

Parameters
nameThe name to give the new wrapper.
groupThe group to hang the new Wrapper from.
Returns
The newly created wrapper.
Note
This Wrapper must hold an LvArray::Array of dimension 2 or greater.
The new Wrapper is not registered with group.

Implemented in geos::dataRepository::Wrapper< T >.

◆ bytesAllocated()

virtual size_t geos::dataRepository::WrapperBase::bytesAllocated ( ) const
pure virtual
Returns
the number of bytes allocated for the wrapped object.

Implemented in geos::dataRepository::Wrapper< T >.

◆ capacity()

virtual localIndex geos::dataRepository::WrapperBase::capacity ( ) const
pure virtual
Returns
T::capacity() if it exists, other wise calls size().

Implemented in geos::dataRepository::Wrapper< T >.

◆ clone()

virtual std::unique_ptr< WrapperBase > geos::dataRepository::WrapperBase::clone ( string const &  name,
Group parent 
)
pure virtual

Creates a clone of *this WrapperBase.

Parameters
[in]namename of the clone
[in]parentparent Group that will hold this clone
Returns

The overridden function will create a copy of the derived Wrapper<T> the using the provided values of name and parent to differentiate itself from the source.

Implemented in geos::dataRepository::Wrapper< T >.

◆ copy()

virtual void geos::dataRepository::WrapperBase::copy ( localIndex const  sourceIndex,
localIndex const  destIndex 
)
pure virtual

Calls T::copy(sourceIndex, destIndex)

Parameters
[in]sourceIndexindex to copy from
[in]destIndexindex to copy to

Implemented in geos::dataRepository::Wrapper< T >.

◆ copyData()

virtual void geos::dataRepository::WrapperBase::copyData ( WrapperBase const &  source)
pure virtual

Copy the the data contained in another wrapper into this wrapper.

Parameters
sourceThe wrapper that holds the data to copy.

Implemented in geos::dataRepository::Wrapper< T >.

◆ copyWrapper()

virtual void geos::dataRepository::WrapperBase::copyWrapper ( WrapperBase const &  source)
pure virtual

Copies the contents of a Wrapper into *this.

Parameters
[in]sourceThe wrapper to copy

Implemented in geos::dataRepository::Wrapper< T >.

◆ copyWrapperAttributes()

virtual void geos::dataRepository::WrapperBase::copyWrapperAttributes ( WrapperBase const &  source)
virtual

Copy attributes from another wrapper.

Parameters
[in]sourcethe source wrapper, must wrap the same type T

Reimplemented in geos::dataRepository::Wrapper< T >.

◆ createDataContext()

void geos::dataRepository::WrapperBase::createDataContext ( xmlWrapper::xmlNode const &  targetNode,
xmlWrapper::xmlNodePos const &  nodePos 
)
protected

Sets the m_dataContext to a DataFileContext by retrieving the attribute file line.

Parameters
targetNodethe node containing this wrapper source attribute.
nodePosthe xml node position of the node

◆ dumpInputOptions()

string geos::dataRepository::WrapperBase::dumpInputOptions ( bool const  outputHeader) const
Returns
a table formatted string containing the input options.
Parameters
outputHeaderIf true outputs the table header, otherwise just outputs a row.

◆ elementByteSize()

virtual localIndex geos::dataRepository::WrapperBase::elementByteSize ( ) const
pure virtual
Returns
the number of bytes in an object of unit size. Ie elementByteSize() * size() gives the size of memory pointed to by voidPointer().

Implemented in geos::dataRepository::Wrapper< T >.

◆ erase()

virtual void geos::dataRepository::WrapperBase::erase ( std::set< localIndex > const &  indicesToErase)
pure virtual

Calls T::erase(indicesToErase)

Parameters
[in]indicesToEraseindices to erase

Implemented in geos::dataRepository::Wrapper< T >.

◆ getDataContext()

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

Definition at line 450 of file WrapperBase.hpp.

◆ getDefaultValueString()

virtual string geos::dataRepository::WrapperBase::getDefaultValueString ( ) const
pure virtual

Return a string representing the default value.

Returns
A string representing the default value.

Implemented in geos::dataRepository::Wrapper< T >.

◆ getDescription()

string const& geos::dataRepository::WrapperBase::getDescription ( ) const
inline

Get the description string of the wrapper.

Returns
this wrapper's description string

Definition at line 527 of file WrapperBase.hpp.

◆ getDimLabels()

virtual Span< string const > geos::dataRepository::WrapperBase::getDimLabels ( integer  dim) const
pure virtual

Get dimension labels of an array.

Parameters
dimdimension index (must be less than number of array dimensions)
Returns
reference to array of labels (empty unless set via setDimLabels)

An error is raised if wrapped type is not LvArray::Array.

Implemented in geos::dataRepository::Wrapper< T >.

◆ getHistoryMetadata()

virtual HistoryMetadata geos::dataRepository::WrapperBase::getHistoryMetadata ( localIndex const  packCount) const
pure virtual

Get a description of the wrapped data for time history collection/output.

Parameters
packCountThe number of indices from the wrapped data to collect,
Returns
HistoryMetadata about the wrapped type

Implemented in geos::dataRepository::Wrapper< T >.

◆ getInputFlag()

InputFlags geos::dataRepository::WrapperBase::getInputFlag ( ) const
inline

Get the InputFlag of the wrapper.

Returns
this wrapper's input flags

Definition at line 486 of file WrapperBase.hpp.

◆ getName()

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

Get name of the wrapper.

Returns
name of the wrapper

Definition at line 435 of file WrapperBase.hpp.

◆ getParent() [1/2]

Group& geos::dataRepository::WrapperBase::getParent ( )
inline
Returns
the group that contains this Wrapper.

Definition at line 456 of file WrapperBase.hpp.

◆ getParent() [2/2]

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

Returns
the group that contains this Wrapper.

Definition at line 462 of file WrapperBase.hpp.

◆ getPath()

string geos::dataRepository::WrapperBase::getPath ( ) const

Return the path to this Wrapper in the data repository.

Returns
The path to this Wrapper in the data repository.

◆ getPlotLevel()

PlotLevel geos::dataRepository::WrapperBase::getPlotLevel ( ) const
inline

Get PlotLevel for this wrapper.

Returns
this wrapper's plot level

Definition at line 418 of file WrapperBase.hpp.

◆ getRegisteringObjects()

std::set< string > const& geos::dataRepository::WrapperBase::getRegisteringObjects ( ) const
inline

Get the list of names of groups that registered this wrapper.

Returns
vector of object names

Definition at line 544 of file WrapperBase.hpp.

◆ getRestartFlags()

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

Get the RestartFlags of the wrapper.

Returns
this wrapper's restart flags

Definition at line 401 of file WrapperBase.hpp.

◆ getRTTypeName()

string const& geos::dataRepository::WrapperBase::getRTTypeName ( ) const
inline
Returns
the rtTypeName used when parsing an input value to the wrapped object.

Definition at line 177 of file WrapperBase.hpp.

◆ getSuccessfulReadFromInput()

bool geos::dataRepository::WrapperBase::getSuccessfulReadFromInput ( ) const
inline

Returns flag that indicates whether the contents of the wrapper have been successfully read from the input file.

Returns
true if the contents of the wrapper have been read from input.

Definition at line 496 of file WrapperBase.hpp.

◆ getTypeId()

virtual std::type_info const& geos::dataRepository::WrapperBase::getTypeId ( ) const
pure virtual

Get the typeid of T.

Returns
type_info of the wrapped type "typeid(T)"

Implemented in geos::dataRepository::Wrapper< T >.

◆ getTypeRegex()

virtual Regex const& geos::dataRepository::WrapperBase::getTypeRegex ( ) const
pure virtual
Returns
regex used to validate inputs of wrapped type

Implemented in geos::dataRepository::Wrapper< T >.

◆ hasDefaultValue()

virtual bool geos::dataRepository::WrapperBase::hasDefaultValue ( ) const
pure virtual

Return true iff this wrapper has a valid default value.

Returns
True iff this wrapper has a valid default value.

Implemented in geos::dataRepository::Wrapper< T >.

◆ isPackable()

virtual bool geos::dataRepository::WrapperBase::isPackable ( bool  onDevice) const
pure virtual

Check whether wrapped type is can be packed into a buffer on host or device.

Parameters
[in]onDevicedetermine whether the wrapper is packable on host vs device
Returns
true if T is packable, false otherwise

Implemented in geos::dataRepository::Wrapper< T >.

◆ loadFromConduit()

virtual bool geos::dataRepository::WrapperBase::loadFromConduit ( )
pure virtual

Read the wrapped data from Conduit.

Returns
True iff the Wrapper read in data.

Implemented in geos::dataRepository::Wrapper< T >.

◆ move()

virtual void geos::dataRepository::WrapperBase::move ( LvArray::MemorySpace const  space,
bool const  touch 
) const
pure virtual

Calls T::move(space, touch)

Parameters
[in]spaceA CHAI execution space to move the data into
[in]touchwhether to register a touch in target space

Implemented in geos::dataRepository::Wrapper< T >.

◆ numArrayComp()

virtual localIndex geos::dataRepository::WrapperBase::numArrayComp ( ) const
pure virtual

Return the number of components in a multidimensional array.

Returns
total size along all dimensions except first if T is an array, and 0 otherwise

Implemented in geos::dataRepository::Wrapper< T >.

◆ numArrayDims()

virtual int geos::dataRepository::WrapperBase::numArrayDims ( ) const
pure virtual

Return the number of dimensions of the array.

Returns
the number of dimensions of the array if T is an array, and 0 otherwise

Implemented in geos::dataRepository::Wrapper< T >.

◆ pack()

template<bool DO_PACKING>
localIndex geos::dataRepository::WrapperBase::pack ( buffer_unit_type *&  buffer,
bool  withMetadata,
bool  onDevice,
parallelDeviceEvents &  events 
) const
inline

Concrete implementation of the packing method.

Template Parameters
DO_PACKINGA template parameter to discriminate between actually packing or only computing the packing size.
Parameters
[in,out]bufferThe buffer that will receive the packed data.
[in]withMetadataWhether to pack string metadata with the underlying data.
[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 packed size.

Definition at line 303 of file WrapperBase.hpp.

◆ packByIndex()

template<bool DO_PACKING>
localIndex geos::dataRepository::WrapperBase::packByIndex ( buffer_unit_type *&  buffer,
arrayView1d< localIndex const > const &  packList,
bool  withMetadata,
bool  onDevice,
parallelDeviceEvents &  events 
) const
inline

Concrete implementation of the packing by index method.

Template Parameters
DO_PACKINGA template parameter to discriminate between actually packing or only computing the packing size.
Parameters
[in,out]bufferThe buffer that will receive the packed data.
[in]packListThe element we want packed.
[in]withMetadataWhether to pack string metadata with the underlying data.
[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 packed size.

Definition at line 325 of file WrapperBase.hpp.

◆ populateMCArray()

virtual void geos::dataRepository::WrapperBase::populateMCArray ( conduit::Node &  node,
std::vector< string > const &  componentNames = {} 
) const
pure virtual

Push the data in the wrapper into a Conduit Blueprint mcarray.

Parameters
nodeThe Conduit Node to put the data into.
componentNamesThe names of the components, if not specified they are auto generated.
Note
This wrapper must hold an LvArray::Array.

Implemented in geos::dataRepository::Wrapper< T >.

◆ processInputFile()

virtual bool geos::dataRepository::WrapperBase::processInputFile ( xmlWrapper::xmlNode const &  targetNode,
xmlWrapper::xmlNodePos const &  nodePos 
)
pure virtual

Initialize the wrapper from the input xml node.

Parameters
targetNodethe xml node to initialize from.
nodePosthe target node position, typically obtained with xmlDocument::getNodePosition().
Returns
True if the wrapper initialized itself from the file.

Implemented in geos::dataRepository::Wrapper< T >.

◆ reserve()

virtual void geos::dataRepository::WrapperBase::reserve ( localIndex const  newCapacity)
pure virtual

Calls T::reserve( newCapacity ) if it exists, otherwise a no-op.

Parameters
[in]newCapacitythe new capacity of the T.

Implemented in geos::dataRepository::Wrapper< T >.

◆ resize() [1/2]

virtual void geos::dataRepository::WrapperBase::resize ( int  num_dims,
localIndex const *const  dims 
)
pure virtual

Calls T::resize( num_dims, dims )

Parameters
[in]num_dimsnumber of dimensions in T
[in]dimspointer to the new dims

Implemented in geos::dataRepository::Wrapper< T >.

◆ resize() [2/2]

virtual void geos::dataRepository::WrapperBase::resize ( localIndex  newsize)
pure virtual

Calls T::resize(newsize) if it exists.

Parameters
[in]newsizeparameter to pass to T::resize(newsize)

Implemented in geos::dataRepository::Wrapper< T >.

◆ setDescription()

WrapperBase& geos::dataRepository::WrapperBase::setDescription ( string const &  description)
inline

Set the description string of the wrapper.

Parameters
descriptionthe description
Returns
a pointer to this wrapper

Definition at line 506 of file WrapperBase.hpp.

◆ setDimLabels()

virtual WrapperBase& geos::dataRepository::WrapperBase::setDimLabels ( integer  dim,
Span< string const >  labels 
)
pure virtual

Set dimension labels for an array.

Parameters
dimdimension index (must be less than number of array dimensions)
labelsarray of labels
Returns
reference to this (for convenience of call chaining)

Dimension labels are typically used in visualization output to give context to plots of multidimensional data, such as fluid component and phase names. This method provides a way for physics modules (solvers and constitutive models) to communicate meaningful labels to output drivers (such as VTK and Silo).

An error is raised if wrapped type is not LvArray::Array.

Implemented in geos::dataRepository::Wrapper< T >.

◆ setInputFlag()

WrapperBase& geos::dataRepository::WrapperBase::setInputFlag ( InputFlags const  input)
inline

Set the InputFlag of the wrapper.

Parameters
inputthe new InputFlags value
Returns
a pointer to this wrapper

Definition at line 470 of file WrapperBase.hpp.

◆ setPlotLevel()

WrapperBase& geos::dataRepository::WrapperBase::setPlotLevel ( PlotLevel const  flag)
inline

Set the PlotLevel of the wrapper.

Parameters
flagthe new PlotLevel value
Returns
a pointer to this wrapper

Definition at line 425 of file WrapperBase.hpp.

◆ setRegisteringObjects()

WrapperBase& geos::dataRepository::WrapperBase::setRegisteringObjects ( string const &  objectName)
inline

Add a new name to the list of groups that register this wrapper.

Parameters
objectNamename of the registering object
Returns
pointer to this wrapper

Definition at line 554 of file WrapperBase.hpp.

◆ setRestartFlags()

WrapperBase& geos::dataRepository::WrapperBase::setRestartFlags ( RestartFlags  flags)
inline

Set the RestartFlags of the wrapper.

Parameters
flagsthe new RestartFlags value
Returns
a pointer to this wrapper

Definition at line 408 of file WrapperBase.hpp.

◆ setRTTypeName()

WrapperBase& geos::dataRepository::WrapperBase::setRTTypeName ( string_view  rtTypeName)
inline

override the rtType to use when parsing an input value to the wrapped object. It can be useful to change the used regex to validate the input value.

Parameters
rtTypeNamethe name of the rtType to use (given by rtType::CustomTypes or rtType::getTypeName())
Returns
the reference to this Wrapper

Definition at line 186 of file WrapperBase.hpp.

◆ setSizedFromParent()

WrapperBase& geos::dataRepository::WrapperBase::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 wrapper

Definition at line 391 of file WrapperBase.hpp.

◆ size()

virtual localIndex geos::dataRepository::WrapperBase::size ( ) const
pure virtual

Calls T::size()

Returns
result of T::size()

Implemented in geos::dataRepository::Wrapper< T >.

◆ sizedFromParent()

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

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

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

Definition at line 381 of file WrapperBase.hpp.

◆ unpack()

virtual localIndex geos::dataRepository::WrapperBase::unpack ( buffer_unit_type const *&  buffer,
bool  withMetadata,
bool  onDevice,
parallelDeviceEvents &  events 
)
pure virtual

Unpack the entire wrapped object from a buffer.

Parameters
[in,out]bufferthe binary buffer pointer, advanced upon completion
[in]withMetadatawhether to expect string metadata with the underlying data
[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 number of buffer_unit_type units unpacked

Implemented in geos::dataRepository::Wrapper< T >.

◆ unpackByIndex()

virtual localIndex geos::dataRepository::WrapperBase::unpackByIndex ( buffer_unit_type const *&  buffer,
arrayView1d< localIndex const > const &  unpackIndices,
bool  withMetadata,
bool  onDevice,
parallelDeviceEvents &  events,
MPI_Op  op = MPI_REPLACE 
)
pure virtual

For indexable types, unpack selected indices of wrapped object from a buffer.

Parameters
[in,out]bufferthe binary buffer pointer, advanced upon completion
[in]unpackIndicesthe list of indices to pack
[in]withMetadatawhether to include metadata in the packing
[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 buffer_unit_type units unpacked

Implemented in geos::dataRepository::Wrapper< T >.

◆ voidPointer()

virtual void const* geos::dataRepository::WrapperBase::voidPointer ( ) const
pure virtual
Returns
a const void pointer to the data.

Implemented in geos::dataRepository::Wrapper< T >.


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