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
64 Group *
const parent );
77 static string catalogName() {
return "wellElementSubRegion"; }
110 return m_toNodesRelation;
118 return m_toNodesRelation;
127 return m_topWellElementIndex;
136 return m_globalWellElementIndex;
144 m_wellControlsName = name;
153 return m_wellControlsName;
162 return &m_perforationData;
170 return &m_perforationData;
246 bool const overwriteUpMaps,
247 bool const overwriteDownMaps )
override;
323 void assignUnownedElementsInReservoir(
MeshLevel & mesh,
338 void checkPartitioningValidity(
LineBlockABC const & lineBlock,
353 void updateNodeManagerSize(
MeshLevel & mesh,
370 void constructSubRegionLocalElementMaps(
MeshLevel & mesh,
383 void updateNodeManagerNodeToElementMap(
MeshLevel & mesh );
392 template<
bool DO_PACKING >
400 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.
bool isLocallyOwned() const
Check if well is owned by current rank.
virtual localIndex packUpDownMaps(buffer_unit_type *&buffer, arrayView1d< localIndex const > const &packList) const override
Packs the specific elements in the @ packList.
string const & getWellControlsName() const
Get the name of the WellControls object of this well.
void setTopRank(int rank)
Set for the MPI rank that owns this well (i.e. the top segment).
void generate(MeshLevel &mesh, LineBlockABC const &lineBlock, arrayView1d< integer > &elemStatus, globalIndex nodeOffsetGlobal, globalIndex elemOffsetGlobal)
Build the local well elements from global well element data.
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 in segmentStatusList parameter of Generate()
void connectPerforationsToMeshElements(MeshLevel &mesh, LineBlockABC const &lineBlock)
For each perforation, find the reservoir element that contains the perforation.
virtual void setupRelatedObjectsInRelations(MeshLevel const &mesh) override
Link the connectivity maps of the subregion to the managers storing the mesh information.
PerforationData const * getPerforationData() const
Get all the local perforations.
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.
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
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).
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...
std::int32_t integer
Signed integer type.
LvArray::SortedArray< T, localIndex, LvArray::ChaiBuffer > SortedArray
A sorted array of local indices.
signed char buffer_unit_type
Type stored in communication buffers.
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.
static constexpr char const * nextWellElementIndexGlobalString()
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 * topWellElementIndexString()
static constexpr char const * topRankString()
dataRepository::ViewKey radius
ViewKey for the well radius.
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)