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 Total, S.A
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 GEOSX_MESH_EMBEDDEDSURFACESUBREGION_HPP_
20 #define GEOSX_MESH_EMBEDDEDSURFACESUBREGION_HPP_
21 
23 #include "InterObjectRelation.hpp"
24 #include "ToElementRelation.hpp"
25 #include "EdgeManager.hpp"
26 #include "CellElementSubRegion.hpp"
28 
29 namespace geosx
30 {
31 
39 {
40 public:
41 
44 
48 
54  static const string CatalogName()
55  { return "EmbeddedSurfaceSubRegion"; }
56 
61  virtual const string getCatalogName() const override
62  {
64  }
65 
67 
71 
78  EmbeddedSurfaceSubRegion( string const & name,
79  dataRepository::Group * const parent );
80 
82  virtual ~EmbeddedSurfaceSubRegion() override;
83 
85 
89 
91  virtual void CalculateElementGeometricQuantities( NodeManager const & nodeManager,
92  FaceManager const & facemanager ) override;
93 
100  localIndex k );
101 
113  bool AddNewEmbeddedSurface( localIndex const cellIndex,
114  localIndex const regionIndex,
115  localIndex const subRegionIndex,
116  NodeManager & nodeManager,
117  EdgeManager const & edgeManager,
118  FixedOneToManyRelation const & cellToEdges,
119  BoundedPlane const * fracture );
120 
125  void inheritGhostRank( array1d< array1d< arrayView1d< integer const > > > const & cellGhostRank );
126 
134  localIndex const k ) const;
135 
136 
137 
139 
145  {
147  static constexpr auto normalVectorString = "normalVector";
148 
150  static constexpr auto t1VectorString = "tangentVector1";
151 
153  static constexpr auto t2VectorString = "tangentVector2";
154 
156  static constexpr auto connectivityIndexString = "connectivityIndex";
157  };
158 
159  virtual void setupRelatedObjectsInRelations( MeshLevel const * const mesh ) override;
160 
161  virtual string GetElementTypeString() const override final { return "Embedded"; }
162 
167 
173  localIndex & numOfJumpEnrichments() {return m_numOfJumpEnrichments;}
174 
179  localIndex const & numOfJumpEnrichments() const {return m_numOfJumpEnrichments;}
180 
185  array2d< real64 > & getNormalVector() { return m_normalVector; }
186 
190  arrayView2d< real64 const > getNormalVector() const { return m_normalVector; }
191 
197  arraySlice1d< real64 > getNormalVector( localIndex k ) { return m_normalVector[k]; }
198 
202  arraySlice1d< real64 const > getNormalVector( localIndex k ) const { return m_normalVector[k]; }
203 
208  array2d< real64 > & getTangentVector1() { return m_tangentVector1; }
209 
213  arrayView2d< real64 const > getTangentVector1() const { return m_tangentVector1; }
214 
220  arraySlice1d< real64 > getTangentVector1( localIndex k ) { return m_tangentVector1[k];}
221 
225  arraySlice1d< real64 const > getTangentVector1( localIndex k ) const { return m_tangentVector1[k]; }
226 
231  array2d< real64 > & getTangentVector2() { return m_tangentVector2; }
232 
236  arrayView2d< real64 const > getTangentVector2() const { return m_tangentVector2; }
237 
243  arraySlice1d< real64 > getTangentVector2( localIndex k ) { return m_tangentVector2[k];}
244 
248  arraySlice1d< real64 const > getTangentVector2( localIndex k ) const { return m_tangentVector2[k];}
249 
250 
255  array1d< real64 > & getConnectivityIndex() { return m_connectivityIndex;}
256 
260  array1d< real64 > const & getConnectivityIndex() const { return m_connectivityIndex;}
261 
263 
264 
265 private:
266 
268  array2d< real64 > m_normalVector;
269 
270  // tangential direction 1
271  array2d< real64 > m_tangentVector1;
272 
273  // tangential direction 2
274  array2d< real64 > m_tangentVector2;
275 
277  localIndex m_numOfJumpEnrichments;
278 
280  array1d< real64 > m_connectivityIndex;
281 };
282 
283 
284 } /* namespace geosx */
285 
286 #endif /* GEOSX_MESH_EMBEDDEDSURFACESUBREGION_HPP_ */
localIndex & numOfJumpEnrichments()
Get number of jump enrichments.
virtual string GetElementTypeString() const override final
Get the type of element in this subregion.
arraySlice1d< real64 > getTangentVector1(localIndex k)
Get the first tangent vector of a specific embedded surface element.
void inheritGhostRank(array1d< array1d< arrayView1d< integer const > > > const &cellGhostRank)
inherit ghost rank from cell elements.
array1d< real64 > & getConnectivityIndex()
Get the connectivity index of the embedded surface element.
InterObjectRelation< array2d< localIndex > > FixedOneToManyRelation
A relationship from single objects to many other objects, where each object is related to the same nu...
This class serves to provide a sliced multidimensional interface to the family of LvArray classes...
Definition: ArraySlice.hpp:89
Class facilitating the representation of a multi-level discretization of a MeshBody.
Definition: MeshLevel.hpp:38
The NodeManager class provides an interface to ObjectManagerBase in order to manage node data...
Definition: NodeManager.hpp:47
arrayView2d< real64 const > getTangentVector1() const
Get an array of the first tangent vector of the embedded surface elements.
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 ...
EmbeddedSurfaceSubRegion(string const &name, dataRepository::Group *const parent)
Constructor.
array2d< real64 > & getNormalVector()
Get normal vectors.
array1d< real64 > const & getConnectivityIndex() const
Get the connectivity index of the embedded surface element.
Class to represent a geometric box in GEOSX.
arrayView2d< real64 const > getTangentVector2() const
Get an array of the second tangent vector of the embedded surface elements.
This class serves to provide a "view" of a multidimensional array.
Definition: ArrayView.hpp:67
arraySlice1d< real64 > getTangentVector2(localIndex k)
Get the second tangent vector of a specific embedded surface element.
arraySlice1d< real64 > getNormalVector(localIndex k)
Get normal vector of a specific embedded surface element.
arraySlice1d< real64 const > getNormalVector(localIndex k) const
Get normal vector of a specific embedded surface element.
virtual void CalculateElementGeometricQuantities(NodeManager const &nodeManager, FaceManager const &facemanager) override
Calculate the geometric quantities for each element in the subregion.
static constexpr auto normalVectorString
Embedded surface element normal vector string.
double real64
64-bit floating point type.
Definition: DataTypes.hpp:136
arraySlice1d< real64 const > getTangentVector2(localIndex k) const
Get the second tangent vector of a specific embedded surface element.
Struct containing the keys to all embedded surface element views.
arraySlice1d< real64 const > getTangentVector1(localIndex k) const
Get the first tangent vector of a specific embedded surface element.
array2d< real64 > & getTangentVector1()
Get an array of the first tangent vector of the embedded surface elements.
virtual ~EmbeddedSurfaceSubRegion() override
Destructor.
static const string CatalogName()
Get catalog name.
virtual void setupRelatedObjectsInRelations(MeshLevel const *const mesh) override
Link the connectivity maps of the subregion to the managers storing the mesh information.
virtual const string getCatalogName() const override
Get catalog name.
static constexpr auto t2VectorString
Tangent vector 2 string.
static constexpr auto connectivityIndexString
Connectivity index string.
Struct containing the keys to all embedded surface element views.
This class provides an interface to ObjectManagerBase in order to manage edge data.
Definition: EdgeManager.hpp:42
std::ptrdiff_t localIndex
Local index type (for indexing objects within an MPI partition).
Definition: DataTypes.hpp:125
bool AddNewEmbeddedSurface(localIndex const cellIndex, localIndex const regionIndex, localIndex const subRegionIndex, NodeManager &nodeManager, EdgeManager const &edgeManager, FixedOneToManyRelation const &cellToEdges, BoundedPlane const *fracture)
Function to add a new embedded surface element.
localIndex const & numOfJumpEnrichments() const
Get number of jump enrichments.
The FaceManager class provides an interface to ObjectManagerBase in order to manage face data...
Definition: FaceManager.hpp:40
arrayView2d< real64 const > getNormalVector() const
Get normal vectors.
This class provides a fixed dimensional resizeable array interface in addition to an interface simila...
Definition: Array.hpp:55
static constexpr auto t1VectorString
Tangent vector 1 string.
array2d< real64 > & getTangentVector2()
Get an array of the second tangent vector of the embedded surface elements.