16 #ifndef GEOS_MESH_CELLELEMENTSUBREGION_HPP_
17 #define GEOS_MESH_CELLELEMENTSUBREGION_HPP_
19 #include "mesh/generators/CellBlockABC.hpp"
54 {
return "CellElementSubRegion"; }
114 bool const overwriteUpMaps,
115 bool const overwriteDownMaps )
override;
162 template<
typename LAMBDA >
166 for(
auto & constitutiveGroup : m_constitutiveGrouping )
168 lambda( constitutiveGroup );
183 static constexpr
char const *
dNdXString() {
return "dNdX"; }
185 static constexpr
char const *
detJString() {
return "detJ"; }
300 {
return m_fracturedCells; }
306 {
return m_fracturedCells.toViewConst(); }
355 void calculateCellVolumesKernel(
localIndex const k,
358 void calculateElementCenterAndVolume(
localIndex const k,
389 template<
bool DO_PACKING >
399 void setupRelatedObjectsInRelations(
MeshLevel const & mesh )
override;
401 template<
bool DO_PACKING >
arrayView2d< real64 const > detJ() const
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.
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.
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.
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.
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.
GEOSX_LOCALINDEX_TYPE localIndex
Local index type (for indexing objects within an MPI partition).
Array< T, 1 > array1d
Alias for 1D array.
struct to serve as a container for variable strings and keys
dataRepository::ViewKey constitutiveMap
ViewKey for the constitutive map.
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.