Skip to content

Commit

Permalink
Fix setMGRStrategy logic for SinglePhaseReservoirAndWells (#3111)
Browse files Browse the repository at this point in the history
  • Loading branch information
paveltomin authored May 7, 2024
1 parent 2a2d045 commit 2d4e867
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -103,13 +103,15 @@ void
CompositionalMultiphaseReservoirAndWells< CompositionalMultiphaseBase >::
setMGRStrategy()
{
if( flowSolver()->getLinearSolverParameters().mgr.strategy == LinearSolverParameters::MGR::StrategyType::compositionalMultiphaseFVM )
if( flowSolver()->getLinearSolverParameters().mgr.strategy == LinearSolverParameters::MGR::StrategyType::compositionalMultiphaseHybridFVM )
{
m_linearSolverParameters.get().mgr.strategy = LinearSolverParameters::MGR::StrategyType::compositionalMultiphaseReservoirFVM;
// add Reservoir
m_linearSolverParameters.get().mgr.strategy = LinearSolverParameters::MGR::StrategyType::compositionalMultiphaseReservoirHybridFVM;
}
else
{
m_linearSolverParameters.get().mgr.strategy = LinearSolverParameters::MGR::StrategyType::compositionalMultiphaseReservoirHybridFVM;
// add Reservoir
m_linearSolverParameters.get().mgr.strategy = LinearSolverParameters::MGR::StrategyType::compositionalMultiphaseReservoirFVM;
}
}

Expand All @@ -118,12 +120,14 @@ void
CompositionalMultiphaseReservoirAndWells< MultiphasePoromechanics< CompositionalMultiphaseBase > >::
setMGRStrategy()
{
// flow solver here is indeed flow solver, not poromechanics solver
if( flowSolver()->getLinearSolverParameters().mgr.strategy == LinearSolverParameters::MGR::StrategyType::compositionalMultiphaseHybridFVM )
{
GEOS_LOG_RANK_0( "The MGR strategy for hybrid FVM is not implemented" );
GEOS_LOG_RANK_0( "The poromechanics MGR strategy for hybrid FVM is not implemented" );
}
else
{
// add Reservoir
m_linearSolverParameters.get().mgr.strategy = LinearSolverParameters::MGR::StrategyType::multiphasePoromechanicsReservoirFVM;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,12 +97,14 @@ void
SinglePhaseReservoirAndWells< SinglePhaseBase >::
setMGRStrategy()
{
if( flowSolver()->getLinearSolverParameters().mgr.strategy == LinearSolverParameters::MGR::StrategyType::singlePhaseReservoirHybridFVM )
if( flowSolver()->getLinearSolverParameters().mgr.strategy == LinearSolverParameters::MGR::StrategyType::singlePhaseHybridFVM )
{
// add Reservoir
m_linearSolverParameters.get().mgr.strategy = LinearSolverParameters::MGR::StrategyType::singlePhaseReservoirHybridFVM;
}
else
{
// add Reservoir
m_linearSolverParameters.get().mgr.strategy = LinearSolverParameters::MGR::StrategyType::singlePhaseReservoirFVM;
}
}
Expand All @@ -112,12 +114,14 @@ void
SinglePhaseReservoirAndWells< SinglePhasePoromechanics< SinglePhaseBase > >::
setMGRStrategy()
{
if( flowSolver()->getLinearSolverParameters().mgr.strategy == LinearSolverParameters::MGR::StrategyType::singlePhaseReservoirHybridFVM )
// flow solver here is indeed flow solver, not poromechanics solver
if( flowSolver()->getLinearSolverParameters().mgr.strategy == LinearSolverParameters::MGR::StrategyType::singlePhaseHybridFVM )
{
GEOS_LOG_RANK_0( "The MGR strategy for hybrid FVM is not implemented" );
GEOS_LOG_RANK_0( "The poromechanics MGR strategy for hybrid FVM is not implemented" );
}
else
{
// add Reservoir
m_linearSolverParameters.get().mgr.strategy = LinearSolverParameters::MGR::StrategyType::singlePhasePoromechanicsReservoirFVM;
}
}
Expand Down

0 comments on commit 2d4e867

Please sign in to comment.