20 #ifndef GEOS_MESH_FACEMANAGER_HPP_
21 #define GEOS_MESH_FACEMANAGER_HPP_
23 #include "mesh/generators/CellBlockManagerABC.hpp"
32 class ElementRegionManager;
33 class CellElementSubRegion;
66 {
return "FaceManager"; }
125 NodeManager const & nodeManager,
bool isBaseMeshLevel );
216 bool const overwriteUpMaps,
217 bool const overwriteDownMaps )
override;
273 static constexpr
char const * nodeListString() {
return "nodeList"; }
274 static constexpr
char const * edgeListString() {
return "edgeList"; }
275 static constexpr
char const * elementRegionListString() {
return "elemRegionList"; }
276 static constexpr
char const * elementSubRegionListString() {
return "elemSubRegionList"; }
277 static constexpr
char const * elementListString() {
return "elemList"; }
278 constexpr
static char const * faceAreaString() {
return "faceArea"; }
279 constexpr
static char const * faceCenterString() {
return "faceCenter"; }
280 constexpr
static char const * faceNormalString() {
return "faceNormal"; }
453 template<
bool DO_PACKING >
481 constexpr
static int MAX_FACE_NODES = 16;
Abstract base class for CellBlockManager.
static constexpr localIndex edgeMapExtraSpacePerFace()
Extra space for extra faces.
static constexpr localIndex nodeMapExtraSpacePerFace()
Extra space for extra nodes.
This class provides an interface to ObjectManagerBase in order to manage edge data.
The ElementRegionManager class provides an interface to ObjectManagerBase in order to manage ElementR...
The FaceManager class provides an interface to ObjectManagerBase in order to manage face data.
FixedToManyElementRelation ElemMapType
FaceToElement map type.
static constexpr localIndex nodeMapOverallocation()
Get the default number of node per face in node list.
void sortAllFaceNodes(NodeManager const &nodeManager, ElementRegionManager const &elemManager)
Sort all faces nodes counterclockwisely in m_toNodesRelation.
array2d< localIndex > & elementRegionList()
Get a mutable accessor to the faces-to-ElementRegion relation.
array2d< real64 > & faceNormal()
Get a mutable accessor to an array containing all the face normals.
InterObjectRelation< ArrayOfArrays< localIndex > > EdgeMapType
FaceToEdge map type.
arrayView2d< real64 const > faceCenter() const
Get an immutable accessor to an array containing all the face centers.
array1d< real64 > & faceArea()
Get a mutable accessor to an array containing all the face area.
virtual localIndex packUpDownMaps(buffer_unit_type *&buffer, arrayView1d< localIndex const > const &packList) const override
Pack an array of node indices into a buffer.
array2d< real64 > & faceCenter()
Get a mutable accessor to an array containing all the face center.
static string catalogName()
Return the name of the FaceManager in the object catalog.
array2d< localIndex > & elementList()
Get a mutable accessor to the faces-to-element-index relation.
void setupRelatedObjectsInRelations(NodeManager const &nodeManager, EdgeManager const &edgeManager, ElementRegionManager const &elemRegionManager)
Link the current manager to other managers.
NodeMapType & nodeList()
Get a mutable accessor to a map containing the list of each nodes for each faces.
void setGeometricalRelations(CellBlockManagerABC const &cellBlockManager, ElementRegionManager const &elemRegionManager, NodeManager const &nodeManager, bool isBaseMeshLevel)
Copies the nodes positions and the faces to (nodes|edges|elements) mappings from cellBlockManager....
NodeMapType const & nodeList() const
Get an immutable accessor to a map containing the list of each nodes for each faces.
arrayView2d< localIndex const > elementRegionList() const
Get an immutable accessor to the faces-to-ElementRegion relation.
void compressRelationMaps()
Compress FaceManager face-to-node and face-to-edge containers so that the values of each array are co...
virtual localIndex packUpDownMapsSize(arrayView1d< localIndex const > const &packList) const override
Calculate the size that a list would have if it were packed, but without actually packing it.
ElemMapType const & toElementRelation() const
Get an immutable accessor to the faces-to-element-index relation.
array2d< localIndex > & elementSubRegionList()
Get a mutable accessor to the faces-to-ElementSubRegion relation.
arrayView2d< localIndex const > elementSubRegionList() const
Get an immutable accessor to the faces-to-ElementSubRegion relation.
virtual string getCatalogName() const override
Provide a virtual access to catalogName().
InterObjectRelation< ArrayOfArrays< localIndex > > NodeMapType
FaceToNode map type.
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 node indices.
virtual void enforceStateFieldConsistencyPostTopologyChange(std::set< localIndex > const &targetIndices) override
Enforce child faces and parent faces to have opposite normals.
static constexpr localIndex edgeMapOverallocation()
Get the default number of edge per face in edge list.
void setDomainBoundaryObjects(ElementRegionManager const &elemRegionManager)
Builds the face-on-domain-boundary indicator.
void buildSets(NodeManager const &nodeManager)
Build sets from the node sets.
virtual void resize(localIndex const newsize) override
Extend base class resize method resizing m_toNodesRelation, m_toEdgesRelation member containers.
geos::FaceManager::viewKeyStruct viewKeys
viewKeys
ElemMapType & toElementRelation()
Get a mutable accessor to the faces-to-element-index relation.
void depopulateUpMaps(std::set< localIndex > const &receivedFaces, ElementRegionManager const &elemRegionManager)
Clean up the mappings from faces to element index, region, subregion on a new (updated) list of faces...
static void sortFaceNodes(arrayView2d< real64 const, nodes::REFERENCE_POSITION_USD > const &X, arraySlice1d< real64 const > const elementCenter, Span< localIndex > const faceNodes)
Reorder face nodes to be labeled counter-clockwise resulting in outgoing normal.
FaceManager(string const &name, Group *const parent)
Main Constructor for FaceManager.
arrayView2d< localIndex const > elementList() const
Get an imutable accessor to the faces-to-element-index relation.
void computeGeometry(NodeManager const &nodeManager)
Compute faces center, area and normal.
void setIsExternal()
Flag faces on boundary or external to the DomainPartition.
virtual ArrayOfSets< globalIndex > extractMapFromObjectForAssignGlobalIndexNumbers(ObjectManagerBase const &nodeManager) override
Extract a face-to-nodes map with global indexed for boundary faces.
arrayView2d< real64 const > faceNormal() const
Get an immutable accessor to an array containing all the face normals.
void fixUpDownMaps(bool const clearIfUnmapped)
Call fixUpDownMaps for nodes-to-edges and nodes-to-faces maps.
arrayView1d< real64 const > faceArea() const
Get an immutable accessor to an array containing all the face area.
EdgeMapType & edgeList()
Get a mutable accessor to a map containing the list of each edges for each faces.
EdgeMapType const & edgeList() const
Get an immutable accessor to a map containing the list of each edges for each faces.
constexpr static int maxFaceNodes()
}@
The NodeManager class provides an interface to ObjectManagerBase in order to manage node data.
The ObjectManagerBase is the base object of all object managers in the mesh data hierachy.
Lightweight non-owning wrapper over a contiguous range of elements.
A relationship to an element.
BASETYPE m_toElementIndex
The relationship between object indices and element indices.
BASETYPE m_toElementSubRegion
The relationship between object indices and element subregions.
BASETYPE m_toElementRegion
The relationship between object indices and element regions.
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.
Array< T, 2, PERMUTATION > array2d
Alias for 2D array.
ToElementRelation< array2d< localIndex > > FixedToManyElementRelation
A ToElementRelation where each object is related to the same number of elements.
GEOS_LOCALINDEX_TYPE localIndex
Local index type (for indexing objects within an MPI partition).
ArraySlice< T, 1, USD > arraySlice1d
Alias for 1D array slice.
LvArray::ArrayOfSets< T, INDEX_TYPE, LvArray::ChaiBuffer > ArrayOfSets
Array of variable-sized sets. See LvArray::ArrayOfSets for details.
signed char buffer_unit_type
Type stored in communication buffers.
ArrayView< T, 2, USD > arrayView2d
Alias for 2D array view.
Array< T, 1 > array1d
Alias for 1D array.
struct to serve as a container for variable strings and keys