Skip to content

Commit

Permalink
check should not be called for hybrid
Browse files Browse the repository at this point in the history
  • Loading branch information
Pavel Tomin authored and Pavel Tomin committed Jan 15, 2025
1 parent 885c597 commit 90af149
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,8 @@ void CompositionalMultiphaseFVM::initializePreSubGroups()
m_linearSolverParameters.get().mgr.strategy = m_isThermal
? LinearSolverParameters::MGR::StrategyType::thermalCompositionalMultiphaseFVM
: LinearSolverParameters::MGR::StrategyType::compositionalMultiphaseFVM;

checkDiscretizationName();
}

void CompositionalMultiphaseFVM::setupDofs( DomainPartition const & domain,
Expand Down
11 changes: 9 additions & 2 deletions src/coreComponents/physicsSolvers/fluidFlow/FlowSolverBase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -365,10 +365,17 @@ void FlowSolverBase::initializePreSubGroups()
}
} );
}
else
}

void FlowSolverBase::checkDiscretizationName()
{
DomainPartition & domain = this->getGroupByPath< DomainPartition >( "/Problem/domain" );
NumericalMethodsManager const & numericalMethodManager = domain.getNumericalMethodManager();
FiniteVolumeManager const & fvManager = numericalMethodManager.getFiniteVolumeManager();
if( !fvManager.hasGroup< FluxApproximationBase >( m_discretizationName ) )
{
GEOS_ERROR( GEOS_FMT( "{}: can not find discretization named '{}' (a discretization deriving from FluxApproximationBase must be selected for {} solver '{}' )",
getDataContext(), m_discretizationName, getCatalogName(), getName() ) );
getDataContext(), m_discretizationName, getCatalogName(), getName()));
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,8 @@ class FlowSolverBase : public PhysicsSolverBase

virtual void initializePreSubGroups() override;

void checkDiscretizationName();

virtual void initializePostInitialConditionsPreSubGroups() override;

void initializeState( DomainPartition & domain );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,11 @@ ReactiveCompositionalMultiphaseOBL::ReactiveCompositionalMultiphaseOBL( const st
m_linearSolverParameters.get().mgr.strategy = LinearSolverParameters::MGR::StrategyType::reactiveCompositionalMultiphaseOBL;
}

void ReactiveCompositionalMultiphaseOBL::initializePreSubGroups()
{
checkDiscretizationName();
}

void ReactiveCompositionalMultiphaseOBL::setupDofs( DomainPartition const & domain,
DofManager & dofManager ) const
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,8 @@ class ReactiveCompositionalMultiphaseOBL : public FlowSolverBase

virtual void initializePostInitialConditionsPreSubGroups() override;

virtual void initializePreSubGroups() override;


private:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ void SinglePhaseFVM< BASE >::initializePreSubGroups()
{
BASE::initializePreSubGroups();

checkDiscretizationName();

if( m_isThermal )
{
// For thermal simulations 2 pdes are considered so we let AMG know.
Expand Down

0 comments on commit 90af149

Please sign in to comment.