diff --git a/src/coreComponents/physicsSolvers/fluidFlow/CompositionalMultiphaseBase.cpp b/src/coreComponents/physicsSolvers/fluidFlow/CompositionalMultiphaseBase.cpp index 81176c2bb1..f117160c68 100644 --- a/src/coreComponents/physicsSolvers/fluidFlow/CompositionalMultiphaseBase.cpp +++ b/src/coreComponents/physicsSolvers/fluidFlow/CompositionalMultiphaseBase.cpp @@ -583,18 +583,15 @@ void CompositionalMultiphaseBase::validateConstitutiveModels( DomainPartition co compareMultiphaseModels( fluid, referenceFluid ); compareMulticomponentModels( fluid, referenceFluid ); - constitutiveUpdatePassThru( fluid, [&] ( auto & castedFluid ) - { - bool const isFluidModelThermal = castedFluid.isThermal(); - GEOS_THROW_IF( m_isThermal && !isFluidModelThermal, - GEOS_FMT( "CompositionalMultiphaseBase {}: the thermal option is enabled in the solver, but the fluid model {} is incompatible with the thermal option", - getDataContext(), fluid.getDataContext() ), - InputError ); - GEOS_THROW_IF( !m_isThermal && isFluidModelThermal, - GEOS_FMT( "CompositionalMultiphaseBase {}: the thermal option is enabled in fluid model {}, but the solver options are incompatible with the thermal option", - getDataContext(), fluid.getDataContext() ), - InputError ); - } ); + bool const isFluidModelThermal = fluid.isThermal(); + GEOS_THROW_IF( m_isThermal && !isFluidModelThermal, + GEOS_FMT( "CompositionalMultiphaseBase {}: the thermal option is enabled in the solver, but the fluid model {} is incompatible with the thermal option", + getDataContext(), fluid.getDataContext() ), + InputError ); + GEOS_THROW_IF( !m_isThermal && isFluidModelThermal, + GEOS_FMT( "CompositionalMultiphaseBase {}: the thermal option is enabled in fluid model {}, but the solver options are incompatible with the thermal option", + getDataContext(), fluid.getDataContext() ), + InputError ); string const & relpermName = subRegion.getReference< string >( viewKeyStruct::relPermNamesString() ); RelativePermeabilityBase const & relPerm = getConstitutiveModel< RelativePermeabilityBase >( subRegion, relpermName );