21 #ifndef GEOS_PHYSICSSOLVERS_MULTIPHYSICS_PHASEFIELDPOROMECHANICSSOLVER_HPP_ 
   22 #define GEOS_PHYSICSSOLVERS_MULTIPHYSICS_PHASEFIELDPOROMECHANICSSOLVER_HPP_ 
   44                                  Group * 
const parent );
 
   54     return "PhaseFieldPoromechanics";
 
   78     return std::get< toUnderlying( SolverType::Poromechanics ) >( 
m_solvers );
 
   87     return std::get< toUnderlying( SolverType::Damage ) >( 
m_solvers );
 
  102 template< 
typename FE_TYPE >
 
  106     m_numElems( subRegion.
size() )
 
  117       constexpr 
localIndex numNodesPerElement = FE_TYPE::numNodes;
 
  118       constexpr 
localIndex n_q_points = FE_TYPE::numQuadraturePoints;
 
  120       real64 xLocal[ numNodesPerElement ][ 3 ];
 
  121       real64 nodalDamageLocal[ numNodesPerElement ];
 
  123       for( 
localIndex a = 0; a < numNodesPerElement; ++a )
 
  125         localIndex const localNodeIndex = elemToNodes( k, a );
 
  127         for( 
int dim=0; dim < 3; ++dim )
 
  129           xLocal[a][dim] = xNodes[ localNodeIndex ][dim];
 
  132         nodalDamageLocal[ a ] = nodalDamage[ localNodeIndex ];
 
  137         real64 N[ numNodesPerElement ];
 
  138         FE_TYPE::calcN( q, N );
 
  140         real64 dNdX[ numNodesPerElement ][ 3 ];
 
  141         real64 const detJ = FE_TYPE::calcGradN( q, xLocal, dNdX );
 
  146         real64 qDamageGrad[3] = {0, 0, 0};
 
  147         FE_TYPE::valueAndGradient( N, dNdX, nodalDamageLocal, qDamage, qDamageGrad );
 
  149         damageFieldOnMaterial( k, q ) = qDamage;
 
  151         for( 
int dim=0; dim < 3; ++dim )
 
  153           damageGradOnMaterial[k][q][dim] = qDamageGrad[dim];
 
#define GEOS_HOST_DEVICE
Marks a host-device function.
 
#define GEOS_UNUSED_VAR(...)
Mark an unused variable and silence compiler warnings.
 
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
 
string getCatalogName() const override
 
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.
 
SinglePhasePoromechanics< SinglePhaseBase > * poromechancisSolver() const
accessor for the pointer to the poromechanics solver
 
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.
 
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.
 
localIndex size() const
Get the "size" of the group, which determines the number of elements in resizable wrappers.
 
ArrayView< T, 1 > arrayView1d
Alias for 1D array view.
 
double real64
64-bit floating point type.
 
GEOS_LOCALINDEX_TYPE localIndex
Local index type (for indexing objects within an MPI partition).
 
ArrayView< T, 2, USD > arrayView2d
Alias for 2D array view.
 
int integer
Signed integer type.
 
ArrayView< T, 3, USD > arrayView3d
Alias for 3D array view.