17 #ifndef GEOS_MESH_CELLELEMENTSUBREGION_HPP_
18 #define GEOS_MESH_CELLELEMENTSUBREGION_HPP_
20 #include "mesh/generators/CellBlockABC.hpp"
55 {
return "CellElementSubRegion"; }
115 bool const overwriteUpMaps,
116 bool const overwriteDownMaps )
override;
163 template<
typename LAMBDA >
167 for(
auto & constitutiveGroup : m_constitutiveGrouping )
169 lambda( constitutiveGroup );
184 static constexpr
char const *
dNdXString() {
return "dNdX"; }
186 static constexpr
char const *
detJString() {
return "detJ"; }
305 {
return m_fracturedCells; }
311 {
return m_fracturedCells.toViewConst(); }
328 { m_bubbleCells = bubbleCells; }
334 {
return m_bubbleCells.toViewConst(); }
341 { m_toFaceElements = faceElemsList; }
347 {
return m_toFaceElements.toViewConst(); }
386 void calculateCellVolumesKernel(
localIndex const k,
389 void calculateElementCenterAndVolume(
localIndex const k,
428 template<
bool DO_PACKING >
438 void setupRelatedObjectsInRelations(
MeshLevel const & mesh )
override;
440 template<
bool DO_PACKING >
arrayView2d< real64 const > detJ() const
void setFaceElementsList(arrayView2d< localIndex const > const faceElemsList)
Set the array of neighboring face elements.
CellElementSubRegion(string const &name, Group *const parent)
Constructor for this class.
NodeMapType const & nodeList() const
Get the element-to-node map.
void addFracturedElement(localIndex const cellElemIndex, localIndex const embSurfIndex)
Add fractured element to list and relative entries to the map.
EmbSurfMapType const & embeddedSurfacesList() const
virtual localIndex packUpDownMapsSize(arrayView1d< localIndex const > const &packList) const override
Computes the pack size of the specific elements in the @ packList.
localIndex const & nodeList(localIndex k, localIndex a) const
Get the local index of the a-th node of the k-th element.
void calculateElementGeometricQuantities(NodeManager const &nodeManager, FaceManager const &faceManager) override
Calculate the geometric quantities for each element in the subregion.
SortedArrayView< localIndex const > const fracturedElementsList() const
FixedOneToManyRelation & faceList()
Get the element-to-face map.
localIndex faceList(localIndex k, localIndex a) const
Get the local index of the a-th face of the k-th element.
FixedOneToManyRelation & edgeList()
Get the element-to-edge map.
void setBubbleElementsList(arrayView1d< localIndex const > const bubbleCells)
Set the array of bubble elements.
array2d< real64 > & detJ()
NodeMapType & nodeList()
Get the element-to-node map.
EmbSurfMapType & embeddedSurfacesList()
localIndex packFracturedElements(buffer_unit_type *&buffer, arrayView1d< localIndex const > const &packList, arrayView1d< globalIndex const > const &embeddedSurfacesLocalToGlobal) const
Packs the set of fractured elements and the element-to-embeddedSurfaces map of the elements in the @ ...
virtual void fixUpDownMaps(bool const clearIfUnmapped) final override
Call ObjectManagerBase::fixUpDownMaps for the connectivity maps needed by the derived class (i....
localIndex getFaceNodes(localIndex const elementIndex, localIndex const localFaceIndex, Span< localIndex > const nodeIndices) const
Get the local indices of the nodes in a face of the element.
arrayView2d< localIndex const > const faceElementsList() const
virtual localIndex packUpDownMaps(buffer_unit_type *&buffer, arrayView1d< localIndex const > const &packList) const override
Packs the specific elements in the @ packList.
SortedArray< localIndex > & fracturedElementsList()
localIndex & nodeList(localIndex k, localIndex a)
Get the local index of the a-th node of the k-th element.
arrayView1d< localIndex const > const bubbleElementsList() const
arrayView4d< real64 const > dNdX() const
array4d< real64 > & dNdX()
virtual string getCatalogName() const override final
Const getter for the catalog name.
FixedOneToManyRelation const & faceList() const
Get the element-to-face map.
void calculateElementCenters(arrayView2d< real64 const, nodes::REFERENCE_POSITION_USD > const &X) const
Compute the center of each element in the subregion.
void forMaterials(LAMBDA lambda)
Helper function to apply a lambda function over all constructive groups.
static string catalogName()
Const getter for the catalog name.
virtual void resizePerElementValues(localIndex const numNodesPerElement, localIndex const numEdgesPerElement, localIndex const numFacesPerElement) override
Set all "perElement" values for this subregion.
geos::CellElementSubRegion::viewKeyStruct m_CellBlockSubRegionViewKeys
viewKey struct for the CellElementSubRegion class
localIndex packFracturedElementsSize(arrayView1d< localIndex const > const &packList, arrayView1d< globalIndex const > const &embeddedSurfacesLocalToGlobal) const
Computes the pack size of the set of fractured elements and the element-to-embeddedSurfaces map of th...
virtual viewKeyStruct & viewKeys() override
Get the view keys for Group access.
void copyFromCellBlock(CellBlockABC const &cellBlock)
Fill the CellElementSubRegion by copying those of the source CellBlock.
virtual localIndex unpackUpDownMaps(buffer_unit_type const *&buffer, array1d< localIndex > &packList, bool const overwriteUpMaps, bool const overwriteDownMaps) override
Unpacks the specific elements in the @ packList.
virtual viewKeyStruct const & viewKeys() const override
Get the view keys for Group access, const version.
FixedOneToManyRelation const & edgeList() const
Get the element-to-edge map.
localIndex unpackFracturedElements(buffer_unit_type const *&buffer, localIndex_array &packList, unordered_map< globalIndex, localIndex > const &embeddedSurfacesGlobalToLocal)
Unpacks the set of fractured elemetn and the element-to-embeddedSurfaces map from buffer.
localIndex const & numEdgesPerElement() const
Gets the number of edges per element.
localIndex const & numFacesPerElement() const
Get the number of faces per element.
localIndex const & numNodesPerElement() const
Get the number of nodes per element.
void calculateElementCenters(NODE_MAP const &toNodesRelation, arrayView2d< real64 const, nodes::REFERENCE_POSITION_USD > const &X) const
Compute the center of each element in the subregion.
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.
Lightweight non-owning wrapper over a contiguous range of elements.
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.
Array< T, 3, PERMUTATION > array3d
Alias for 3D array.
array1d< string > string_array
A 1-dimensional array of geos::string types.
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.
Array< T, 4, PERMUTATION > array4d
Alias for 4D array.
LvArray::SortedArrayView< T, localIndex, LvArray::ChaiBuffer > SortedArrayView
A sorted array view of local indices.
ArrayView< T, 4, USD > arrayView4d
Alias for 4D array view.
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
static constexpr char const * toFaceElementsString()
dataRepository::ViewKey constitutiveMap
ViewKey for the constitutive map.
static constexpr char const * bubbleCellsString()
static constexpr char const * dNdXString()
static constexpr char const * constitutiveMapString()
static constexpr char const * constitutiveGroupingString()
static constexpr char const * constitutivePointVolumeFractionString()
dataRepository::ViewKey constitutiveGrouping
ViewKey for the constitutive grouping.
static constexpr char const * detJString()
static constexpr char const * fracturedCellsString()
static constexpr char const * toEmbSurfString()
A struct to serve as a container for variable strings and keys.