GEOS
EmbeddedSurfaceGenerator.hpp
Go to the documentation of this file.
1 /*
2  * ------------------------------------------------------------------------------------------------------------
3  * SPDX-License-Identifier: LGPL-2.1-only
4  *
5  * Copyright (c) 2016-2024 Lawrence Livermore National Security LLC
6  * Copyright (c) 2018-2024 Total, S.A
7  * Copyright (c) 2018-2024 The Board of Trustees of the Leland Stanford Junior University
8  * Copyright (c) 2023-2024 Chevron
9  * Copyright (c) 2019- GEOS/GEOSX Contributors
10  * All rights reserved
11  *
12  * See top level LICENSE, COPYRIGHT, CONTRIBUTORS, NOTICE, and ACKNOWLEDGEMENTS files for details.
13  * ------------------------------------------------------------------------------------------------------------
14  */
15 
20 #ifndef GEOS_PHYSICSSOLVERS_SURFACEGENERATION_EMBEDDEDSURFACEGENERATOR_HPP_
21 #define GEOS_PHYSICSSOLVERS_SURFACEGENERATION_EMBEDDEDSURFACEGENERATOR_HPP_
22 
23 #include "mesh/mpiCommunications/NeighborCommunicator.hpp"
25 #include "mesh/DomainPartition.hpp"
26 
27 
28 namespace geos
29 {
30 
32 {
33  std::set< localIndex > newNodes;
34  std::set< localIndex > newEdges;
35  map< std::pair< localIndex, localIndex >, std::set< localIndex > > newElements;
36 
37  void insert( NewObjectLists const & lists );
38 };
39 
40 
41 class SpatialPartition;
42 
43 class NodeManager;
44 class FaceManager;
46 class ElementRegionBase;
47 
55 {
56 public:
57  EmbeddedSurfaceGenerator( const string & name,
58  Group * const parent );
59  ~EmbeddedSurfaceGenerator() override;
60 
61 
62  static string catalogName() { return "EmbeddedSurfaceGenerator"; }
66  string getCatalogName() const override { return catalogName(); }
67 
68  virtual void registerDataOnMesh( Group & MeshBody ) override final;
69 
70  virtual bool execute( real64 const time_n,
71  real64 const dt,
72  integer const cycleNumber,
73  integer const GEOS_UNUSED_PARAM( eventCounter ),
74  real64 const GEOS_UNUSED_PARAM( eventProgress ),
75  DomainPartition & domain ) override
76  {
77  solverStep( time_n, dt, cycleNumber, domain );
78  return false;
79  }
80 
89  virtual real64 solverStep( real64 const & time_n,
90  real64 const & dt,
91  integer const cycleNumber,
92  DomainPartition & domain ) override;
93 
96 protected:
97 
98  virtual void initializePostSubGroups() override final;
99 
100  virtual void initializePostInitialConditionsPreSubGroups() override final;
101 
102  virtual void postRestartInitialization() override final
103  {
104  GEOS_ERROR( "Restarting is not supported for cases involving EmbeddedSurfaceGenerator" );
105  }
106 
107 private:
108 
109  void addToFractureStencil( DomainPartition & domain );
110 
111  void setGlobalIndices( ElementRegionManager & elemManager,
112  EmbeddedSurfaceNodeManager & embSurfNodeManager,
113  EmbeddedSurfaceSubRegion & embeddedSurfaceSubregion );
114 
115  void addEmbeddedElementsToSets( ElementRegionManager const & elemManager,
116  EmbeddedSurfaceSubRegion & embeddedSurfaceSubregion );
117 
121  struct viewKeyStruct : PhysicsSolverBase::viewKeyStruct
122  {
123  constexpr static char const * solidMaterialNameString() {return "solidMaterialNames"; }
124  constexpr static char const * fractureRegionNameString() {return "fractureRegion"; }
125  constexpr static char const * targetObjectsNameString() {return "targetObjects"; }
126  constexpr static char const * mpiCommOrderString() { return "mpiCommOrder"; }
127 
128  //TODO: rock toughness should be a material parameter, and we need to make rock toughness to KIC a constitutive
129  // relation.
130  constexpr static char const * rockToughnessString() {return "rockToughness"; }
131  };
132 
133  // fracture region name
134  string m_fractureRegionName;
135  // target geometric objects to turn into fractures
136  array1d< string > m_targetObjectsName;
137  // Flag for consistent communication ordering
138  int m_mpiCommOrder;
139 };
140 
141 } /* namespace geos */
142 
143 #endif /* GEOS_PHYSICSSOLVERS_SURFACEGENERATION_EMBEDDEDSURFACEGENERATOR_HPP_ */
#define GEOS_UNUSED_PARAM(X)
Mark an unused argument and silence compiler warnings.
Definition: GeosxMacros.hpp:72
#define GEOS_ERROR(msg)
Raise a hard error and terminate the program.
Definition: Logger.hpp:157
Partition of the decomposed physical domain. It also manages the connexion information to its neighbo...
The ElementRegionBase is the base class to manage the data stored at the element level.
The ElementRegionManager class provides an interface to ObjectManagerBase in order to manage ElementR...
virtual void postRestartInitialization() override final
Performs initialization required after reading from a restart file.
virtual void initializePostInitialConditionsPreSubGroups() override final
Called by InitializePostInitialConditions() prior to initializing sub-Groups.
virtual void initializePostSubGroups() override final
Called by Initialize() after to initializing sub-Groups.
virtual void registerDataOnMesh(Group &MeshBody) override final
Register wrappers that contain data on the mesh objects.
virtual real64 solverStep(real64 const &time_n, real64 const &dt, integer const cycleNumber, DomainPartition &domain) override
xxx
The EmbeddedSurfaceNodeManager class provides an interface to ObjectManagerBase in order to manage no...
The FaceManager class provides an interface to ObjectManagerBase in order to manage face data.
Definition: FaceManager.hpp:44
The class is used to manage mesh body.
Definition: MeshBody.hpp:36
The NodeManager class provides an interface to ObjectManagerBase in order to manage node data.
Definition: NodeManager.hpp:46
Base class for all physics solvers.
Base template for ordered and unordered maps.
Definition: DataTypes.hpp:329
double real64
64-bit floating point type.
Definition: DataTypes.hpp:99
std::int32_t integer
Signed integer type.
Definition: DataTypes.hpp:82
Structure to hold scoped key names.