GEOSX
Classes | Protected Member Functions | List of all members
geosx::InternalWellGenerator Class Reference

#include <InternalWellGenerator.hpp>

Inheritance diagram for geosx::InternalWellGenerator:
Inheritance graph
[legend]

Classes

struct  NodeLocation
 Struct to define the top and bottom node of a segment. More...
 

Public Member Functions

Constructor / Destructor
 InternalWellGenerator (const string &name, Group *const parent)
 Constructor. More...
 
virtual ~InternalWellGenerator () override
 Default destructor.
 
Overriding functions defined in MeshGeneratorBase and above
virtual GroupcreateChild (string const &childKey, string const &childName) override
 Creates a new sub-Group using the ObjectCatalog functionality. More...
 
virtual void expandObjectCatalogs () override
 Expand any catalogs in the data structure.
 
virtual void generateMesh (DomainPartition &domain) override
 Main function of the class that generates the well geometry. More...
 
Getters / Setters
globalIndex getNumElements () const
 Get the global number of well elements. More...
 
arrayView2d< real64 const > getElemCoords () const
 Get the physical location of the centers of well elements. More...
 
arrayView1d< globalIndex const > getNextElemIndex () const
 Get the global indices mapping an element to the next. More...
 
arrayView1d< arrayView1d< globalIndex const > const > getPrevElemIndices () const
 Get the global indices mapping an element to the previous ones. More...
 
arrayView2d< globalIndex const > getElemToNodesMap () const
 Get the global indices of the well nodes nodes connected to each element. More...
 
arrayView1d< real64 const > getElemVolume () const
 Get the volume of the well elements. More...
 
real64 getElementRadius () const
 Get the radius in the well. More...
 
globalIndex getNumNodes () const
 Get the global number of well nodes. More...
 
arrayView2d< real64 const > getNodeCoords () const
 Get the physical location of the centers of well elements. More...
 
globalIndex getNumPerforations () const
 Get the global number of perforations on this well. More...
 
arrayView2d< real64 const > getPerfCoords () const
 Get the locations of the perforations. More...
 
arrayView1d< real64 const > getPerfTransmissibility () const
 Get the well transmissibility at the perforations. More...
 
arrayView1d< globalIndex const > getPerfElemIndex () const
 Get the global indices of the well elements connected to each perforation. More...
 
- Public Member Functions inherited from geosx::MeshGeneratorBase
 MeshGeneratorBase (string const &name, Group *const parent)
 Main constructor for MeshGenerator base class. More...
 
virtual ~MeshGeneratorBase ()
 Destructor for MeshGenerator.
 
virtual void importFields (DomainPartition &domain) const
 Import data from external sources (e.g. dataset that comes with a mesh). More...
 
virtual void freeResources ()
 Free internal resources associated with mesh/data import. More...
 
- Public Member Functions inherited from geosx::dataRepository::Group
virtual bool registerCallback (void *func, const std::type_info &funcType)
 Register a callback function on the group. More...
 
 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...
 
void printDataHierarchy (integer indent=0)
 Prints the data hierarchy recursively. More...
 
string dumpInputOptions () const
 
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...
 
template<typename T = Group, typename KEY = void>
T * getGroupPointer (KEY const &key)
 Return a pointer to a sub-group of the current Group. More...
 
template<typename T = Group, typename KEY = void>
T const * getGroupPointer (KEY const &key) const
 Return a pointer to a sub-group of the current Group. More...
 
template<typename T = Group, typename KEY = void>
T & getGroup (KEY const &key)
 Return a reference to a sub-group of the current Group. More...
 
template<typename T = Group, typename KEY = void>
T const & getGroup (KEY const &key) const
 Return a reference to a sub-group of the current Group. More...
 
template<typename T = Group>
T & getGroupByPath (string const &path)
 Retrieve a group from the hierarchy using a path. More...
 
template<typename T = Group>
T const & getGroupByPath (string const &path) const
 Retrieve a group from the hierarchy using a path. More...
 
subGroupMapgetSubGroups ()
 Get the subgroups object. More...
 
subGroupMap const & getSubGroups () const
 Get the subgroups object. More...
 
localIndex numSubGroups () const
 return the number of sub groups in this Group More...
 
template<typename T = Group>
bool hasGroup (string const &name) const
 Check whether a sub-group exists. More...
 
template<typename GROUPTYPE = Group, typename ... GROUPTYPES, typename LAMBDA >
void forSubGroups (LAMBDA &&lambda)
 Apply the given functor to subgroups that can be casted to one of specified types. More...
 
template<typename GROUPTYPE = Group, typename ... GROUPTYPES, typename LAMBDA >
void forSubGroups (LAMBDA &&lambda) const
 Apply the given functor to subgroups that can be casted to one of specified types. More...
 
template<typename GROUPTYPE = Group, typename ... GROUPTYPES, typename LOOKUP_CONTAINER , typename LAMBDA >
void forSubGroups (LOOKUP_CONTAINER const &subGroupKeys, LAMBDA &&lambda)
 
