Skip to content

Commit b652c03

Browse files
committed
fix seq coupling for multiphase poromechanics
1 parent 7cca97c commit b652c03

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

src/coreComponents/physicsSolvers/multiphysics/MultiphasePoromechanics.hpp

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,31 @@ class MultiphasePoromechanics : public PoromechanicsSolver< FLOW_SOLVER, MECHANI
107107
GEOS_ERROR( GEOS_FMT( "{}: MGR strategy is not implemented for {}", this->getName(), this->getCatalogName()));
108108
}
109109

110+
virtual void mapSolutionBetweenSolvers( DomainPartition & domain, integer const solverType ) override
111+
{
112+
GEOS_MARK_FUNCTION;
113+
114+
Base::mapSolutionBetweenSolvers( domain, solverType );
115+
116+
/// After the solid mechanics solver
117+
if( solverType == static_cast< integer >( Base::SolverType::SolidMechanics )
118+
&& !this->m_performStressInitialization ) // do not update during poromechanics initialization
119+
{
120+
this->template forDiscretizationOnMeshTargets<>( domain.getMeshBodies(), [&]( string const &,
121+
MeshLevel & mesh,
122+
string_array const & regionNames )
123+
{
124+
125+
mesh.getElemManager().forElementSubRegions< CellElementSubRegion >( regionNames, [&]( localIndex const,
126+
auto & subRegion )
127+
{
128+
// update mass after porosity change due to mechanics solve
129+
this->flowSolver()->updateMass( subRegion );
130+
} );
131+
} );
132+
}
133+
}
134+
110135
/**
111136
* @brief Helper function to recompute the bulk density
112137
* @param[in] subRegion the element subRegion

0 commit comments

Comments
 (0)