16 #ifndef GEOS_MESH_WELLELEMENTSUBREGION_HPP_ 
   17 #define GEOS_MESH_WELLELEMENTSUBREGION_HPP_ 
   21 #include "mesh/PerforationData.hpp" 
   22 #include "mesh/generators/LineBlockABC.hpp" 
   50     SHARED = REMOTE | LOCAL  
 
   73                         Group * 
const parent );
 
   86   static string catalogName() { 
return "wellElementSubRegion"; }
 
  119     return m_toNodesRelation;
 
  127     return m_toNodesRelation;
 
  136     return m_topWellElementIndex;
 
  145     return m_globalWellElementIndex;
 
  153     m_wellControlsName = name;
 
  162     return m_wellControlsName;
 
  171     return &m_perforationData;
 
  179     return &m_perforationData;
 
  188     return m_wellLocalElementStatus;
 
  196     return m_wellLocalElementStatus;
 
  206     return m_wellElementStatus;
 
  214     return m_wellElementStatus;
 
  294                                        bool const overwriteUpMaps,
 
  295                                        bool const overwriteDownMaps ) 
override;
 
  401   void assignUnownedElementsInReservoir( 
MeshLevel & mesh,
 
  417   void checkPartitioningValidity( 
LineBlockABC const & lineBlock,
 
  432   void updateNodeManagerSize( 
MeshLevel & mesh,
 
  449   void constructSubRegionLocalElementMaps( 
MeshLevel & mesh,
 
  462   void updateNodeManagerNodeToElementMap( 
MeshLevel & mesh );
 
  471   template< 
bool DO_PACKING >
 
  479   string m_wellControlsName;
 
The FaceManager class provides an interface to ObjectManagerBase in order to manage face data.
 
Class facilitating the representation of a multi-level discretization of a MeshBody.
 
The NodeManager class provides an interface to ObjectManagerBase in order to manage node data.
 
This class describes a collection of local well elements and perforations.
 
array1d< integer > const  & getLocalWellElementStatus() const
Get status for local well elements.
 
WellElemParallelStatus
enumeration for values in segmentStatusList parameter of Generate()
 
bool isLocallyOwned() const
Check if well is owned by current rank.
 
array1d< integer > & getWellLocalElementStatus()
Get status for local well elements.
 
virtual localIndex packUpDownMaps(buffer_unit_type *&buffer, arrayView1d< localIndex const > const &packList) const override
Packs the specific elements in the @ packList.
 
void setupCommArrays()
Setup offset arrays needed for MPI comm of perforatin sttus.
 
string const  & getWellControlsName() const
Get the name of the WellControls object of this well.
 
array1d< globalIndex > const  & getGlobalElementIndex() const
Get global element index for all elements.
 
void setTopRank(int rank)
Set for the MPI rank that owns this well (i.e. the top segment).
 
NodeMapType const  & nodeList() const
Get the element-to-node map.
 
static string catalogName()
Get the catalog name.
 
arrayView1d< globalIndex const > getGlobalWellElementIndex() const
Get for the top element index.
 
virtual void fixUpDownMaps(bool const clearIfUnmapped) final override
Call ObjectManagerBase::fixUpDownMaps for the connectivity maps needed by the derived class (i....
 
void setWellControlsName(string const &name)
Set the name of the WellControls object of this well.
 
NodeMapType & nodeList()
Get the element-to-node map.
 
PerforationData * getPerforationData()
Get all the local perforations.
 
WellElemStatus
enumeration for values element state
 
integer const  & getNumLocalElements() const
Get number of local elements.
 
virtual void setupRelatedObjectsInRelations(MeshLevel const &mesh) override
Link the connectivity maps of the subregion to the managers storing the mesh information.
 
void generate(MeshLevel &mesh, LineBlockABC const &lineBlock, arrayView1d< integer > &elemStatus, globalIndex nodeOffsetGlobal, globalIndex elemOffsetGlobal, real64 geomTol)
Build the local well elements from global well element data.
 
PerforationData const  * getPerforationData() const
Get all the local perforations.
 
InterObjectRelation< array2d< localIndex, cells::NODE_MAP_PERMUTATION > > NodeMapType
Alias for the type of the element-to-node map.
 
virtual void calculateElementGeometricQuantities(NodeManager const &, FaceManager const &) override
Calculate the geometric quantities for each element in the subregion.
 
localIndex getTopWellElementIndex() const
Get for the top element index.
 
geos::WellElementSubRegion::viewKeyStruct viewKeysWellElementSubRegion
ViewKey struct for the WellElementSubRegion class.
 
virtual string getCatalogName() const override
Get the catalog name.
 
array1d< integer > & getWellElementStatus()
Get status for all well elements.
 
virtual localIndex unpackUpDownMaps(buffer_unit_type const *&buffer, localIndex_array &packList, bool const overwriteUpMaps, bool const overwriteDownMaps) override
Unpacks the specific elements in the @ packList.
 
void reconstructLocalConnectivity()
Reconstruct the (local) map nextWellElemId using nextWellElemIdGlobal after the ghost exchange.
 
virtual localIndex packUpDownMapsSize(arrayView1d< localIndex const > const &packList) const override
Computes the pack size of the specific elements in the @ packList.
 
geos::WellElementSubRegion::groupKeyStruct groupKeysWellElementSubRegion
groupKey struct for the WellElementSubRegion class
 
void setElementStatus(arrayView1d< integer > const &localElemPerfStatus)
Set status (Open/Closed) for locally owned elements.
 
void connectPerforationsToMeshElements(MeshLevel &mesh, LineBlockABC const &lineBlock, real64 geomTol)
For each perforation, find the reservoir element that contains the perforation.
 
array1d< integer > const  & getWellElementStatus() const
Get status for all well elements.
 
WellElementSubRegion(string const &name, Group *const parent)
Constructor.
 
Base template for ordered and unordered maps.
 
Group::wrapperMap::KeyIndex ViewKey
Type alias for KeyIndexT type used for wrapper lookups.
 
ArrayView< T, 1 > arrayView1d
Alias for 1D array view.
 
array1d< localIndex > localIndex_array
A 1-dimensional array of geos::localIndex types.
 
GEOS_GLOBALINDEX_TYPE globalIndex
Global index type (for indexing objects across MPI partitions).
 
double real64
64-bit floating point type.
 
GEOS_LOCALINDEX_TYPE localIndex
Local index type (for indexing objects within an MPI partition).
 
InterObjectRelation< array2d< localIndex > > FixedOneToManyRelation
A relationship from single objects to many other objects, where each object is related to the same nu...
 
LvArray::SortedArray< T, localIndex, LvArray::ChaiBuffer > SortedArray
A sorted array of local indices.
 
signed char buffer_unit_type
Type stored in communication buffers.
 
int integer
Signed integer type.
 
Array< T, 1 > array1d
Alias for 1D array.
 
struct to serve as a container for group strings and keys
 
A struct to serve as a container for variable strings and keys.
 
struct to serve as a container for group strings and keys
 
static constexpr char const  * perforationDataString()
 
dataRepository::GroupKey perforationData
GroupKey for the PerforationData object.
 
Struct to serve as a container for variable strings and keys.
 
dataRepository::ViewKey wellLocalElementGlobalIndex
ViewKey for the global element index.
 
static constexpr char const  * nextWellElementIndexGlobalString()
 
static constexpr char const  * wellLocalElementStatusString()
 
dataRepository::ViewKey topRank
ViewKey for the rank owning the top element.
 
dataRepository::ViewKey topWellElementIndex
ViewKey for the top well element index.
 
dataRepository::ViewKey nextWellElementIndex
ViewKey for the local indices of the next well element (used in solvers)
 
static constexpr char const  * wellNodeListString()
 
static constexpr char const  * wellLocalElementGlobalIndexString()
 
static constexpr char const  * topWellElementIndexString()
 
static constexpr char const  * topRankString()
 
dataRepository::ViewKey radius
ViewKey for the well radius.
 
dataRepository::ViewKey wellLocalElementStatus
ViewKey for the well element status.
 
dataRepository::ViewKey wellNodeList
ViewKey for the well element-to-node list.
 
dataRepository::ViewKey wellControlsName
ViewKey for the well control name.
 
static constexpr char const  * nextWellElementIndexString()
 
static constexpr char const  * radiusString()
 
static constexpr char const  * wellControlsString()
 
dataRepository::ViewKey nextWellElementIndexGlobal
ViewKey for the global indices of the next well element (to reconstruct maps)