template<typename GROUPTYPE = Group, typename ... GROUPTYPES, typename LOOKUP_CONTAINER , typename LAMBDA >
void forSubGroups (LOOKUP_CONTAINER const &subGroupKeys, LAMBDA &&lambda) const
 
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...
 
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::xmlNode &targetNode)
 Recursively read values using ProcessInputFile() from the input file and put them into the wrapped values for this group. More...
 
void postProcessInputRecursive ()
 Recursively call postProcessInput() to apply post processing after reading input values.
 
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)
 
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 (string const &name, std::unique_ptr< WrapperBase > wrapper)
 Register and take ownership of an existing Wrapper. More...
 
void deregisterWrapper (string const &name)
 Removes a Wrapper from this group. More...
 
void generateDataStructureSkeleton (integer const level)
 Build a complete datastructure for schema generation. More...
 
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...
 
virtual void registerDataOnMeshRecursive (Group &meshBodies)
 Calls RegisterDataOnMesh() recursively. More...
 
virtual void registerDataOnMesh (Group &meshBodies)
 Register data on mesh entities. More...
 
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...
 
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...
 
virtual localIndex unpack (buffer_unit_type const *&buffer, arrayView1d< localIndex > &packList, integer const recursive, bool onDevice, parallelDeviceEvents &events)
 Unpack a buffer. More...
 
