GEOS
PhaseFieldPoromechanicsSolver.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 
21 #ifndef GEOS_PHYSICSSOLVERS_MULTIPHYSICS_PHASEFIELDPOROMECHANICSSOLVER_HPP_
22 #define GEOS_PHYSICSSOLVERS_MULTIPHYSICS_PHASEFIELDPOROMECHANICSSOLVER_HPP_
23 
28 
29 namespace geos
30 {
31 
32 class PhaseFieldPoromechanicsSolver : public CoupledSolver< SinglePhasePoromechanics< SinglePhaseBase >, PhaseFieldDamageFEM >
33 {
34 public:
35 
37  using Base::m_solvers;
38  using Base::m_dofManager;
39  using Base::m_localMatrix;
40  using Base::m_rhs;
41  using Base::m_solution;
42 
43  PhaseFieldPoromechanicsSolver( const string & name,
44  Group * const parent );
45 
46  ~PhaseFieldPoromechanicsSolver() override = default;
47 
52  static string catalogName()
53  {
54  return "PhaseFieldPoromechanics";
55  }
56 
57  string getCatalogName() const override { return catalogName(); }
58 
60  static string coupledSolverAttributePrefix() { return "PhaseFieldPoromechanics"; }
61 
62  enum class SolverType : integer
63  {
64  Poromechanics = 0,
65  Damage = 1
66  };
67 
68  virtual void resetStateToBeginningOfStep( DomainPartition & domain ) override final;
69 
70  virtual void postInputInitialization() override final;
71 
77  {
78  return std::get< toUnderlying( SolverType::Poromechanics ) >( m_solvers );
79  }
80 
86  {
87  return std::get< toUnderlying( SolverType::Damage ) >( m_solvers );
88  }
89 
90  virtual void mapSolutionBetweenSolvers( DomainPartition & Domain, integer const idx ) override final;
91 
92  void applyDamageOnTractionBC( DomainPartition & domain );
93 
94 protected:
95 
96  virtual void initializePostInitialConditionsPreSubGroups() override final {}
97 
98 };
99 
100 } /* namespace geos */
101 
102 #endif /* GEOS_PHYSICSSOLVERS_MULTIPHYSICS_PHASEFIELDPOROMECHANICSSOLVER_HPP_ */
std::tuple< SOLVERS *... > m_solvers
Pointers of the single-physics solvers.
Partition of the decomposed physical domain. It also manages the connexion information to its neighbo...
static string catalogName()
name of the node manager in the object catalog
PhaseFieldDamageFEM * damageSolver() const
accessor for the pointer to the flow solver
virtual void mapSolutionBetweenSolvers(DomainPartition &Domain, integer const idx) override final
Maps the solution obtained from one solver to the fields used by the other solver(s)
static string coupledSolverAttributePrefix()
String used to form the solverName used to register solvers in CoupledSolver.
virtual void resetStateToBeginningOfStep(DomainPartition &domain) override final
reset state of physics back to the beginning of the step.
virtual void postInputInitialization() override final
virtual void initializePostInitialConditionsPreSubGroups() override final
Called by InitializePostInitialConditions() prior to initializing sub-Groups.
SinglePhasePoromechanics< SinglePhaseBase > * poromechanicsSolver() const
accessor for the pointer to the poromechanics solver
CRSMatrix< real64, globalIndex > m_localMatrix
Local system matrix and rhs.
DofManager m_dofManager
Data structure to handle degrees of freedom.
ParallelVector m_solution
System solution vector.
ParallelVector m_rhs
System right-hand side vector.
int integer
Signed integer type.
Definition: DataTypes.hpp:81