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 TotalEnergies
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 
31 class SpatialPartition;
32 class NodeManager;
33 class FaceManager;
34 class ElementRegionManager;
35 class ElementRegionBase;
36 
44 {
45 public:
46  EmbeddedSurfaceGenerator( const string & name,
47  Group * const parent );
48  ~EmbeddedSurfaceGenerator() override;
49 
50 
51  static string catalogName() { return "EmbeddedSurfaceGenerator"; }
55  string getCatalogName() const override { return catalogName(); }
56 
57  virtual void registerDataOnMesh( Group & MeshBody ) override final;
58 
59  virtual bool execute( real64 const time_n,
60  real64 const dt,
61  integer const cycleNumber,
62  integer const GEOS_UNUSED_PARAM( eventCounter ),
63  real64 const GEOS_UNUSED_PARAM( eventProgress ),
64  DomainPartition & domain ) override
65  {
66  solverStep( time_n, dt, cycleNumber, domain );
67  return false;
68  }
69 
78  virtual real64 solverStep( real64 const & time_n,
79  real64 const & dt,
80  integer const cycleNumber,
81  DomainPartition & domain ) override;
82 
85 protected:
86 
87  virtual void initializePostSubGroups() override final;
88 
89  virtual void initializePostInitialConditionsPreSubGroups() override final;
90 
91  virtual void postRestartInitialization() override final
92  {
93  GEOS_ERROR( "Restarting is not supported for cases involving EmbeddedSurfaceGenerator" );
94  }
95 
96 private:
97 
98  void addToFractureStencil( DomainPartition & domain );
99 
100  void setGlobalIndices( ElementRegionManager & elemManager,
101  EmbeddedSurfaceNodeManager & embSurfNodeManager,
102  EmbeddedSurfaceSubRegion & embeddedSurfaceSubregion );
103 
104  void addEmbeddedElementsToSets( ElementRegionManager const & elemManager,
105  EmbeddedSurfaceSubRegion & embeddedSurfaceSubregion );
106 
110  struct viewKeyStruct : PhysicsSolverBase::viewKeyStruct
111  {
112  constexpr static char const * solidMaterialNameString() {return "solidMaterialNames"; }
113  constexpr static char const * fractureRegionNameString() {return "fractureRegion"; }
114  constexpr static char const * targetObjectsNameString() {return "targetObjects"; }
115  constexpr static char const * mpiCommOrderString() { return "mpiCommOrder"; }
116 
117  //TODO: rock toughness should be a material parameter, and we need to make rock toughness to KIC a constitutive
118  // relation.
119  constexpr static char const * rockToughnessString() {return "rockToughness"; }
120  };
121 
122  // fracture region name
123  string m_fractureRegionName;
124  // target geometric objects to turn into fractures
125  string_array m_targetObjectsName;
126  // Flag for consistent communication ordering
127  int m_mpiCommOrder;
128 };
129 
130 } /* namespace geos */
131 
132 #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 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 class is used to manage mesh body.
Definition: MeshBody.hpp:36
Base class for all physics solvers.
stdVector< string > string_array
A 1-dimensional array of geos::string types.
Definition: DataTypes.hpp:401
double real64
64-bit floating point type.
Definition: DataTypes.hpp:98
std::int32_t integer
Signed integer type.
Definition: DataTypes.hpp:81
Structure to hold scoped key names.