15 #ifndef GEOSX_MESH_WELLELEMENTSUBREGION_HPP_ 16 #define GEOSX_MESH_WELLELEMENTSUBREGION_HPP_ 20 #include "meshUtilities/PerforationData.hpp" 48 SHARED = REMOTE | LOCAL
62 Group *
const parent );
80 static const string CatalogName() {
return "wellElementSubRegion"; }
113 return m_toEdgesRelation;
121 return m_toEdgesRelation;
130 return m_toFacesRelation;
138 return m_toFacesRelation;
147 return m_toNodesRelation;
155 return m_toNodesRelation;
164 return m_topWellElementIndex;
173 m_wellControlsName = name;
182 return m_wellControlsName;
191 return &m_perforationData;
199 return &m_perforationData;
286 bool const overwriteUpMaps,
287 bool const overwriteDownMaps )
override;
289 virtual void FixUpDownMaps(
bool const clearIfUnmapped )
final override;
294 void DebugWellElementSubRegionsAfterSetupCommunications()
const;
344 static constexpr
auto perforationDataString =
"wellElementSubRegion";
368 void AssignUnownedElementsInReservoir(
MeshLevel & mesh,
398 void UpdateNodeManagerSize(
MeshLevel & mesh,
415 void ConstructSubRegionLocalElementMaps(
MeshLevel & mesh,
428 void UpdateNodeManagerNodeToElementMap(
MeshLevel & mesh );
431 void DebugNodeManager(
MeshLevel const & mesh )
const;
445 template<
bool DOPACK >
453 string m_wellControlsName;
geosx::WellElementSubRegion::viewKeyStruct viewKeysWellElementSubRegion
ViewKey struct for the WellElementSubRegion class.
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.
dataRepository::ViewKey nextWellElementIndexGlobal
ViewKey for the global indices of the next well element (to reconstruct maps)
static constexpr auto wellControlsString
String key for the well control name.
FixedOneToManyRelation const & edgeList() const
Get the element-to-edge map.
NodeMapType & nodeList()
Get the element-to-node map.
long long int globalIndex
Global index type (for indexing objects across MPI partitions).
WellElemStatus
enumeration for values in segmentStatusList parameter of Generate()
virtual void CalculateElementGeometricQuantities(NodeManager const &, FaceManager const &) override
Calculate the geometric quantities for each element in the subregion.
dataRepository::ViewKey topWellElementIndex
ViewKey for the top well element index.
InterObjectRelation< array2d< localIndex > > FixedOneToManyRelation
A relationship from single objects to many other objects, where each object is related to the same nu...
Struct to serve as a container for variable strings and keys.
struct to serve as a container for group strings and keys
Class facilitating the representation of a multi-level discretization of a MeshBody.
static constexpr auto topWellElementIndexString
String key for the top well element index.
The NodeManager class provides an interface to ObjectManagerBase in order to manage node data...
Base template for ordered and unordered maps.
virtual void FixUpDownMaps(bool const clearIfUnmapped) final override
Call ObjectManagerBase::FixUpDownMaps for the connectivity maps needed by the derived class (i...
dataRepository::ViewKey wellControlsName
ViewKey for the well control name.
virtual void setupRelatedObjectsInRelations(MeshLevel const *const mesh) override
Link the connectivity maps of the subregion to the managers storing the mesh information.
dataRepository::ViewKey wellNodeList
ViewKey for the well element-to-node list.
geosx::WellElementSubRegion::groupKeyStruct groupKeysWellElementSubRegion
groupKey struct for the WellElementSubRegion class
This class serves to provide a "view" of a multidimensional array.
static constexpr auto radiusString
String key for the well radius.
A struct to serve as a container for variable strings and keys.
dataRepository::ViewKey radius
ViewKey for the well radius.
WellElementSubRegion(string const &name, Group *const parent)
Constructor.
FixedOneToManyRelation const & faceList() const
Get the element-to-face map.
Group::wrapperMap::KeyIndex ViewKey
Type alias for KeyIndexT type used for wrapper lookups.
bool IsLocallyOwned() const
Check if well is owned by current rank.
dataRepository::ViewKey nextWellElementIndex
ViewKey for the local indices of the next well element (used in solvers)
NodeMapType const & nodeList() const
Get the element-to-node map.
virtual const string getCatalogName() const override
Get the catalog name.
static constexpr auto wellNodeListString
String key for the well element-to-node list.
void Generate(MeshLevel &mesh, InternalWellGenerator const &wellGeometry, arrayView1d< integer > &elemStatus, globalIndex nodeOffsetGlobal, globalIndex elemOffsetGlobal)
Build the local well elements from global well element data.
virtual localIndex PackUpDownMapsSize(arrayView1d< localIndex const > const &packList) const override
Computes the pack size of the specific elements in the @ packList.
void ReconstructLocalConnectivity()
Reconstruct the (local) map nextWellElemId using nextWellElemIdGlobal after the ghost exchange...
signed char buffer_unit_type
Type stored in communication buffers.
void SetWellControlsName(string const &name)
Set the name of the WellControls object of this well.
struct to serve as a container for group strings and keys
static constexpr auto topRankString
String key for the rank owning the top element.
std::int32_t integer
Signed integer type.
FixedOneToManyRelation & faceList()
Get the element-to-face map.
int GetTopRank() const
Get the MPI rank that owns this well (i.e. the top segment).
PerforationData * GetPerforationData()
Get all the local perforations.
virtual ~WellElementSubRegion() override
Default destructor.
FixedOneToManyRelation & edgeList()
Get the element-to-edge map.
void SetTopRank(int rank)
Set for the MPI rank that owns this well (i.e. the top segment).
static constexpr auto nextWellElementIndexGlobalString
String key for the global indices of the next well element (to reconstruct maps)
dataRepository::ViewKey topRank
ViewKey for the rank owning the top element.
std::ptrdiff_t localIndex
Local index type (for indexing objects within an MPI partition).
void ConnectPerforationsToMeshElements(MeshLevel &mesh, InternalWellGenerator const &wellGeometry)
For each perforation, find the reservoir element that contains the perforation.
virtual localIndex PackUpDownMaps(buffer_unit_type *&buffer, arrayView1d< localIndex const > const &packList) const override
Packs the specific elements in the @ packList.
The FaceManager class provides an interface to ObjectManagerBase in order to manage face data...
localIndex GetTopWellElementIndex() const
Get for the top element index.
string const & GetWellControlsName() const
Get the name of the WellControls object of this well.
This class provides a fixed dimensional resizeable array interface in addition to an interface simila...
static const string CatalogName()
Get the catalog name.
This class describes a collection of local well elements and perforations.
PerforationData const * GetPerforationData() const
Get all the local perforations.
virtual void ViewPackingExclusionList(SortedArray< localIndex > &exclusionList) const override
Inserts in exclusionList the data that shall not be packed.
static constexpr auto nextWellElementIndexString
String key for the local indices of the next well element (used in solvers)