From 3839b4a286f82832b1dffb168a87354f1ee50107 Mon Sep 17 00:00:00 2001 From: Pavel Tomin Date: Fri, 5 Jul 2024 16:08:56 -0500 Subject: [PATCH] Update SinglePhaseBase.cpp --- .../physicsSolvers/fluidFlow/SinglePhaseBase.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/coreComponents/physicsSolvers/fluidFlow/SinglePhaseBase.cpp b/src/coreComponents/physicsSolvers/fluidFlow/SinglePhaseBase.cpp index 15f9a1905be..84c7563f51d 100644 --- a/src/coreComponents/physicsSolvers/fluidFlow/SinglePhaseBase.cpp +++ b/src/coreComponents/physicsSolvers/fluidFlow/SinglePhaseBase.cpp @@ -462,12 +462,12 @@ void SinglePhaseBase::initializePostInitialConditionsPreSubGroups() { region.forElementSubRegions< FaceElementSubRegion >( [&]( FaceElementSubRegion & subRegion ) { + ConstitutiveBase & fluid = getConstitutiveModel( subRegion, subRegion.getReference< string >( viewKeyStruct::fluidNamesString() ) ); + real64 const defaultDensity = getFluidProperties( fluid ).defaultDensity; + subRegion.getWrapper< real64_array >( fields::flow::hydraulicAperture::key() ). setApplyDefaultValue( region.getDefaultAperture() ); - SingleFluidBase & fluid = - getConstitutiveModel< SingleFluidBase >( subRegion, subRegion.getReference< string >( FlowSolverBase::viewKeyStruct::fluidNamesString() ) ); - real64 const defaultDensity = fluid.defaultDensity(); subRegion.getWrapper< real64_array >( FaceElementSubRegion::viewKeyStruct::creationMassString() ). setApplyDefaultValue( defaultDensity * region.getDefaultAperture() ); } );