GEOSX
EmbeddedSurfaceSubRegion.hpp
Go to the documentation of this file.
1 /*
2  * ------------------------------------------------------------------------------------------------------------
3  * SPDX-License-Identifier: LGPL-2.1-only
4  *
5  * Copyright (c) 2018-2020 Lawrence Livermore National Security LLC
6  * Copyright (c) 2018-2020 The Board of Trustees of the Leland Stanford Junior University
7  * Copyright (c) 2018-2020 TotalEnergies
8  * Copyright (c) 2019- GEOSX Contributors
9  * All rights reserved
10  *
11  * See top level LICENSE, COPYRIGHT, CONTRIBUTORS, NOTICE, and ACKNOWLEDGEMENTS files for details.
12  * ------------------------------------------------------------------------------------------------------------
13  */
14 
19 #ifndef GEOS_MESH_EMBEDDEDSURFACESUBREGION_HPP_
20 #define GEOS_MESH_EMBEDDEDSURFACESUBREGION_HPP_
21 
23 #include "InterObjectRelation.hpp"
24 #include "ToElementRelation.hpp"
25 #include "EdgeManager.hpp"
27 #include "CellElementSubRegion.hpp"
28 //Do we really need this include Rectangle?
30 
31 namespace geos
32 {
33 
39 {
43  std::vector< globalIndex > parentEdgeIndex;
46 
51  surfaceIndex(),
53  numOfNodes( 0 ){}
58  void insert ( globalIndex const & edgeIndex );
59 };
60 
68 {
69 public:
70 
73 
78 
83  static string catalogName()
84  { return "EmbeddedSurfaceSubRegion"; }
85 
90  virtual string getCatalogName() const override
91  {
92  return catalogName();
93  }
94 
96 
101 
107  EmbeddedSurfaceSubRegion( string const & name,
108  dataRepository::Group * const parent );
109 
111 
116 
117  virtual void calculateElementGeometricQuantities( NodeManager const & nodeManager,
118  FaceManager const & facemanager ) override final;
119 
126  localIndex k );
139  bool addNewEmbeddedSurface( localIndex const cellIndex,
140  localIndex const regionIndex,
141  localIndex const subRegionIndex,
142  NodeManager const & nodeManager,
143  EmbeddedSurfaceNodeManager & embSurfNodeManager,
144  EdgeManager const & edgeManager,
145  FixedOneToManyRelation const & cellToEdges,
146  PlanarGeometricObject const * fracture );
147 
152  void inheritGhostRank( array1d< array1d< arrayView1d< integer const > > > const & cellGhostRank );
153 
161  localIndex const k ) const;
162 
163  virtual localIndex packUpDownMapsSize( arrayView1d< localIndex const > const & packList ) const override;
164 
166  arrayView1d< localIndex const > const & packList ) const override;
167 
168  virtual localIndex unpackUpDownMaps( buffer_unit_type const * & buffer,
169  array1d< localIndex > & packList,
170  bool const overwriteUpMaps,
171  bool const overwriteDownMaps ) override;
172 
174 
180  {
182  static constexpr char const * connectivityIndexString() { return "connectivityIndex"; }
183 
185  static constexpr char const * surfaceWithGhostNodesString() { return "surfaceWithGhostNodes"; }
186  }
189 
190  virtual void setupRelatedObjectsInRelations( MeshLevel const & mesh ) override;
191 
197 
202  localIndex & numOfJumpEnrichments() {return m_numOfJumpEnrichments;}
203 
208  localIndex const & numOfJumpEnrichments() const {return m_numOfJumpEnrichments;}
209 
215  string const & getFractureName( localIndex k ) const { return m_parentPlaneName[k]; }
216 
221  arrayView1d< real64 > getConnectivityIndex() { return m_connectivityIndex.toView();}
222 
226  arrayView1d< real64 const > getConnectivityIndex() const { return m_connectivityIndex;}
227 
232  std::vector< struct surfaceWithGhostNodes > surfaceWithGhostNodes() { return m_surfaceWithGhostNodes; }
233 
235 
236 private:
237 
245  template< bool DO_PACKING >
246  localIndex packUpDownMapsImpl( buffer_unit_type * & buffer,
247  arrayView1d< localIndex const > const & packList ) const;
248 
250  localIndex m_numOfJumpEnrichments;
251 
253  array1d< real64 > m_connectivityIndex;
254 
255  // Indices of geometric objects the element belongs to
256  array1d< string > m_parentPlaneName;
257 
259  std::vector< struct surfaceWithGhostNodes > m_surfaceWithGhostNodes;
260 };
261 
262 
263 } /* namespace geos */
264 
265 #endif /* GEOS_MESH_EMBEDDEDSURFACESUBREGION_HPP_ */
This class provides an interface to ObjectManagerBase in order to manage edge data.
Definition: EdgeManager.hpp:42
The EmbeddedSurfaceNodeManager class provides an interface to ObjectManagerBase in order to manage no...
virtual localIndex packUpDownMaps(buffer_unit_type *&buffer, arrayView1d< localIndex const > const &packList) const override
Packs the specific elements in the @ packList.
virtual void setupRelatedObjectsInRelations(MeshLevel const &mesh) override
Link the connectivity maps of the subregion to the managers storing the mesh information.
virtual void calculateElementGeometricQuantities(NodeManager const &nodeManager, FaceManager const &facemanager) override final
Calculate the geometric quantities for each element in the subregion.
virtual localIndex packUpDownMapsSize(arrayView1d< localIndex const > const &packList) const override
Computes the pack size of the specific elements in the @ packList.
real64 computeHeavisideFunction(ArraySlice< real64 const, 1, nodes::REFERENCE_POSITION_USD - 1 > const nodeCoord, localIndex const k) const
Given the coordinates of a node, it computes the Heaviside function iside a cut element with respect ...
std::vector< struct surfaceWithGhostNodes > surfaceWithGhostNodes()
accessor to the m_surfaceWithGhostNodes list
void inheritGhostRank(array1d< array1d< arrayView1d< integer const > > > const &cellGhostRank)
inherit ghost rank from cell elements.
arrayView1d< real64 > getConnectivityIndex()
Get the connectivity index of the embedded surface element.
virtual string getCatalogName() const override
Get catalog name.
arrayView1d< real64 const > getConnectivityIndex() const
Get the connectivity index of the embedded surface element.
localIndex & numOfJumpEnrichments()
Get number of jump enrichments.
geos::EmbeddedSurfaceSubRegion::viewKeyStruct viewKeys
viewKey struct for the EmbeddedSurfaceSubRegion class
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.
void calculateElementGeometricQuantities(arrayView2d< real64 const > const intersectionPoints, localIndex k)
Function to compute the geometric quantities of a specific embedded surface element.
string const & getFractureName(localIndex k) const
Get the name of the bounding plate that was used to generate fracture element k.
localIndex const & numOfJumpEnrichments() const
Get number of jump enrichments.
EmbeddedSurfaceSubRegion(string const &name, dataRepository::Group *const parent)
Constructor.
bool addNewEmbeddedSurface(localIndex const cellIndex, localIndex const regionIndex, localIndex const subRegionIndex, NodeManager const &nodeManager, EmbeddedSurfaceNodeManager &embSurfNodeManager, EdgeManager const &edgeManager, FixedOneToManyRelation const &cellToEdges, PlanarGeometricObject const *fracture)
Function to add a new embedded surface element.
static string catalogName()
Get catalog name.
The FaceManager class provides an interface to ObjectManagerBase in order to manage face data.
Definition: FaceManager.hpp:43
Class facilitating the representation of a multi-level discretization of a MeshBody.
Definition: MeshLevel.hpp:41
The NodeManager class provides an interface to ObjectManagerBase in order to manage node data.
Definition: NodeManager.hpp:45
Abstract class to implement functions used by all bounded geometric objects in GEOSX,...
ArrayView< T, 1 > arrayView1d
Alias for 1D array view.
Definition: DataTypes.hpp:220
double real64
64-bit floating point type.
Definition: DataTypes.hpp:139
InterObjectRelation< array2d< localIndex > > FixedOneToManyRelation
A relationship from single objects to many other objects, where each object is related to the same nu...
GEOSX_GLOBALINDEX_TYPE globalIndex
Global index type (for indexing objects across MPI partitions).
Definition: DataTypes.hpp:128
LvArray::ArraySlice< T, NDIM, USD, localIndex > ArraySlice
Multidimensional array slice type. See LvArray:ArraySlice for details.
Definition: DataTypes.hpp:192
signed char buffer_unit_type
Type stored in communication buffers.
Definition: DataTypes.hpp:149
ArrayView< T, 2, USD > arrayView2d
Alias for 2D array view.
Definition: DataTypes.hpp:236
GEOSX_LOCALINDEX_TYPE localIndex
Local index type (for indexing objects within an MPI partition).
Definition: DataTypes.hpp:125
Array< T, 1 > array1d
Alias for 1D array.
Definition: DataTypes.hpp:216
Struct containing the keys to all embedded surface element views.
static constexpr char const * surfaceWithGhostNodesString()
Struct containing the keys to all surface element views.
Struct defining an embedded element which has at least on node which is a ghost on this rank.
localIndex numOfNodes
number of nodes of the element
std::vector< globalIndex > parentEdgeIndex
index of the parent edge of each node
void insert(globalIndex const &edgeIndex)
insert a new node
localIndex surfaceIndex
local index of the surface element