template<typename KEY >
WrapperBase const & getWrapperBase (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
 
wrapperMap const & wrappers () 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...
 
template<typename LOOKUP_TYPE >
bool hasWrapper (LOOKUP_TYPE const &lookup) const
 Check if a wrapper exists. More...
 
template<typename T , typename LOOKUP_TYPE >
Wrapper< T > const & getWrapper (LOOKUP_TYPE const &index) const
 Retrieve a Wrapper stored in this group. More...
 
template<typename T , typename LOOKUP_TYPE >
Wrapper< T > & getWrapper (LOOKUP_TYPE const &index)
 Retrieve a Wrapper stored in this group. More...
 
template<typename T , typename LOOKUP_TYPE >
Wrapper< T > const * getWrapperPointer (LOOKUP_TYPE const &index) const
 Retrieve a Wrapper stored in this group. More...
 
template<typename T , typename LOOKUP_TYPE >
Wrapper< T > * getWrapperPointer (LOOKUP_TYPE const &index)
 Retrieve a Wrapper stored in this group. More...
 
template<typename T , typename LOOKUP_TYPE >
GEOSX_DECLTYPE_AUTO_RETURN getReference (LOOKUP_TYPE const &lookup) const
 Look up a wrapper and get reference to wrapped object. More...
 
template<typename T , typename LOOKUP_TYPE >
T & getReference (LOOKUP_TYPE const &lookup)
 Look up a wrapper and get reference to wrapped object. More...
 
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...
 
string const & getName () const
 Get group name. More...
 
string getPath () const
 Return the path of this Group in the data repository. More...
 
GroupgetParent ()
 Access the group's parent. More...
 
Group const & getParent () const
 Access the group's parent. More...
 
localIndex getIndexInParent () const
 Get the group's index withing its parent group. More...
 
integer sizedFromParent () const
 Check whether this Group is resized when its parent is resized. More...
 
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...
 
conduit::Node & getConduitNode ()
 Return the Conduit node object associated with this group. More...
 
conduit::Node const & getConduitNode () const
 Return the Conduit node object associated with this group. More...
 
void prepareToWrite ()
 Register the group and its wrappers with Conduit.
 
void finishWriting ()
 Write the group and its wrappers into Conduit.
 
void loadFromConduit ()
 Read the group and its wrappers from Conduit.
 
void enableLogLevelInput ()
 Enable verbosity input for object.
 
integer getLogLevel () const
 

Static Public Member Functions

Static Factory Catalog Functions
static string catalogName ()
 Get the catalog name. More...
 
- Static Public Member Functions inherited from geosx::MeshGeneratorBase
static string catalogName ()
 Return the name of the MeshGenerator in object catalog. More...
 
static CatalogInterface::CatalogTypegetCatalog ()
 Accessor for the singleton Catalog object. More...
 
- Static Public Member Functions inherited from geosx::dataRepository::Group
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...
 
static CatalogInterface::CatalogTypegetCatalog ()
 Get the singleton catalog for this class. More...
 

Protected Member Functions

void postProcessInput () override final
 This function provides capability to post process input values prior to any other initialization operations.
 
- Protected Member Functions inherited from geosx::dataRepository::Group
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.
 

Additional Inherited Members

- Public Types inherited from geosx::MeshGeneratorBase
using CatalogInterface = dataRepository::CatalogInterface< MeshGeneratorBase, string const &, Group *const >
 using alias for templated Catalog meshGenerator type
 
- Public Types inherited from geosx::dataRepository::Group
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.
 
using CatalogInterface = dataRepository::CatalogInterface< Group, string const &, Group *const >
 Type alias for catalog interface used by this class. See CatalogInterface.
 

Detailed Description

This class processes the data of a single well from the XML and generates the well geometry

Definition at line 33 of file InternalWellGenerator.hpp.

Constructor & Destructor Documentation

◆ InternalWellGenerator()

geosx::InternalWellGenerator::InternalWellGenerator ( const string name,
Group *const  parent 
)

Constructor.

Parameters
namename of the object in the data hierarchy.
parentpointer to the parent group in the data hierarchy.

Member Function Documentation

◆ catalogName()

static string geosx::InternalWellGenerator::catalogName ( )
inlinestatic

Get the catalog name.

Returns
the name of this type in the catalog

Definition at line 75 of file InternalWellGenerator.hpp.

◆ createChild()

virtual Group* geosx::InternalWellGenerator::createChild ( string const &  childKey,
string const &  childName 
)
overridevirtual

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 from geosx::dataRepository::Group.

◆ generateMesh()

virtual void geosx::InternalWellGenerator::generateMesh ( DomainPartition domain)
overridevirtual

Main function of the class that generates the well geometry.

Parameters
[in]domainthe domain object

Implements geosx::MeshGeneratorBase.

◆ getElemCoords()

arrayView2d< real64 const > geosx::InternalWellGenerator::getElemCoords ( ) const
inline

Get the physical location of the centers of well elements.

Returns
list of center locations of the well elements

Definition at line 124 of file InternalWellGenerator.hpp.

◆ getElementRadius()

real64 geosx::InternalWellGenerator::getElementRadius ( ) const
inline

Get the radius in the well.

Returns
the radius in the well

Definition at line 154 of file InternalWellGenerator.hpp.

◆ getElemToNodesMap()

arrayView2d< globalIndex const > geosx::InternalWellGenerator::getElemToNodesMap ( ) const
inline

Get the global indices of the well nodes nodes connected to each element.

Returns
list providing the global index of the well nodes for each well element

Definition at line 142 of file InternalWellGenerator.hpp.

◆ getElemVolume()

arrayView1d< real64 const > geosx::InternalWellGenerator::getElemVolume ( ) const
inline

Get the volume of the well elements.

Returns
list of volumes of the well elements

Definition at line 148 of file InternalWellGenerator.hpp.

◆ getNextElemIndex()

arrayView1d< globalIndex const > geosx::InternalWellGenerator::getNextElemIndex ( ) const
inline

Get the global indices mapping an element to the next.

Returns
list providing the global index of the next element for each element

Definition at line 130 of file InternalWellGenerator.hpp.

◆ getNodeCoords()

arrayView2d< real64 const > geosx::InternalWellGenerator::getNodeCoords ( ) const
inline

Get the physical location of the centers of well elements.

Returns
list of center locations of the well elements

Definition at line 168 of file InternalWellGenerator.hpp.

◆ getNumElements()

globalIndex geosx::InternalWellGenerator::getNumElements ( ) const
inline

Get the global number of well elements.

Returns
the global number of elements

Definition at line 118 of file InternalWellGenerator.hpp.

◆ getNumNodes()

globalIndex geosx::InternalWellGenerator::getNumNodes ( ) const
inline

Get the global number of well nodes.

Returns
the global number of nodes

Definition at line 162 of file InternalWellGenerator.hpp.

◆ getNumPerforations()

globalIndex geosx::InternalWellGenerator::getNumPerforations ( ) const
inline

Get the global number of perforations on this well.

Returns
the global number of elements

Definition at line 178 of file InternalWellGenerator.hpp.

◆ getPerfCoords()

arrayView2d< real64 const > geosx::InternalWellGenerator::getPerfCoords ( ) const
inline

Get the locations of the perforations.

Returns
list of locations of all the perforations on the well

Definition at line 184 of file InternalWellGenerator.hpp.

◆ getPerfElemIndex()

arrayView1d< globalIndex const > geosx::InternalWellGenerator::getPerfElemIndex ( ) const
inline

Get the global indices of the well elements connected to each perforation.

Returns
list providing the global index of the connected well element for each perforation

Definition at line 196 of file InternalWellGenerator.hpp.

◆ getPerfTransmissibility()

arrayView1d< real64 const > geosx::InternalWellGenerator::getPerfTransmissibility ( ) const
inline

Get the well transmissibility at the perforations.

Returns
list of well transmissibility at all the perforations on the well

Definition at line 190 of file InternalWellGenerator.hpp.

◆ getPrevElemIndices()

arrayView1d< arrayView1d< globalIndex const > const > geosx::InternalWellGenerator::getPrevElemIndices ( ) const
inline

Get the global indices mapping an element to the previous ones.

Returns
list providing the global indices of the previous elements for each element

Definition at line 136 of file InternalWellGenerator.hpp.


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