Skip to content

Commit

Permalink
Merge branch 'develop' into fix/AddSourceValueTableForFWI
Browse files Browse the repository at this point in the history
  • Loading branch information
acitrain authored Jan 31, 2025
2 parents 10e990b + bd70903 commit a255893
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -165,14 +165,7 @@ void CompositionalMultiphaseFVM::initializePreSubGroups()
? LinearSolverParameters::MGR::StrategyType::thermalCompositionalMultiphaseFVM
: LinearSolverParameters::MGR::StrategyType::compositionalMultiphaseFVM;

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( "A discretization deriving from FluxApproximationBase must be selected with CompositionalMultiphaseFlow" );
}

checkDiscretizationName();
}

void CompositionalMultiphaseFVM::setupDofs( DomainPartition const & domain,
Expand Down
12 changes: 12 additions & 0 deletions src/coreComponents/physicsSolvers/fluidFlow/FlowSolverBase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,18 @@ void FlowSolverBase::initializePreSubGroups()
}
}

void FlowSolverBase::checkDiscretizationName() const
{
DomainPartition const & 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()));
}
}

void FlowSolverBase::validatePoreVolumes( DomainPartition const & domain ) const
{
real64 minPoreVolume = LvArray::NumericLimits< real64 >::max;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,8 @@ class FlowSolverBase : public PhysicsSolverBase

virtual void initializePreSubGroups() override;

void checkDiscretizationName() const;

virtual void initializePostInitialConditionsPreSubGroups() override;

void initializeState( DomainPartition & domain );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,14 +125,7 @@ void ReactiveCompositionalMultiphaseOBL::initializePreSubGroups()
{
FlowSolverBase::initializePreSubGroups();

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( "A discretization deriving from FluxApproximationBase must be selected with ReactiveCompositionalMultiphaseOBL" );
}

checkDiscretizationName();
}

void ReactiveCompositionalMultiphaseOBL::setupDofs( DomainPartition const & domain,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,7 @@ void SinglePhaseFVM< BASE >::initializePreSubGroups()
{
BASE::initializePreSubGroups();

DomainPartition & domain = this->template getGroupByPath< DomainPartition >( "/Problem/domain" );
NumericalMethodsManager const & numericalMethodManager = domain.getNumericalMethodManager();
FiniteVolumeManager const & fvManager = numericalMethodManager.getFiniteVolumeManager();

if( !fvManager.hasGroup< FluxApproximationBase >( m_discretizationName ) )
{
GEOS_ERROR( "A discretization deriving from FluxApproximationBase must be selected with SinglePhaseFVM" );
}
this->checkDiscretizationName();

if( m_isThermal )
{
Expand Down

0 comments on commit a255893

Please sign in to comment.