GEOSX
FaceElementSubRegion.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_FACEELEMENTSUBREGION_HPP_
20 #define GEOSX_MESH_FACEELEMENTSUBREGION_HPP_
21 
23 
24 namespace geosx
25 {
26 
36 {
37 public:
38 
41 
45 
51  static const string CatalogName()
52  { return "FaceElementSubRegion"; }
53 
58  virtual const string getCatalogName() const override
59  {
61  }
62 
64 
68 
75  FaceElementSubRegion( string const & name,
76  dataRepository::Group * const parent );
77 
78 
80  virtual ~FaceElementSubRegion() override;
81 
83 
87 
89  virtual void CalculateElementGeometricQuantities( NodeManager const & nodeManager,
90  FaceManager const & faceManager ) override;
97  arrayView1d< real64 const > const & faceArea );
98 
99  virtual localIndex PackUpDownMapsSize( arrayView1d< localIndex const > const & packList ) const override;
100 
101  virtual localIndex PackUpDownMaps( buffer_unit_type * & buffer,
102  arrayView1d< localIndex const > const & packList ) const override;
103 
104  virtual localIndex UnpackUpDownMaps( buffer_unit_type const * & buffer,
105  array1d< localIndex > & packList,
106  bool const overwriteUpMaps,
107  bool const overwriteDownMaps ) override;
108 
109  virtual void FixUpDownMaps( bool const clearIfUnmapped ) override;
110 
111  virtual void ViewPackingExclusionList( SortedArray< localIndex > & exclusionList ) const override;
112 
114 
120  void inheritGhostRankFromParentFace( FaceManager const * const faceManager,
121  std::set< localIndex > const & indices );
122 
128  {
130  static constexpr auto dNdXString = "dNdX";
131 
133  static constexpr auto detJString = "detJ";
134 
135 #if GEOSX_USE_SEPARATION_COEFFICIENT
136 
138  constexpr static auto separationCoeffString = "separationCoeff";
139 
141  constexpr static auto dSeparationCoeffdAperString = "dSeparationCoeffdAper";
142 #endif
143 
144  };
145 
146  virtual void setupRelatedObjectsInRelations( MeshLevel const * const mesh ) override;
147 
148 
153 
159  FaceMapType const & faceList() const
160  {
161  return m_toFacesRelation;
162  }
163 
168  {
169  return m_toFacesRelation;
170  }
172 
173 
178 
184  //virtual localIndex numNodesPerElement( localIndex const k ) const override { return m_toNodesRelation[k].size(); }
185 
186 #ifdef GEOSX_USE_SEPARATION_COEFFICIENT
187 
191  arrayView1d< real64 > getSeparationCoefficient() { return m_separationCoefficient; }
195  arrayView1d< real64 const > getSeparationCoefficient() const { return m_separationCoefficient; }
196 #endif
197 
199 
202 
205 
208 
211 
216  { return m_dNdX; }
217 
222  { return m_dNdX.toViewConst(); }
223 
228  { return m_detJ; }
229 
234  { return m_detJ; }
235 
236 private:
237 
245  template< bool DOPACK >
246  localIndex PackUpDownMapsPrivate( buffer_unit_type * & buffer,
247  arrayView1d< localIndex const > const & packList ) const;
248 
250  array4d< real64 > m_dNdX;
251 
253  array2d< real64 > m_detJ;
254 
256  FaceMapType m_toFacesRelation;
257 
258 #ifdef GEOSX_USE_SEPARATION_COEFFICIENT
259  array1d< real64 > m_separationCoefficient;
261 #endif
262 
263 };
264 
265 } /* namespace geosx */
266 
267 #endif /* GEOSX_MESH_FACEELEMENTSUBREGION_HPP_ */
virtual void setupRelatedObjectsInRelations(MeshLevel const *const mesh) override
Link the connectivity maps of the subregion to the managers storing the mesh information.
void inheritGhostRankFromParentFace(FaceManager const *const faceManager, std::set< localIndex > const &indices)
Function to set the ghostRank for a list of FaceElements and set them to the value of their bounding ...
SortedArray< localIndex > m_newFaceElements
List of the new face elements that have been generated.
Class facilitating the representation of a multi-level discretization of a MeshBody.
Definition: MeshLevel.hpp:38
virtual localIndex PackUpDownMapsSize(arrayView1d< localIndex const > const &packList) const override
Computes the pack size of the specific elements in the @ packList.
FaceMapType const & faceList() const
Get the face element to faces map.
The NodeManager class provides an interface to ObjectManagerBase in order to manage node data...
Definition: NodeManager.hpp:47
Base template for ordered and unordered maps.
Definition: DataTypes.hpp:349
virtual localIndex PackUpDownMaps(buffer_unit_type *&buffer, arrayView1d< localIndex const > const &packList) const override
Packs the specific elements in the @ packList.
virtual void CalculateElementGeometricQuantities(NodeManager const &nodeManager, FaceManager const &faceManager) override
Calculate the geometric quantities for each element in the subregion.
This class serves to provide a "view" of a multidimensional array.
Definition: ArrayView.hpp:67
virtual const string getCatalogName() const override
Get catalog name.
Struct containing the keys to all face element views.
virtual void FixUpDownMaps(bool const clearIfUnmapped) override
Call ObjectManagerBase::FixUpDownMaps for the connectivity maps needed by the derived class (i...
Struct containing the keys to all embedded surface element views.
virtual void ViewPackingExclusionList(SortedArray< localIndex > &exclusionList) const override
Inserts in exclusionList the data that shall not be packed.
map< localIndex, array1d< globalIndex > > m_unmappedGlobalIndicesInToEdges
Unmapped face elements to edges map.
signed char buffer_unit_type
Type stored in communication buffers.
Definition: DataTypes.hpp:146
map< localIndex, array1d< globalIndex > > m_unmappedGlobalIndicesInToNodes
Get the number of nodes per face element.
static constexpr auto detJString
String key for the derivative of the jacobian.
virtual ~FaceElementSubRegion() override
Destructor.
std::ptrdiff_t localIndex
Local index type (for indexing objects within an MPI partition).
Definition: DataTypes.hpp:125
static const string CatalogName()
Get catalog name.
The FaceManager class provides an interface to ObjectManagerBase in order to manage face data...
Definition: FaceManager.hpp:40
arrayView2d< real64 const > detJ() const
This class provides a fixed dimensional resizeable array interface in addition to an interface simila...
Definition: Array.hpp:55
FaceElementSubRegion(string const &name, dataRepository::Group *const parent)
Constructor.
arrayView4d< real64 const > dNdX() const
FaceMapType & faceList()
Get the face element to faces map.
static constexpr auto dNdXString
String key for the derivatives of the shape functions with respect to the reference configuration...
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.
map< localIndex, array1d< globalIndex > > m_unmappedGlobalIndicesInToFaces
Unmapped face elements to faces map.