19 #ifndef GEOSX_MESH_EDGEMANAGER_HPP_ 20 #define GEOSX_MESH_EDGEMANAGER_HPP_ 32 class CellBlockManager;
61 {
return "EdgeManager"; }
91 Group *
const parent );
148 std::vector< std::vector< globalIndex > > & globalEdgeNodes )
override;
179 bool const overwriteUpMaps,
180 bool const overwriteDownMaps )
override;
247 template<
typename OUT_VECTOR >
250 OUT_VECTOR && edgeCenter )
const;
259 template<
typename OUT_VECTOR >
262 OUT_VECTOR && edgeVector )
const;
276 static constexpr
auto nodeListString =
"nodeList";
277 static constexpr
auto faceListString =
"faceList";
278 static constexpr
auto elementRegionListString =
"elemRegionList";
279 static constexpr
auto elementSubRegionListString =
"elemSubRegionList";
280 static constexpr
auto elementListString =
"elemList";
281 static constexpr
auto edgesTofractureConnectorsEdgesString =
"edgesToFractureConnectors";
282 static constexpr
auto fractureConnectorEdgesToEdgesString =
"fractureConnectorsToEdges";
283 static constexpr
auto fractureConnectorsEdgesToFaceElementsIndexString =
"fractureConnectorsToElementIndex";
337 {
return m_toNodesRelation( edgeIndex, nodeIndex ); }
346 {
return m_toNodesRelation( edgeIndex, nodeIndex ); }
399 template<
bool DOPACK >
405 template<
typename OUT_VECTOR >
408 OUT_VECTOR && edgeCenter )
const 410 LvArray::tensorOps::copy< 3 >( edgeCenter, X[m_toNodesRelation[edgeIndex][0]] );
411 LvArray::tensorOps::add< 3 >( edgeCenter, X[m_toNodesRelation[edgeIndex][1]] );
412 LvArray::tensorOps::scale< 3 >( edgeCenter, 0.5 );
415 template<
typename OUT_VECTOR >
418 OUT_VECTOR && edgeSegment )
const 420 LvArray::tensorOps::copy< 3 >( edgeSegment, X[m_toNodesRelation[edgeIndex][1]] );
421 LvArray::tensorOps::subtract< 3 >( edgeSegment, X[m_toNodesRelation[edgeIndex][0]] );
void compressRelationMaps()
Compress all nodes-to-faces relation maps so that the values of each array are contiguous with no ext...
array1d< localIndex > m_fractureConnectorsEdgesToEdges
todo
virtual void ExtractMapFromObjectForAssignGlobalIndexNumbers(ObjectManagerBase const *const nodeManager, std::vector< std::vector< globalIndex > > &globalEdgeNodes) override
Build globalEdgeNodes, a vector containing all the global indices of each nodes of each edges...
localIndex nodeList(localIndex const edgeIndex, localIndex const nodeIndex) const
Get a node list.
void FixUpDownMaps(bool const clearIfUnmapped)
Call FixUpDownMaps of the class ObjectManagerBase for nodes-to-edges and nodes-to-faces relation maps...
struct to serve as a container for group strings and keys
static localIndex faceMapExtraSpacePerEdge()
Oversize the Face mapping by this amount for each edge (hardcoded)
InterObjectRelation< array2d< localIndex > > FixedOneToManyRelation
A relationship from single objects to many other objects, where each object is related to the same nu...
FaceMapType & faceList()
Get the edge-to-face relation.
EdgeManager(std::string const &name, Group *const parent)
main constructor for EdgeManager Objects
The NodeManager class provides an interface to ObjectManagerBase in order to manage node data...
Base template for ordered and unordered maps.
void SplitEdge(const localIndex indexToSplit, const localIndex parentNodeIndex, const localIndex childNodeIndex[2], array1d< SortedArray< localIndex > > &nodesToEdges)
Split an edge (separate its two extremity nodes)
This class serves to provide a "view" of a multidimensional array.
virtual localIndex PackUpDownMaps(buffer_unit_type *&buffer, arrayView1d< localIndex const > const &packList) const override
Pack an array of edge indices in a buffer.
NodeMapType & nodeList()
Get a node list.
The ObjectManagerBase is the base object of all object managers in the mesh data hierachy.
void SetDomainBoundaryObjects(const ObjectDataStructureBaseT *const referenceObject=nullptr)
Set the node of the domain boundary object.
Group::wrapperMap::KeyIndex ViewKey
Type alias for KeyIndexT type used for wrapper lookups.
virtual groupKeyStruct & groupKeys()
Get the group keys for Group access.
This class provides a view into an array of arrays like object.
map< localIndex, localIndex > m_edgesToFractureConnectorsEdges
todo
ArrayOfArrays< localIndex > m_fractureConnectorEdgesToFaceElements
todo
virtual viewKeyStruct & viewKeys()
Get the view keys for Group access.
localIndex & nodeList(localIndex const edgeIndex, localIndex const nodeIndex)
Get a reference to a node list.
virtual localIndex UnpackUpDownMaps(buffer_unit_type const *&buffer, localIndex_array &packList, bool const overwriteUpMaps, bool const overwriteDownMaps) override
Unpack a buffer to an array of indices that has been packed.
signed char buffer_unit_type
Type stored in communication buffers.
virtual void resize(localIndex const newSize) override
Resize the EdgeManager object and all it members.
void depopulateUpMaps(std::set< localIndex > const &receivedEdges, ArrayOfArraysView< localIndex const > const &facesToEdges)
Clean up the edges-to-faces mapping with respect to a new list of edges.
This class provides an interface to ObjectManagerBase in order to manage edge data.
void calculateCenter(localIndex const edgeIndex, arrayView2d< real64 const, nodes::REFERENCE_POSITION_USD > const &X, OUT_VECTOR &&edgeCenter) const
Calculate the center of an edge given its index.
SortedArray< localIndex > m_recalculateFractureConnectorEdges
map from the edges to the fracture connectors index (edges that are fracture connectors) ...
virtual localIndex PackUpDownMapsSize(arrayView1d< localIndex const > const &packList) const override
Compute the future size of a packed list.
constexpr int maxEdgesPerNode() const
}@
std::ptrdiff_t localIndex
Local index type (for indexing objects within an MPI partition).
void calculateLength(localIndex const edgeIndex, arrayView2d< real64 const, nodes::REFERENCE_POSITION_USD > const &X, OUT_VECTOR &&edgeVector) const
Calculate the edge segment.
Container of keys needed to access the data of the class member.
bool hasNode(const localIndex edgeID, const localIndex nodeID) const
Check if edge edgeID contains node nodeID.
std::string string
String type.
void BuildEdges(FaceManager *const faceManager, NodeManager *const nodeManager)
Build faces-to-edges and nodes-to-edges relation maps.
void AddToEdgeToFaceMap(FaceManager const *const faceManager, arrayView1d< localIndex const > const &newFaceIndices)
Add new faces to the faces to edges map.
Container of keys needed to access the data of the class member.
The FaceManager class provides an interface to ObjectManagerBase in order to manage face data...
static const string CatalogName()
This class provides a fixed dimensional resizeable array interface in addition to an interface simila...
void ConnectivityFromGlobalToLocal(const SortedArray< localIndex > &indices, const map< globalIndex, localIndex > &nodeGlobalToLocal, const map< globalIndex, localIndex > &faceGlobalToLocal)
Build the mapping edge-to-nodes relation from the mapping global to local nodes.
struct to serve as a container for variable strings and keys
void SetIsExternal(FaceManager const *const faceManager)
Set external edges.
virtual const string getCatalogName() const override
Getter used to access the edge manager catalog name.
~EdgeManager() override
default destructor
FaceMapType const & faceList() const
Get an immutable accessor to the edge-to-face relation.
NodeMapType const & nodeList() const
Provide an accessor to an immutable node list.