From d73ac6d1cf4f55757e42156fc7d58e1104dc003d Mon Sep 17 00:00:00 2001 From: MelReyCG Date: Thu, 21 Dec 2023 15:43:50 +0100 Subject: [PATCH 01/98] added region mass stats --- .../fluidFlow/SinglePhaseBaseKernels.hpp | 7 ++++++- .../fluidFlow/SinglePhaseStatistics.cpp | 14 +++++++++++++- .../fluidFlow/SinglePhaseStatistics.hpp | 4 ++++ 3 files changed, 23 insertions(+), 2 deletions(-) diff --git a/src/coreComponents/physicsSolvers/fluidFlow/SinglePhaseBaseKernels.hpp b/src/coreComponents/physicsSolvers/fluidFlow/SinglePhaseBaseKernels.hpp index c275f3a6781..59868ad6f66 100644 --- a/src/coreComponents/physicsSolvers/fluidFlow/SinglePhaseBaseKernels.hpp +++ b/src/coreComponents/physicsSolvers/fluidFlow/SinglePhaseBaseKernels.hpp @@ -676,13 +676,15 @@ struct StatisticsKernel arrayView1d< real64 const > const & deltaPres, arrayView1d< real64 const > const & refPorosity, arrayView2d< real64 const > const & porosity, + arrayView2d< real64 const > const & densities, real64 & minPres, real64 & avgPresNumerator, real64 & maxPres, real64 & minDeltaPres, real64 & maxDeltaPres, real64 & totalUncompactedPoreVol, - real64 & totalPoreVol ) + real64 & totalPoreVol, + real64 & totalMass ) { RAJA::ReduceMin< parallelDeviceReduce, real64 > subRegionMinPres( LvArray::NumericLimits< real64 >::max ); RAJA::ReduceSum< parallelDeviceReduce, real64 > subRegionAvgPresNumerator( 0.0 ); @@ -693,6 +695,7 @@ struct StatisticsKernel RAJA::ReduceSum< parallelDeviceReduce, real64 > subRegionTotalUncompactedPoreVol( 0.0 ); RAJA::ReduceSum< parallelDeviceReduce, real64 > subRegionTotalPoreVol( 0.0 ); + RAJA::ReduceSum< parallelDeviceReduce, real64 > subRegionTotalMass( 0.0 ); forAll< parallelDevicePolicy<> >( size, [=] GEOS_HOST_DEVICE ( localIndex const ei ) { @@ -714,6 +717,7 @@ struct StatisticsKernel subRegionTotalUncompactedPoreVol += uncompactedPoreVol; subRegionTotalPoreVol += dynamicPoreVol; + subRegionTotalMass += dynamicPoreVol * densities[ei][0]; } ); minPres = subRegionMinPres.get(); @@ -725,6 +729,7 @@ struct StatisticsKernel totalUncompactedPoreVol = subRegionTotalUncompactedPoreVol.get(); totalPoreVol = subRegionTotalPoreVol.get(); + totalMass = subRegionTotalMass.get(); } }; diff --git a/src/coreComponents/physicsSolvers/fluidFlow/SinglePhaseStatistics.cpp b/src/coreComponents/physicsSolvers/fluidFlow/SinglePhaseStatistics.cpp index e8a0bcd17dd..7576ca38a90 100644 --- a/src/coreComponents/physicsSolvers/fluidFlow/SinglePhaseStatistics.cpp +++ b/src/coreComponents/physicsSolvers/fluidFlow/SinglePhaseStatistics.cpp @@ -100,6 +100,7 @@ void SinglePhaseStatistics::computeRegionStatistics( MeshLevel & mesh, regionStatistics.totalPoreVolume = 0.0; regionStatistics.totalUncompactedPoreVolume = 0.0; + regionStatistics.totalMass = 0.0; } // Step 2: increment the average/min/max quantities for all the subRegions @@ -118,6 +119,10 @@ void SinglePhaseStatistics::computeRegionStatistics( MeshLevel & mesh, arrayView1d< real64 const > const refPorosity = solid.getReferencePorosity(); arrayView2d< real64 const > const porosity = solid.getPorosity(); + string const & fluidName = subRegion.template getReference< string >( FlowSolverBase::viewKeyStruct::fluidNamesString() ); + SingleFluidBase const & fluid = constitutiveModels.getGroup< SingleFluidBase >( fluidName ); + arrayView2d< real64 const > const densities = fluid.density(); + real64 subRegionAvgPresNumerator = 0.0; real64 subRegionMinPres = 0.0; real64 subRegionMaxPres = 0.0; @@ -125,6 +130,7 @@ void SinglePhaseStatistics::computeRegionStatistics( MeshLevel & mesh, real64 subRegionMaxDeltaPres = 0.0; real64 subRegionTotalUncompactedPoreVol = 0.0; real64 subRegionTotalPoreVol = 0.0; + real64 subRegionTotalMass = 0.0; singlePhaseBaseKernels::StatisticsKernel:: launch( subRegion.size(), @@ -134,13 +140,15 @@ void SinglePhaseStatistics::computeRegionStatistics( MeshLevel & mesh, deltaPres, refPorosity, porosity, + densities, subRegionMinPres, subRegionAvgPresNumerator, subRegionMaxPres, subRegionMinDeltaPres, subRegionMaxDeltaPres, subRegionTotalUncompactedPoreVol, - subRegionTotalPoreVol ); + subRegionTotalPoreVol, + subRegionTotalMass ); ElementRegionBase & region = elemManager.getRegion( subRegion.getParent().getParent().getName() ); RegionStatistics & regionStatistics = region.getReference< RegionStatistics >( viewKeyStruct::regionStatisticsString() ); @@ -167,6 +175,7 @@ void SinglePhaseStatistics::computeRegionStatistics( MeshLevel & mesh, regionStatistics.totalUncompactedPoreVolume += subRegionTotalUncompactedPoreVol; regionStatistics.totalPoreVolume += subRegionTotalPoreVol; + regionStatistics.totalMass += subRegionTotalMass; } ); // Step 3: synchronize the results over the MPI ranks @@ -182,6 +191,7 @@ void SinglePhaseStatistics::computeRegionStatistics( MeshLevel & mesh, regionStatistics.totalUncompactedPoreVolume = MpiWrapper::sum( regionStatistics.totalUncompactedPoreVolume ); regionStatistics.totalPoreVolume = MpiWrapper::sum( regionStatistics.totalPoreVolume ); regionStatistics.averagePressure = MpiWrapper::sum( regionStatistics.averagePressure ); + regionStatistics.totalMass = MpiWrapper::sum( regionStatistics.totalMass ); if( regionStatistics.totalUncompactedPoreVolume > 0 ) { regionStatistics.averagePressure /= regionStatistics.totalUncompactedPoreVolume; @@ -201,6 +211,8 @@ void SinglePhaseStatistics::computeRegionStatistics( MeshLevel & mesh, << regionStatistics.minDeltaPressure << ", " << regionStatistics.maxDeltaPressure << " Pa" ); GEOS_LOG_LEVEL_RANK_0( 1, getName() << ", " << regionNames[i] << ": Total dynamic pore volume: " << regionStatistics.totalPoreVolume << " rm^3" ); + GEOS_LOG_LEVEL_RANK_0( 1, getName() << ", " << regionNames[i] + << ": Total fluid mass: " << regionStatistics.totalMass << " kg" ); } } diff --git a/src/coreComponents/physicsSolvers/fluidFlow/SinglePhaseStatistics.hpp b/src/coreComponents/physicsSolvers/fluidFlow/SinglePhaseStatistics.hpp index 04c0bc28ff7..662bf38cf5f 100644 --- a/src/coreComponents/physicsSolvers/fluidFlow/SinglePhaseStatistics.hpp +++ b/src/coreComponents/physicsSolvers/fluidFlow/SinglePhaseStatistics.hpp @@ -89,6 +89,10 @@ class SinglePhaseStatistics : public FieldStatisticsBase< SinglePhaseBase > /// maximum region delta pressure real64 maxDeltaPressure; + // fluid mass + real64 totalMass; + + /// total region pore volume real64 totalPoreVolume; /// total region uncompacted pore volume From 909a1c51db2659a91d7c4975284e8cbe0a2a29ff Mon Sep 17 00:00:00 2001 From: MelReyCG Date: Thu, 21 Dec 2023 15:46:01 +0100 Subject: [PATCH 02/98] added region temperature stats --- .../fluidFlow/SinglePhaseBaseKernels.hpp | 16 ++++++++ .../fluidFlow/SinglePhaseStatistics.cpp | 40 +++++++++++++++++-- .../fluidFlow/SinglePhaseStatistics.hpp | 6 +++ 3 files changed, 59 insertions(+), 3 deletions(-) diff --git a/src/coreComponents/physicsSolvers/fluidFlow/SinglePhaseBaseKernels.hpp b/src/coreComponents/physicsSolvers/fluidFlow/SinglePhaseBaseKernels.hpp index 59868ad6f66..5787282375b 100644 --- a/src/coreComponents/physicsSolvers/fluidFlow/SinglePhaseBaseKernels.hpp +++ b/src/coreComponents/physicsSolvers/fluidFlow/SinglePhaseBaseKernels.hpp @@ -674,6 +674,7 @@ struct StatisticsKernel arrayView1d< real64 const > const & volume, arrayView1d< real64 const > const & pres, arrayView1d< real64 const > const & deltaPres, + arrayView1d< real64 const > const & temp, arrayView1d< real64 const > const & refPorosity, arrayView2d< real64 const > const & porosity, arrayView2d< real64 const > const & densities, @@ -682,6 +683,9 @@ struct StatisticsKernel real64 & maxPres, real64 & minDeltaPres, real64 & maxDeltaPres, + real64 & minTemp, + real64 & avgTempNumerator, + real64 & maxTemp, real64 & totalUncompactedPoreVol, real64 & totalPoreVol, real64 & totalMass ) @@ -693,6 +697,10 @@ struct StatisticsKernel RAJA::ReduceMin< parallelDeviceReduce, real64 > subRegionMinDeltaPres( LvArray::NumericLimits< real64 >::max ); RAJA::ReduceMax< parallelDeviceReduce, real64 > subRegionMaxDeltaPres( -LvArray::NumericLimits< real64 >::max ); + RAJA::ReduceMin< parallelDeviceReduce, real64 > subRegionMinTemp( LvArray::NumericLimits< real64 >::max ); + RAJA::ReduceSum< parallelDeviceReduce, real64 > subRegionAvgTempNumerator( 0.0 ); + RAJA::ReduceMax< parallelDeviceReduce, real64 > subRegionMaxTemp( -LvArray::NumericLimits< real64 >::max ); + RAJA::ReduceSum< parallelDeviceReduce, real64 > subRegionTotalUncompactedPoreVol( 0.0 ); RAJA::ReduceSum< parallelDeviceReduce, real64 > subRegionTotalPoreVol( 0.0 ); RAJA::ReduceSum< parallelDeviceReduce, real64 > subRegionTotalMass( 0.0 ); @@ -715,6 +723,10 @@ struct StatisticsKernel subRegionMinDeltaPres.min( deltaPres[ei] ); subRegionMaxDeltaPres.max( deltaPres[ei] ); + subRegionMinTemp.min( temp[ei] ); + subRegionAvgTempNumerator += uncompactedPoreVol * temp[ei]; + subRegionMaxTemp.max( temp[ei] ); + subRegionTotalUncompactedPoreVol += uncompactedPoreVol; subRegionTotalPoreVol += dynamicPoreVol; subRegionTotalMass += dynamicPoreVol * densities[ei][0]; @@ -727,6 +739,10 @@ struct StatisticsKernel minDeltaPres = subRegionMinDeltaPres.get(); maxDeltaPres = subRegionMaxDeltaPres.get(); + minTemp = subRegionMinTemp.get(); + avgTempNumerator = subRegionAvgTempNumerator.get(); + maxTemp = subRegionMaxTemp.get(); + totalUncompactedPoreVol = subRegionTotalUncompactedPoreVol.get(); totalPoreVol = subRegionTotalPoreVol.get(); totalMass = subRegionTotalMass.get(); diff --git a/src/coreComponents/physicsSolvers/fluidFlow/SinglePhaseStatistics.cpp b/src/coreComponents/physicsSolvers/fluidFlow/SinglePhaseStatistics.cpp index 7576ca38a90..1f6c5740666 100644 --- a/src/coreComponents/physicsSolvers/fluidFlow/SinglePhaseStatistics.cpp +++ b/src/coreComponents/physicsSolvers/fluidFlow/SinglePhaseStatistics.cpp @@ -98,6 +98,10 @@ void SinglePhaseStatistics::computeRegionStatistics( MeshLevel & mesh, regionStatistics.maxDeltaPressure = -LvArray::NumericLimits< real64 >::max; regionStatistics.minDeltaPressure = LvArray::NumericLimits< real64 >::max; + regionStatistics.averageTemperature = 0.0; + regionStatistics.maxTemperature = -LvArray::NumericLimits< real64 >::max; + regionStatistics.minTemperature = LvArray::NumericLimits< real64 >::max; + regionStatistics.totalPoreVolume = 0.0; regionStatistics.totalUncompactedPoreVolume = 0.0; regionStatistics.totalMass = 0.0; @@ -112,6 +116,7 @@ void SinglePhaseStatistics::computeRegionStatistics( MeshLevel & mesh, arrayView1d< real64 const > const volume = subRegion.getElementVolume(); arrayView1d< real64 const > const pres = subRegion.getField< fields::flow::pressure >(); arrayView1d< real64 const > const deltaPres = subRegion.getField< fields::flow::deltaPressure >(); + arrayView1d< real64 const > const temp = subRegion.getField< fields::flow::temperature >(); string const & solidName = subRegion.getReference< string >( SinglePhaseBase::viewKeyStruct::solidNamesString() ); Group const & constitutiveModels = subRegion.getGroup( ElementSubRegionBase::groupKeyStruct::constitutiveModelsString() ); @@ -128,6 +133,9 @@ void SinglePhaseStatistics::computeRegionStatistics( MeshLevel & mesh, real64 subRegionMaxPres = 0.0; real64 subRegionMinDeltaPres = 0.0; real64 subRegionMaxDeltaPres = 0.0; + real64 subRegionAvgTempNumerator = 0.0; + real64 subRegionMinTemp = 0.0; + real64 subRegionMaxTemp = 0.0; real64 subRegionTotalUncompactedPoreVol = 0.0; real64 subRegionTotalPoreVol = 0.0; real64 subRegionTotalMass = 0.0; @@ -138,6 +146,7 @@ void SinglePhaseStatistics::computeRegionStatistics( MeshLevel & mesh, volume, pres, deltaPres, + temp, refPorosity, porosity, densities, @@ -146,6 +155,9 @@ void SinglePhaseStatistics::computeRegionStatistics( MeshLevel & mesh, subRegionMaxPres, subRegionMinDeltaPres, subRegionMaxDeltaPres, + subRegionMinTemp, + subRegionAvgTempNumerator, + subRegionMaxTemp, subRegionTotalUncompactedPoreVol, subRegionTotalPoreVol, subRegionTotalMass ); @@ -172,6 +184,15 @@ void SinglePhaseStatistics::computeRegionStatistics( MeshLevel & mesh, regionStatistics.maxDeltaPressure = subRegionMaxDeltaPres; } + regionStatistics.averageTemperature += subRegionAvgTempNumerator; + if( subRegionMinTemp < regionStatistics.minTemperature ) + { + regionStatistics.minTemperature = subRegionMinTemp; + } + if( subRegionMaxTemp > regionStatistics.maxTemperature ) + { + regionStatistics.maxTemperature = subRegionMaxTemp; + } regionStatistics.totalUncompactedPoreVolume += subRegionTotalUncompactedPoreVol; regionStatistics.totalPoreVolume += subRegionTotalPoreVol; @@ -185,22 +206,32 @@ void SinglePhaseStatistics::computeRegionStatistics( MeshLevel & mesh, RegionStatistics & regionStatistics = region.getReference< RegionStatistics >( viewKeyStruct::regionStatisticsString() ); regionStatistics.minPressure = MpiWrapper::min( regionStatistics.minPressure ); + regionStatistics.averagePressure = MpiWrapper::sum( regionStatistics.averagePressure ); regionStatistics.maxPressure = MpiWrapper::max( regionStatistics.maxPressure ); + regionStatistics.minDeltaPressure = MpiWrapper::min( regionStatistics.minDeltaPressure ); regionStatistics.maxDeltaPressure = MpiWrapper::max( regionStatistics.maxDeltaPressure ); + + regionStatistics.minTemperature = MpiWrapper::min( regionStatistics.minTemperature ); + regionStatistics.averageTemperature = MpiWrapper::sum( regionStatistics.averageTemperature ); + regionStatistics.maxTemperature = MpiWrapper::max( regionStatistics.maxTemperature ); + regionStatistics.totalUncompactedPoreVolume = MpiWrapper::sum( regionStatistics.totalUncompactedPoreVolume ); regionStatistics.totalPoreVolume = MpiWrapper::sum( regionStatistics.totalPoreVolume ); - regionStatistics.averagePressure = MpiWrapper::sum( regionStatistics.averagePressure ); regionStatistics.totalMass = MpiWrapper::sum( regionStatistics.totalMass ); + if( regionStatistics.totalUncompactedPoreVolume > 0 ) { - regionStatistics.averagePressure /= regionStatistics.totalUncompactedPoreVolume; + float invTotalUncompactedPoreVolume = 1.0 / regionStatistics.totalUncompactedPoreVolume; + regionStatistics.averagePressure *= invTotalUncompactedPoreVolume; + regionStatistics.averageTemperature *= invTotalUncompactedPoreVolume; } else { regionStatistics.averagePressure = 0.0; + regionStatistics.averageTemperature = 0.0; GEOS_LOG_LEVEL_RANK_0( 1, getName() << ", " << regionNames[i] - << ": Cannot compute average pressure because region pore volume is zero." ); + << ": Cannot compute average pressure & temperature because region pore volume is zero." ); } GEOS_LOG_LEVEL_RANK_0( 1, getName() << ", " << regionNames[i] @@ -209,6 +240,9 @@ void SinglePhaseStatistics::computeRegionStatistics( MeshLevel & mesh, GEOS_LOG_LEVEL_RANK_0( 1, getName() << ", " << regionNames[i] << ": Delta pressure (min, max): " << regionStatistics.minDeltaPressure << ", " << regionStatistics.maxDeltaPressure << " Pa" ); + GEOS_LOG_LEVEL_RANK_0( 1, getName() << ", " << regionNames[i] + << ": Temperature (min, average, max): " + << regionStatistics.minTemperature << ", " << regionStatistics.averageTemperature << ", " << regionStatistics.maxTemperature << " K" ); GEOS_LOG_LEVEL_RANK_0( 1, getName() << ", " << regionNames[i] << ": Total dynamic pore volume: " << regionStatistics.totalPoreVolume << " rm^3" ); GEOS_LOG_LEVEL_RANK_0( 1, getName() << ", " << regionNames[i] diff --git a/src/coreComponents/physicsSolvers/fluidFlow/SinglePhaseStatistics.hpp b/src/coreComponents/physicsSolvers/fluidFlow/SinglePhaseStatistics.hpp index 662bf38cf5f..8d826c5034e 100644 --- a/src/coreComponents/physicsSolvers/fluidFlow/SinglePhaseStatistics.hpp +++ b/src/coreComponents/physicsSolvers/fluidFlow/SinglePhaseStatistics.hpp @@ -92,6 +92,12 @@ class SinglePhaseStatistics : public FieldStatisticsBase< SinglePhaseBase > // fluid mass real64 totalMass; + /// average region temperature + real64 averageTemperature; + /// minimum region temperature + real64 minTemperature; + /// maximum region temperature + real64 maxTemperature; /// total region pore volume real64 totalPoreVolume; From 8bee3cfed250bd142e407019c1e116b7d9b848a8 Mon Sep 17 00:00:00 2001 From: MelReyCG Date: Fri, 12 Jan 2024 10:43:06 +0100 Subject: [PATCH 03/98] Logging debug info - to be removed laster --- .../fluidFlow/SinglePhaseBase.cpp | 21 +++++++++++++++++-- .../fluidFlow/SinglePhaseStatistics.cpp | 2 +- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/src/coreComponents/physicsSolvers/fluidFlow/SinglePhaseBase.cpp b/src/coreComponents/physicsSolvers/fluidFlow/SinglePhaseBase.cpp index c94e705ba3e..0aa03aa7c2b 100644 --- a/src/coreComponents/physicsSolvers/fluidFlow/SinglePhaseBase.cpp +++ b/src/coreComponents/physicsSolvers/fluidFlow/SinglePhaseBase.cpp @@ -1064,6 +1064,12 @@ void SinglePhaseBase::applySourceFluxBC( real64 const time_n, return 0.0; } ); + GEOS_LOG( "SourceFlux "<< fs.getName() << "\n" << + " - targetSet elem count = "<< targetSet.size() << "\n" << + " - contribs = {"<< stringutilities::join( rhsContributionArray, ", " ) <<"}" ); + GEOS_LOG( LvArray::system::stackTrace( true )); + + // Step 3.2: we are ready to add the right-hand side contributions, taking into account our equation layout // get the normalizer @@ -1121,13 +1127,17 @@ void SinglePhaseBase::applySourceFluxBC( real64 const time_n, } else { + real64 sum=0.0; + std::ostringstream strt; forAll< parallelDevicePolicy<> >( targetSet.size(), [sizeScalingFactor, targetSet, rankOffset, ghostRank, dofNumber, rhsContributionArrayView, - localRhs] GEOS_HOST_DEVICE ( localIndex const a ) + localRhs, + &sum, + &strt] GEOS_HOST_DEVICE ( localIndex const a ) { // we need to filter out ghosts here, because targetSet may contain them localIndex const ei = targetSet[a]; @@ -1138,8 +1148,15 @@ void SinglePhaseBase::applySourceFluxBC( real64 const time_n, // add the value to the mass balance equation globalIndex const rowIndex = dofNumber[ei] - rankOffset; - localRhs[rowIndex] += rhsContributionArrayView[a] / sizeScalingFactor; // scale the contribution by the sizeScalingFactor here! + real64 const scaledContrib = rhsContributionArrayView[a] / sizeScalingFactor; // scale the contribution by the sizeScalingFactor + // here! + strt< Date: Fri, 12 Jan 2024 15:56:26 +0100 Subject: [PATCH 04/98] better debug output --- .../fluidFlow/SinglePhaseBase.cpp | 26 ++++++++++++++----- 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/src/coreComponents/physicsSolvers/fluidFlow/SinglePhaseBase.cpp b/src/coreComponents/physicsSolvers/fluidFlow/SinglePhaseBase.cpp index 0aa03aa7c2b..d5ba79aa33d 100644 --- a/src/coreComponents/physicsSolvers/fluidFlow/SinglePhaseBase.cpp +++ b/src/coreComponents/physicsSolvers/fluidFlow/SinglePhaseBase.cpp @@ -1064,10 +1064,13 @@ void SinglePhaseBase::applySourceFluxBC( real64 const time_n, return 0.0; } ); - GEOS_LOG( "SourceFlux "<< fs.getName() << "\n" << - " - targetSet elem count = "<< targetSet.size() << "\n" << - " - contribs = {"<< stringutilities::join( rhsContributionArray, ", " ) <<"}" ); - GEOS_LOG( LvArray::system::stackTrace( true )); + if( fs.getLogLevel()>=3 ) + { + GEOS_LOG( "SourceFlux "<< fs.getName() << "\n" << + " - targetSet elem count = "<< targetSet.size() << "\n" << + " - contribs = {"<< stringutilities::join( rhsContributionArray, ", " ) <<"}" ); + GEOS_LOG( LvArray::system::stackTrace( true )); + } // Step 3.2: we are ready to add the right-hand side contributions, taking into account our equation layout @@ -1155,8 +1158,19 @@ void SinglePhaseBase::applySourceFluxBC( real64 const time_n, sum+=scaledContrib; } ); sum = MpiWrapper::sum( sum ); - GEOS_LOG_RANK_0( "Adds : { "<=1 ) + { + double effectiveRate = sum / dt; + GEOS_LOG_RANK_0( fs.getName() << ", " << subRegion.getName() << + ": Produced mass: " << sum << " kg" ); + GEOS_LOG_RANK_0( fs.getName() << ", " << subRegion.getName() << + ": Mean rate: " << effectiveRate << " kg/s" ); + } } } ); } ); From 0ec69b53b20cdb96f4d74505dc5fa47ef9d06fe1 Mon Sep 17 00:00:00 2001 From: MelReyCG Date: Mon, 15 Jan 2024 13:42:25 +0100 Subject: [PATCH 05/98] annotations --- .../physicsSolvers/fluidFlow/SinglePhaseBase.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/coreComponents/physicsSolvers/fluidFlow/SinglePhaseBase.cpp b/src/coreComponents/physicsSolvers/fluidFlow/SinglePhaseBase.cpp index d5ba79aa33d..d5608e96e67 100644 --- a/src/coreComponents/physicsSolvers/fluidFlow/SinglePhaseBase.cpp +++ b/src/coreComponents/physicsSolvers/fluidFlow/SinglePhaseBase.cpp @@ -1014,6 +1014,7 @@ void SinglePhaseBase::applySourceFluxBC( real64 const time_n, if( isThermal ) { + // message à supprimer / résumer char const msg[] = "SinglePhaseBase {} with isThermal = 1. At time {}s, " "the <{}> source flux boundary condition '{}' will be applied with the following behavior" "\n - negative value (injection): the mass balance equation is modified to considered the additional source term" @@ -1064,6 +1065,7 @@ void SinglePhaseBase::applySourceFluxBC( real64 const time_n, return 0.0; } ); + // à suppr. if( fs.getLogLevel()>=3 ) { GEOS_LOG( "SourceFlux "<< fs.getName() << "\n" << @@ -1158,11 +1160,13 @@ void SinglePhaseBase::applySourceFluxBC( real64 const time_n, sum+=scaledContrib; } ); sum = MpiWrapper::sum( sum ); + // à suppr. if( fs.getLogLevel()>=2 ) { GEOS_LOG_RANK_0( fs.getName() << ", " << subRegion.getName() << " adds : { "<=1 ) { double effectiveRate = sum / dt; From 67d8a7ea858ccb4934dcac5d7f8f1ae5bdb34404 Mon Sep 17 00:00:00 2001 From: MelReyCG Date: Tue, 16 Jan 2024 10:09:32 +0100 Subject: [PATCH 06/98] cleaning --- .../fluidFlow/SinglePhaseBase.cpp | 53 +++++++------------ 1 file changed, 18 insertions(+), 35 deletions(-) diff --git a/src/coreComponents/physicsSolvers/fluidFlow/SinglePhaseBase.cpp b/src/coreComponents/physicsSolvers/fluidFlow/SinglePhaseBase.cpp index d5608e96e67..76bf7a5bd35 100644 --- a/src/coreComponents/physicsSolvers/fluidFlow/SinglePhaseBase.cpp +++ b/src/coreComponents/physicsSolvers/fluidFlow/SinglePhaseBase.cpp @@ -58,6 +58,13 @@ SinglePhaseBase::SinglePhaseBase( const string & name, setApplyDefaultValue( 0.0 ). setInputFlag( InputFlags::OPTIONAL ). setDescription( "Temperature" ); + + getWrapper( viewKeyStruct::isThermalString() ). + setDescription( GEOS_FMT( "\nSourceFluxes application if {} is enabled :\n" + "- negative value (injection): the mass balance equation is modified to considered the additional source term,\n" + "- positive value (production): both the mass balance and the energy balance equations are modified to considered the additional source term.\n" + "For the energy balance equation, the mass flux is multipied by the enthalpy in the cell from which the fluid is being produced.", + viewKeyStruct::isThermalString() ) ); } @@ -1011,18 +1018,6 @@ void SinglePhaseBase::applySourceFluxBC( real64 const time_n, GEOS_LOG_RANK_0( GEOS_FMT( bcLogMessage, getName(), time_n+dt, SourceFluxBoundaryCondition::catalogName(), fs.getName(), setName, subRegion.getName(), fs.getScale(), numTargetElems ) ); - - if( isThermal ) - { - // message à supprimer / résumer - char const msg[] = "SinglePhaseBase {} with isThermal = 1. At time {}s, " - "the <{}> source flux boundary condition '{}' will be applied with the following behavior" - "\n - negative value (injection): the mass balance equation is modified to considered the additional source term" - "\n - positive value (production): both the mass balance and the energy balance equations are modified to considered the additional source term. " \ - "\n For the energy balance equation, the mass flux is multipied by the enthalpy in the cell from which the fluid is being produced."; - GEOS_LOG_RANK_0( GEOS_FMT( msg, - getName(), time_n+dt, SourceFluxBoundaryCondition::catalogName(), fs.getName() ) ); - } } if( targetSet.size() == 0 ) @@ -1065,16 +1060,6 @@ void SinglePhaseBase::applySourceFluxBC( real64 const time_n, return 0.0; } ); - // à suppr. - if( fs.getLogLevel()>=3 ) - { - GEOS_LOG( "SourceFlux "<< fs.getName() << "\n" << - " - targetSet elem count = "<< targetSet.size() << "\n" << - " - contribs = {"<< stringutilities::join( rhsContributionArray, ", " ) <<"}" ); - GEOS_LOG( LvArray::system::stackTrace( true )); - } - - // Step 3.2: we are ready to add the right-hand side contributions, taking into account our equation layout // get the normalizer @@ -1133,7 +1118,6 @@ void SinglePhaseBase::applySourceFluxBC( real64 const time_n, else { real64 sum=0.0; - std::ostringstream strt; forAll< parallelDevicePolicy<> >( targetSet.size(), [sizeScalingFactor, targetSet, rankOffset, @@ -1155,25 +1139,24 @@ void SinglePhaseBase::applySourceFluxBC( real64 const time_n, globalIndex const rowIndex = dofNumber[ei] - rankOffset; real64 const scaledContrib = rhsContributionArrayView[a] / sizeScalingFactor; // scale the contribution by the sizeScalingFactor // here! - strt<=2 ) - { - GEOS_LOG_RANK_0( fs.getName() << ", " << subRegion.getName() << - " adds : { "<=1 ) + if( fs.getLogLevel() >= 1 ) { double effectiveRate = sum / dt; - GEOS_LOG_RANK_0( fs.getName() << ", " << subRegion.getName() << + + GEOS_LOG_RANK_0( fs.getName() << ", " << setName << ", " << subRegion.getName() << ": Produced mass: " << sum << " kg" ); - GEOS_LOG_RANK_0( fs.getName() << ", " << subRegion.getName() << - ": Mean rate: " << effectiveRate << " kg/s" ); + GEOS_LOG_RANK_0( fs.getName() << ", " << setName << ", " << subRegion.getName() << + ": Production rate: " << effectiveRate << " kg/s" ); } } } ); From f89e2d8a63fc93a7089530fbb7146e5515cc8726 Mon Sep 17 00:00:00 2001 From: MelReyCG Date: Fri, 19 Jan 2024 10:16:13 +0100 Subject: [PATCH 07/98] completed previous commit --- .../physicsSolvers/fluidFlow/SinglePhaseBase.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/coreComponents/physicsSolvers/fluidFlow/SinglePhaseBase.cpp b/src/coreComponents/physicsSolvers/fluidFlow/SinglePhaseBase.cpp index 2dcbb4a5de8..12af110316f 100644 --- a/src/coreComponents/physicsSolvers/fluidFlow/SinglePhaseBase.cpp +++ b/src/coreComponents/physicsSolvers/fluidFlow/SinglePhaseBase.cpp @@ -1152,9 +1152,10 @@ void SinglePhaseBase::applySourceFluxBC( real64 const time_n, if( fs.getLogLevel() >= 1 && logger::internal::rank == 0 ) { double effectiveRate = sum / dt; + globalIndex const numTargetElems = MpiWrapper::sum< globalIndex >( targetSet.size() ); GEOS_LOG_RANK_0( GEOS_FMT( "{}: applied on {} elements in region {}", - fs.getName(), ???, subRegion.getName() ) ); + fs.getName(), numTargetElems, subRegion.getName() ) ); GEOS_LOG_RANK_0( GEOS_FMT( "{}: Produced mass = {} kg", fs.getName(), sum ) ); GEOS_LOG_RANK_0( GEOS_FMT( "{}: Production rate = {} kg/s", From e0592ede576376b192213a032a856b49b2e958f2 Mon Sep 17 00:00:00 2001 From: MelReyCG Date: Fri, 19 Jan 2024 14:32:17 +0100 Subject: [PATCH 08/98] Add the logLevel viewkey & description --- src/coreComponents/dataRepository/Group.cpp | 8 ++++---- src/coreComponents/dataRepository/Group.hpp | 9 +++++++++ 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/src/coreComponents/dataRepository/Group.cpp b/src/coreComponents/dataRepository/Group.cpp index f97ed5840ff..2da6dfaf670 100644 --- a/src/coreComponents/dataRepository/Group.cpp +++ b/src/coreComponents/dataRepository/Group.cpp @@ -644,12 +644,12 @@ void Group::postRestartInitializationRecursive() void Group::enableLogLevelInput() { - string const logLevelString = "logLevel"; - - registerWrapper( logLevelString, &m_logLevel ). + // TODO : Improve the Log Level description to clearly assign a usecase per log level (incoming PR). + registerWrapper( viewKeyStruct::logLevelString(), &m_logLevel ). setApplyDefaultValue( 0 ). setInputFlag( InputFlags::OPTIONAL ). - setDescription( "Log level" ); + setDescription( "Sets the level of information to write in the standard output (the console typically).\n" + "A level of 0 outputs minimal information, higher levels require more." ); } Group const & Group::getBaseGroupByPath( string const & path ) const diff --git a/src/coreComponents/dataRepository/Group.hpp b/src/coreComponents/dataRepository/Group.hpp index 6192f3cddab..84a26c1af6b 100644 --- a/src/coreComponents/dataRepository/Group.hpp +++ b/src/coreComponents/dataRepository/Group.hpp @@ -1414,6 +1414,15 @@ class Group */ void setInputFlags( InputFlags flags ) { m_input_flags = flags; } + /** + * @struct viewKeyStruct holds char strings and viewKeys for fast lookup + */ + struct viewKeyStruct + { + /// String for the logLevel wrapper + constexpr static char const * logLevelString() { return "logLevel"; } + }; + ///@} /** From 078e6edc07dff97fc3cfe3be9f270d14e5a785b8 Mon Sep 17 00:00:00 2001 From: MelReyCG Date: Fri, 19 Jan 2024 14:32:40 +0100 Subject: [PATCH 09/98] Add a way to expend the description of a wrapper --- src/coreComponents/dataRepository/Wrapper.hpp | 9 +++++++++ src/coreComponents/dataRepository/WrapperBase.hpp | 11 +++++++++++ 2 files changed, 20 insertions(+) diff --git a/src/coreComponents/dataRepository/Wrapper.hpp b/src/coreComponents/dataRepository/Wrapper.hpp index 404225490af..b3193af0ee5 100644 --- a/src/coreComponents/dataRepository/Wrapper.hpp +++ b/src/coreComponents/dataRepository/Wrapper.hpp @@ -893,6 +893,15 @@ class Wrapper final : public WrapperBase return *this; } + /** + * @copydoc WrapperBase::appendDescription(string const &) + */ + Wrapper< T > & appendDescription( string const & description ) + { + WrapperBase::appendDescription( description ); + return *this; + } + /** * @copydoc WrapperBase::setRegisteringObjects(string const &) */ diff --git a/src/coreComponents/dataRepository/WrapperBase.hpp b/src/coreComponents/dataRepository/WrapperBase.hpp index 542863e03b9..d44e24c2e6b 100644 --- a/src/coreComponents/dataRepository/WrapperBase.hpp +++ b/src/coreComponents/dataRepository/WrapperBase.hpp @@ -508,6 +508,17 @@ class WrapperBase return *this; } + /** + * @brief Add up more text to the existing description string of the wrapper. + * @param description the description to add to the end of the previous one. + * @return a pointer to this wrapper + */ + WrapperBase & appendDescription( string const & description ) + { + m_description += description; + return *this; + } + /** * @brief Get the description string of the wrapper. * @return this wrapper's description string From 5b8f213c6430b3e01d313d48618e573ab0c3b605 Mon Sep 17 00:00:00 2001 From: MelReyCG Date: Fri, 19 Jan 2024 14:34:53 +0100 Subject: [PATCH 10/98] Intermediate progress to properly store the SourceFlux stats --- .../fluidFlow/SinglePhaseBase.cpp | 148 +++++++++++------- 1 file changed, 89 insertions(+), 59 deletions(-) diff --git a/src/coreComponents/physicsSolvers/fluidFlow/SinglePhaseBase.cpp b/src/coreComponents/physicsSolvers/fluidFlow/SinglePhaseBase.cpp index 12af110316f..2f2fe1c3a30 100644 --- a/src/coreComponents/physicsSolvers/fluidFlow/SinglePhaseBase.cpp +++ b/src/coreComponents/physicsSolvers/fluidFlow/SinglePhaseBase.cpp @@ -58,6 +58,13 @@ SinglePhaseBase::SinglePhaseBase( const string & name, setApplyDefaultValue( 0.0 ). setInputFlag( InputFlags::OPTIONAL ). setDescription( "Temperature" ); + + this->getWrapper< integer >( string( viewKeyStruct::isThermalString() ) ). + setDescription( GEOS_FMT( "\nSourceFluxes application if {} is enabled :\n" + "- negative value (injection): the mass balance equation is modified to considered the additional source term,\n" + "- positive value (production): both the mass balance and the energy balance equations are modified to considered the additional source term.\n" + "For the energy balance equation, the mass flux is multipied by the enthalpy in the cell from which the fluid is being produced.", + viewKeyStruct::isThermalString() ) ); } @@ -838,20 +845,20 @@ void SinglePhaseBase::applyBoundaryConditions( real64 time_n, namespace { -char const bcLogMessage[] = - "SinglePhaseBase {}: at time {}s, " - "the <{}> boundary condition '{}' is applied to the element set '{}' in subRegion '{}'. " - "\nThe scale of this boundary condition is {} and multiplies the value of the provided function (if any). " - "\nThe total number of target elements (including ghost elements) is {}. " - "\nNote that if this number is equal to zero for all subRegions, the boundary condition will not be applied on this element set."; +//!\\ TODO : remove this as the SourceFluxStatistics exist to output these info (and more) +//!\\ char const bcLogMessage[] = +//!\\ "SinglePhaseBase {}: at time {}s, " +//!\\ "the <{}> boundary condition '{}' is applied to the element set '{}' in subRegion '{}'. " +//!\\ "\nThe scale of this boundary condition is {} and multiplies the value of the provided function (if any). " +//!\\ "\nThe total number of target elements (including ghost elements) is {}. " +//!\\ "\nNote that if this number is equal to zero for all subRegions, the boundary condition will not be applied on this element set."; void applyAndSpecifyFieldValue( real64 const & time_n, real64 const & dt, MeshLevel & mesh, globalIndex const rankOffset, string const dofKey, - bool const isFirstNonlinearIteration, - string const solverName, + bool const, integer const idof, string const fieldKey, string const boundaryFieldKey, @@ -864,18 +871,19 @@ void applyAndSpecifyFieldValue( real64 const & time_n, mesh, fieldKey, [&]( FieldSpecificationBase const & fs, - string const & setName, + string const &, SortedArrayView< localIndex const > const & lset, ElementSubRegionBase & subRegion, string const & ) { - if( fs.getLogLevel() >= 1 && isFirstNonlinearIteration ) - { - globalIndex const numTargetElems = MpiWrapper::sum< globalIndex >( lset.size() ); - GEOS_LOG_RANK_0( GEOS_FMT( bcLogMessage, - solverName, time_n+dt, FieldSpecificationBase::catalogName(), - fs.getName(), setName, subRegion.getName(), fs.getScale(), numTargetElems ) ); - } + //!\\ TODO : remove this as the SourceFluxStatistics exist to output these info (and more) + //!\\ if( fs.getLogLevel() >= 1 && isFirstNonlinearIteration ) + //!\\ { + //!\\ globalIndex const bcNumTargetElems = MpiWrapper::sum< globalIndex >( lset.size() ); + //!\\ GEOS_LOG_RANK_0( GEOS_FMT( bcLogMessage, + //!\\ solverName, time_n+dt, FieldSpecificationBase::catalogName(), + //!\\ fs.getName(), setName, subRegion.getName(), fs.getScale(), bcNumTargetElems ) ); + //!\\ } // Specify the bc value of the field fs.applyFieldValue< FieldSpecificationEqual, @@ -935,12 +943,12 @@ void SinglePhaseBase::applyDirichletBC( real64 const time_n, MeshLevel & mesh, arrayView1d< string const > const & ) { - applyAndSpecifyFieldValue( time_n, dt, mesh, rankOffset, dofKey, isFirstNonlinearIteration, getName(), + applyAndSpecifyFieldValue( time_n, dt, mesh, rankOffset, dofKey, isFirstNonlinearIteration, 0, fields::flow::pressure::key(), fields::flow::bcPressure::key(), localMatrix, localRhs ); if( m_isThermal ) { - applyAndSpecifyFieldValue( time_n, dt, mesh, rankOffset, dofKey, isFirstNonlinearIteration, getName(), + applyAndSpecifyFieldValue( time_n, dt, mesh, rankOffset, dofKey, isFirstNonlinearIteration, 1, fields::flow::temperature::key(), fields::flow::bcTemperature::key(), localMatrix, localRhs ); } @@ -1005,24 +1013,30 @@ void SinglePhaseBase::applySourceFluxBC( real64 const time_n, ElementSubRegionBase & subRegion, string const & ) { - if( fs.getLogLevel() >= 1 && m_nonlinearSolverParameters.m_numNewtonIterations == 0 ) - { - globalIndex const numTargetElems = MpiWrapper::sum< globalIndex >( targetSet.size() ); - GEOS_LOG_RANK_0( GEOS_FMT( bcLogMessage, - getName(), time_n+dt, SourceFluxBoundaryCondition::catalogName(), - fs.getName(), setName, subRegion.getName(), fs.getScale(), numTargetElems ) ); - - if( isThermal ) - { - char const msg[] = "SinglePhaseBase {} with isThermal = 1. At time {}s, " - "the <{}> source flux boundary condition '{}' will be applied with the following behavior" - "\n - negative value (injection): the mass balance equation is modified to considered the additional source term" - "\n - positive value (production): both the mass balance and the energy balance equations are modified to considered the additional source term. " \ - "\n For the energy balance equation, the mass flux is multipied by the enthalpy in the cell from which the fluid is being produced."; - GEOS_LOG_RANK_0( GEOS_FMT( msg, - getName(), time_n+dt, SourceFluxBoundaryCondition::catalogName(), fs.getName() ) ); - } - } + //!\\ TODO : remove this as the SourceFluxStatistics exist to output these info (and more) + //!\\ if( fs.getLogLevel() >= 1 && m_nonlinearSolverParameters.m_numNewtonIterations == 0 ) + //!\\ { + //!\\ globalIndex const numTargetElems = MpiWrapper::sum< globalIndex >( targetSet.size() ); + //!\\ GEOS_LOG_RANK_0( GEOS_FMT( bcLogMessage, + //!\\ getName(), time_n+dt, SourceFluxBoundaryCondition::catalogName(), + //!\\ fs.getName(), setName, subRegion.getName(), fs.getScale(), numTargetElems ) ); + + //!\\ if( isThermal ) + //!\\ { + //!\\ char const msg[] = "SinglePhaseBase {} with isThermal = 1. At time {}s, " + //!\\ "the <{}> source flux boundary condition '{}' will be applied with the following behavior" + //!\\ "\n - negative value (injection): the mass balance equation is modified to considered the additional + //! source + //!\\ term" + //!\\ "\n - positive value (production): both the mass balance and the energy balance equations are modified to + //!\\ considered the additional source term. " + //!\\ "\n For the energy balance equation, the mass flux is multipied by the enthalpy in the cell from which + //! the + //!\\ fluid is being produced."; + //!\\ GEOS_LOG_RANK_0( GEOS_FMT( msg, + //!\\ getName(), time_n+dt, SourceFluxBoundaryCondition::catalogName(), fs.getName() ) ); + //!\\ } + //!\\ } if( targetSet.size() == 0 ) { @@ -1038,6 +1052,14 @@ void SinglePhaseBase::applySourceFluxBC( real64 const time_n, return; } + //!\\ TODO : store those values in a SourceFluxStatistics::Stats + //!\\ // init source flux statistics + //!\\ // TODO: extract those local variables in a dedicated class. Need to re-init them before ... + //!\\ real64 bcProducedMass = 0.0; + //!\\ globalIndex bcNumTargetElems = 0; + //!\\ // TODO: collect region names rather than sub-region names (need ElementSubRegionBase::getRegionName()) + //!\\ std::set< string > bcRegions; + arrayView1d< globalIndex const > const dofNumber = subRegion.getReference< array1d< globalIndex > >( dofKey ); arrayView1d< integer const > const ghostRank = subRegion.ghostRank(); @@ -1101,6 +1123,8 @@ void SinglePhaseBase::applySourceFluxBC( real64 const time_n, globalIndex const energyRowIndex = massRowIndex + 1; real64 const rhsValue = rhsContributionArrayView[a] / sizeScalingFactor; // scale the contribution by the sizeScalingFactor here! localRhs[massRowIndex] += rhsValue; + //!\\ TODO : store those values in a SourceFluxStatistics::Stats + //!\\ bcProducedMass += rhsValue; //add the value to the energey balance equation if the flux is positive (i.e., it's a producer) if( rhsContributionArrayView[a] > 0.0 ) { @@ -1121,15 +1145,13 @@ void SinglePhaseBase::applySourceFluxBC( real64 const time_n, } else { - real64 sum=0.0; forAll< parallelDevicePolicy<> >( targetSet.size(), [sizeScalingFactor, targetSet, rankOffset, ghostRank, dofNumber, rhsContributionArrayView, - localRhs, - &sum] GEOS_HOST_DEVICE ( localIndex const a ) + localRhs] GEOS_HOST_DEVICE ( localIndex const a ) { // we need to filter out ghosts here, because targetSet may contain them localIndex const ei = targetSet[a]; @@ -1140,28 +1162,36 @@ void SinglePhaseBase::applySourceFluxBC( real64 const time_n, // add the value to the mass balance equation globalIndex const rowIndex = dofNumber[ei] - rankOffset; - real64 const scaledContrib = rhsContributionArrayView[a] / sizeScalingFactor; - localRhs[rowIndex] += scaledContrib; - sum += scaledContrib; + real64 const rhsValue = rhsContributionArrayView[a] / sizeScalingFactor; + localRhs[rowIndex] += rhsValue; + //!\\ TODO : store those values in a SourceFluxStatistics::Stats + //!\\ bcProducedMass += rhsValue; } ); - // Output the flux rate in the console. - // TODO: 1. Maintain the folowing PR to base on the following "TODO" : - // https://github.com/GEOS-DEV/GEOS/compare/develop...feature/untereiner/export_stats - // TODO: 2. Create a dedicated SourceFluxStatistics class, send the logging part of this code in it, and do so for every flow solver - sum = MpiWrapper::sum( sum ); - if( fs.getLogLevel() >= 1 && logger::internal::rank == 0 ) - { - double effectiveRate = sum / dt; - globalIndex const numTargetElems = MpiWrapper::sum< globalIndex >( targetSet.size() ); - - GEOS_LOG_RANK_0( GEOS_FMT( "{}: applied on {} elements in region {}", - fs.getName(), numTargetElems, subRegion.getName() ) ); - GEOS_LOG_RANK_0( GEOS_FMT( "{}: Produced mass = {} kg", - fs.getName(), sum ) ); - GEOS_LOG_RANK_0( GEOS_FMT( "{}: Production rate = {} kg/s", - fs.getName(), effectiveRate ) ); - } } + + //!\\ TODO : store those values in a SourceFluxStatistics::Stats + //!\\ jjbcNumTargetElems += targetSet.size(); + //!\\ jjbcRegions.insert( subRegion.getName() ); + + //!\\ // compile all stats from every ranks + //!\\ bcProducedMass = MpiWrapper::sum( bcProducedMass ); + //!\\ bcNumTargetElems = MpiWrapper::sum( bcNumTargetElems ); + //!\\ // Output the flux rate in the console. + //!\\ // TODO: 1. Create a dedicated SourceFluxStatistics class, send the logging part of this code in it, and do so for every flow + //!\\ solver + //!\\ // TODO: 2. Maintain the folowing PR to base SourceFluxStatistics on: + //!\\ // https://github.com/GEOS-DEV/GEOS/compare/develop...feature/untereiner/export_stats + //!\\ if( fs.getLogLevel() >= 1 && logger::internal::rank == 0 ) + //!\\ { + //!\\ double effectiveRate = bcProducedMass / dt; + + //!\\ GEOS_LOG_RANK_0( GEOS_FMT( "{}: applied on {} elements in sub-region {}", + //!\\ fs.getName(), bcNumTargetElems, stringutilities::join( bcRegions, ", " ) ) ); + //!\\ GEOS_LOG_RANK_0( GEOS_FMT( "{}: Produced mass = {} kg", + //!\\ fs.getName(), bcProducedMass ) ); + //!\\ GEOS_LOG_RANK_0( GEOS_FMT( "{}: Production rate = {} kg/s", + //!\\ fs.getName(), effectiveRate ) ); + //!\\ } } ); } ); } From 953ec3aed3303ef545a771e1fe73e86399cb00a0 Mon Sep 17 00:00:00 2001 From: MelReyCG Date: Fri, 19 Jan 2024 14:36:15 +0100 Subject: [PATCH 11/98] adding the SourceFluxStatistics Task which will allow to aggregate statistics of SourceFluxBoundaryCondition (WIP) --- .../SourceFluxStatistics.cpp | 131 ++++++++++++++++++ .../SourceFluxStatistics.hpp | 127 +++++++++++++++++ 2 files changed, 258 insertions(+) create mode 100644 src/coreComponents/fieldSpecification/SourceFluxStatistics.cpp create mode 100644 src/coreComponents/fieldSpecification/SourceFluxStatistics.hpp diff --git a/src/coreComponents/fieldSpecification/SourceFluxStatistics.cpp b/src/coreComponents/fieldSpecification/SourceFluxStatistics.cpp new file mode 100644 index 00000000000..fe3e53223ee --- /dev/null +++ b/src/coreComponents/fieldSpecification/SourceFluxStatistics.cpp @@ -0,0 +1,131 @@ +/* + * ------------------------------------------------------------------------------------------------------------ + * SPDX-License-Identifier: LGPL-2.1-only + * + * Copyright (c) 2018-2020 Lawrence Livermore National Security LLC + * Copyright (c) 2018-2020 The Board of Trustees of the Leland Stanford Junior University + * Copyright (c) 2018-2020 TotalEnergies + * Copyright (c) 2019- GEOSX Contributors + * All rights reserved + * + * See top level LICENSE, COPYRIGHT, CONTRIBUTORS, NOTICE, and ACKNOWLEDGEMENTS files for details. + * ------------------------------------------------------------------------------------------------------------ + */ + +/** + * @file SourceFluxStatistics.cpp + */ + +//TODO add a test for this component in SinglePhase and MultiPhase + +#include "SourceFluxStatistics.hpp" + +#include "SourceFluxBoundaryCondition.hpp" +#include "FieldSpecificationManager.hpp" + +namespace geos +{ +using namespace dataRepository; + +SourceFluxStatistics::SourceFluxStatistics( const string & name, + Group * const parent ): + Base( name, parent ) +{ + getWrapper< integer >( Group::viewKeyStruct::logLevelString ). + appendDescription( GEOS_FMT( "\n- Log Level 1 outputs the sum of all {0}(s) produced rate & mass,\n" + "- Log Level 2 outputs detailed values for each {0}.", + SourceFluxBoundaryCondition::catalogName() ) ); + + registerWrapper( viewKeyStruct::setNamesString(), &m_fluxNames ). + setRTTypeName( rtTypes::CustomTypes::groupNameRefArray ). + setInputFlag( InputFlags::REQUIRED ). + setSizedFromParent( 0 ). + setDescription( GEOS_FMT( "Name(s) array of the {0}(s) for which we want the statistics." + "Use \"{ all }\" to target all {0}.", + SourceFluxBoundaryCondition::catalogName() ) ); +} + +void SourceFluxStatistics::postProcessInput() +{ + FieldSpecificationManager & fsManager = FieldSpecificationManager::getInstance(); + if( m_fluxNames.size() == 1 && m_fluxNames[0] == "all" ) + { + m_fluxNames.clear(); + fsManager.forSubGroups< SourceFluxBoundaryCondition >( [&]( SourceFluxBoundaryCondition & sourceFlux ) + { + m_set.push_back( &sourceFlux ); + } ); + } + else + { + for( string const & fluxName : m_fluxNames ) + { + //TODO : test this error + GEOS_ERROR_IF( !fsManager.hasGroup< SourceFluxBoundaryCondition >( fluxName ), + GEOS_FMT( "{}: No {} named {} was found in {}.", + getDataContext(), SourceFluxBoundaryCondition::catalogName(), + fluxName, fs.getDataContext() ) ); + } + } + //TODO : remove that + for( string const & flux : m_set ) + { + GEOS_LOG( flux.getName()); + } +} + +void SourceFluxStatistics::registerDataOnMesh( Group & meshBodies ) +{ + // the fields have to be registered in "registerDataOnMesh" (and not later) + // otherwise they cannot be targeted by TimeHistory + + // for now, this guard is needed to avoid breaking the xml schema generation + if( m_solver == nullptr ) + { + return; + } + + m_solver->forDiscretizationOnMeshTargets( meshBodies, [&] ( string const &, + MeshLevel & mesh, + arrayView1d< string const > const & ) + { + mesh.getElemManager().forElementRegions( [&]( ElementRegionBase const & region ) + { + + WrapperBase & regionStats = region.registerWrapper< Stats >( getRegionStatsName() ); + regionStats.setRestartFlags( RestartFlags::NO_WRITE ); + + region.excludeWrappersFromPacking( { getRegionStatsName() } ); + } ); + } ); +} + +void SourceFluxStatistics::writeStats( SourceFluxStatistics::Stats const & stats ) + +bool SourceFluxStatistics::execute( real64 const GEOS_UNUSED_PARAM( time_n ), + real64 const GEOS_UNUSED_PARAM( dt ), + integer const GEOS_UNUSED_PARAM( cycleNumber ), + integer const GEOS_UNUSED_PARAM( eventCounter ), + real64 const GEOS_UNUSED_PARAM( eventProgress ), + DomainPartition & domain ) +{ + if( getLogLevel() >= 1 ) + { + // m_solver->forDiscretizationOnMeshTargets( domain.getMeshBodies(), [&] ( string const &, + // MeshLevel & mesh, + // arrayView1d< string const > const & regionNames ) + { + //TODO : get back all regions info on sourceflux region stat wrappers + GEOS_LOG( GEOS_FMT( "{} {}: SourceFluxStatistics::execute::allFluxStats not yet implemented", + catalogName(), getName() ) ); + if( getLogLevel() >= 2 ) + { + GEOS_LOG( GEOS_FMT( "{} {}: SourceFluxStatistics::execute::perFluxStats not yet implemented", + catalogName(), getName() ) ); + } + } //); + } + return false; +} + +} /* namespace geos */ diff --git a/src/coreComponents/fieldSpecification/SourceFluxStatistics.hpp b/src/coreComponents/fieldSpecification/SourceFluxStatistics.hpp new file mode 100644 index 00000000000..55ec1a96844 --- /dev/null +++ b/src/coreComponents/fieldSpecification/SourceFluxStatistics.hpp @@ -0,0 +1,127 @@ +/* + * ------------------------------------------------------------------------------------------------------------ + * SPDX-License-Identifier: LGPL-2.1-only + * + * Copyright (c) 2018-2020 Lawrence Livermore National Security LLC + * Copyright (c) 2018-2020 The Board of Trustees of the Leland Stanford Junior University + * Copyright (c) 2018-2020 TotalEnergies + * Copyright (c) 2019- GEOSX Contributors + * All rights reserved + * + * See top level LICENSE, COPYRIGHT, CONTRIBUTORS, NOTICE, and ACKNOWLEDGEMENTS files for details. + * ------------------------------------------------------------------------------------------------------------ + */ + +/** + * @file SinglePhaseStatistics.hpp + */ + +#ifndef SRC_CORECOMPONENTS_PHYSICSSOLVERS_FLUIDFLOW_SINGLEPHASESTATISTICS_HPP_ +#define SRC_CORECOMPONENTS_PHYSICSSOLVERS_FLUIDFLOW_SINGLEPHASESTATISTICS_HPP_ + +#include "physicsSolvers/FieldStatisticsBase.hpp" + +class SourceFluxBoundaryCondition; + +namespace geos +{ + +/** + * @class SourceFluxStatistics + * + * Task class allowing for the computation of aggregate statistics of SourceFluxBoundaryCondition + */ +class SourceFluxStatistics : public FieldStatisticsBase< SinglePhaseBase > +{ +public: + + /** + * @brief Statistics flux data in the whole mesh or in a precise region + */ + struct Stats + { + /// fluid mass produced by the flux(es) (kg) + real64 producedMass; + /// flux(es) production rate (kg/s) + real64 productionRate; + }; + + /** + * @brief Constructor for the statistics class + * @param[in] name the name of the task coming from the xml + * @param[in] parent the parent group of the task + */ + SourceFluxStatistics( const string & name, + Group * const parent ); + + /// Accessor for the catalog name + static string catalogName() { return "SourceFluxStatistics"; } + + /** + * @defgroup Tasks Interface Functions + * + * This function implements the interface defined by the abstract TaskBase class + */ + /**@{*/ + + virtual bool execute( real64 const time_n, + real64 const dt, + integer const cycleNumber, + integer const eventCounter, + real64 const eventProgress, + DomainPartition & domain ) override; + + /**@}*/ + + /** + * @brief View keys + */ + struct viewKeyStruct + { + /// @return The key for setName + constexpr static char const * setNamesString() { return "setNames"; } + }; + +protected: + + void postProcessInput() override; + +private: + using Base = FieldStatisticsBase< SinglePhaseBase >; + + /// the names of the SourceFlux(s) for which we want the statistics + string_array m_fluxNames; + /// Internal array of the SourceFlux(s) for which we want the statistics + std::vector< SourceFluxBoundaryCondition * > m_fluxes; + + /** + * @return a string used to name the wrapper that is added to each region that is simulated by + * the solver. The string is based on the name of this Group so it is unique within the region. + */ + string getRegionStatsName( string_view fluxName ) + { + return GEOS_FMT( "{}_region_{}_Stats", + getName(), fluxName ); + } + + /** + * @copydoc Group::registerDataOnMesh(Group &) + */ + void registerDataOnMesh( Group & meshBodies ) override; + + /** + * @param Stats the statistics that must be output in the log + */ + static void logStats( Stats const & stats ) override; + +}; + + +/******************************** SourceFluxStatisticsKernel ********************************/ +struct SourceFluxStatisticsKernel +{}; + + +} /* namespace geos */ + +#endif /* SRC_CORECOMPONENTS_PHYSICSSOLVERS_FLUIDFLOW_SINGLEPHASESTATISTICS_HPP_ */ From 1a9fe0c7519b172c6e3d418827174179fca42994 Mon Sep 17 00:00:00 2001 From: MelReyCG Date: Fri, 19 Jan 2024 14:37:58 +0100 Subject: [PATCH 12/98] simplify description to avoid regenerating a lot of .rst (to be added in a more specific PR later) --- src/coreComponents/dataRepository/Group.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/coreComponents/dataRepository/Group.cpp b/src/coreComponents/dataRepository/Group.cpp index 2da6dfaf670..b2f80b3954c 100644 --- a/src/coreComponents/dataRepository/Group.cpp +++ b/src/coreComponents/dataRepository/Group.cpp @@ -648,8 +648,7 @@ void Group::enableLogLevelInput() registerWrapper( viewKeyStruct::logLevelString(), &m_logLevel ). setApplyDefaultValue( 0 ). setInputFlag( InputFlags::OPTIONAL ). - setDescription( "Sets the level of information to write in the standard output (the console typically).\n" - "A level of 0 outputs minimal information, higher levels require more." ); + setDescription( "Log level" ); } Group const & Group::getBaseGroupByPath( string const & path ) const From 814fd34a5cab11c32a0125a17e968399c21f9394 Mon Sep 17 00:00:00 2001 From: MelReyCG Date: Fri, 19 Jan 2024 15:51:36 +0100 Subject: [PATCH 13/98] missed a few details --- .../fieldSpecification/SourceFluxStatistics.hpp | 6 +++--- .../physicsSolvers/fluidFlow/SinglePhaseBase.cpp | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/coreComponents/fieldSpecification/SourceFluxStatistics.hpp b/src/coreComponents/fieldSpecification/SourceFluxStatistics.hpp index 55ec1a96844..1eb063bf790 100644 --- a/src/coreComponents/fieldSpecification/SourceFluxStatistics.hpp +++ b/src/coreComponents/fieldSpecification/SourceFluxStatistics.hpp @@ -31,7 +31,7 @@ namespace geos * * Task class allowing for the computation of aggregate statistics of SourceFluxBoundaryCondition */ -class SourceFluxStatistics : public FieldStatisticsBase< SinglePhaseBase > +class SourceFluxStatistics : public FieldStatisticsBase< FlowSolverBase > { public: @@ -40,9 +40,9 @@ class SourceFluxStatistics : public FieldStatisticsBase< SinglePhaseBase > */ struct Stats { - /// fluid mass produced by the flux(es) (kg) + /// fluid mass produced by the flux(es) (kg). Negative if injecting. real64 producedMass; - /// flux(es) production rate (kg/s) + /// flux(es) production rate (kg/s). Negative if injecting. real64 productionRate; }; diff --git a/src/coreComponents/physicsSolvers/fluidFlow/SinglePhaseBase.cpp b/src/coreComponents/physicsSolvers/fluidFlow/SinglePhaseBase.cpp index 2f2fe1c3a30..3a6feaea719 100644 --- a/src/coreComponents/physicsSolvers/fluidFlow/SinglePhaseBase.cpp +++ b/src/coreComponents/physicsSolvers/fluidFlow/SinglePhaseBase.cpp @@ -60,7 +60,7 @@ SinglePhaseBase::SinglePhaseBase( const string & name, setDescription( "Temperature" ); this->getWrapper< integer >( string( viewKeyStruct::isThermalString() ) ). - setDescription( GEOS_FMT( "\nSourceFluxes application if {} is enabled :\n" + appendDescription( GEOS_FMT( "\nSourceFluxes application if {} is enabled :\n" "- negative value (injection): the mass balance equation is modified to considered the additional source term,\n" "- positive value (production): both the mass balance and the energy balance equations are modified to considered the additional source term.\n" "For the energy balance equation, the mass flux is multipied by the enthalpy in the cell from which the fluid is being produced.", From 818fcc25a17efc1d89d0d2a2d6f7aa4082909a8c Mon Sep 17 00:00:00 2001 From: MelReyCG Date: Fri, 19 Jan 2024 15:58:29 +0100 Subject: [PATCH 14/98] forgotten generated files... --- .../schema/docs/AcousticElasticSEM.rst | 18 +++ .../schema/docs/AcousticElasticSEM_other.rst | 13 +++ .../schema/docs/Constitutive.rst | 11 +- .../schema/docs/Constitutive_other.rst | 11 +- .../docs/PorousDamageElasticIsotropic.rst | 13 +++ .../PorousDamageElasticIsotropic_other.rst | 9 ++ .../PorousDamageSpectralElasticIsotropic.rst | 13 +++ ...usDamageSpectralElasticIsotropic_other.rst | 9 ++ .../PorousDamageVolDevElasticIsotropic.rst | 13 +++ ...rousDamageVolDevElasticIsotropic_other.rst | 9 ++ .../schema/docs/PorousViscoDruckerPrager.rst | 18 +-- .../docs/PorousViscoExtendedDruckerPrager.rst | 18 +-- .../docs/PorousViscoModifiedCamClay.rst | 18 +-- src/coreComponents/schema/docs/Solvers.rst | 1 + .../schema/docs/Solvers_other.rst | 1 + src/coreComponents/schema/schema.xsd | 108 +++++++++++++++--- src/coreComponents/schema/schema.xsd.other | 54 ++++++--- src/docs/sphinx/CompleteXMLSchema.rst | 68 ++++++++++- 18 files changed, 331 insertions(+), 74 deletions(-) create mode 100644 src/coreComponents/schema/docs/AcousticElasticSEM.rst create mode 100644 src/coreComponents/schema/docs/AcousticElasticSEM_other.rst create mode 100644 src/coreComponents/schema/docs/PorousDamageElasticIsotropic.rst create mode 100644 src/coreComponents/schema/docs/PorousDamageElasticIsotropic_other.rst create mode 100644 src/coreComponents/schema/docs/PorousDamageSpectralElasticIsotropic.rst create mode 100644 src/coreComponents/schema/docs/PorousDamageSpectralElasticIsotropic_other.rst create mode 100644 src/coreComponents/schema/docs/PorousDamageVolDevElasticIsotropic.rst create mode 100644 src/coreComponents/schema/docs/PorousDamageVolDevElasticIsotropic_other.rst diff --git a/src/coreComponents/schema/docs/AcousticElasticSEM.rst b/src/coreComponents/schema/docs/AcousticElasticSEM.rst new file mode 100644 index 00000000000..8a99bd42d0f --- /dev/null +++ b/src/coreComponents/schema/docs/AcousticElasticSEM.rst @@ -0,0 +1,18 @@ + + +========================= ================== ======== ======================================================================================================================================================================================================================================================================================================================== +Name Type Default Description +========================= ================== ======== ======================================================================================================================================================================================================================================================================================================================== +acousticSolverName groupNameRef required Name of the acoustic solver used by the coupled solver +cflFactor real64 0.5 Factor to apply to the `CFL condition `_ when calculating the maximum allowable time step. Values should be in the interval (0,1] +discretization groupNameRef required Name of discretization object (defined in the :ref:`NumericalMethodsManager`) to use for this solver. For instance, if this is a Finite Element Solver, the name of a :ref:`FiniteElement` should be specified. If this is a Finite Volume Method, the name of a :ref:`FiniteVolume` discretization should be specified. +elasticSolverName groupNameRef required Name of the elastic solver used by the coupled solver +initialDt real64 1e+99 Initial time-step value required by the solver to the event manager. +logLevel integer 0 Log level +name groupName required A name is required for any non-unique nodes +targetRegions groupNameRef_array required Allowable regions that the solver may be applied to. Note that this does not indicate that the solver will be applied to these regions, only that allocation will occur such that the solver may be applied to these regions. The decision about what regions this solver will beapplied to rests in the EventManager. +LinearSolverParameters node unique :ref:`XML_LinearSolverParameters` +NonlinearSolverParameters node unique :ref:`XML_NonlinearSolverParameters` +========================= ================== ======== ======================================================================================================================================================================================================================================================================================================================== + + diff --git a/src/coreComponents/schema/docs/AcousticElasticSEM_other.rst b/src/coreComponents/schema/docs/AcousticElasticSEM_other.rst new file mode 100644 index 00000000000..3f1b37c3d6c --- /dev/null +++ b/src/coreComponents/schema/docs/AcousticElasticSEM_other.rst @@ -0,0 +1,13 @@ + + +========================= ============================================================================================================================================================== ================================================================ +Name Type Description +========================= ============================================================================================================================================================== ================================================================ +maxStableDt real64 Value of the Maximum Stable Timestep for this solver. +meshTargets geos_mapBase< std_pair< string, string >, LvArray_Array< string, 1, camp_int_seq< long, 0l >, int, LvArray_ChaiBuffer >, std_integral_constant< bool, true > > MeshBody/Region combinations that the solver will be applied to. +LinearSolverParameters node :ref:`DATASTRUCTURE_LinearSolverParameters` +NonlinearSolverParameters node :ref:`DATASTRUCTURE_NonlinearSolverParameters` +SolverStatistics node :ref:`DATASTRUCTURE_SolverStatistics` +========================= ============================================================================================================================================================== ================================================================ + + diff --git a/src/coreComponents/schema/docs/Constitutive.rst b/src/coreComponents/schema/docs/Constitutive.rst index 2f7c4bad4e0..f0a48fcf31f 100644 --- a/src/coreComponents/schema/docs/Constitutive.rst +++ b/src/coreComponents/schema/docs/Constitutive.rst @@ -51,16 +51,19 @@ ParallelPlatesPermeability node :ref:`XML_ParallelPla ParticleFluid node :ref:`XML_ParticleFluid` PerfectlyPlastic node :ref:`XML_PerfectlyPlastic` PermeabilityBase node :ref:`XML_PermeabilityBase` +PorousDamageElasticIsotropic node :ref:`XML_PorousDamageElasticIsotropic` +PorousDamageSpectralElasticIsotropic node :ref:`XML_PorousDamageSpectralElasticIsotropic` +PorousDamageVolDevElasticIsotropic node :ref:`XML_PorousDamageVolDevElasticIsotropic` PorousDelftEgg node :ref:`XML_PorousDelftEgg` PorousDruckerPrager node :ref:`XML_PorousDruckerPrager` PorousElasticIsotropic node :ref:`XML_PorousElasticIsotropic` PorousElasticOrthotropic node :ref:`XML_PorousElasticOrthotropic` PorousElasticTransverseIsotropic node :ref:`XML_PorousElasticTransverseIsotropic` PorousExtendedDruckerPrager node :ref:`XML_PorousExtendedDruckerPrager` -PorousModifiedCamClay node :ref:`XML_PorousModifiedCamClay` -PorousViscoDruckerPrager node :ref:`XML_PorousViscoDruckerPrager` -PorousViscoExtendedDruckerPrager node :ref:`XML_PorousViscoExtendedDruckerPrager` -PorousViscoModifiedCamClay node :ref:`XML_PorousViscoModifiedCamClay` +PorousModifiedCamClay node :ref:`XML_PorousModifiedCamClay` +PorousViscoDruckerPrager node :ref:`XML_PorousViscoDruckerPrager` +PorousViscoExtendedDruckerPrager node :ref:`XML_PorousViscoExtendedDruckerPrager` +PorousViscoModifiedCamClay node :ref:`XML_PorousViscoModifiedCamClay` PressurePorosity node :ref:`XML_PressurePorosity` ProppantPermeability node :ref:`XML_ProppantPermeability` ProppantPorosity node :ref:`XML_ProppantPorosity` diff --git a/src/coreComponents/schema/docs/Constitutive_other.rst b/src/coreComponents/schema/docs/Constitutive_other.rst index 06999731356..9ce0f20a901 100644 --- a/src/coreComponents/schema/docs/Constitutive_other.rst +++ b/src/coreComponents/schema/docs/Constitutive_other.rst @@ -51,16 +51,19 @@ ParallelPlatesPermeability node :ref:`DATASTRUCTURE_ParallelP ParticleFluid node :ref:`DATASTRUCTURE_ParticleFluid` PerfectlyPlastic node :ref:`DATASTRUCTURE_PerfectlyPlastic` PermeabilityBase node :ref:`DATASTRUCTURE_PermeabilityBase` +PorousDamageElasticIsotropic node :ref:`DATASTRUCTURE_PorousDamageElasticIsotropic` +PorousDamageSpectralElasticIsotropic node :ref:`DATASTRUCTURE_PorousDamageSpectralElasticIsotropic` +PorousDamageVolDevElasticIsotropic node :ref:`DATASTRUCTURE_PorousDamageVolDevElasticIsotropic` PorousDelftEgg node :ref:`DATASTRUCTURE_PorousDelftEgg` PorousDruckerPrager node :ref:`DATASTRUCTURE_PorousDruckerPrager` PorousElasticIsotropic node :ref:`DATASTRUCTURE_PorousElasticIsotropic` PorousElasticOrthotropic node :ref:`DATASTRUCTURE_PorousElasticOrthotropic` PorousElasticTransverseIsotropic node :ref:`DATASTRUCTURE_PorousElasticTransverseIsotropic` PorousExtendedDruckerPrager node :ref:`DATASTRUCTURE_PorousExtendedDruckerPrager` -PorousModifiedCamClay node :ref:`DATASTRUCTURE_PorousModifiedCamClay` -PorousViscoDruckerPrager node :ref:`DATASTRUCTURE_PorousViscoDruckerPrager` -PorousViscoExtendedDruckerPrager node :ref:`DATASTRUCTURE_PorousViscoExtendedDruckerPrager` -PorousViscoModifiedCamClay node :ref:`DATASTRUCTURE_PorousViscoModifiedCamClay` +PorousModifiedCamClay node :ref:`DATASTRUCTURE_PorousModifiedCamClay` +PorousViscoDruckerPrager node :ref:`DATASTRUCTURE_PorousViscoDruckerPrager` +PorousViscoExtendedDruckerPrager node :ref:`DATASTRUCTURE_PorousViscoExtendedDruckerPrager` +PorousViscoModifiedCamClay node :ref:`DATASTRUCTURE_PorousViscoModifiedCamClay` PressurePorosity node :ref:`DATASTRUCTURE_PressurePorosity` ProppantPermeability node :ref:`DATASTRUCTURE_ProppantPermeability` ProppantPorosity node :ref:`DATASTRUCTURE_ProppantPorosity` diff --git a/src/coreComponents/schema/docs/PorousDamageElasticIsotropic.rst b/src/coreComponents/schema/docs/PorousDamageElasticIsotropic.rst new file mode 100644 index 00000000000..7d6d29602c1 --- /dev/null +++ b/src/coreComponents/schema/docs/PorousDamageElasticIsotropic.rst @@ -0,0 +1,13 @@ + + +============================ ============ ======== =========================================== +Name Type Default Description +============================ ============ ======== =========================================== +name groupName required A name is required for any non-unique nodes +permeabilityModelName groupNameRef required Name of the permeability model. +porosityModelName groupNameRef required Name of the porosity model. +solidInternalEnergyModelName groupNameRef Name of the solid internal energy model. +solidModelName groupNameRef required Name of the solid model. +============================ ============ ======== =========================================== + + diff --git a/src/coreComponents/schema/docs/PorousDamageElasticIsotropic_other.rst b/src/coreComponents/schema/docs/PorousDamageElasticIsotropic_other.rst new file mode 100644 index 00000000000..adf1c1b8aec --- /dev/null +++ b/src/coreComponents/schema/docs/PorousDamageElasticIsotropic_other.rst @@ -0,0 +1,9 @@ + + +==== ==== ============================ +Name Type Description +==== ==== ============================ + (no documentation available) +==== ==== ============================ + + diff --git a/src/coreComponents/schema/docs/PorousDamageSpectralElasticIsotropic.rst b/src/coreComponents/schema/docs/PorousDamageSpectralElasticIsotropic.rst new file mode 100644 index 00000000000..7d6d29602c1 --- /dev/null +++ b/src/coreComponents/schema/docs/PorousDamageSpectralElasticIsotropic.rst @@ -0,0 +1,13 @@ + + +============================ ============ ======== =========================================== +Name Type Default Description +============================ ============ ======== =========================================== +name groupName required A name is required for any non-unique nodes +permeabilityModelName groupNameRef required Name of the permeability model. +porosityModelName groupNameRef required Name of the porosity model. +solidInternalEnergyModelName groupNameRef Name of the solid internal energy model. +solidModelName groupNameRef required Name of the solid model. +============================ ============ ======== =========================================== + + diff --git a/src/coreComponents/schema/docs/PorousDamageSpectralElasticIsotropic_other.rst b/src/coreComponents/schema/docs/PorousDamageSpectralElasticIsotropic_other.rst new file mode 100644 index 00000000000..adf1c1b8aec --- /dev/null +++ b/src/coreComponents/schema/docs/PorousDamageSpectralElasticIsotropic_other.rst @@ -0,0 +1,9 @@ + + +==== ==== ============================ +Name Type Description +==== ==== ============================ + (no documentation available) +==== ==== ============================ + + diff --git a/src/coreComponents/schema/docs/PorousDamageVolDevElasticIsotropic.rst b/src/coreComponents/schema/docs/PorousDamageVolDevElasticIsotropic.rst new file mode 100644 index 00000000000..7d6d29602c1 --- /dev/null +++ b/src/coreComponents/schema/docs/PorousDamageVolDevElasticIsotropic.rst @@ -0,0 +1,13 @@ + + +============================ ============ ======== =========================================== +Name Type Default Description +============================ ============ ======== =========================================== +name groupName required A name is required for any non-unique nodes +permeabilityModelName groupNameRef required Name of the permeability model. +porosityModelName groupNameRef required Name of the porosity model. +solidInternalEnergyModelName groupNameRef Name of the solid internal energy model. +solidModelName groupNameRef required Name of the solid model. +============================ ============ ======== =========================================== + + diff --git a/src/coreComponents/schema/docs/PorousDamageVolDevElasticIsotropic_other.rst b/src/coreComponents/schema/docs/PorousDamageVolDevElasticIsotropic_other.rst new file mode 100644 index 00000000000..adf1c1b8aec --- /dev/null +++ b/src/coreComponents/schema/docs/PorousDamageVolDevElasticIsotropic_other.rst @@ -0,0 +1,9 @@ + + +==== ==== ============================ +Name Type Description +==== ==== ============================ + (no documentation available) +==== ==== ============================ + + diff --git a/src/coreComponents/schema/docs/PorousViscoDruckerPrager.rst b/src/coreComponents/schema/docs/PorousViscoDruckerPrager.rst index e15edba5a2f..7d6d29602c1 100644 --- a/src/coreComponents/schema/docs/PorousViscoDruckerPrager.rst +++ b/src/coreComponents/schema/docs/PorousViscoDruckerPrager.rst @@ -1,13 +1,13 @@ -============================ ====== ======== =========================================== -Name Type Default Description -============================ ====== ======== =========================================== -name string required A name is required for any non-unique nodes -permeabilityModelName string required Name of the permeability model. -porosityModelName string required Name of the porosity model. -solidInternalEnergyModelName string Name of the solid internal energy model. -solidModelName string required Name of the solid model. -============================ ====== ======== =========================================== +============================ ============ ======== =========================================== +Name Type Default Description +============================ ============ ======== =========================================== +name groupName required A name is required for any non-unique nodes +permeabilityModelName groupNameRef required Name of the permeability model. +porosityModelName groupNameRef required Name of the porosity model. +solidInternalEnergyModelName groupNameRef Name of the solid internal energy model. +solidModelName groupNameRef required Name of the solid model. +============================ ============ ======== =========================================== diff --git a/src/coreComponents/schema/docs/PorousViscoExtendedDruckerPrager.rst b/src/coreComponents/schema/docs/PorousViscoExtendedDruckerPrager.rst index e15edba5a2f..7d6d29602c1 100644 --- a/src/coreComponents/schema/docs/PorousViscoExtendedDruckerPrager.rst +++ b/src/coreComponents/schema/docs/PorousViscoExtendedDruckerPrager.rst @@ -1,13 +1,13 @@ -============================ ====== ======== =========================================== -Name Type Default Description -============================ ====== ======== =========================================== -name string required A name is required for any non-unique nodes -permeabilityModelName string required Name of the permeability model. -porosityModelName string required Name of the porosity model. -solidInternalEnergyModelName string Name of the solid internal energy model. -solidModelName string required Name of the solid model. -============================ ====== ======== =========================================== +============================ ============ ======== =========================================== +Name Type Default Description +============================ ============ ======== =========================================== +name groupName required A name is required for any non-unique nodes +permeabilityModelName groupNameRef required Name of the permeability model. +porosityModelName groupNameRef required Name of the porosity model. +solidInternalEnergyModelName groupNameRef Name of the solid internal energy model. +solidModelName groupNameRef required Name of the solid model. +============================ ============ ======== =========================================== diff --git a/src/coreComponents/schema/docs/PorousViscoModifiedCamClay.rst b/src/coreComponents/schema/docs/PorousViscoModifiedCamClay.rst index e15edba5a2f..7d6d29602c1 100644 --- a/src/coreComponents/schema/docs/PorousViscoModifiedCamClay.rst +++ b/src/coreComponents/schema/docs/PorousViscoModifiedCamClay.rst @@ -1,13 +1,13 @@ -============================ ====== ======== =========================================== -Name Type Default Description -============================ ====== ======== =========================================== -name string required A name is required for any non-unique nodes -permeabilityModelName string required Name of the permeability model. -porosityModelName string required Name of the porosity model. -solidInternalEnergyModelName string Name of the solid internal energy model. -solidModelName string required Name of the solid model. -============================ ====== ======== =========================================== +============================ ============ ======== =========================================== +Name Type Default Description +============================ ============ ======== =========================================== +name groupName required A name is required for any non-unique nodes +permeabilityModelName groupNameRef required Name of the permeability model. +porosityModelName groupNameRef required Name of the porosity model. +solidInternalEnergyModelName groupNameRef Name of the solid internal energy model. +solidModelName groupNameRef required Name of the solid model. +============================ ============ ======== =========================================== diff --git a/src/coreComponents/schema/docs/Solvers.rst b/src/coreComponents/schema/docs/Solvers.rst index edb912f0e24..f8d8eb2a500 100644 --- a/src/coreComponents/schema/docs/Solvers.rst +++ b/src/coreComponents/schema/docs/Solvers.rst @@ -4,6 +4,7 @@ Name Type Default Description ============================================= ======== =========== ======================================================== gravityVector R1Tensor {0,0,-9.81} Gravity vector used in the physics solvers +AcousticElasticSEM node :ref:`XML_AcousticElasticSEM` AcousticFirstOrderSEM node :ref:`XML_AcousticFirstOrderSEM` AcousticSEM node :ref:`XML_AcousticSEM` AcousticVTISEM node :ref:`XML_AcousticVTISEM` diff --git a/src/coreComponents/schema/docs/Solvers_other.rst b/src/coreComponents/schema/docs/Solvers_other.rst index 4d70a356a39..541ff8b2e8a 100644 --- a/src/coreComponents/schema/docs/Solvers_other.rst +++ b/src/coreComponents/schema/docs/Solvers_other.rst @@ -3,6 +3,7 @@ ============================================= ==== ================================================================== Name Type Description ============================================= ==== ================================================================== +AcousticElasticSEM node :ref:`DATASTRUCTURE_AcousticElasticSEM` AcousticFirstOrderSEM node :ref:`DATASTRUCTURE_AcousticFirstOrderSEM` AcousticSEM node :ref:`DATASTRUCTURE_AcousticSEM` AcousticVTISEM node :ref:`DATASTRUCTURE_AcousticVTISEM` diff --git a/src/coreComponents/schema/schema.xsd b/src/coreComponents/schema/schema.xsd index a12097730ed..bd817a3b3e7 100644 --- a/src/coreComponents/schema/schema.xsd +++ b/src/coreComponents/schema/schema.xsd @@ -309,6 +309,10 @@ + + + + @@ -701,6 +705,18 @@ + + + + + + + + + + + + @@ -2033,6 +2049,7 @@ the relative residual norm satisfies: + @@ -2083,6 +2100,28 @@ the relative residual norm satisfies: + + + + + + + + + + + + + + + + + + + + + + @@ -3600,6 +3639,9 @@ Local - Add stabilization only to interiors of macro elements.--> + + + @@ -4548,6 +4590,42 @@ If you want to do a three-phase simulation, please use instead wettingIntermedia + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -4634,39 +4712,39 @@ If you want to do a three-phase simulation, please use instead wettingIntermedia - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + diff --git a/src/coreComponents/schema/schema.xsd.other b/src/coreComponents/schema/schema.xsd.other index ca7aaa0f57c..bfeab0520d8 100644 --- a/src/coreComponents/schema/schema.xsd.other +++ b/src/coreComponents/schema/schema.xsd.other @@ -494,6 +494,7 @@ + @@ -532,6 +533,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -579,24 +609,6 @@ - - - - - - - - - - - - - - - - - - @@ -1327,6 +1339,9 @@ + + + @@ -2296,6 +2311,9 @@ + + + diff --git a/src/docs/sphinx/CompleteXMLSchema.rst b/src/docs/sphinx/CompleteXMLSchema.rst index ff88d7a1a73..774ada1b92e 100644 --- a/src/docs/sphinx/CompleteXMLSchema.rst +++ b/src/docs/sphinx/CompleteXMLSchema.rst @@ -10,6 +10,13 @@ Input Schema Definitions :download:`XML Schema <../../coreComponents/schema/docs/../schema.xsd>` +.. _XML_AcousticElasticSEM: + +Element: AcousticElasticSEM +=========================== +.. include:: ../../coreComponents/schema/docs/AcousticElasticSEM.rst + + .. _XML_AcousticFirstOrderSEM: Element: AcousticFirstOrderSEM @@ -815,6 +822,27 @@ Element: PhaseFieldFracture .. include:: ../../coreComponents/schema/docs/PhaseFieldFracture.rst +.. _XML_PorousDamageElasticIsotropic: + +Element: PorousDamageElasticIsotropic +===================================== +.. include:: ../../coreComponents/schema/docs/PorousDamageElasticIsotropic.rst + + +.. _XML_PorousDamageSpectralElasticIsotropic: + +Element: PorousDamageSpectralElasticIsotropic +============================================= +.. include:: ../../coreComponents/schema/docs/PorousDamageSpectralElasticIsotropic.rst + + +.. _XML_PorousDamageVolDevElasticIsotropic: + +Element: PorousDamageVolDevElasticIsotropic +=========================================== +.. include:: ../../coreComponents/schema/docs/PorousDamageVolDevElasticIsotropic.rst + + .. _XML_PorousDelftEgg: Element: PorousDelftEgg @@ -867,21 +895,21 @@ Element: PorousModifiedCamClay .. _XML_PorousViscoDruckerPrager: Element: PorousViscoDruckerPrager -============================== +================================= .. include:: ../../coreComponents/schema/docs/PorousViscoDruckerPrager.rst .. _XML_PorousViscoExtendedDruckerPrager: Element: PorousViscoExtendedDruckerPrager -============================== +========================================= .. include:: ../../coreComponents/schema/docs/PorousViscoExtendedDruckerPrager.rst .. _XML_PorousViscoModifiedCamClay: Element: PorousViscoModifiedCamClay -============================== +=================================== .. include:: ../../coreComponents/schema/docs/PorousViscoModifiedCamClay.rst @@ -1379,6 +1407,13 @@ Datastructure Definitions ******************************** +.. _DATASTRUCTURE_AcousticElasticSEM: + +Datastructure: AcousticElasticSEM +================================= +.. include:: ../../coreComponents/schema/docs/AcousticElasticSEM_other.rst + + .. _DATASTRUCTURE_AcousticFirstOrderSEM: Datastructure: AcousticFirstOrderSEM @@ -2205,6 +2240,27 @@ Datastructure: PhaseFieldFracture .. include:: ../../coreComponents/schema/docs/PhaseFieldFracture_other.rst +.. _DATASTRUCTURE_PorousDamageElasticIsotropic: + +Datastructure: PorousDamageElasticIsotropic +=========================================== +.. include:: ../../coreComponents/schema/docs/PorousDamageElasticIsotropic_other.rst + + +.. _DATASTRUCTURE_PorousDamageSpectralElasticIsotropic: + +Datastructure: PorousDamageSpectralElasticIsotropic +=================================================== +.. include:: ../../coreComponents/schema/docs/PorousDamageSpectralElasticIsotropic_other.rst + + +.. _DATASTRUCTURE_PorousDamageVolDevElasticIsotropic: + +Datastructure: PorousDamageVolDevElasticIsotropic +================================================= +.. include:: ../../coreComponents/schema/docs/PorousDamageVolDevElasticIsotropic_other.rst + + .. _DATASTRUCTURE_PorousDelftEgg: Datastructure: PorousDelftEgg @@ -2257,21 +2313,21 @@ Datastructure: PorousModifiedCamClay .. _DATASTRUCTURE_PorousViscoDruckerPrager: Datastructure: PorousViscoDruckerPrager -==================================== +======================================= .. include:: ../../coreComponents/schema/docs/PorousViscoDruckerPrager_other.rst .. _DATASTRUCTURE_PorousViscoExtendedDruckerPrager: Datastructure: PorousViscoExtendedDruckerPrager -==================================== +=============================================== .. include:: ../../coreComponents/schema/docs/PorousViscoExtendedDruckerPrager_other.rst .. _DATASTRUCTURE_PorousViscoModifiedCamClay: Datastructure: PorousViscoModifiedCamClay -==================================== +========================================= .. include:: ../../coreComponents/schema/docs/PorousViscoModifiedCamClay_other.rst From a5d762bda52c7a103a81b10e35656e79596701d6 Mon Sep 17 00:00:00 2001 From: MelReyCG Date: Fri, 19 Jan 2024 17:27:57 +0100 Subject: [PATCH 15/98] SourceFlluxStatistics now compiles --- .../fieldSpecification/CMakeLists.txt | 2 + .../SourceFluxStatistics.cpp | 56 ++++++++++++------- .../SourceFluxStatistics.hpp | 25 ++++++--- src/coreComponents/schema/schema.xsd | 17 ++++++ 4 files changed, 71 insertions(+), 29 deletions(-) diff --git a/src/coreComponents/fieldSpecification/CMakeLists.txt b/src/coreComponents/fieldSpecification/CMakeLists.txt index 10ad2e8ec1a..ae31a4157fc 100644 --- a/src/coreComponents/fieldSpecification/CMakeLists.txt +++ b/src/coreComponents/fieldSpecification/CMakeLists.txt @@ -10,6 +10,7 @@ set( fieldSpecification_headers TractionBoundaryCondition.hpp AquiferBoundaryCondition.hpp PerfectlyMatchedLayer.hpp + SourceFluxStatistics.hpp ) # @@ -24,6 +25,7 @@ set( fieldSpecification_sources TractionBoundaryCondition.cpp AquiferBoundaryCondition.cpp PerfectlyMatchedLayer.cpp + SourceFluxStatistics.cpp ) set( dependencyList ${parallelDeps} functions linearAlgebra ) diff --git a/src/coreComponents/fieldSpecification/SourceFluxStatistics.cpp b/src/coreComponents/fieldSpecification/SourceFluxStatistics.cpp index fe3e53223ee..3c1cde051e5 100644 --- a/src/coreComponents/fieldSpecification/SourceFluxStatistics.cpp +++ b/src/coreComponents/fieldSpecification/SourceFluxStatistics.cpp @@ -31,17 +31,17 @@ SourceFluxStatistics::SourceFluxStatistics( const string & name, Group * const parent ): Base( name, parent ) { - getWrapper< integer >( Group::viewKeyStruct::logLevelString ). + getWrapper< integer >( Group::viewKeyStruct::logLevelString() ). appendDescription( GEOS_FMT( "\n- Log Level 1 outputs the sum of all {0}(s) produced rate & mass,\n" "- Log Level 2 outputs detailed values for each {0}.", SourceFluxBoundaryCondition::catalogName() ) ); - registerWrapper( viewKeyStruct::setNamesString(), &m_fluxNames ). + registerWrapper( viewKeyStruct::fluxNamesString(), &m_fluxNames ). setRTTypeName( rtTypes::CustomTypes::groupNameRefArray ). setInputFlag( InputFlags::REQUIRED ). setSizedFromParent( 0 ). - setDescription( GEOS_FMT( "Name(s) array of the {0}(s) for which we want the statistics." - "Use \"{ all }\" to target all {0}.", + setDescription( GEOS_FMT( "Name(s) array of the {0}(s) for which we want the statistics. " + "Use \"all\" to target all {0}.", SourceFluxBoundaryCondition::catalogName() ) ); } @@ -53,25 +53,19 @@ void SourceFluxStatistics::postProcessInput() m_fluxNames.clear(); fsManager.forSubGroups< SourceFluxBoundaryCondition >( [&]( SourceFluxBoundaryCondition & sourceFlux ) { - m_set.push_back( &sourceFlux ); + m_fluxNames.emplace_back( string( sourceFlux.getName() ) ); } ); } else { for( string const & fluxName : m_fluxNames ) { - //TODO : test this error GEOS_ERROR_IF( !fsManager.hasGroup< SourceFluxBoundaryCondition >( fluxName ), GEOS_FMT( "{}: No {} named {} was found in {}.", getDataContext(), SourceFluxBoundaryCondition::catalogName(), - fluxName, fs.getDataContext() ) ); + fluxName, fsManager.getDataContext() ) ); } } - //TODO : remove that - for( string const & flux : m_set ) - { - GEOS_LOG( flux.getName()); - } } void SourceFluxStatistics::registerDataOnMesh( Group & meshBodies ) @@ -85,29 +79,45 @@ void SourceFluxStatistics::registerDataOnMesh( Group & meshBodies ) return; } + m_statWrapperNames.clear(); + for( string const & fluxName : m_fluxNames ) + { + m_statWrapperNames.insert( getRegionStatsName( fluxName ) ); + } + m_solver->forDiscretizationOnMeshTargets( meshBodies, [&] ( string const &, MeshLevel & mesh, arrayView1d< string const > const & ) { - mesh.getElemManager().forElementRegions( [&]( ElementRegionBase const & region ) + // adding, on each reagion, a wrapper to hold the stats of each wrapper + mesh.getElemManager().forElementRegions( [&]( ElementRegionBase & region ) { - - WrapperBase & regionStats = region.registerWrapper< Stats >( getRegionStatsName() ); - regionStats.setRestartFlags( RestartFlags::NO_WRITE ); - - region.excludeWrappersFromPacking( { getRegionStatsName() } ); + for( string const & wrapperName : m_statWrapperNames ) + { + Wrapper< Stats > & statsWrapper = region.registerWrapper< Stats >( wrapperName ); + statsWrapper.setRestartFlags( RestartFlags::NO_WRITE ); + } + region.excludeWrappersFromPacking( m_statWrapperNames ); } ); } ); } -void SourceFluxStatistics::writeStats( SourceFluxStatistics::Stats const & stats ) +void SourceFluxStatistics::writeStats( string_view aggregateName, Stats const & stats ) +{ + GEOS_LOG_RANK_0( GEOS_FMT( "{}: applied on {} elements", + aggregateName, stats.elementCount ) ); + GEOS_LOG_RANK_0( GEOS_FMT( "{}: Produced mass = {} kg", + aggregateName, stats.producedMass ) ); + GEOS_LOG_RANK_0( GEOS_FMT( "{}: Production rate = {} kg/s", + aggregateName, stats.productionRate ) ); +} bool SourceFluxStatistics::execute( real64 const GEOS_UNUSED_PARAM( time_n ), real64 const GEOS_UNUSED_PARAM( dt ), integer const GEOS_UNUSED_PARAM( cycleNumber ), integer const GEOS_UNUSED_PARAM( eventCounter ), real64 const GEOS_UNUSED_PARAM( eventProgress ), - DomainPartition & domain ) + DomainPartition & GEOS_UNUSED_PARAM( domain ) ) { if( getLogLevel() >= 1 ) { @@ -116,6 +126,8 @@ bool SourceFluxStatistics::execute( real64 const GEOS_UNUSED_PARAM( time_n ), // arrayView1d< string const > const & regionNames ) { //TODO : get back all regions info on sourceflux region stat wrappers + //TODO : mpi sum to rank 0 + //TODO : writeStats() calls GEOS_LOG( GEOS_FMT( "{} {}: SourceFluxStatistics::execute::allFluxStats not yet implemented", catalogName(), getName() ) ); if( getLogLevel() >= 2 ) @@ -128,4 +140,8 @@ bool SourceFluxStatistics::execute( real64 const GEOS_UNUSED_PARAM( time_n ), return false; } +REGISTER_CATALOG_ENTRY( TaskBase, + SourceFluxStatistics, + string const &, dataRepository::Group * const ) + } /* namespace geos */ diff --git a/src/coreComponents/fieldSpecification/SourceFluxStatistics.hpp b/src/coreComponents/fieldSpecification/SourceFluxStatistics.hpp index 1eb063bf790..4c8c5ecbc15 100644 --- a/src/coreComponents/fieldSpecification/SourceFluxStatistics.hpp +++ b/src/coreComponents/fieldSpecification/SourceFluxStatistics.hpp @@ -13,13 +13,14 @@ */ /** - * @file SinglePhaseStatistics.hpp + * @file SourceFluxStatistics.hpp */ -#ifndef SRC_CORECOMPONENTS_PHYSICSSOLVERS_FLUIDFLOW_SINGLEPHASESTATISTICS_HPP_ -#define SRC_CORECOMPONENTS_PHYSICSSOLVERS_FLUIDFLOW_SINGLEPHASESTATISTICS_HPP_ +#ifndef SRC_CORECOMPONENTS_PHYSICSSOLVERS_FLUIDFLOW_SOURCEFLUXSTATISTICS_HPP_ +#define SRC_CORECOMPONENTS_PHYSICSSOLVERS_FLUIDFLOW_SOURCEFLUXSTATISTICS_HPP_ #include "physicsSolvers/FieldStatisticsBase.hpp" +#include "physicsSolvers/fluidFlow/FlowSolverBase.hpp" class SourceFluxBoundaryCondition; @@ -44,6 +45,8 @@ class SourceFluxStatistics : public FieldStatisticsBase< FlowSolverBase > real64 producedMass; /// flux(es) production rate (kg/s). Negative if injecting. real64 productionRate; + /// Number of elements in which we are producing / injecting + integer elementCount; }; /** @@ -79,7 +82,7 @@ class SourceFluxStatistics : public FieldStatisticsBase< FlowSolverBase > struct viewKeyStruct { /// @return The key for setName - constexpr static char const * setNamesString() { return "setNames"; } + constexpr static char const * fluxNamesString() { return "fluxNames"; } }; protected: @@ -87,12 +90,16 @@ class SourceFluxStatistics : public FieldStatisticsBase< FlowSolverBase > void postProcessInput() override; private: - using Base = FieldStatisticsBase< SinglePhaseBase >; + using Base = FieldStatisticsBase< FlowSolverBase >; /// the names of the SourceFlux(s) for which we want the statistics string_array m_fluxNames; - /// Internal array of the SourceFlux(s) for which we want the statistics - std::vector< SourceFluxBoundaryCondition * > m_fluxes; + /// internal array to keep track of the names of the wrappers that will store the Stat data on each + /// region for this SourceFluxStatistics. + std::set< string > m_statWrapperNames; + //!\\ TODO : remove that ? + //!\\ /// Internal array of the SourceFlux(s) for which we want the statistics + //!\\ std::vector< SourceFluxBoundaryCondition * > m_fluxes; /** * @return a string used to name the wrapper that is added to each region that is simulated by @@ -112,7 +119,7 @@ class SourceFluxStatistics : public FieldStatisticsBase< FlowSolverBase > /** * @param Stats the statistics that must be output in the log */ - static void logStats( Stats const & stats ) override; + static void writeStats( string_view aggregateName, Stats const & stats ); }; @@ -124,4 +131,4 @@ struct SourceFluxStatisticsKernel } /* namespace geos */ -#endif /* SRC_CORECOMPONENTS_PHYSICSSOLVERS_FLUIDFLOW_SINGLEPHASESTATISTICS_HPP_ */ +#endif /* SRC_CORECOMPONENTS_PHYSICSSOLVERS_FLUIDFLOW_SOURCEFLUXSTATISTICS_HPP_ */ diff --git a/src/coreComponents/schema/schema.xsd b/src/coreComponents/schema/schema.xsd index bd817a3b3e7..4af560fc01c 100644 --- a/src/coreComponents/schema/schema.xsd +++ b/src/coreComponents/schema/schema.xsd @@ -507,6 +507,10 @@ + + + + @@ -3405,6 +3409,7 @@ Local - Add stabilization only to interiors of macro elements.--> + @@ -3562,6 +3567,18 @@ Local - Add stabilization only to interiors of macro elements.--> + + + + + + + + + + From 28a7730e7824c62425f574914b8504542463f9e2 Mon Sep 17 00:00:00 2001 From: MelReyCG Date: Fri, 19 Jan 2024 17:28:58 +0100 Subject: [PATCH 16/98] generated docs --- .../schema/docs/SourceFluxStatistics.rst | 14 ++++++++++++++ .../schema/docs/SourceFluxStatistics_other.rst | 9 +++++++++ src/coreComponents/schema/docs/Tasks.rst | 1 + src/coreComponents/schema/docs/Tasks_other.rst | 1 + src/coreComponents/schema/schema.xsd.other | 2 ++ src/docs/sphinx/CompleteXMLSchema.rst | 14 ++++++++++++++ 6 files changed, 41 insertions(+) create mode 100644 src/coreComponents/schema/docs/SourceFluxStatistics.rst create mode 100644 src/coreComponents/schema/docs/SourceFluxStatistics_other.rst diff --git a/src/coreComponents/schema/docs/SourceFluxStatistics.rst b/src/coreComponents/schema/docs/SourceFluxStatistics.rst new file mode 100644 index 00000000000..a395ab44098 --- /dev/null +++ b/src/coreComponents/schema/docs/SourceFluxStatistics.rst @@ -0,0 +1,14 @@ + + +============== ================== ======== =============================================================================================================================================== +Name Type Default Description +============== ================== ======== =============================================================================================================================================== +flowSolverName groupNameRef required Name of the flow solver +fluxNames groupNameRef_array required Name(s) array of the SourceFlux(s) for which we want the statistics. Use "all" to target all SourceFlux. +logLevel integer 0 | Log level + | - Log Level 1 outputs the sum of all SourceFlux(s) produced rate & mass, + | - Log Level 2 outputs detailed values for each SourceFlux. +name groupName required A name is required for any non-unique nodes +============== ================== ======== =============================================================================================================================================== + + diff --git a/src/coreComponents/schema/docs/SourceFluxStatistics_other.rst b/src/coreComponents/schema/docs/SourceFluxStatistics_other.rst new file mode 100644 index 00000000000..adf1c1b8aec --- /dev/null +++ b/src/coreComponents/schema/docs/SourceFluxStatistics_other.rst @@ -0,0 +1,9 @@ + + +==== ==== ============================ +Name Type Description +==== ==== ============================ + (no documentation available) +==== ==== ============================ + + diff --git a/src/coreComponents/schema/docs/Tasks.rst b/src/coreComponents/schema/docs/Tasks.rst index 95301497c5c..3a3a3e06a9f 100644 --- a/src/coreComponents/schema/docs/Tasks.rst +++ b/src/coreComponents/schema/docs/Tasks.rst @@ -15,6 +15,7 @@ SinglePhaseReservoirPoromechanicsInitialization node :ref:`X SinglePhaseStatistics node :ref:`XML_SinglePhaseStatistics` SolidMechanicsStateReset node :ref:`XML_SolidMechanicsStateReset` SolidMechanicsStatistics node :ref:`XML_SolidMechanicsStatistics` +SourceFluxStatistics node :ref:`XML_SourceFluxStatistics` TriaxialDriver node :ref:`XML_TriaxialDriver` =========================================================== ==== ======= ====================================================================== diff --git a/src/coreComponents/schema/docs/Tasks_other.rst b/src/coreComponents/schema/docs/Tasks_other.rst index dca37a26a99..4ee34a22e81 100644 --- a/src/coreComponents/schema/docs/Tasks_other.rst +++ b/src/coreComponents/schema/docs/Tasks_other.rst @@ -15,6 +15,7 @@ SinglePhaseReservoirPoromechanicsInitialization node :ref:`DATASTRUC SinglePhaseStatistics node :ref:`DATASTRUCTURE_SinglePhaseStatistics` SolidMechanicsStateReset node :ref:`DATASTRUCTURE_SolidMechanicsStateReset` SolidMechanicsStatistics node :ref:`DATASTRUCTURE_SolidMechanicsStatistics` +SourceFluxStatistics node :ref:`DATASTRUCTURE_SourceFluxStatistics` TriaxialDriver node :ref:`DATASTRUCTURE_TriaxialDriver` =========================================================== ==== ================================================================================ diff --git a/src/coreComponents/schema/schema.xsd.other b/src/coreComponents/schema/schema.xsd.other index bfeab0520d8..d7e9e8cf0e8 100644 --- a/src/coreComponents/schema/schema.xsd.other +++ b/src/coreComponents/schema/schema.xsd.other @@ -1237,6 +1237,7 @@ + @@ -1252,6 +1253,7 @@ + diff --git a/src/docs/sphinx/CompleteXMLSchema.rst b/src/docs/sphinx/CompleteXMLSchema.rst index 774ada1b92e..e57f5555edc 100644 --- a/src/docs/sphinx/CompleteXMLSchema.rst +++ b/src/docs/sphinx/CompleteXMLSchema.rst @@ -1207,6 +1207,13 @@ Element: SourceFlux .. include:: ../../coreComponents/schema/docs/SourceFlux.rst +.. _XML_SourceFluxStatistics: + +Element: SourceFluxStatistics +============================= +.. include:: ../../coreComponents/schema/docs/SourceFluxStatistics.rst + + .. _XML_SurfaceElementRegion: Element: SurfaceElementRegion @@ -2632,6 +2639,13 @@ Datastructure: SourceFlux .. include:: ../../coreComponents/schema/docs/SourceFlux_other.rst +.. _DATASTRUCTURE_SourceFluxStatistics: + +Datastructure: SourceFluxStatistics +=================================== +.. include:: ../../coreComponents/schema/docs/SourceFluxStatistics_other.rst + + .. _DATASTRUCTURE_SurfaceElementRegion: Datastructure: SurfaceElementRegion From 4e71130e4fdfcaf96a8cd5c1e5acb1550a7498d8 Mon Sep 17 00:00:00 2001 From: MelReyCG Date: Thu, 25 Jan 2024 16:31:56 +0100 Subject: [PATCH 17/98] SourceFluxStatistics now runs: - finalize architecture - add a way to accumulate statistics over multiple timesteps - test case runs correctly - added a way to know the region of a subregion - cleanup - completed some wrappers descriptions --- .../SourceFluxStatistics.cpp | 188 ++++++++++++++---- .../SourceFluxStatistics.hpp | 166 +++++++++++++--- src/coreComponents/mesh/ElementRegionBase.hpp | 12 ++ .../fluidFlow/SinglePhaseBase.cpp | 102 ++-------- .../schema/docs/SinglePhaseFVM.rst | 36 ++-- .../schema/docs/SinglePhaseHybridFVM.rst | 36 ++-- .../schema/docs/SinglePhaseProppantFVM.rst | 36 ++-- .../schema/docs/SourceFluxStatistics.rst | 22 +- src/coreComponents/schema/schema.xsd | 22 +- 9 files changed, 405 insertions(+), 215 deletions(-) diff --git a/src/coreComponents/fieldSpecification/SourceFluxStatistics.cpp b/src/coreComponents/fieldSpecification/SourceFluxStatistics.cpp index 3c1cde051e5..46b0ed8008c 100644 --- a/src/coreComponents/fieldSpecification/SourceFluxStatistics.cpp +++ b/src/coreComponents/fieldSpecification/SourceFluxStatistics.cpp @@ -16,7 +16,7 @@ * @file SourceFluxStatistics.cpp */ -//TODO add a test for this component in SinglePhase and MultiPhase +//!\\ TODO add a test for this component in SinglePhase and MultiPhase #include "SourceFluxStatistics.hpp" @@ -27,13 +27,15 @@ namespace geos { using namespace dataRepository; -SourceFluxStatistics::SourceFluxStatistics( const string & name, - Group * const parent ): +SourceFluxStatsAggregator::SourceFluxStatsAggregator( const string & name, + Group * const parent ): Base( name, parent ) { getWrapper< integer >( Group::viewKeyStruct::logLevelString() ). appendDescription( GEOS_FMT( "\n- Log Level 1 outputs the sum of all {0}(s) produced rate & mass,\n" - "- Log Level 2 outputs detailed values for each {0}.", + "- Log Level 2 details values for each {0},\n" + "- Log Level 3 details values for each region,\n" + "- Log Level 4 details values for each sub-region.", SourceFluxBoundaryCondition::catalogName() ) ); registerWrapper( viewKeyStruct::fluxNamesString(), &m_fluxNames ). @@ -45,8 +47,10 @@ SourceFluxStatistics::SourceFluxStatistics( const string & name, SourceFluxBoundaryCondition::catalogName() ) ); } -void SourceFluxStatistics::postProcessInput() +void SourceFluxStatsAggregator::postProcessInput() { + Base::postProcessInput(); + FieldSpecificationManager & fsManager = FieldSpecificationManager::getInstance(); if( m_fluxNames.size() == 1 && m_fluxNames[0] == "all" ) { @@ -55,6 +59,10 @@ void SourceFluxStatistics::postProcessInput() { m_fluxNames.emplace_back( string( sourceFlux.getName() ) ); } ); + GEOS_WARNING_IF( m_fluxNames.empty(), + GEOS_FMT( "{}: No {} was found in {}.", + getDataContext(), SourceFluxBoundaryCondition::catalogName(), + fsManager.getDataContext() ) ); } else { @@ -68,7 +76,7 @@ void SourceFluxStatistics::postProcessInput() } } -void SourceFluxStatistics::registerDataOnMesh( Group & meshBodies ) +void SourceFluxStatsAggregator::registerDataOnMesh( Group & meshBodies ) { // the fields have to be registered in "registerDataOnMesh" (and not later) // otherwise they cannot be targeted by TimeHistory @@ -79,69 +87,161 @@ void SourceFluxStatistics::registerDataOnMesh( Group & meshBodies ) return; } - m_statWrapperNames.clear(); - for( string const & fluxName : m_fluxNames ) - { - m_statWrapperNames.insert( getRegionStatsName( fluxName ) ); - } - m_solver->forDiscretizationOnMeshTargets( meshBodies, [&] ( string const &, MeshLevel & mesh, arrayView1d< string const > const & ) { - // adding, on each reagion, a wrapper to hold the stats of each wrapper - mesh.getElemManager().forElementRegions( [&]( ElementRegionBase & region ) + // Adding, on each sub-region, a wrapper to hold the stats of each wrapper + mesh.getElemManager().forElementSubRegions( [&]( ElementSubRegionBase & subRegion ) { - for( string const & wrapperName : m_statWrapperNames ) + for( string const & fluxName : m_fluxNames ) { - Wrapper< Stats > & statsWrapper = region.registerWrapper< Stats >( wrapperName ); + string const wrapperName = getRegionStatDataName( fluxName ); + Wrapper< WrappedStats > & statsWrapper = subRegion.registerWrapper< WrappedStats >( wrapperName ); statsWrapper.setRestartFlags( RestartFlags::NO_WRITE ); + statsWrapper.reference().setTarget( getName(), fluxName ); + subRegion.excludeWrappersFromPacking( { wrapperName } ); } - region.excludeWrappersFromPacking( m_statWrapperNames ); } ); + // Do we need to add a similar wrapper for each statistics ? (region-level, mesh-level... to hold as many stats the log levels offer) } ); } -void SourceFluxStatistics::writeStats( string_view aggregateName, Stats const & stats ) +SourceFluxStatsAggregator::WrappedStats & +SourceFluxStatsAggregator::getFluxStatData( Group & container, + string_view fluxName ) { - GEOS_LOG_RANK_0( GEOS_FMT( "{}: applied on {} elements", - aggregateName, stats.elementCount ) ); - GEOS_LOG_RANK_0( GEOS_FMT( "{}: Produced mass = {} kg", - aggregateName, stats.producedMass ) ); - GEOS_LOG_RANK_0( GEOS_FMT( "{}: Production rate = {} kg/s", - aggregateName, stats.productionRate ) ); + WrappedStats * r = nullptr; + container.forWrappers< WrappedStats >( [&]( dataRepository::Wrapper< WrappedStats > & statsWrapper ) + { + WrappedStats & statsWrapperView = statsWrapper.referenceAsView(); + if( statsWrapperView.getFluxName() == fluxName && statsWrapperView.getAggregatorName() == getName() ) + { + r = &statsWrapperView; + } + } ); + // Error if SourceFluxStatsAggregator::registerDataOnMesh() did not work as expected + GEOS_ERROR_IF( r == nullptr, GEOS_FMT( "{}: {} data wrongly registered on mesh (no flux stats wrapper was found for {} named {}).", + getName(), catalogName(), + SourceFluxBoundaryCondition::catalogName(), fluxName ) ); + return *r; } -bool SourceFluxStatistics::execute( real64 const GEOS_UNUSED_PARAM( time_n ), - real64 const GEOS_UNUSED_PARAM( dt ), - integer const GEOS_UNUSED_PARAM( cycleNumber ), - integer const GEOS_UNUSED_PARAM( eventCounter ), - real64 const GEOS_UNUSED_PARAM( eventProgress ), - DomainPartition & GEOS_UNUSED_PARAM( domain ) ) +void SourceFluxStatsAggregator::writeStatData( integer minLogLevel, string_view subSetName, + string_view fluxName, StatData const & stats ) +{ + if( getLogLevel() >= minLogLevel && logger::internal::rank == 0 ) + { + GEOS_LOG_RANK( GEOS_FMT( "{}, {}, {}: applied on {} elements", + getName(), fluxName, subSetName, stats.m_elementCount ) ); + GEOS_LOG_RANK( GEOS_FMT( "{}, {}, {}: Produced mass = {} kg", + getName(), fluxName, subSetName, stats.m_producedMass ) ); + GEOS_LOG_RANK( GEOS_FMT( "{}, {}, {}: Production rate = {} kg/s", + getName(), fluxName, subSetName, stats.m_productionRate ) ); + } +} + +bool SourceFluxStatsAggregator::execute( real64 const GEOS_UNUSED_PARAM( time_n ), + real64 const GEOS_UNUSED_PARAM( dt ), + integer const GEOS_UNUSED_PARAM( cycleNumber ), + integer const GEOS_UNUSED_PARAM( eventCounter ), + real64 const GEOS_UNUSED_PARAM( eventProgress ), + DomainPartition & domain ) { if( getLogLevel() >= 1 ) { - // m_solver->forDiscretizationOnMeshTargets( domain.getMeshBodies(), [&] ( string const &, - // MeshLevel & mesh, - // arrayView1d< string const > const & regionNames ) + StatData allStats; + m_solver->forDiscretizationOnMeshTargets( domain.getMeshBodies(), + [&] ( string const &, + MeshLevel & mesh, + arrayView1d< string const > const & ) { - //TODO : get back all regions info on sourceflux region stat wrappers - //TODO : mpi sum to rank 0 - //TODO : writeStats() calls - GEOS_LOG( GEOS_FMT( "{} {}: SourceFluxStatistics::execute::allFluxStats not yet implemented", - catalogName(), getName() ) ); - if( getLogLevel() >= 2 ) + for( string const & fluxName : m_fluxNames ) { - GEOS_LOG( GEOS_FMT( "{} {}: SourceFluxStatistics::execute::perFluxStats not yet implemented", - catalogName(), getName() ) ); + StatData fluxStats; + + mesh.getElemManager().forElementRegions( [&]( ElementRegionBase & region ) + { + StatData regionStats; + region.forElementSubRegions( [&]( ElementSubRegionBase & subRegion ) + { + StatData subRegionStats = getFluxStatData( subRegion, fluxName ).finalizePeriod(); + subRegionStats.mpiReduce(); + + writeStatData( 4, subRegion.getName(), fluxName, subRegionStats ); + regionStats.combine( subRegionStats ); + } ); + + writeStatData( 3, region.getName(), fluxName, regionStats ); + fluxStats.combine( regionStats ); + } ); + + writeStatData( 2, "Whole mesh", fluxName, fluxStats ); + allStats.combine( fluxStats ); } - } //); + + writeStatData( 1, "Whole mesh", "Fluxes sum", allStats ); + } ); } return false; } + + +void SourceFluxStatsAggregator::StatData::combine( StatData const & other ) +{ + m_producedMass += other.m_producedMass; + m_productionRate += other.m_productionRate; + m_elementCount += other.m_elementCount; +} +void SourceFluxStatsAggregator::StatData::mpiReduce() +{ + m_producedMass += MpiWrapper::sum( m_producedMass ); + m_productionRate += MpiWrapper::sum( m_productionRate ); + m_elementCount += MpiWrapper::sum( m_elementCount ); +} + +void SourceFluxStatsAggregator::WrappedStats::setTarget( string_view aggregatorName, + string_view fluxName ) +{ + m_aggregatorName = aggregatorName; + m_fluxName = fluxName; +} +void SourceFluxStatsAggregator::WrappedStats::setTimeStepStats( real64 dt, + real64 productedMass, + integer elementCount, + bool overwriteTimeStepStats ) +{ + // we are beginning a new timestep, so we must aggregate the pending stats before overwriting the current stats data + if( !overwriteTimeStepStats ) + { + m_pendingPeriodMass += m_currentTimeStepMass; + m_periodDeltaTime += dt; + m_elementCount = elementCount; + } + + m_currentTimeStepMass = productedMass; +} +SourceFluxStatsAggregator::StatData SourceFluxStatsAggregator::WrappedStats::finalizePeriod() +{ + real64 periodMass = m_currentTimeStepMass + m_pendingPeriodMass; + StatData periodStats; + periodStats.m_producedMass = periodMass; + periodStats.m_productionRate = periodMass / m_periodDeltaTime; + periodStats.m_elementCount = m_elementCount; + + m_currentTimeStepMass = 0.0; + m_pendingPeriodMass = 0.0; + m_periodDeltaTime = 0.0; + m_elementCount = 0; + + return periodStats; +} + + REGISTER_CATALOG_ENTRY( TaskBase, - SourceFluxStatistics, - string const &, dataRepository::Group * const ) + SourceFluxStatsAggregator, + string const &, + dataRepository::Group * const ) } /* namespace geos */ diff --git a/src/coreComponents/fieldSpecification/SourceFluxStatistics.hpp b/src/coreComponents/fieldSpecification/SourceFluxStatistics.hpp index 4c8c5ecbc15..9b0d04f65ea 100644 --- a/src/coreComponents/fieldSpecification/SourceFluxStatistics.hpp +++ b/src/coreComponents/fieldSpecification/SourceFluxStatistics.hpp @@ -28,34 +28,102 @@ namespace geos { /** - * @class SourceFluxStatistics + * @class SourceFluxStatsAggregator * * Task class allowing for the computation of aggregate statistics of SourceFluxBoundaryCondition */ -class SourceFluxStatistics : public FieldStatisticsBase< FlowSolverBase > +class SourceFluxStatsAggregator : public FieldStatisticsBase< FlowSolverBase > { public: /** - * @brief Statistics flux data in the whole mesh or in a precise region + * @brief Potentially aggregated statistics flux data */ - struct Stats + struct StatData { /// fluid mass produced by the flux(es) (kg). Negative if injecting. - real64 producedMass; + real64 m_producedMass = 0.0; /// flux(es) production rate (kg/s). Negative if injecting. - real64 productionRate; + real64 m_productionRate = 0.0; /// Number of elements in which we are producing / injecting - integer elementCount; + integer m_elementCount = 0; + + /** + * @brief Aggregate the statistics of the instance with those of another one. + * @param other the other stats structure. + */ + void combine( StatData const & other ); + /** + * @brief Aggregate the statistics of the instance with those from all instances from other MPI ranks. + */ + void mpiReduce(); }; + /** + * @brief Class that aggregate statistics of a flux over multiple time-steps for a given + * SourceFluxStatsAggregator and a for a given mesh part (i.e. a subregion, a region...). + */ + class WrappedStats + { +public: + /** + * @brief Set the subjects targeted by the stats. + * @param aggregatorName the name of the targeted SourceFluxStatsAggregator + * @param fluxName the name of the targeted SourceFluxBoundaryCondition + */ + void setTarget( string_view aggregatorName, string_view fluxName ); + + /** + * @brief Set the current time step stats. + * @param overwriteTimeStepStats false when this is the first time we're writing the current + * timestep data, true otherwise (i.e. new solver iteration) + * @param dt time delta of the current timestep + * @param productedMass time-step producted mass (see StatData::m_producedMass). + * @param elementCount number of cell elements concerned by this instance + */ + void setTimeStepStats( real64 dt, real64 productedMass, integer elementCount, + bool overwriteTimeStepStats ); + + /** + * @brief Finalize the statistics period and render data. + * @return the accumulated statistics of the period. + */ + StatData finalizePeriod(); + + /** + * @return get the name of the SourceFluxStatsAggregator that want to collect data on this instance. + */ + string_view getAggregatorName() const + { return m_aggregatorName; } + + /** + * @return get the name of the SourceFluxBoundaryCondition from which we are collecting data on this instance. + */ + string_view getFluxName() const + { return m_fluxName; } +private: + /// producted mass of the current time-step. + real64 m_currentTimeStepMass = 0.0; + /// producted mass sum from all previous time-step of the current period. + real64 m_pendingPeriodMass = 0.0; + /// delta time the current period + real64 m_periodDeltaTime = 0.0; + /// number of cell elements concerned by this instance + integer m_elementCount = 0; + + /// Name of the SourceFluxStatsAggregator that want to collect data on this instance. + string m_aggregatorName; + /// Name of the SourceFluxBoundaryCondition from which we are collecting data on this instance. + string m_fluxName; + }; + /** * @brief Constructor for the statistics class * @param[in] name the name of the task coming from the xml * @param[in] parent the parent group of the task */ - SourceFluxStatistics( const string & name, - Group * const parent ); + SourceFluxStatsAggregator( const string & name, + Group * const parent ); /// Accessor for the catalog name static string catalogName() { return "SourceFluxStatistics"; } @@ -76,6 +144,39 @@ class SourceFluxStatistics : public FieldStatisticsBase< FlowSolverBase > /**@}*/ + /** + * @return a WrappedStats struct that contains the statistics of the flux for the + * SourceFluxStatsAggregator instance in the container. + * @note To be retrieved, the WrappedStats struct must be registered on the container during the + * registerDataOnMesh() call. + * @param container the container from which we want the statistics. + * @param fluxName the name of the flux from which we want the statistics. + * @throw a GEOS_ERROR if the flux was not found. + */ + WrappedStats & getFluxStatData( Group & container, string_view fluxName ); + + /** + * @brief Apply a functor to all WrappedStats of the given group that target a given flux (and + * potentially multiple SourceFluxStatsAggregator). + * The functor takes in parameter the reference to the currently processed WrappedStats. + * @note To be retrieved, the WrappedStats structs must be registered on the container during the + * registerDataOnMesh() call. + * @tparam LAMBDA the type of lambda function to call in the function + * @param container the container from which we want the statistics. + * @param fluxName the name of the flux from which we want the statistics. + * @param lambda the functor that will be called for each WrappedStats. Takes in parameter the + * reference to the currently processed WrappedStats. + */ + template< typename LAMBDA > + static void forAllFluxStatData( Group & container, string_view fluxName, LAMBDA && lambda ); + + /** + * @return a string used to name the wrapper that is added to each region that is simulated by the solver. + * The string is unique within the region for the SourceFluxBoundaryCondition and the SourceFluxStatsAggregator. + */ + inline string getRegionStatDataName( string_view fluxName ) const; + + /** * @brief View keys */ @@ -87,6 +188,9 @@ class SourceFluxStatistics : public FieldStatisticsBase< FlowSolverBase > protected: + /** + * @copydoc Group::postProcessInput() + */ void postProcessInput() override; private: @@ -94,22 +198,6 @@ class SourceFluxStatistics : public FieldStatisticsBase< FlowSolverBase > /// the names of the SourceFlux(s) for which we want the statistics string_array m_fluxNames; - /// internal array to keep track of the names of the wrappers that will store the Stat data on each - /// region for this SourceFluxStatistics. - std::set< string > m_statWrapperNames; - //!\\ TODO : remove that ? - //!\\ /// Internal array of the SourceFlux(s) for which we want the statistics - //!\\ std::vector< SourceFluxBoundaryCondition * > m_fluxes; - - /** - * @return a string used to name the wrapper that is added to each region that is simulated by - * the solver. The string is based on the name of this Group so it is unique within the region. - */ - string getRegionStatsName( string_view fluxName ) - { - return GEOS_FMT( "{}_region_{}_Stats", - getName(), fluxName ); - } /** * @copydoc Group::registerDataOnMesh(Group &) @@ -117,13 +205,37 @@ class SourceFluxStatistics : public FieldStatisticsBase< FlowSolverBase > void registerDataOnMesh( Group & meshBodies ) override; /** - * @param Stats the statistics that must be output in the log + * @brief Output in the log the given statistics. + * @param regionName the name of the element group (a region, a sub-region...) from which we want + * to output the data. + * @param minLogLevel the min log level to output any line. + * @param subSetName the region / sub-subregion name concerned by the statistics. + * @param fluxName the flux name concerned by the statistics. + * @param stats the statistics that must be output in the log. */ - static void writeStats( string_view aggregateName, Stats const & stats ); + void writeStatData( integer minLogLevel, string_view subSetName, string_view fluxName, StatData const & stats ); }; +template< typename LAMBDA > +void SourceFluxStatsAggregator::forAllFluxStatData( Group & container, + string_view fluxName, + LAMBDA && lambda ) +{ + container.forWrappers< WrappedStats >( [&]( dataRepository::Wrapper< WrappedStats > & statsWrapper ) + { + if( statsWrapper.referenceAsView().getFluxName() == fluxName ) + { + lambda( statsWrapper.reference() ); + } + } ); +} + +inline string SourceFluxStatsAggregator::getRegionStatDataName( string_view fluxName ) const +{ return GEOS_FMT( "{}_region_stats_for_{}", fluxName, getName() ); } + + /******************************** SourceFluxStatisticsKernel ********************************/ struct SourceFluxStatisticsKernel {}; diff --git a/src/coreComponents/mesh/ElementRegionBase.hpp b/src/coreComponents/mesh/ElementRegionBase.hpp index 049173a74e6..dff8529804e 100644 --- a/src/coreComponents/mesh/ElementRegionBase.hpp +++ b/src/coreComponents/mesh/ElementRegionBase.hpp @@ -214,6 +214,18 @@ class ElementRegionBase : public ObjectManagerBase template< typename CONSTITUTIVE_TYPE > string_array getConstitutiveNames() const; + /** + * @brief Get the parent region of a given sub-region + */ + static ElementRegionBase & getParentRegion( ElementSubRegionBase & subRegion ) + { return dynamicCast< ElementRegionBase & >( subRegion.getParent().getParent() ); } + + /** + * @brief Get the parent region of a given sub-region + */ + static ElementRegionBase const & getParentRegion( ElementSubRegionBase const & subRegion ) + { return dynamicCast< ElementRegionBase const & >( subRegion.getParent().getParent() ); } + ///@} diff --git a/src/coreComponents/physicsSolvers/fluidFlow/SinglePhaseBase.cpp b/src/coreComponents/physicsSolvers/fluidFlow/SinglePhaseBase.cpp index 3a6feaea719..8a759b01fa2 100644 --- a/src/coreComponents/physicsSolvers/fluidFlow/SinglePhaseBase.cpp +++ b/src/coreComponents/physicsSolvers/fluidFlow/SinglePhaseBase.cpp @@ -31,6 +31,7 @@ #include "fieldSpecification/EquilibriumInitialCondition.hpp" #include "fieldSpecification/FieldSpecificationManager.hpp" #include "fieldSpecification/SourceFluxBoundaryCondition.hpp" +#include "fieldSpecification/SourceFluxStatistics.hpp" #include "finiteVolume/FiniteVolumeManager.hpp" #include "functions/TableFunction.hpp" #include "mainInterface/ProblemManager.hpp" @@ -61,10 +62,10 @@ SinglePhaseBase::SinglePhaseBase( const string & name, this->getWrapper< integer >( string( viewKeyStruct::isThermalString() ) ). appendDescription( GEOS_FMT( "\nSourceFluxes application if {} is enabled :\n" - "- negative value (injection): the mass balance equation is modified to considered the additional source term,\n" - "- positive value (production): both the mass balance and the energy balance equations are modified to considered the additional source term.\n" - "For the energy balance equation, the mass flux is multipied by the enthalpy in the cell from which the fluid is being produced.", - viewKeyStruct::isThermalString() ) ); + "- negative value (injection): the mass balance equation is modified to considered the additional source term,\n" + "- positive value (production): both the mass balance and the energy balance equations are modified to considered the additional source term.\n" + "For the energy balance equation, the mass flux is multipied by the enthalpy in the cell from which the fluid is being produced.", + viewKeyStruct::isThermalString() ) ); } @@ -845,14 +846,6 @@ void SinglePhaseBase::applyBoundaryConditions( real64 time_n, namespace { -//!\\ TODO : remove this as the SourceFluxStatistics exist to output these info (and more) -//!\\ char const bcLogMessage[] = -//!\\ "SinglePhaseBase {}: at time {}s, " -//!\\ "the <{}> boundary condition '{}' is applied to the element set '{}' in subRegion '{}'. " -//!\\ "\nThe scale of this boundary condition is {} and multiplies the value of the provided function (if any). " -//!\\ "\nThe total number of target elements (including ghost elements) is {}. " -//!\\ "\nNote that if this number is equal to zero for all subRegions, the boundary condition will not be applied on this element set."; - void applyAndSpecifyFieldValue( real64 const & time_n, real64 const & dt, MeshLevel & mesh, @@ -876,15 +869,6 @@ void applyAndSpecifyFieldValue( real64 const & time_n, ElementSubRegionBase & subRegion, string const & ) { - //!\\ TODO : remove this as the SourceFluxStatistics exist to output these info (and more) - //!\\ if( fs.getLogLevel() >= 1 && isFirstNonlinearIteration ) - //!\\ { - //!\\ globalIndex const bcNumTargetElems = MpiWrapper::sum< globalIndex >( lset.size() ); - //!\\ GEOS_LOG_RANK_0( GEOS_FMT( bcLogMessage, - //!\\ solverName, time_n+dt, FieldSpecificationBase::catalogName(), - //!\\ fs.getName(), setName, subRegion.getName(), fs.getScale(), bcNumTargetElems ) ); - //!\\ } - // Specify the bc value of the field fs.applyFieldValue< FieldSpecificationEqual, parallelDevicePolicy<> >( lset, @@ -1013,31 +997,6 @@ void SinglePhaseBase::applySourceFluxBC( real64 const time_n, ElementSubRegionBase & subRegion, string const & ) { - //!\\ TODO : remove this as the SourceFluxStatistics exist to output these info (and more) - //!\\ if( fs.getLogLevel() >= 1 && m_nonlinearSolverParameters.m_numNewtonIterations == 0 ) - //!\\ { - //!\\ globalIndex const numTargetElems = MpiWrapper::sum< globalIndex >( targetSet.size() ); - //!\\ GEOS_LOG_RANK_0( GEOS_FMT( bcLogMessage, - //!\\ getName(), time_n+dt, SourceFluxBoundaryCondition::catalogName(), - //!\\ fs.getName(), setName, subRegion.getName(), fs.getScale(), numTargetElems ) ); - - //!\\ if( isThermal ) - //!\\ { - //!\\ char const msg[] = "SinglePhaseBase {} with isThermal = 1. At time {}s, " - //!\\ "the <{}> source flux boundary condition '{}' will be applied with the following behavior" - //!\\ "\n - negative value (injection): the mass balance equation is modified to considered the additional - //! source - //!\\ term" - //!\\ "\n - positive value (production): both the mass balance and the energy balance equations are modified to - //!\\ considered the additional source term. " - //!\\ "\n For the energy balance equation, the mass flux is multipied by the enthalpy in the cell from which - //! the - //!\\ fluid is being produced."; - //!\\ GEOS_LOG_RANK_0( GEOS_FMT( msg, - //!\\ getName(), time_n+dt, SourceFluxBoundaryCondition::catalogName(), fs.getName() ) ); - //!\\ } - //!\\ } - if( targetSet.size() == 0 ) { return; @@ -1052,13 +1011,8 @@ void SinglePhaseBase::applySourceFluxBC( real64 const time_n, return; } - //!\\ TODO : store those values in a SourceFluxStatistics::Stats - //!\\ // init source flux statistics - //!\\ // TODO: extract those local variables in a dedicated class. Need to re-init them before ... - //!\\ real64 bcProducedMass = 0.0; - //!\\ globalIndex bcNumTargetElems = 0; - //!\\ // TODO: collect region names rather than sub-region names (need ElementSubRegionBase::getRegionName()) - //!\\ std::set< string > bcRegions; + // production stats for this SourceFluxBoundaryCondition in this subRegion + real64 producedMass = 0.0; arrayView1d< globalIndex const > const dofNumber = subRegion.getReference< array1d< globalIndex > >( dofKey ); arrayView1d< integer const > const ghostRank = subRegion.ghostRank(); @@ -1109,7 +1063,8 @@ void SinglePhaseBase::applySourceFluxBC( real64 const time_n, dEnthalpy_dPressure, rhsContributionArrayView, localRhs, - localMatrix] GEOS_HOST_DEVICE ( localIndex const a ) + localMatrix, + &producedMass] GEOS_HOST_DEVICE ( localIndex const a ) { // we need to filter out ghosts here, because targetSet may contain them localIndex const ei = targetSet[a]; @@ -1123,8 +1078,7 @@ void SinglePhaseBase::applySourceFluxBC( real64 const time_n, globalIndex const energyRowIndex = massRowIndex + 1; real64 const rhsValue = rhsContributionArrayView[a] / sizeScalingFactor; // scale the contribution by the sizeScalingFactor here! localRhs[massRowIndex] += rhsValue; - //!\\ TODO : store those values in a SourceFluxStatistics::Stats - //!\\ bcProducedMass += rhsValue; + producedMass += rhsValue; //add the value to the energey balance equation if the flux is positive (i.e., it's a producer) if( rhsContributionArrayView[a] > 0.0 ) { @@ -1151,7 +1105,8 @@ void SinglePhaseBase::applySourceFluxBC( real64 const time_n, ghostRank, dofNumber, rhsContributionArrayView, - localRhs] GEOS_HOST_DEVICE ( localIndex const a ) + localRhs, + &producedMass] GEOS_HOST_DEVICE ( localIndex const a ) { // we need to filter out ghosts here, because targetSet may contain them localIndex const ei = targetSet[a]; @@ -1164,34 +1119,17 @@ void SinglePhaseBase::applySourceFluxBC( real64 const time_n, globalIndex const rowIndex = dofNumber[ei] - rankOffset; real64 const rhsValue = rhsContributionArrayView[a] / sizeScalingFactor; localRhs[rowIndex] += rhsValue; - //!\\ TODO : store those values in a SourceFluxStatistics::Stats - //!\\ bcProducedMass += rhsValue; + producedMass += rhsValue; } ); } - //!\\ TODO : store those values in a SourceFluxStatistics::Stats - //!\\ jjbcNumTargetElems += targetSet.size(); - //!\\ jjbcRegions.insert( subRegion.getName() ); - - //!\\ // compile all stats from every ranks - //!\\ bcProducedMass = MpiWrapper::sum( bcProducedMass ); - //!\\ bcNumTargetElems = MpiWrapper::sum( bcNumTargetElems ); - //!\\ // Output the flux rate in the console. - //!\\ // TODO: 1. Create a dedicated SourceFluxStatistics class, send the logging part of this code in it, and do so for every flow - //!\\ solver - //!\\ // TODO: 2. Maintain the folowing PR to base SourceFluxStatistics on: - //!\\ // https://github.com/GEOS-DEV/GEOS/compare/develop...feature/untereiner/export_stats - //!\\ if( fs.getLogLevel() >= 1 && logger::internal::rank == 0 ) - //!\\ { - //!\\ double effectiveRate = bcProducedMass / dt; - - //!\\ GEOS_LOG_RANK_0( GEOS_FMT( "{}: applied on {} elements in sub-region {}", - //!\\ fs.getName(), bcNumTargetElems, stringutilities::join( bcRegions, ", " ) ) ); - //!\\ GEOS_LOG_RANK_0( GEOS_FMT( "{}: Produced mass = {} kg", - //!\\ fs.getName(), bcProducedMass ) ); - //!\\ GEOS_LOG_RANK_0( GEOS_FMT( "{}: Production rate = {} kg/s", - //!\\ fs.getName(), effectiveRate ) ); - //!\\ } + SourceFluxStatsAggregator::forAllFluxStatData( subRegion, fs.getName(), + [&]( SourceFluxStatsAggregator::WrappedStats & wrapper ) + { + // set the new sub-region statistics for this timestep + wrapper.setTimeStepStats( dt, producedMass, targetSet.size(), + m_nonlinearSolverParameters.m_numNewtonIterations != 0 ); + } ); } ); } ); } diff --git a/src/coreComponents/schema/docs/SinglePhaseFVM.rst b/src/coreComponents/schema/docs/SinglePhaseFVM.rst index 1f7ecbc504a..96309c4df5e 100644 --- a/src/coreComponents/schema/docs/SinglePhaseFVM.rst +++ b/src/coreComponents/schema/docs/SinglePhaseFVM.rst @@ -1,20 +1,24 @@ -========================= ================== ======== ======================================================================================================================================================================================================================================================================================================================== -Name Type Default Description -========================= ================== ======== ======================================================================================================================================================================================================================================================================================================================== -allowNegativePressure integer 1 Flag indicating if negative pressure is allowed -cflFactor real64 0.5 Factor to apply to the `CFL condition `_ when calculating the maximum allowable time step. Values should be in the interval (0,1] -discretization groupNameRef required Name of discretization object (defined in the :ref:`NumericalMethodsManager`) to use for this solver. For instance, if this is a Finite Element Solver, the name of a :ref:`FiniteElement` should be specified. If this is a Finite Volume Method, the name of a :ref:`FiniteVolume` discretization should be specified. -initialDt real64 1e+99 Initial time-step value required by the solver to the event manager. -isThermal integer 0 Flag indicating whether the problem is thermal or not. -logLevel integer 0 Log level -maxAbsolutePressureChange real64 -1 Maximum (absolute) pressure change in a Newton iteration -name groupName required A name is required for any non-unique nodes -targetRegions groupNameRef_array required Allowable regions that the solver may be applied to. Note that this does not indicate that the solver will be applied to these regions, only that allocation will occur such that the solver may be applied to these regions. The decision about what regions this solver will beapplied to rests in the EventManager. -temperature real64 0 Temperature -LinearSolverParameters node unique :ref:`XML_LinearSolverParameters` -NonlinearSolverParameters node unique :ref:`XML_NonlinearSolverParameters` -========================= ================== ======== ======================================================================================================================================================================================================================================================================================================================== +========================= ================== ======== ======================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================== +Name Type Default Description +========================= ================== ======== ======================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================== +allowNegativePressure integer 1 Flag indicating if negative pressure is allowed +cflFactor real64 0.5 Factor to apply to the `CFL condition `_ when calculating the maximum allowable time step. Values should be in the interval (0,1] +discretization groupNameRef required Name of discretization object (defined in the :ref:`NumericalMethodsManager`) to use for this solver. For instance, if this is a Finite Element Solver, the name of a :ref:`FiniteElement` should be specified. If this is a Finite Volume Method, the name of a :ref:`FiniteVolume` discretization should be specified. +initialDt real64 1e+99 Initial time-step value required by the solver to the event manager. +isThermal integer 0 | Flag indicating whether the problem is thermal or not. + | SourceFluxes application if isThermal is enabled : + | - negative value (injection): the mass balance equation is modified to considered the additional source term, + | - positive value (production): both the mass balance and the energy balance equations are modified to considered the additional source term. + | For the energy balance equation, the mass flux is multipied by the enthalpy in the cell from which the fluid is being produced. +logLevel integer 0 Log level +maxAbsolutePressureChange real64 -1 Maximum (absolute) pressure change in a Newton iteration +name groupName required A name is required for any non-unique nodes +targetRegions groupNameRef_array required Allowable regions that the solver may be applied to. Note that this does not indicate that the solver will be applied to these regions, only that allocation will occur such that the solver may be applied to these regions. The decision about what regions this solver will beapplied to rests in the EventManager. +temperature real64 0 Temperature +LinearSolverParameters node unique :ref:`XML_LinearSolverParameters` +NonlinearSolverParameters node unique :ref:`XML_NonlinearSolverParameters` +========================= ================== ======== ======================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================== diff --git a/src/coreComponents/schema/docs/SinglePhaseHybridFVM.rst b/src/coreComponents/schema/docs/SinglePhaseHybridFVM.rst index 1f7ecbc504a..96309c4df5e 100644 --- a/src/coreComponents/schema/docs/SinglePhaseHybridFVM.rst +++ b/src/coreComponents/schema/docs/SinglePhaseHybridFVM.rst @@ -1,20 +1,24 @@ -========================= ================== ======== ======================================================================================================================================================================================================================================================================================================================== -Name Type Default Description -========================= ================== ======== ======================================================================================================================================================================================================================================================================================================================== -allowNegativePressure integer 1 Flag indicating if negative pressure is allowed -cflFactor real64 0.5 Factor to apply to the `CFL condition `_ when calculating the maximum allowable time step. Values should be in the interval (0,1] -discretization groupNameRef required Name of discretization object (defined in the :ref:`NumericalMethodsManager`) to use for this solver. For instance, if this is a Finite Element Solver, the name of a :ref:`FiniteElement` should be specified. If this is a Finite Volume Method, the name of a :ref:`FiniteVolume` discretization should be specified. -initialDt real64 1e+99 Initial time-step value required by the solver to the event manager. -isThermal integer 0 Flag indicating whether the problem is thermal or not. -logLevel integer 0 Log level -maxAbsolutePressureChange real64 -1 Maximum (absolute) pressure change in a Newton iteration -name groupName required A name is required for any non-unique nodes -targetRegions groupNameRef_array required Allowable regions that the solver may be applied to. Note that this does not indicate that the solver will be applied to these regions, only that allocation will occur such that the solver may be applied to these regions. The decision about what regions this solver will beapplied to rests in the EventManager. -temperature real64 0 Temperature -LinearSolverParameters node unique :ref:`XML_LinearSolverParameters` -NonlinearSolverParameters node unique :ref:`XML_NonlinearSolverParameters` -========================= ================== ======== ======================================================================================================================================================================================================================================================================================================================== +========================= ================== ======== ======================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================== +Name Type Default Description +========================= ================== ======== ======================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================== +allowNegativePressure integer 1 Flag indicating if negative pressure is allowed +cflFactor real64 0.5 Factor to apply to the `CFL condition `_ when calculating the maximum allowable time step. Values should be in the interval (0,1] +discretization groupNameRef required Name of discretization object (defined in the :ref:`NumericalMethodsManager`) to use for this solver. For instance, if this is a Finite Element Solver, the name of a :ref:`FiniteElement` should be specified. If this is a Finite Volume Method, the name of a :ref:`FiniteVolume` discretization should be specified. +initialDt real64 1e+99 Initial time-step value required by the solver to the event manager. +isThermal integer 0 | Flag indicating whether the problem is thermal or not. + | SourceFluxes application if isThermal is enabled : + | - negative value (injection): the mass balance equation is modified to considered the additional source term, + | - positive value (production): both the mass balance and the energy balance equations are modified to considered the additional source term. + | For the energy balance equation, the mass flux is multipied by the enthalpy in the cell from which the fluid is being produced. +logLevel integer 0 Log level +maxAbsolutePressureChange real64 -1 Maximum (absolute) pressure change in a Newton iteration +name groupName required A name is required for any non-unique nodes +targetRegions groupNameRef_array required Allowable regions that the solver may be applied to. Note that this does not indicate that the solver will be applied to these regions, only that allocation will occur such that the solver may be applied to these regions. The decision about what regions this solver will beapplied to rests in the EventManager. +temperature real64 0 Temperature +LinearSolverParameters node unique :ref:`XML_LinearSolverParameters` +NonlinearSolverParameters node unique :ref:`XML_NonlinearSolverParameters` +========================= ================== ======== ======================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================== diff --git a/src/coreComponents/schema/docs/SinglePhaseProppantFVM.rst b/src/coreComponents/schema/docs/SinglePhaseProppantFVM.rst index 1f7ecbc504a..96309c4df5e 100644 --- a/src/coreComponents/schema/docs/SinglePhaseProppantFVM.rst +++ b/src/coreComponents/schema/docs/SinglePhaseProppantFVM.rst @@ -1,20 +1,24 @@ -========================= ================== ======== ======================================================================================================================================================================================================================================================================================================================== -Name Type Default Description -========================= ================== ======== ======================================================================================================================================================================================================================================================================================================================== -allowNegativePressure integer 1 Flag indicating if negative pressure is allowed -cflFactor real64 0.5 Factor to apply to the `CFL condition `_ when calculating the maximum allowable time step. Values should be in the interval (0,1] -discretization groupNameRef required Name of discretization object (defined in the :ref:`NumericalMethodsManager`) to use for this solver. For instance, if this is a Finite Element Solver, the name of a :ref:`FiniteElement` should be specified. If this is a Finite Volume Method, the name of a :ref:`FiniteVolume` discretization should be specified. -initialDt real64 1e+99 Initial time-step value required by the solver to the event manager. -isThermal integer 0 Flag indicating whether the problem is thermal or not. -logLevel integer 0 Log level -maxAbsolutePressureChange real64 -1 Maximum (absolute) pressure change in a Newton iteration -name groupName required A name is required for any non-unique nodes -targetRegions groupNameRef_array required Allowable regions that the solver may be applied to. Note that this does not indicate that the solver will be applied to these regions, only that allocation will occur such that the solver may be applied to these regions. The decision about what regions this solver will beapplied to rests in the EventManager. -temperature real64 0 Temperature -LinearSolverParameters node unique :ref:`XML_LinearSolverParameters` -NonlinearSolverParameters node unique :ref:`XML_NonlinearSolverParameters` -========================= ================== ======== ======================================================================================================================================================================================================================================================================================================================== +========================= ================== ======== ======================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================== +Name Type Default Description +========================= ================== ======== ======================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================== +allowNegativePressure integer 1 Flag indicating if negative pressure is allowed +cflFactor real64 0.5 Factor to apply to the `CFL condition `_ when calculating the maximum allowable time step. Values should be in the interval (0,1] +discretization groupNameRef required Name of discretization object (defined in the :ref:`NumericalMethodsManager`) to use for this solver. For instance, if this is a Finite Element Solver, the name of a :ref:`FiniteElement` should be specified. If this is a Finite Volume Method, the name of a :ref:`FiniteVolume` discretization should be specified. +initialDt real64 1e+99 Initial time-step value required by the solver to the event manager. +isThermal integer 0 | Flag indicating whether the problem is thermal or not. + | SourceFluxes application if isThermal is enabled : + | - negative value (injection): the mass balance equation is modified to considered the additional source term, + | - positive value (production): both the mass balance and the energy balance equations are modified to considered the additional source term. + | For the energy balance equation, the mass flux is multipied by the enthalpy in the cell from which the fluid is being produced. +logLevel integer 0 Log level +maxAbsolutePressureChange real64 -1 Maximum (absolute) pressure change in a Newton iteration +name groupName required A name is required for any non-unique nodes +targetRegions groupNameRef_array required Allowable regions that the solver may be applied to. Note that this does not indicate that the solver will be applied to these regions, only that allocation will occur such that the solver may be applied to these regions. The decision about what regions this solver will beapplied to rests in the EventManager. +temperature real64 0 Temperature +LinearSolverParameters node unique :ref:`XML_LinearSolverParameters` +NonlinearSolverParameters node unique :ref:`XML_NonlinearSolverParameters` +========================= ================== ======== ======================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================== diff --git a/src/coreComponents/schema/docs/SourceFluxStatistics.rst b/src/coreComponents/schema/docs/SourceFluxStatistics.rst index a395ab44098..0bf817efde4 100644 --- a/src/coreComponents/schema/docs/SourceFluxStatistics.rst +++ b/src/coreComponents/schema/docs/SourceFluxStatistics.rst @@ -1,14 +1,16 @@ -============== ================== ======== =============================================================================================================================================== -Name Type Default Description -============== ================== ======== =============================================================================================================================================== -flowSolverName groupNameRef required Name of the flow solver -fluxNames groupNameRef_array required Name(s) array of the SourceFlux(s) for which we want the statistics. Use "all" to target all SourceFlux. -logLevel integer 0 | Log level - | - Log Level 1 outputs the sum of all SourceFlux(s) produced rate & mass, - | - Log Level 2 outputs detailed values for each SourceFlux. -name groupName required A name is required for any non-unique nodes -============== ================== ======== =============================================================================================================================================== +============== ================== ======== ======================================================================================================================================================================================================================================== +Name Type Default Description +============== ================== ======== ======================================================================================================================================================================================================================================== +flowSolverName groupNameRef required Name of the flow solver +fluxNames groupNameRef_array required Name(s) array of the SourceFlux(s) for which we want the statistics. Use "all" to target all SourceFlux. +logLevel integer 0 | Log level + | - Log Level 1 outputs the sum of all SourceFlux(s) produced rate & mass, + | - Log Level 2 details values for each SourceFlux, + | - Log Level 3 details values for each region, + | - Log Level 4 details values for each sub-region. +name groupName required A name is required for any non-unique nodes +============== ================== ======== ======================================================================================================================================================================================================================================== diff --git a/src/coreComponents/schema/schema.xsd b/src/coreComponents/schema/schema.xsd index 4af560fc01c..3fdc25b94d8 100644 --- a/src/coreComponents/schema/schema.xsd +++ b/src/coreComponents/schema/schema.xsd @@ -2980,7 +2980,11 @@ Local - Add stabilization only to interiors of macro elements.--> - + @@ -3006,7 +3010,11 @@ Local - Add stabilization only to interiors of macro elements.--> - + @@ -3120,7 +3128,11 @@ Local - Add stabilization only to interiors of macro elements.--> - + @@ -3574,7 +3586,9 @@ Local - Add stabilization only to interiors of macro elements.--> +- Log Level 2 details values for each SourceFlux, +- Log Level 3 details values for each region, +- Log Level 4 details values for each sub-region.--> From cc55358f469efce2bc0577edf273d40609bb1c17 Mon Sep 17 00:00:00 2001 From: MelReyCG Date: Thu, 25 Jan 2024 17:14:34 +0100 Subject: [PATCH 18/98] few edits --- .../fieldSpecification/SourceFluxStatistics.cpp | 17 ++++++++++------- .../fieldSpecification/SourceFluxStatistics.hpp | 6 +++--- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/src/coreComponents/fieldSpecification/SourceFluxStatistics.cpp b/src/coreComponents/fieldSpecification/SourceFluxStatistics.cpp index 46b0ed8008c..afecb6f1d76 100644 --- a/src/coreComponents/fieldSpecification/SourceFluxStatistics.cpp +++ b/src/coreComponents/fieldSpecification/SourceFluxStatistics.cpp @@ -132,12 +132,12 @@ void SourceFluxStatsAggregator::writeStatData( integer minLogLevel, string_view { if( getLogLevel() >= minLogLevel && logger::internal::rank == 0 ) { - GEOS_LOG_RANK( GEOS_FMT( "{}, {}, {}: applied on {} elements", - getName(), fluxName, subSetName, stats.m_elementCount ) ); - GEOS_LOG_RANK( GEOS_FMT( "{}, {}, {}: Produced mass = {} kg", - getName(), fluxName, subSetName, stats.m_producedMass ) ); - GEOS_LOG_RANK( GEOS_FMT( "{}, {}, {}: Production rate = {} kg/s", - getName(), fluxName, subSetName, stats.m_productionRate ) ); + GEOS_LOG_RANK( GEOS_FMT( "{} ({}) of {} in {}: Producting on {} elements", + catalogName(), getName(), fluxName, subSetName, stats.m_elementCount ) ); + GEOS_LOG_RANK( GEOS_FMT( "{} ({}) of {} in {}: Produced mass = {} kg", + catalogName(), getName(), fluxName, subSetName, stats.m_producedMass ) ); + GEOS_LOG_RANK( GEOS_FMT( "{} ({}) of {} in {}: Production rate = {} kg/s", + catalogName(), getName(), fluxName, subSetName, stats.m_productionRate ) ); } } @@ -227,7 +227,10 @@ SourceFluxStatsAggregator::StatData SourceFluxStatsAggregator::WrappedStats::fin real64 periodMass = m_currentTimeStepMass + m_pendingPeriodMass; StatData periodStats; periodStats.m_producedMass = periodMass; - periodStats.m_productionRate = periodMass / m_periodDeltaTime; + if( m_periodDeltaTime > 0.0 ) + { + periodStats.m_productionRate = periodMass / m_periodDeltaTime; + } periodStats.m_elementCount = m_elementCount; m_currentTimeStepMass = 0.0; diff --git a/src/coreComponents/fieldSpecification/SourceFluxStatistics.hpp b/src/coreComponents/fieldSpecification/SourceFluxStatistics.hpp index 9b0d04f65ea..7fa03d570c9 100644 --- a/src/coreComponents/fieldSpecification/SourceFluxStatistics.hpp +++ b/src/coreComponents/fieldSpecification/SourceFluxStatistics.hpp @@ -123,7 +123,7 @@ class SourceFluxStatsAggregator : public FieldStatisticsBase< FlowSolverBase > * @param[in] parent the parent group of the task */ SourceFluxStatsAggregator( const string & name, - Group * const parent ); + Group * const parent ); /// Accessor for the catalog name static string catalogName() { return "SourceFluxStatistics"; } @@ -220,8 +220,8 @@ class SourceFluxStatsAggregator : public FieldStatisticsBase< FlowSolverBase > template< typename LAMBDA > void SourceFluxStatsAggregator::forAllFluxStatData( Group & container, - string_view fluxName, - LAMBDA && lambda ) + string_view fluxName, + LAMBDA && lambda ) { container.forWrappers< WrappedStats >( [&]( dataRepository::Wrapper< WrappedStats > & statsWrapper ) { From 69c69187eef43123b10aa7071afaf91acd821f9a Mon Sep 17 00:00:00 2001 From: MelReyCG Date: Fri, 26 Jan 2024 15:26:38 +0100 Subject: [PATCH 19/98] uncrustify --- src/coreComponents/physicsSolvers/fluidFlow/SinglePhaseBase.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/coreComponents/physicsSolvers/fluidFlow/SinglePhaseBase.cpp b/src/coreComponents/physicsSolvers/fluidFlow/SinglePhaseBase.cpp index 8a759b01fa2..9d6c45832ec 100644 --- a/src/coreComponents/physicsSolvers/fluidFlow/SinglePhaseBase.cpp +++ b/src/coreComponents/physicsSolvers/fluidFlow/SinglePhaseBase.cpp @@ -1124,7 +1124,7 @@ void SinglePhaseBase::applySourceFluxBC( real64 const time_n, } SourceFluxStatsAggregator::forAllFluxStatData( subRegion, fs.getName(), - [&]( SourceFluxStatsAggregator::WrappedStats & wrapper ) + [&]( SourceFluxStatsAggregator::WrappedStats & wrapper ) { // set the new sub-region statistics for this timestep wrapper.setTimeStepStats( dt, producedMass, targetSet.size(), From a164ecee63639aba11fcdd405d6ff4c9865f4cfc Mon Sep 17 00:00:00 2001 From: MelReyCG Date: Thu, 1 Feb 2024 17:31:16 +0100 Subject: [PATCH 20/98] architecture adaptations to expose values to unit tests --- .../SourceFluxStatistics.cpp | 199 ++++++++++-------- .../SourceFluxStatistics.hpp | 196 +++++++++++++---- .../CompositionalMultiphaseStatistics.cpp | 2 +- .../fluidFlow/SinglePhaseBase.cpp | 9 +- .../fluidFlow/SinglePhaseStatistics.cpp | 2 +- 5 files changed, 273 insertions(+), 135 deletions(-) diff --git a/src/coreComponents/fieldSpecification/SourceFluxStatistics.cpp b/src/coreComponents/fieldSpecification/SourceFluxStatistics.cpp index afecb6f1d76..abe728e5b59 100644 --- a/src/coreComponents/fieldSpecification/SourceFluxStatistics.cpp +++ b/src/coreComponents/fieldSpecification/SourceFluxStatistics.cpp @@ -16,8 +16,6 @@ * @file SourceFluxStatistics.cpp */ -//!\\ TODO add a test for this component in SinglePhase and MultiPhase - #include "SourceFluxStatistics.hpp" #include "SourceFluxBoundaryCondition.hpp" @@ -38,7 +36,7 @@ SourceFluxStatsAggregator::SourceFluxStatsAggregator( const string & name, "- Log Level 4 details values for each sub-region.", SourceFluxBoundaryCondition::catalogName() ) ); - registerWrapper( viewKeyStruct::fluxNamesString(), &m_fluxNames ). + registerWrapper( viewKeyStruct::fluxNamesString().data(), &m_fluxNames ). setRTTypeName( rtTypes::CustomTypes::groupNameRefArray ). setInputFlag( InputFlags::REQUIRED ). setSizedFromParent( 0 ). @@ -76,6 +74,15 @@ void SourceFluxStatsAggregator::postProcessInput() } } +Wrapper< SourceFluxStatsAggregator::WrappedStats > & +SourceFluxStatsAggregator::registerWrappedStats( Group & group, string_view fluxName ) +{ + string const wrapperName = getStatWrapperName( fluxName ); + Wrapper< WrappedStats > & statsWrapper = group.registerWrapper< WrappedStats >( wrapperName ); + statsWrapper.setRestartFlags( RestartFlags::NO_WRITE ); + statsWrapper.reference().setTarget( getName(), fluxName ); + return statsWrapper; +} void SourceFluxStatsAggregator::registerDataOnMesh( Group & meshBodies ) { // the fields have to be registered in "registerDataOnMesh" (and not later) @@ -91,53 +98,61 @@ void SourceFluxStatsAggregator::registerDataOnMesh( Group & meshBodies ) MeshLevel & mesh, arrayView1d< string const > const & ) { - // Adding, on each sub-region, a wrapper to hold the stats of each wrapper - mesh.getElemManager().forElementSubRegions( [&]( ElementSubRegionBase & subRegion ) + registerWrappedStats( mesh, viewKeyStruct::fluxSetWrapperString() ); + for( string const & fluxName : m_fluxNames ) { - for( string const & fluxName : m_fluxNames ) + registerWrappedStats( mesh, fluxName ); + + mesh.getElemManager().forElementRegions( [&]( ElementRegionBase & region ) { - string const wrapperName = getRegionStatDataName( fluxName ); - Wrapper< WrappedStats > & statsWrapper = subRegion.registerWrapper< WrappedStats >( wrapperName ); - statsWrapper.setRestartFlags( RestartFlags::NO_WRITE ); - statsWrapper.reference().setTarget( getName(), fluxName ); - subRegion.excludeWrappersFromPacking( { wrapperName } ); - } - } ); - // Do we need to add a similar wrapper for each statistics ? (region-level, mesh-level... to hold as many stats the log levels offer) - } ); -} + Wrapper< WrappedStats > & regionStatsWrapper = registerWrappedStats( region, fluxName ); + region.excludeWrappersFromPacking( { regionStatsWrapper.getName() } ); -SourceFluxStatsAggregator::WrappedStats & -SourceFluxStatsAggregator::getFluxStatData( Group & container, - string_view fluxName ) -{ - WrappedStats * r = nullptr; - container.forWrappers< WrappedStats >( [&]( dataRepository::Wrapper< WrappedStats > & statsWrapper ) - { - WrappedStats & statsWrapperView = statsWrapper.referenceAsView(); - if( statsWrapperView.getFluxName() == fluxName && statsWrapperView.getAggregatorName() == getName() ) - { - r = &statsWrapperView; + region.forElementSubRegions( [&]( ElementSubRegionBase & subRegion ) + { + Wrapper< WrappedStats > & subRegionStatsWrapper = registerWrappedStats( subRegion, fluxName ); + subRegion.excludeWrappersFromPacking( { subRegionStatsWrapper.getName() } ); + } ); + } ); } } ); - // Error if SourceFluxStatsAggregator::registerDataOnMesh() did not work as expected - GEOS_ERROR_IF( r == nullptr, GEOS_FMT( "{}: {} data wrongly registered on mesh (no flux stats wrapper was found for {} named {}).", - getName(), catalogName(), - SourceFluxBoundaryCondition::catalogName(), fluxName ) ); - return *r; } -void SourceFluxStatsAggregator::writeStatData( integer minLogLevel, string_view subSetName, - string_view fluxName, StatData const & stats ) +// SourceFluxStatsAggregator::WrappedStats & +// SourceFluxStatsAggregator::getFluxStatData( Group & container, +// string_view fluxName ) +// { +// WrappedStats * r = nullptr; +// container.forWrappers< WrappedStats >( [&]( dataRepository::Wrapper< WrappedStats > & statsWrapper ) +// { +// WrappedStats & statsWrapperView = statsWrapper.referenceAsView(); +// if( statsWrapperView.getFluxName() == fluxName && statsWrapperView.getAggregatorName() == getName() ) +// { +// r = &statsWrapperView; +// } +// } ); +// // Error if SourceFluxStatsAggregator::registerDataOnMesh() did not work as expected +// GEOS_ERROR_IF( r == nullptr, GEOS_FMT( "{}: {} data wrongly registered on mesh (no flux stats wrapper was found for {} named {}).", +// getName(), catalogName(), +// SourceFluxBoundaryCondition::catalogName(), fluxName ) ); +// return *r; +// } + +void SourceFluxStatsAggregator::writeStatData( integer minLogLevel, + string_view elementSetName, + WrappedStats const & wrappedStats ) { if( getLogLevel() >= minLogLevel && logger::internal::rank == 0 ) { - GEOS_LOG_RANK( GEOS_FMT( "{} ({}) of {} in {}: Producting on {} elements", - catalogName(), getName(), fluxName, subSetName, stats.m_elementCount ) ); - GEOS_LOG_RANK( GEOS_FMT( "{} ({}) of {} in {}: Produced mass = {} kg", - catalogName(), getName(), fluxName, subSetName, stats.m_producedMass ) ); - GEOS_LOG_RANK( GEOS_FMT( "{} ({}) of {} in {}: Production rate = {} kg/s", - catalogName(), getName(), fluxName, subSetName, stats.m_productionRate ) ); + GEOS_LOG_RANK( GEOS_FMT( "{} {} (of {}, in {}): Producting on {} elements", + catalogName(), getName(), wrappedStats.getFluxName(), elementSetName, + wrappedStats.stats().m_elementCount ) ); + GEOS_LOG_RANK( GEOS_FMT( "{} {} (of {}, in {}): Produced mass = {} kg", + catalogName(), getName(), wrappedStats.getFluxName(), elementSetName, + wrappedStats.stats().m_producedMass ) ); + GEOS_LOG_RANK( GEOS_FMT( "{} {} (of {}, in {}): Production rate = {} kg/s", + catalogName(), getName(), wrappedStats.getFluxName(), elementSetName, + wrappedStats.stats().m_productionRate ) ); } } @@ -148,41 +163,41 @@ bool SourceFluxStatsAggregator::execute( real64 const GEOS_UNUSED_PARAM( time_n real64 const GEOS_UNUSED_PARAM( eventProgress ), DomainPartition & domain ) { - if( getLogLevel() >= 1 ) + forMeshLevelStatsWrapper( domain, + [&] ( MeshLevel & meshLevel, WrappedStats & meshLevelStats ) { - StatData allStats; - m_solver->forDiscretizationOnMeshTargets( domain.getMeshBodies(), - [&] ( string const &, - MeshLevel & mesh, - arrayView1d< string const > const & ) + meshLevelStats.stats() = StatData(); + + forAllFluxStatsWrappers( meshLevel, + [&] ( MeshLevel &, WrappedStats & fluxStats ) { - for( string const & fluxName : m_fluxNames ) + fluxStats.stats() = StatData(); + + forAllRegionStatsWrappers( meshLevel, fluxStats.getFluxName(), + [&] ( ElementRegionBase & region, WrappedStats & regionStats ) { - StatData fluxStats; + regionStats.stats() = StatData(); - mesh.getElemManager().forElementRegions( [&]( ElementRegionBase & region ) + forAllSubRegionStatsWrappers( region, regionStats.getFluxName(), + [&] ( ElementSubRegionBase & subRegion, WrappedStats & subRegionStats ) { - StatData regionStats; - region.forElementSubRegions( [&]( ElementSubRegionBase & subRegion ) - { - StatData subRegionStats = getFluxStatData( subRegion, fluxName ).finalizePeriod(); - subRegionStats.mpiReduce(); - - writeStatData( 4, subRegion.getName(), fluxName, subRegionStats ); - regionStats.combine( subRegionStats ); - } ); - - writeStatData( 3, region.getName(), fluxName, regionStats ); - fluxStats.combine( regionStats ); + subRegionStats.finalizePeriod(); + + regionStats.stats().combine( subRegionStats.stats() ); + writeStatData( 4, subRegion.getName(), subRegionStats ); } ); - writeStatData( 2, "Whole mesh", fluxName, fluxStats ); - allStats.combine( fluxStats ); - } + fluxStats.stats().combine( regionStats.stats() ); + writeStatData( 3, region.getName(), regionStats ); + } ); - writeStatData( 1, "Whole mesh", "Fluxes sum", allStats ); + meshLevelStats.stats().combine( fluxStats.stats() ); + writeStatData( 2, viewKeyStruct::allRegionWrapperString(), fluxStats ); } ); - } + + writeStatData( 1, viewKeyStruct::allRegionWrapperString(), meshLevelStats ); + } ); + return false; } @@ -196,9 +211,9 @@ void SourceFluxStatsAggregator::StatData::combine( StatData const & other ) } void SourceFluxStatsAggregator::StatData::mpiReduce() { - m_producedMass += MpiWrapper::sum( m_producedMass ); - m_productionRate += MpiWrapper::sum( m_productionRate ); - m_elementCount += MpiWrapper::sum( m_elementCount ); + m_producedMass = MpiWrapper::sum( m_producedMass ); + m_productionRate = MpiWrapper::sum( m_productionRate ); + m_elementCount = MpiWrapper::sum( m_elementCount ); } void SourceFluxStatsAggregator::WrappedStats::setTarget( string_view aggregatorName, @@ -207,38 +222,38 @@ void SourceFluxStatsAggregator::WrappedStats::setTarget( string_view aggregatorN m_aggregatorName = aggregatorName; m_fluxName = fluxName; } -void SourceFluxStatsAggregator::WrappedStats::setTimeStepStats( real64 dt, - real64 productedMass, - integer elementCount, - bool overwriteTimeStepStats ) +void SourceFluxStatsAggregator::WrappedStats::gatherTimeStepStats( real64 dt, + real64 productedMass, + integer elementCount, + bool overwriteTimeStepStats ) { - // we are beginning a new timestep, so we must aggregate the pending stats before overwriting the current stats data + // we are beginning a new timestep, so we must aggregate the pending stats (mass & dt) before collecting the current stats data if( !overwriteTimeStepStats ) { - m_pendingPeriodMass += m_currentTimeStepMass; - m_periodDeltaTime += dt; - m_elementCount = elementCount; + m_periodStats.m_periodPendingMass += m_periodStats.m_timeStepMass; + m_periodStats.m_timeStepMass = 0; + m_periodStats.m_periodDeltaTime += dt; + m_periodStats.m_elementCount = elementCount; } - m_currentTimeStepMass = productedMass; + m_periodStats.m_timeStepMass = productedMass; } -SourceFluxStatsAggregator::StatData SourceFluxStatsAggregator::WrappedStats::finalizePeriod() +void SourceFluxStatsAggregator::WrappedStats::finalizePeriod() { - real64 periodMass = m_currentTimeStepMass + m_pendingPeriodMass; - StatData periodStats; - periodStats.m_producedMass = periodMass; - if( m_periodDeltaTime > 0.0 ) - { - periodStats.m_productionRate = periodMass / m_periodDeltaTime; - } - periodStats.m_elementCount = m_elementCount; + // produce timestep stats of this ranks + real64 periodMass = m_periodStats.m_timeStepMass + m_periodStats.m_periodPendingMass; + m_stats.m_producedMass = periodMass; + m_stats.m_productionRate = m_periodStats.m_periodDeltaTime > 0.0 ? + periodMass / m_periodStats.m_periodDeltaTime : + 0.0; + m_stats.m_elementCount = m_periodStats.m_elementCount; + + // combine period results from all MPI ranks + m_stats.mpiReduce(); - m_currentTimeStepMass = 0.0; - m_pendingPeriodMass = 0.0; - m_periodDeltaTime = 0.0; - m_elementCount = 0; + // start a new timestep + m_periodStats = WrappedStats::PeriodStats(); - return periodStats; } diff --git a/src/coreComponents/fieldSpecification/SourceFluxStatistics.hpp b/src/coreComponents/fieldSpecification/SourceFluxStatistics.hpp index 7fa03d570c9..2372b3d7856 100644 --- a/src/coreComponents/fieldSpecification/SourceFluxStatistics.hpp +++ b/src/coreComponents/fieldSpecification/SourceFluxStatistics.hpp @@ -37,7 +37,7 @@ class SourceFluxStatsAggregator : public FieldStatisticsBase< FlowSolverBase > public: /** - * @brief Potentially aggregated statistics flux data + * @brief Aggregated flux statistics data. */ struct StatData { @@ -55,6 +55,7 @@ class SourceFluxStatsAggregator : public FieldStatisticsBase< FlowSolverBase > void combine( StatData const & other ); /** * @brief Aggregate the statistics of the instance with those from all instances from other MPI ranks. + * Must be called only once per timestep. */ void mpiReduce(); }; @@ -80,40 +81,60 @@ class SourceFluxStatsAggregator : public FieldStatisticsBase< FlowSolverBase > * @param productedMass time-step producted mass (see StatData::m_producedMass). * @param elementCount number of cell elements concerned by this instance */ - void setTimeStepStats( real64 dt, real64 productedMass, integer elementCount, - bool overwriteTimeStepStats ); + void gatherTimeStepStats( real64 dt, real64 productedMass, integer elementCount, + bool overwriteTimeStepStats ); /** - * @brief Finalize the statistics period and render data. - * @return the accumulated statistics of the period. + * @brief Finalize the period statistics of each timestep gathering and render data over all mpi ranks. + * The result can be read by the data() assessor. */ - StatData finalizePeriod(); + void finalizePeriod(); /** - * @return get the name of the SourceFluxStatsAggregator that want to collect data on this instance. + * @return the reference to the wrapped stats data collected over the last period (one timestep or more), computed by finalizePeriod() + */ + StatData & stats() + { return m_stats; } + + /** + * @return the reference to the wrapped stats data collected over the last period (one timestep or more), computed by finalizePeriod() + */ + StatData const & stats() const + { return m_stats; } + + /** + * @return the name of the SourceFluxStatsAggregator that want to collect data on this instance. */ string_view getAggregatorName() const { return m_aggregatorName; } /** - * @return get the name of the SourceFluxBoundaryCondition from which we are collecting data on this instance. + * @return the name of the SourceFluxBoundaryCondition from which we are collecting data on this instance. */ string_view getFluxName() const { return m_fluxName; } private: - /// producted mass of the current time-step. - real64 m_currentTimeStepMass = 0.0; - /// producted mass sum from all previous time-step of the current period. - real64 m_pendingPeriodMass = 0.0; - /// delta time the current period - real64 m_periodDeltaTime = 0.0; - /// number of cell elements concerned by this instance - integer m_elementCount = 0; + /// stats data collected over the last period (one timestep or more), computed by finalizePeriod() + StatData m_stats; + + struct PeriodStats + { + /// producted mass of the current time-step. + real64 m_timeStepMass = 0.0; + /// producted mass sum from all previous time-step of the current period. + real64 m_periodPendingMass = 0.0; + /// delta time the current period + real64 m_periodDeltaTime = 0.0; + /// number of cell elements concerned by this instance + integer m_elementCount = 0; + } m_periodStats; /// Name of the SourceFluxStatsAggregator that want to collect data on this instance. string m_aggregatorName; /// Name of the SourceFluxBoundaryCondition from which we are collecting data on this instance. string m_fluxName; + + std::set elementSet; }; @@ -144,16 +165,16 @@ class SourceFluxStatsAggregator : public FieldStatisticsBase< FlowSolverBase > /**@}*/ - /** - * @return a WrappedStats struct that contains the statistics of the flux for the - * SourceFluxStatsAggregator instance in the container. - * @note To be retrieved, the WrappedStats struct must be registered on the container during the - * registerDataOnMesh() call. - * @param container the container from which we want the statistics. - * @param fluxName the name of the flux from which we want the statistics. - * @throw a GEOS_ERROR if the flux was not found. - */ - WrappedStats & getFluxStatData( Group & container, string_view fluxName ); + // /** + // * @return a WrappedStats struct that contains the statistics of the flux for the + // * SourceFluxStatsAggregator instance in the container. + // * @param container the container from which we want the statistics. + // * @param fluxName the name of the flux from which we want the statistics. + // * @throw a GEOS_ERROR if the flux was not found. + // * @note To be retrieved, the WrappedStats struct must be registered on the container during the + // * registerDataOnMesh() call. + // */ + // WrappedStats & getFluxStatData( Group & container, string_view fluxName ); /** * @brief Apply a functor to all WrappedStats of the given group that target a given flux (and @@ -168,13 +189,55 @@ class SourceFluxStatsAggregator : public FieldStatisticsBase< FlowSolverBase > * reference to the currently processed WrappedStats. */ template< typename LAMBDA > - static void forAllFluxStatData( Group & container, string_view fluxName, LAMBDA && lambda ); + static void forAllFluxStatWrappers( Group & container, string_view fluxName, LAMBDA && lambda ); + + /** + * @brief Loop over the target solver discretization on all mesh targets and ???????????? + * @param fluxName the name of the flux from which we want the statistics. + * @param lambda the functor that will be called for each WrappedStats. Takes in parameter the MeshLevel reference + * and the reference to the WrappedStats that combines all stats for the instance. + * @tparam LAMBDA the type of lambda function to call in the function + * @note To be retrieved, the WrappedStats structs must be registered on the container during the + * registerDataOnMesh() call. + */ + template< typename LAMBDA > + void forMeshLevelStatsWrapper( DomainPartition & domain, LAMBDA && lambda ); + /** + * @param fluxName the name of the flux from which we want the statistics. + * @param lambda the functor that will be called for each WrappedStats. Takes in parameter ??????????? + * @tparam LAMBDA the type of lambda function to call in the function + * @note To be retrieved, the WrappedStats structs must be registered on the container during the + * registerDataOnMesh() call. + */ + template< typename LAMBDA > + void forAllFluxStatsWrappers( MeshLevel & meshLevel, LAMBDA && lambda ); + /** + * @param fluxName the name of the flux from which we want the statistics. + * @param lambda the functor that will be called for each WrappedStats. Takes in parameter ??????????? + * @tparam LAMBDA the type of lambda function to call in the function + * @note To be retrieved, the WrappedStats structs must be registered on the container during the + * registerDataOnMesh() call. + */ + template< typename LAMBDA > + void forAllRegionStatsWrappers( MeshLevel & meshLevel, string_view fluxName, LAMBDA && lambda ); + /** + * @brief Apply a functor to all subregion WrappedStats (of the given region) that target a given flux. + * @param region the region from which we want to execute the lambda for each of its sub-region. + * @param fluxName the name of the flux from which we want the statistics. + * @param lambda the functor that will be called for each WrappedStats. Takes in parameter ??????????? + * @tparam LAMBDA the type of lambda function to call in the function + * @note To be retrieved, the WrappedStats structs must be registered on the container during the + * registerDataOnMesh() call. + */ + template< typename LAMBDA > + void forAllSubRegionStatsWrappers( ElementRegionBase & region, string_view fluxName, LAMBDA && lambda ); /** * @return a string used to name the wrapper that is added to each region that is simulated by the solver. * The string is unique within the region for the SourceFluxBoundaryCondition and the SourceFluxStatsAggregator. + * @param fluxName The name of the flux. For the mesh-level global stats, fluxSetWrapperString() can be used. */ - inline string getRegionStatDataName( string_view fluxName ) const; + inline string getStatWrapperName( string_view fluxName ) const; /** @@ -183,7 +246,11 @@ class SourceFluxStatsAggregator : public FieldStatisticsBase< FlowSolverBase > struct viewKeyStruct { /// @return The key for setName - constexpr static char const * fluxNamesString() { return "fluxNames"; } + constexpr inline static string_view fluxNamesString() { return "fluxNames"; } + /// @return The key for statistics wrapper name that targets all region + constexpr inline static string_view allRegionWrapperString() { return "all_regions"; } + /// @return The key for statistics wrapper name that targets all fluxes of the set + constexpr inline static string_view fluxSetWrapperString() { return "flux_set"; } }; protected: @@ -204,24 +271,25 @@ class SourceFluxStatsAggregator : public FieldStatisticsBase< FlowSolverBase > */ void registerDataOnMesh( Group & meshBodies ) override; + dataRepository::Wrapper< WrappedStats > & registerWrappedStats( Group & group, string_view fluxName ); + /** * @brief Output in the log the given statistics. - * @param regionName the name of the element group (a region, a sub-region...) from which we want - * to output the data. + * @param regionName the name of the element group (a region, a sub-region...) from which we want to output the data. * @param minLogLevel the min log level to output any line. - * @param subSetName the region / sub-subregion name concerned by the statistics. + * @param elementSetName the region / sub-subregion name concerned by the statistics. * @param fluxName the flux name concerned by the statistics. * @param stats the statistics that must be output in the log. */ - void writeStatData( integer minLogLevel, string_view subSetName, string_view fluxName, StatData const & stats ); + void writeStatData( integer minLogLevel, string_view elementSetName, WrappedStats const & stats ); }; template< typename LAMBDA > -void SourceFluxStatsAggregator::forAllFluxStatData( Group & container, - string_view fluxName, - LAMBDA && lambda ) +void SourceFluxStatsAggregator::forAllFluxStatWrappers( Group & container, + string_view fluxName, + LAMBDA && lambda ) { container.forWrappers< WrappedStats >( [&]( dataRepository::Wrapper< WrappedStats > & statsWrapper ) { @@ -232,7 +300,61 @@ void SourceFluxStatsAggregator::forAllFluxStatData( Group & container, } ); } -inline string SourceFluxStatsAggregator::getRegionStatDataName( string_view fluxName ) const +template< typename LAMBDA > +void SourceFluxStatsAggregator::forMeshLevelStatsWrapper( DomainPartition & domain, + LAMBDA && lambda ) +{ + m_solver->forDiscretizationOnMeshTargets( domain.getMeshBodies(), + [&] ( string const &, + MeshLevel & meshLevel, + arrayView1d< string const > const & ) + { + string const wrapperName = getStatWrapperName( viewKeyStruct::fluxSetWrapperString() ); + WrappedStats & stats = meshLevel.getWrapper< WrappedStats >( wrapperName ).reference(); + + lambda( meshLevel, stats ); + } ); +} +template< typename LAMBDA > +void SourceFluxStatsAggregator::forAllFluxStatsWrappers( MeshLevel & meshLevel, + LAMBDA && lambda ) +{ + for( string const & fluxName : m_fluxNames ) + { + string const wrapperName = getStatWrapperName( fluxName ); + WrappedStats & stats = meshLevel.getWrapper< WrappedStats >( wrapperName ).reference(); + + lambda( meshLevel, stats ); + } +} +template< typename LAMBDA > +void SourceFluxStatsAggregator::forAllRegionStatsWrappers( MeshLevel & meshLevel, + string_view fluxName, + LAMBDA && lambda ) +{ + string const wrapperName = getStatWrapperName( fluxName ); + meshLevel.getElemManager().forElementRegions( [&]( ElementRegionBase & region ) + { + WrappedStats & stats = region.getWrapper< WrappedStats >( wrapperName ).reference(); + + lambda( region, stats ); + } ); +} +template< typename LAMBDA > +void SourceFluxStatsAggregator::forAllSubRegionStatsWrappers( ElementRegionBase & region, + string_view fluxName, + LAMBDA && lambda ) +{ + string const wrapperName = getStatWrapperName( fluxName ); + region.forElementSubRegions( [&]( ElementSubRegionBase & subRegion ) + { + WrappedStats & stats = subRegion.getWrapper< WrappedStats >( wrapperName ).reference(); + + lambda( subRegion, stats ); + } ); +} + +inline string SourceFluxStatsAggregator::getStatWrapperName( string_view fluxName ) const { return GEOS_FMT( "{}_region_stats_for_{}", fluxName, getName() ); } diff --git a/src/coreComponents/physicsSolvers/fluidFlow/CompositionalMultiphaseStatistics.cpp b/src/coreComponents/physicsSolvers/fluidFlow/CompositionalMultiphaseStatistics.cpp index fd01f5d3898..6579c64a780 100644 --- a/src/coreComponents/physicsSolvers/fluidFlow/CompositionalMultiphaseStatistics.cpp +++ b/src/coreComponents/physicsSolvers/fluidFlow/CompositionalMultiphaseStatistics.cpp @@ -318,7 +318,7 @@ void CompositionalMultiphaseStatistics::computeRegionStatistics( real64 const ti subRegionImmobilePhaseMass.toView(), subRegionComponentMass.toView() ); - ElementRegionBase & region = elemManager.getRegion( subRegion.getParent().getParent().getName() ); + ElementRegionBase & region = elemManager.getRegion( ElementRegionBase::getParentRegion(subRegion).getName() ); RegionStatistics & regionStatistics = region.getReference< RegionStatistics >( viewKeyStruct::regionStatisticsString() ); regionStatistics.averagePressure += subRegionAvgPresNumerator; diff --git a/src/coreComponents/physicsSolvers/fluidFlow/SinglePhaseBase.cpp b/src/coreComponents/physicsSolvers/fluidFlow/SinglePhaseBase.cpp index 9d6c45832ec..cc7d49353da 100644 --- a/src/coreComponents/physicsSolvers/fluidFlow/SinglePhaseBase.cpp +++ b/src/coreComponents/physicsSolvers/fluidFlow/SinglePhaseBase.cpp @@ -1123,12 +1123,13 @@ void SinglePhaseBase::applySourceFluxBC( real64 const time_n, } ); } - SourceFluxStatsAggregator::forAllFluxStatData( subRegion, fs.getName(), - [&]( SourceFluxStatsAggregator::WrappedStats & wrapper ) + SourceFluxStatsAggregator::forAllFluxStatWrappers( subRegion, fs.getName(), + [&]( SourceFluxStatsAggregator::WrappedStats & wrapper ) { // set the new sub-region statistics for this timestep - wrapper.setTimeStepStats( dt, producedMass, targetSet.size(), - m_nonlinearSolverParameters.m_numNewtonIterations != 0 ); + wrapper.gatherTimeStepStats( dt, producedMass, targetSet.size(), + m_nonlinearSolverParameters.m_numNewtonIterations != 0 ); + // GEOS_LOG(wrapper.getParent().getPath()<<"->"< + + +using namespace geos; +using namespace geos::dataRepository; +// using namespace geos::constitutive; +// using namespace geos::constitutive::multifluid; +using namespace geos::testing; + +CommandLineOptions g_commandLineOptions; + +struct TestParams +{ + string xmlInput; + + string sourceFluxName; + string sinkFluxName; + + // input values to test out + integer sourceElementsCount = 0; + integer sinkElementsCount = 0; + integer totalElementsCount = 0; + std::vector< real64 > timestepSourceMassProd; + std::vector< real64 > timestepSinkMassProd; + real64 totalSourceMassProd = 0.0; + real64 sourceMeanRate = 0.0; + real64 totalSinkMassProd = 0.0; + real64 sinkMeanRate = 0.0; + real64 totalMassProd = 0.0; + real64 totalMeanRate = 0.0; +}; + + +//////////////////////////////// SinglePhase Flux Statistics Test //////////////////////////////// + +TestParams getSinglephaseXmlInput() +{ + TestParams testParams; + + testParams.xmlInput = + R"xml( + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +)xml"; + + + testParams.sourceFluxName = "sourceFlux"; + testParams.sinkFluxName = "sinkFlux"; + + // compute the expected statistics + { + static real64 const dt = 500.0; + + //elements count + testParams.sourceElementsCount = 2; + testParams.sinkElementsCount = 4; + testParams.totalElementsCount = testParams.sourceElementsCount + testParams.sinkElementsCount; + + // FluxRate table from 0.0s to 5000.0s + std::vector< real64 > const rates = { 0.000, 0.000, 0.767, 0.894, 0.561, 0.234, 0.194, 0.178, 0.162, 0.059, 0.000 }; + testParams.timestepSourceMassProd.reserve( rates.size() ); + testParams.timestepSinkMassProd.reserve( rates.size() ); + for( size_t i = 0; i < rates.size(); ++i ) + { + // mass injection / production calculation (sink is 4x source production) + testParams.timestepSourceMassProd.push_back( rates[i] * dt * -1.0 ); + testParams.totalSourceMassProd += testParams.timestepSourceMassProd.back(); + testParams.timestepSinkMassProd.push_back( rates[i] * dt * 4.0 ); + testParams.totalSinkMassProd += testParams.timestepSinkMassProd.back(); + + // rates accumulation + testParams.sourceMeanRate += rates[i] * -1.0; + testParams.sinkMeanRate += rates[i] * 4.0; + } + // mean rates calculation + real64 const ratesMeanDivisor = 1.0 / double( rates.size() - 1 ); + testParams.sourceMeanRate *= ratesMeanDivisor; + testParams.sinkMeanRate *= ratesMeanDivisor; + // totals + testParams.totalMassProd = testParams.totalSinkMassProd + testParams.totalSourceMassProd; + testParams.totalMeanRate = testParams.sinkMeanRate + testParams.sourceMeanRate; + } + + return testParams; +} + +TEST( FluidStatisticsTest, checkSinglePhaseFluxStatistics ) +{ + TestParams const testParams = getSinglephaseXmlInput(); + GeosxState state( std::make_unique< CommandLineOptions >( g_commandLineOptions ) ); + ProblemManager & problem = state.getProblemManager(); + setupProblemFromXML( problem, testParams.xmlInput.data() ); + + problem.printDataHierarchy();//!// + + EXPECT_FALSE( problem.runSimulation() ) << "Simulation exited early."; + + { + SourceFluxStatsAggregator & timestepsStats = problem.getGroupByPath< SourceFluxStatsAggregator >( "/Tasks/timestepsStats" ); + SourceFluxStatsAggregator & wholeSimStats = problem.getGroupByPath< SourceFluxStatsAggregator >( "/Tasks/wholeSimStats" ); + DomainPartition & domain = problem.getDomainPartition(); + + timestepsStats.forMeshLevelStatsWrapper( domain, + [&] ( MeshLevel & meshLevel, + SourceFluxStatsAggregator::WrappedStats & meshLevelStats ) + { + GEOS_LOG( "timestepsStats :" ); + GEOS_LOG( " - Group "< Date: Thu, 1 Feb 2024 17:34:37 +0100 Subject: [PATCH 22/98] removed debug infos --- .../fluidFlowTests/testFluidStatistics.cpp | 23 ------------------- 1 file changed, 23 deletions(-) diff --git a/src/coreComponents/unitTests/fluidFlowTests/testFluidStatistics.cpp b/src/coreComponents/unitTests/fluidFlowTests/testFluidStatistics.cpp index 6aac5ba4e39..732fa70a739 100644 --- a/src/coreComponents/unitTests/fluidFlowTests/testFluidStatistics.cpp +++ b/src/coreComponents/unitTests/fluidFlowTests/testFluidStatistics.cpp @@ -240,44 +240,21 @@ TEST( FluidStatisticsTest, checkSinglePhaseFluxStatistics ) ProblemManager & problem = state.getProblemManager(); setupProblemFromXML( problem, testParams.xmlInput.data() ); - problem.printDataHierarchy();//!// - EXPECT_FALSE( problem.runSimulation() ) << "Simulation exited early."; { - SourceFluxStatsAggregator & timestepsStats = problem.getGroupByPath< SourceFluxStatsAggregator >( "/Tasks/timestepsStats" ); SourceFluxStatsAggregator & wholeSimStats = problem.getGroupByPath< SourceFluxStatsAggregator >( "/Tasks/wholeSimStats" ); DomainPartition & domain = problem.getDomainPartition(); - timestepsStats.forMeshLevelStatsWrapper( domain, - [&] ( MeshLevel & meshLevel, - SourceFluxStatsAggregator::WrappedStats & meshLevelStats ) - { - GEOS_LOG( "timestepsStats :" ); - GEOS_LOG( " - Group "< Date: Thu, 1 Feb 2024 17:50:34 +0100 Subject: [PATCH 23/98] unit test: code layout, removed debug info --- .../fluidFlowTests/testFluidStatistics.cpp | 46 ++++++++++++------- 1 file changed, 29 insertions(+), 17 deletions(-) diff --git a/src/coreComponents/unitTests/fluidFlowTests/testFluidStatistics.cpp b/src/coreComponents/unitTests/fluidFlowTests/testFluidStatistics.cpp index 732fa70a739..1fee9e8cd73 100644 --- a/src/coreComponents/unitTests/fluidFlowTests/testFluidStatistics.cpp +++ b/src/coreComponents/unitTests/fluidFlowTests/testFluidStatistics.cpp @@ -39,12 +39,14 @@ struct TestParams integer sourceElementsCount = 0; integer sinkElementsCount = 0; integer totalElementsCount = 0; - std::vector< real64 > timestepSourceMassProd; - std::vector< real64 > timestepSinkMassProd; - real64 totalSourceMassProd = 0.0; + std::vector< real64 > sourceRates; + std::vector< real64 > sinkRates; + std::vector< real64 > sourceMassProd; + std::vector< real64 > sinkMassProd; real64 sourceMeanRate = 0.0; - real64 totalSinkMassProd = 0.0; real64 sinkMeanRate = 0.0; + real64 totalSourceMassProd = 0.0; + real64 totalSinkMassProd = 0.0; real64 totalMassProd = 0.0; real64 totalMeanRate = 0.0; }; @@ -171,12 +173,10 @@ TestParams getSinglephaseXmlInput() + flowSolverName="testSolver" /> + flowSolverName="testSolver" /> @@ -207,15 +207,17 @@ TestParams getSinglephaseXmlInput() // FluxRate table from 0.0s to 5000.0s std::vector< real64 > const rates = { 0.000, 0.000, 0.767, 0.894, 0.561, 0.234, 0.194, 0.178, 0.162, 0.059, 0.000 }; - testParams.timestepSourceMassProd.reserve( rates.size() ); - testParams.timestepSinkMassProd.reserve( rates.size() ); + testParams.sourceMassProd.reserve( rates.size() ); + testParams.sinkMassProd.reserve( rates.size() ); for( size_t i = 0; i < rates.size(); ++i ) { // mass injection / production calculation (sink is 4x source production) - testParams.timestepSourceMassProd.push_back( rates[i] * dt * -1.0 ); - testParams.totalSourceMassProd += testParams.timestepSourceMassProd.back(); - testParams.timestepSinkMassProd.push_back( rates[i] * dt * 4.0 ); - testParams.totalSinkMassProd += testParams.timestepSinkMassProd.back(); + testParams.sourceRates.push_back( rates[i] * -1.0 ); + testParams.sourceMassProd.push_back( rates[i] * dt * -1.0 ); + testParams.totalSourceMassProd += testParams.sourceMassProd.back(); + testParams.sinkRates.push_back( rates[i] * 4.0 ); + testParams.sinkMassProd.push_back( rates[i] * dt * 4.0 ); + testParams.totalSinkMassProd += testParams.sinkMassProd.back(); // rates accumulation testParams.sourceMeanRate += rates[i] * -1.0; @@ -238,13 +240,23 @@ TEST( FluidStatisticsTest, checkSinglePhaseFluxStatistics ) TestParams const testParams = getSinglephaseXmlInput(); GeosxState state( std::make_unique< CommandLineOptions >( g_commandLineOptions ) ); ProblemManager & problem = state.getProblemManager(); - setupProblemFromXML( problem, testParams.xmlInput.data() ); + // run simulation + setupProblemFromXML( problem, testParams.xmlInput.data() ); EXPECT_FALSE( problem.runSimulation() ) << "Simulation exited early."; + + DomainPartition & domain = problem.getDomainPartition(); + // SourceFluxStatsAggregator & timestepsStats = problem.getGroupByPath< SourceFluxStatsAggregator >( "/Tasks/timestepsStats" ); + SourceFluxStatsAggregator & wholeSimStats = problem.getGroupByPath< SourceFluxStatsAggregator >( "/Tasks/wholeSimStats" ); + + // check timestep statistics + { + //!\\ TODO + } + + // check whole simulation statistics { - SourceFluxStatsAggregator & wholeSimStats = problem.getGroupByPath< SourceFluxStatsAggregator >( "/Tasks/wholeSimStats" ); - DomainPartition & domain = problem.getDomainPartition(); // verification that the source flux statistics are correct over the whole simulation wholeSimStats.forMeshLevelStatsWrapper( domain, From db72798575d6afb17e05f437bd74b4e74de8968a Mon Sep 17 00:00:00 2001 From: MelReyCG Date: Fri, 2 Feb 2024 16:02:16 +0100 Subject: [PATCH 24/98] unit test: code layout, removed debug info, xmlInput improvements --- .../fluidFlowTests/testFluidStatistics.cpp | 63 ++++++++++++------- 1 file changed, 40 insertions(+), 23 deletions(-) diff --git a/src/coreComponents/unitTests/fluidFlowTests/testFluidStatistics.cpp b/src/coreComponents/unitTests/fluidFlowTests/testFluidStatistics.cpp index 732fa70a739..1ef655ec262 100644 --- a/src/coreComponents/unitTests/fluidFlowTests/testFluidStatistics.cpp +++ b/src/coreComponents/unitTests/fluidFlowTests/testFluidStatistics.cpp @@ -39,12 +39,14 @@ struct TestParams integer sourceElementsCount = 0; integer sinkElementsCount = 0; integer totalElementsCount = 0; - std::vector< real64 > timestepSourceMassProd; - std::vector< real64 > timestepSinkMassProd; - real64 totalSourceMassProd = 0.0; + std::vector< real64 > sourceRates; + std::vector< real64 > sinkRates; + std::vector< real64 > sourceMassProd; + std::vector< real64 > sinkMassProd; real64 sourceMeanRate = 0.0; - real64 totalSinkMassProd = 0.0; real64 sinkMeanRate = 0.0; + real64 totalSourceMassProd = 0.0; + real64 totalSinkMassProd = 0.0; real64 totalMassProd = 0.0; real64 totalMeanRate = 0.0; }; @@ -52,6 +54,7 @@ struct TestParams //////////////////////////////// SinglePhase Flux Statistics Test //////////////////////////////// + TestParams getSinglephaseXmlInput() { TestParams testParams; @@ -64,11 +67,13 @@ TestParams getSinglephaseXmlInput() + + @@ -103,6 +108,7 @@ TestParams getSinglephaseXmlInput() referencePressure="0.0" compressibility="5e-10" viscosibility="0.0" /> + - + @@ -171,12 +176,10 @@ TestParams getSinglephaseXmlInput() + flowSolverName="testSolver" /> + flowSolverName="testSolver" /> @@ -207,15 +210,17 @@ TestParams getSinglephaseXmlInput() // FluxRate table from 0.0s to 5000.0s std::vector< real64 > const rates = { 0.000, 0.000, 0.767, 0.894, 0.561, 0.234, 0.194, 0.178, 0.162, 0.059, 0.000 }; - testParams.timestepSourceMassProd.reserve( rates.size() ); - testParams.timestepSinkMassProd.reserve( rates.size() ); + testParams.sourceMassProd.reserve( rates.size() ); + testParams.sinkMassProd.reserve( rates.size() ); for( size_t i = 0; i < rates.size(); ++i ) { // mass injection / production calculation (sink is 4x source production) - testParams.timestepSourceMassProd.push_back( rates[i] * dt * -1.0 ); - testParams.totalSourceMassProd += testParams.timestepSourceMassProd.back(); - testParams.timestepSinkMassProd.push_back( rates[i] * dt * 4.0 ); - testParams.totalSinkMassProd += testParams.timestepSinkMassProd.back(); + testParams.sourceRates.push_back( rates[i] * -1.0 ); + testParams.sourceMassProd.push_back( rates[i] * dt * -1.0 ); + testParams.totalSourceMassProd += testParams.sourceMassProd.back(); + testParams.sinkRates.push_back( rates[i] * 4.0 ); + testParams.sinkMassProd.push_back( rates[i] * dt * 4.0 ); + testParams.totalSinkMassProd += testParams.sinkMassProd.back(); // rates accumulation testParams.sourceMeanRate += rates[i] * -1.0; @@ -238,13 +243,23 @@ TEST( FluidStatisticsTest, checkSinglePhaseFluxStatistics ) TestParams const testParams = getSinglephaseXmlInput(); GeosxState state( std::make_unique< CommandLineOptions >( g_commandLineOptions ) ); ProblemManager & problem = state.getProblemManager(); - setupProblemFromXML( problem, testParams.xmlInput.data() ); + // run simulation + setupProblemFromXML( problem, testParams.xmlInput.data() ); EXPECT_FALSE( problem.runSimulation() ) << "Simulation exited early."; + + DomainPartition & domain = problem.getDomainPartition(); + // SourceFluxStatsAggregator & timestepsStats = problem.getGroupByPath< SourceFluxStatsAggregator >( "/Tasks/timestepsStats" ); + SourceFluxStatsAggregator & wholeSimStats = problem.getGroupByPath< SourceFluxStatsAggregator >( "/Tasks/wholeSimStats" ); + + // check timestep statistics + { + //!\\ TODO + } + + // check whole simulation statistics { - SourceFluxStatsAggregator & wholeSimStats = problem.getGroupByPath< SourceFluxStatsAggregator >( "/Tasks/wholeSimStats" ); - DomainPartition & domain = problem.getDomainPartition(); // verification that the source flux statistics are correct over the whole simulation wholeSimStats.forMeshLevelStatsWrapper( domain, @@ -280,6 +295,8 @@ TEST( FluidStatisticsTest, checkSinglePhaseFluxStatistics ) } +//////////////////////////////// Main //////////////////////////////// + int main( int argc, char * * argv ) { From 8477262802e0eb11b7a35cbd0d6eec49561737e6 Mon Sep 17 00:00:00 2001 From: MelReyCG Date: Fri, 2 Feb 2024 16:09:19 +0100 Subject: [PATCH 25/98] Added multiphase xml input --- .../fluidFlowTests/testFluidStatistics.cpp | 179 ++++++++++++++++++ 1 file changed, 179 insertions(+) diff --git a/src/coreComponents/unitTests/fluidFlowTests/testFluidStatistics.cpp b/src/coreComponents/unitTests/fluidFlowTests/testFluidStatistics.cpp index 1ef655ec262..0d802b4f936 100644 --- a/src/coreComponents/unitTests/fluidFlowTests/testFluidStatistics.cpp +++ b/src/coreComponents/unitTests/fluidFlowTests/testFluidStatistics.cpp @@ -295,6 +295,185 @@ TEST( FluidStatisticsTest, checkSinglePhaseFluxStatistics ) } +//////////////////////////////// Multiphase Flux Statistics Test //////////////////////////////// + + +TestParams getMultiphaseXmlInput() +{ + TestParams testParams; + + testParams.xmlInput = + R"xml( + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +)xml"; + + + testParams.sourceFluxName = "sourceFlux"; + testParams.sinkFluxName = "sinkFlux"; + + // compute the expected statistics + { + //!\\ TODO + } + + return testParams; +} + + + //////////////////////////////// Main //////////////////////////////// From 317560a04ec8abb4abb763c487dd522676b08ab6 Mon Sep 17 00:00:00 2001 From: MelReyCG Date: Fri, 2 Feb 2024 16:24:21 +0100 Subject: [PATCH 26/98] few comments --- .../unitTests/fluidFlowTests/testFluidStatistics.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/coreComponents/unitTests/fluidFlowTests/testFluidStatistics.cpp b/src/coreComponents/unitTests/fluidFlowTests/testFluidStatistics.cpp index 0d802b4f936..d67be9b9ba0 100644 --- a/src/coreComponents/unitTests/fluidFlowTests/testFluidStatistics.cpp +++ b/src/coreComponents/unitTests/fluidFlowTests/testFluidStatistics.cpp @@ -123,12 +123,14 @@ TestParams getSinglephaseXmlInput() + + setNames="{ sourceBox }" /> + + + Date: Tue, 6 Feb 2024 10:26:07 +0100 Subject: [PATCH 27/98] code style --- .../fluidFlowTests/testFluidStatistics.cpp | 96 ++++++++++--------- 1 file changed, 50 insertions(+), 46 deletions(-) diff --git a/src/coreComponents/unitTests/fluidFlowTests/testFluidStatistics.cpp b/src/coreComponents/unitTests/fluidFlowTests/testFluidStatistics.cpp index d67be9b9ba0..88a0c6cd107 100644 --- a/src/coreComponents/unitTests/fluidFlowTests/testFluidStatistics.cpp +++ b/src/coreComponents/unitTests/fluidFlowTests/testFluidStatistics.cpp @@ -22,12 +22,16 @@ using namespace geos; using namespace geos::dataRepository; -// using namespace geos::constitutive; -// using namespace geos::constitutive::multifluid; using namespace geos::testing; CommandLineOptions g_commandLineOptions; +//////////////////////////////// Test base utilities //////////////////////////////// + + +/** + * @brief this struct is used to provide the input data to each tests + */ struct TestParams { string xmlInput; @@ -53,9 +57,11 @@ struct TestParams //////////////////////////////// SinglePhase Flux Statistics Test //////////////////////////////// +namespace SinglePhaseFluxStatisticsTest +{ -TestParams getSinglephaseXmlInput() +TestParams getXmlInput() { TestParams testParams; @@ -161,12 +167,18 @@ TestParams getSinglephaseXmlInput() - + target="/Tasks/timestepStats" /> + - ( g_commandLineOptions ) ); ProblemManager & problem = state.getProblemManager(); @@ -252,48 +264,38 @@ TEST( FluidStatisticsTest, checkSinglePhaseFluxStatistics ) DomainPartition & domain = problem.getDomainPartition(); - // SourceFluxStatsAggregator & timestepsStats = problem.getGroupByPath< SourceFluxStatsAggregator >( "/Tasks/timestepsStats" ); SourceFluxStatsAggregator & wholeSimStats = problem.getGroupByPath< SourceFluxStatsAggregator >( "/Tasks/wholeSimStats" ); - // check timestep statistics - { - //!\\ TODO - } - - // check whole simulation statistics + // verification that the source flux statistics are correct over the whole simulation + wholeSimStats.forMeshLevelStatsWrapper( domain, + [&] ( MeshLevel & meshLevel, + SourceFluxStatsAggregator::WrappedStats & meshLevelStats ) { - - // verification that the source flux statistics are correct over the whole simulation - wholeSimStats.forMeshLevelStatsWrapper( domain, - [&] ( MeshLevel & meshLevel, - SourceFluxStatsAggregator::WrappedStats & meshLevelStats ) + wholeSimStats.forAllFluxStatsWrappers( meshLevel, + [&] ( MeshLevel &, + SourceFluxStatsAggregator::WrappedStats & fluxStats ) { - wholeSimStats.forAllFluxStatsWrappers( meshLevel, - [&] ( MeshLevel &, - SourceFluxStatsAggregator::WrappedStats & fluxStats ) + if( fluxStats.getFluxName() == testParams.sourceFluxName ) + { + EXPECT_DOUBLE_EQ( fluxStats.stats().m_producedMass, testParams.totalSourceMassProd ) << "The source flux did not inject the expected total mass."; + EXPECT_DOUBLE_EQ( fluxStats.stats().m_productionRate, testParams.sourceMeanRate ) << "The source flux did not inject at the expected rate."; + EXPECT_DOUBLE_EQ( fluxStats.stats().m_elementCount, testParams.sourceElementsCount ) << "The source flux did not target the expected elements."; + } + else if( fluxStats.getFluxName() == testParams.sinkFluxName ) { - if( fluxStats.getFluxName() == testParams.sourceFluxName ) - { - EXPECT_DOUBLE_EQ( fluxStats.stats().m_producedMass, testParams.totalSourceMassProd ) << "The source flux did not inject the expected total mass."; - EXPECT_DOUBLE_EQ( fluxStats.stats().m_productionRate, testParams.sourceMeanRate ) << "The source flux did not inject at the expected rate."; - EXPECT_DOUBLE_EQ( fluxStats.stats().m_elementCount, testParams.sourceElementsCount ) << "The source flux did not target the expected elements."; - } - else if( fluxStats.getFluxName() == testParams.sinkFluxName ) - { - EXPECT_DOUBLE_EQ( fluxStats.stats().m_producedMass, testParams.totalSinkMassProd ) << "The sink flux did not produce the expected total mass."; - EXPECT_DOUBLE_EQ( fluxStats.stats().m_productionRate, testParams.sinkMeanRate ) << "The sink flux did not produce at the expected rate."; - EXPECT_DOUBLE_EQ( fluxStats.stats().m_elementCount, testParams.sinkElementsCount ) << "The sink flux did not target the expected elements."; - } - else - { - FAIL() << "Unexpected SourceFlux found!"; - } - } ); - - EXPECT_DOUBLE_EQ( meshLevelStats.stats().m_producedMass, testParams.totalMassProd ) << "The fluxes did not produce the expected total mass."; - EXPECT_DOUBLE_EQ( meshLevelStats.stats().m_productionRate, testParams.totalMeanRate ) << "The fluxes did not produce at the expected rate."; + EXPECT_DOUBLE_EQ( fluxStats.stats().m_producedMass, testParams.totalSinkMassProd ) << "The sink flux did not produce the expected total mass."; + EXPECT_DOUBLE_EQ( fluxStats.stats().m_productionRate, testParams.sinkMeanRate ) << "The sink flux did not produce at the expected rate."; + EXPECT_DOUBLE_EQ( fluxStats.stats().m_elementCount, testParams.sinkElementsCount ) << "The sink flux did not target the expected elements."; + } + else + { + FAIL() << "Unexpected SourceFlux found!"; + } } ); - } + + EXPECT_DOUBLE_EQ( meshLevelStats.stats().m_producedMass, testParams.totalMassProd ) << "The fluxes did not produce the expected total mass."; + EXPECT_DOUBLE_EQ( meshLevelStats.stats().m_productionRate, testParams.totalMeanRate ) << "The fluxes did not produce at the expected rate."; + } ); } @@ -411,12 +413,12 @@ TestParams getMultiphaseXmlInput() - + target="/Tasks/timestepStats" /> - Date: Tue, 6 Feb 2024 14:11:36 +0100 Subject: [PATCH 28/98] unit test: Added checks on every timesteps stats --- .../fluidFlowTests/testFluidStatistics.cpp | 100 +++++++++++++++++- 1 file changed, 96 insertions(+), 4 deletions(-) diff --git a/src/coreComponents/unitTests/fluidFlowTests/testFluidStatistics.cpp b/src/coreComponents/unitTests/fluidFlowTests/testFluidStatistics.cpp index 88a0c6cd107..31cf2d11699 100644 --- a/src/coreComponents/unitTests/fluidFlowTests/testFluidStatistics.cpp +++ b/src/coreComponents/unitTests/fluidFlowTests/testFluidStatistics.cpp @@ -56,6 +56,93 @@ struct TestParams }; +/** + * @brief This Task allows to extract and check each timestep stats. + */ +class TimeStepChecker : public TaskBase +{ +public: + TimeStepChecker( string const & name, Group * const parent ): + TaskBase( name, parent ) + {} + + void postProcessInput() override + {} + + void setTestParams( TestParams const & inputTestParams ) { m_params = &inputTestParams; } + + static string catalogName() { return "SinglePhaseStatsTimeStepChecker"; } + + virtual bool execute( real64 const GEOS_UNUSED_PARAM( time_n ), + real64 const GEOS_UNUSED_PARAM( dt ), + integer const GEOS_UNUSED_PARAM( cycleNumber ), + integer const GEOS_UNUSED_PARAM( eventCounter ), + real64 const GEOS_UNUSED_PARAM( eventProgress ), + DomainPartition & domain ) + { + SourceFluxStatsAggregator & timestepStats = getGroupByPath< SourceFluxStatsAggregator >( "/Tasks/timestepStats" ); + GEOS_LOG( GEOS_FMT( "TS[{}]: Start checking {}", m_timestepId, timestepStats.getName() ) ); //!\\ temp log + timestepStats.forMeshLevelStatsWrapper( domain, + [&] ( MeshLevel & meshLevel, + SourceFluxStatsAggregator::WrappedStats & ) + { + timestepStats.forAllFluxStatsWrappers( meshLevel, + [&] ( MeshLevel &, + SourceFluxStatsAggregator::WrappedStats & fluxStats ) + { + GEOS_LOG( GEOS_FMT( "TS[{}]: Check {}.{}", m_timestepId, fluxStats.getAggregatorName(), fluxStats.getFluxName() ) );//!\\ temp log + if( fluxStats.getFluxName() == m_params->sourceFluxName ) + { + checkTimestepFluxStats( fluxStats.stats(), + m_params->sourceRates, + m_params->sourceMassProd, + m_params->sourceElementsCount ); + } + else if( fluxStats.getFluxName() == m_params->sinkFluxName ) + { + checkTimestepFluxStats( fluxStats.stats(), + m_params->sinkRates, + m_params->sinkMassProd, + m_params->sinkElementsCount ); + } + else + { + FAIL() << "Unexpected SourceFlux found!"; + } + } ); + } ); + + ++m_timestepId; + + return false; + } +private: + TestParams const * m_params = nullptr; + int m_timestepId = 0; + + + void checkTimestepFluxStats( SourceFluxStatsAggregator::StatData const & stats, + std::vector< real64 > const & expectedRates, + std::vector< real64 > const & expectedMasses, + integer const expectedElementCount ) + { + GEOS_LOG( GEOS_FMT( "TS[{}]: - computed mass = {} <=> expected mass {}", + m_timestepId, stats.m_producedMass, expectedMasses[m_timestepId] ) );//!\\ temp log + GEOS_LOG( GEOS_FMT( "TS[{}]: - computed rate = {} <=> expected rate {}", + m_timestepId, stats.m_productionRate, expectedRates[m_timestepId] ) );//!\\ temp log + GEOS_LOG( GEOS_FMT( "TS[{}]: - computed elements = {} <=> expected elements {}", + m_timestepId, stats.m_elementCount, expectedElementCount ) );//!\\ temp log + EXPECT_LT( m_timestepId, expectedRates.size()); + EXPECT_LT( m_timestepId, expectedMasses.size()); + EXPECT_DOUBLE_EQ( stats.m_producedMass, expectedMasses[m_timestepId] ); + EXPECT_DOUBLE_EQ( stats.m_productionRate, expectedRates[m_timestepId] ); + EXPECT_DOUBLE_EQ( stats.m_elementCount, expectedElementCount ); + } +}; +REGISTER_CATALOG_ENTRY( TaskBase, TimeStepChecker, string const &, Group * const ) + + + //////////////////////////////// SinglePhase Flux Statistics Test //////////////////////////////// namespace SinglePhaseFluxStatisticsTest { @@ -194,6 +281,8 @@ TestParams getXmlInput() + + @@ -258,10 +347,13 @@ TEST( FluidStatisticsTest, checkSinglePhaseFluxStatistics ) GeosxState state( std::make_unique< CommandLineOptions >( g_commandLineOptions ) ); ProblemManager & problem = state.getProblemManager(); - // run simulation setupProblemFromXML( problem, testParams.xmlInput.data() ); - EXPECT_FALSE( problem.runSimulation() ) << "Simulation exited early."; + TimeStepChecker & timeStepChecker = problem.getGroupByPath< TimeStepChecker >( "/Tasks/timeStepChecker" ); + timeStepChecker.setTestParams( testParams ); + + // run simulation + EXPECT_FALSE( problem.runSimulation() ) << "Simulation exited early."; DomainPartition & domain = problem.getDomainPartition(); SourceFluxStatsAggregator & wholeSimStats = problem.getGroupByPath< SourceFluxStatsAggregator >( "/Tasks/wholeSimStats" ); @@ -272,8 +364,8 @@ TEST( FluidStatisticsTest, checkSinglePhaseFluxStatistics ) SourceFluxStatsAggregator::WrappedStats & meshLevelStats ) { wholeSimStats.forAllFluxStatsWrappers( meshLevel, - [&] ( MeshLevel &, - SourceFluxStatsAggregator::WrappedStats & fluxStats ) + [&] ( MeshLevel &, + SourceFluxStatsAggregator::WrappedStats & fluxStats ) { if( fluxStats.getFluxName() == testParams.sourceFluxName ) { From c6ccc63736e233c0d7c041ca12252b0c01b356d1 Mon Sep 17 00:00:00 2001 From: MelReyCG Date: Tue, 6 Feb 2024 16:11:01 +0100 Subject: [PATCH 29/98] unit test: separated the input parameters and expected value set --- .../fluidFlowTests/testFluidStatistics.cpp | 211 ++++++++++-------- 1 file changed, 119 insertions(+), 92 deletions(-) diff --git a/src/coreComponents/unitTests/fluidFlowTests/testFluidStatistics.cpp b/src/coreComponents/unitTests/fluidFlowTests/testFluidStatistics.cpp index 31cf2d11699..48f966c14c6 100644 --- a/src/coreComponents/unitTests/fluidFlowTests/testFluidStatistics.cpp +++ b/src/coreComponents/unitTests/fluidFlowTests/testFluidStatistics.cpp @@ -30,29 +30,81 @@ CommandLineOptions g_commandLineOptions; /** - * @brief this struct is used to provide the input data to each tests + * @brief this struct is used to provide the input data of each fluid tests */ -struct TestParams +struct TestInputs { string xmlInput; string sourceFluxName; string sinkFluxName; + std::vector< real64 > fluxRates; + real64 dt; + real64 sourceRateFactor; + real64 sinkRateFactor; + integer sourceElementsCount; + integer sinkElementsCount; +}; + +/** + * @brief this struct computes from the test inputs the values to expect from the simulation. + */ +struct TestSet +{ + TestInputs const inputs; + // input values to test out - integer sourceElementsCount = 0; - integer sinkElementsCount = 0; - integer totalElementsCount = 0; + integer timestepCount; + integer totalElementsCount; std::vector< real64 > sourceRates; std::vector< real64 > sinkRates; std::vector< real64 > sourceMassProd; std::vector< real64 > sinkMassProd; - real64 sourceMeanRate = 0.0; - real64 sinkMeanRate = 0.0; - real64 totalSourceMassProd = 0.0; - real64 totalSinkMassProd = 0.0; - real64 totalMassProd = 0.0; - real64 totalMeanRate = 0.0; + std::vector< real64 > massDeltas; + real64 sourceMeanRate; + real64 sinkMeanRate; + real64 totalSourceMassProd; + real64 totalSinkMassProd; + real64 totalMassProd; + real64 totalMeanRate; + + /** + * @brief Compute the expected statistics set + * @param inputParams the test simulation input parameters + */ + TestSet( TestInputs const & inputParams ): + inputs( inputParams ) + { + timestepCount = inputs.fluxRates.size(); + sourceRates.resize( timestepCount ); + sinkRates.resize( timestepCount ); + sourceMassProd.resize( timestepCount ); + sinkMassProd.resize( timestepCount ); + massDeltas.resize( timestepCount ); + for( size_t i = 0; i < inputs.fluxRates.size(); ++i ) + { + // mass production / injection calculation + sourceRates[i] = inputs.fluxRates[i] * -1.0; + sourceMassProd[i] = inputs.fluxRates[i] * inputs.dt * -1.0; + totalSourceMassProd += sourceMassProd[i]; + sinkRates[i] = inputs.fluxRates[i] * 4.0; + sinkMassProd[i] = inputs.fluxRates[i] * inputs.dt * 4.0; + massDeltas[i] = -( sourceMassProd[i] + sinkMassProd[i] ); + totalSinkMassProd += sinkMassProd[i]; + // rates accumulations + sourceMeanRate += inputs.fluxRates[i] * -1.0; + sinkMeanRate += inputs.fluxRates[i] * 4.0; + } + // mean rates calculation + real64 const ratesMeanDivisor = 1.0 / double( timestepCount - 1 ); + sourceMeanRate *= ratesMeanDivisor; + sinkMeanRate *= ratesMeanDivisor; + // totals + totalMassProd = totalSinkMassProd + totalSourceMassProd; + totalMeanRate = sinkMeanRate + sourceMeanRate; + totalElementsCount = inputs.sourceElementsCount + inputs.sinkElementsCount; + } }; @@ -69,7 +121,8 @@ class TimeStepChecker : public TaskBase void postProcessInput() override {} - void setTestParams( TestParams const & inputTestParams ) { m_params = &inputTestParams; } + void setTestSet( TestSet const & testSet ) { m_testSet = &testSet; } + integer getTestedTimeStepCount() { return m_timestepId; } static string catalogName() { return "SinglePhaseStatsTimeStepChecker"; } @@ -80,6 +133,7 @@ class TimeStepChecker : public TaskBase real64 const GEOS_UNUSED_PARAM( eventProgress ), DomainPartition & domain ) { + EXPECT_LT( m_timestepId, m_testSet->timestepCount ) << "The tested time-step count were higher than expected."; SourceFluxStatsAggregator & timestepStats = getGroupByPath< SourceFluxStatsAggregator >( "/Tasks/timestepStats" ); GEOS_LOG( GEOS_FMT( "TS[{}]: Start checking {}", m_timestepId, timestepStats.getName() ) ); //!\\ temp log timestepStats.forMeshLevelStatsWrapper( domain, @@ -91,19 +145,19 @@ class TimeStepChecker : public TaskBase SourceFluxStatsAggregator::WrappedStats & fluxStats ) { GEOS_LOG( GEOS_FMT( "TS[{}]: Check {}.{}", m_timestepId, fluxStats.getAggregatorName(), fluxStats.getFluxName() ) );//!\\ temp log - if( fluxStats.getFluxName() == m_params->sourceFluxName ) + if( fluxStats.getFluxName() == m_testSet->inputs.sourceFluxName ) { - checkTimestepFluxStats( fluxStats.stats(), - m_params->sourceRates, - m_params->sourceMassProd, - m_params->sourceElementsCount ); + checkTimestepFluxStats( fluxStats, + m_testSet->sourceRates, + m_testSet->sourceMassProd, + m_testSet->inputs.sourceElementsCount ); } - else if( fluxStats.getFluxName() == m_params->sinkFluxName ) + else if( fluxStats.getFluxName() == m_testSet->inputs.sinkFluxName ) { - checkTimestepFluxStats( fluxStats.stats(), - m_params->sinkRates, - m_params->sinkMassProd, - m_params->sinkElementsCount ); + checkTimestepFluxStats( fluxStats, + m_testSet->sinkRates, + m_testSet->sinkMassProd, + m_testSet->inputs.sinkElementsCount ); } else { @@ -117,26 +171,24 @@ class TimeStepChecker : public TaskBase return false; } private: - TestParams const * m_params = nullptr; + TestSet const * m_testSet = nullptr; int m_timestepId = 0; - void checkTimestepFluxStats( SourceFluxStatsAggregator::StatData const & stats, + void checkTimestepFluxStats( SourceFluxStatsAggregator::WrappedStats const & stats, std::vector< real64 > const & expectedRates, std::vector< real64 > const & expectedMasses, integer const expectedElementCount ) { GEOS_LOG( GEOS_FMT( "TS[{}]: - computed mass = {} <=> expected mass {}", - m_timestepId, stats.m_producedMass, expectedMasses[m_timestepId] ) );//!\\ temp log + m_timestepId, stats.stats().m_producedMass, expectedMasses[m_timestepId] ) );//!\\ temp log GEOS_LOG( GEOS_FMT( "TS[{}]: - computed rate = {} <=> expected rate {}", - m_timestepId, stats.m_productionRate, expectedRates[m_timestepId] ) );//!\\ temp log + m_timestepId, stats.stats().m_productionRate, expectedRates[m_timestepId] ) );//!\\ temp log GEOS_LOG( GEOS_FMT( "TS[{}]: - computed elements = {} <=> expected elements {}", - m_timestepId, stats.m_elementCount, expectedElementCount ) );//!\\ temp log - EXPECT_LT( m_timestepId, expectedRates.size()); - EXPECT_LT( m_timestepId, expectedMasses.size()); - EXPECT_DOUBLE_EQ( stats.m_producedMass, expectedMasses[m_timestepId] ); - EXPECT_DOUBLE_EQ( stats.m_productionRate, expectedRates[m_timestepId] ); - EXPECT_DOUBLE_EQ( stats.m_elementCount, expectedElementCount ); + m_timestepId, stats.stats().m_elementCount, expectedElementCount ) );//!\\ temp log + EXPECT_DOUBLE_EQ( stats.stats().m_producedMass, expectedMasses[m_timestepId] ) << GEOS_FMT( "The flux named '{}' did not produce the expected mass.", stats.getFluxName() ); + EXPECT_DOUBLE_EQ( stats.stats().m_productionRate, expectedRates[m_timestepId] ) << GEOS_FMT( "The flux named '{}' did not produce at the expected rate.", stats.getFluxName() ); + EXPECT_DOUBLE_EQ( stats.stats().m_elementCount, expectedElementCount ) << GEOS_FMT( "The flux named '{}' did not produce in the expected elements.", stats.getFluxName() ); } }; REGISTER_CATALOG_ENTRY( TaskBase, TimeStepChecker, string const &, Group * const ) @@ -148,11 +200,11 @@ namespace SinglePhaseFluxStatisticsTest { -TestParams getXmlInput() +TestSet getXmlInput() { - TestParams testParams; + TestInputs testInputs; - testParams.xmlInput = + testInputs.xmlInput = R"xml( @@ -299,58 +351,32 @@ TestParams getXmlInput() )xml"; - testParams.sourceFluxName = "sourceFlux"; - testParams.sinkFluxName = "sinkFlux"; + testInputs.sourceFluxName = "sourceFlux"; + testInputs.sinkFluxName = "sinkFlux"; + testInputs.dt = 500.0; + testInputs.sourceElementsCount = 2; + testInputs.sinkElementsCount = 4; - // compute the expected statistics - { - static real64 const dt = 500.0; - - //elements count - testParams.sourceElementsCount = 2; - testParams.sinkElementsCount = 4; - testParams.totalElementsCount = testParams.sourceElementsCount + testParams.sinkElementsCount; - - // FluxRate table from 0.0s to 5000.0s - std::vector< real64 > const rates = { 0.000, 0.000, 0.767, 0.894, 0.561, 0.234, 0.194, 0.178, 0.162, 0.059, 0.000 }; - testParams.sourceMassProd.reserve( rates.size() ); - testParams.sinkMassProd.reserve( rates.size() ); - for( size_t i = 0; i < rates.size(); ++i ) - { - // mass injection / production calculation (sink is 4x source production) - testParams.sourceRates.push_back( rates[i] * -1.0 ); - testParams.sourceMassProd.push_back( rates[i] * dt * -1.0 ); - testParams.totalSourceMassProd += testParams.sourceMassProd.back(); - testParams.sinkRates.push_back( rates[i] * 4.0 ); - testParams.sinkMassProd.push_back( rates[i] * dt * 4.0 ); - testParams.totalSinkMassProd += testParams.sinkMassProd.back(); - - // rates accumulation - testParams.sourceMeanRate += rates[i] * -1.0; - testParams.sinkMeanRate += rates[i] * 4.0; - } - // mean rates calculation - real64 const ratesMeanDivisor = 1.0 / double( rates.size() - 1 ); - testParams.sourceMeanRate *= ratesMeanDivisor; - testParams.sinkMeanRate *= ratesMeanDivisor; - // totals - testParams.totalMassProd = testParams.totalSinkMassProd + testParams.totalSourceMassProd; - testParams.totalMeanRate = testParams.sinkMeanRate + testParams.sourceMeanRate; - } + // FluxRate table from 0.0s to 5000.0s + testInputs.fluxRates = { 0.000, 0.000, 0.767, 0.894, 0.561, 0.234, 0.194, 0.178, 0.162, 0.059, 0.000 }; + + // sink is 4x source production + testInputs.sourceRateFactor = -1.0; + testInputs.sinkRateFactor = 4.0; - return testParams; + return TestSet( testInputs ); } TEST( FluidStatisticsTest, checkSinglePhaseFluxStatistics ) { - TestParams const testParams = getXmlInput(); + static TestSet testSet = getXmlInput(); GeosxState state( std::make_unique< CommandLineOptions >( g_commandLineOptions ) ); ProblemManager & problem = state.getProblemManager(); - setupProblemFromXML( problem, testParams.xmlInput.data() ); + setupProblemFromXML( problem, testSet.inputs.xmlInput.data() ); TimeStepChecker & timeStepChecker = problem.getGroupByPath< TimeStepChecker >( "/Tasks/timeStepChecker" ); - timeStepChecker.setTestParams( testParams ); + timeStepChecker.setTestSet( testSet ); // run simulation EXPECT_FALSE( problem.runSimulation() ) << "Simulation exited early."; @@ -359,6 +385,7 @@ TEST( FluidStatisticsTest, checkSinglePhaseFluxStatistics ) SourceFluxStatsAggregator & wholeSimStats = problem.getGroupByPath< SourceFluxStatsAggregator >( "/Tasks/wholeSimStats" ); // verification that the source flux statistics are correct over the whole simulation + EXPECT_EQ( timeStepChecker.getTestedTimeStepCount(), testSet.timestepCount ) << "The tested time-step were different than expected."; wholeSimStats.forMeshLevelStatsWrapper( domain, [&] ( MeshLevel & meshLevel, SourceFluxStatsAggregator::WrappedStats & meshLevelStats ) @@ -367,17 +394,17 @@ TEST( FluidStatisticsTest, checkSinglePhaseFluxStatistics ) [&] ( MeshLevel &, SourceFluxStatsAggregator::WrappedStats & fluxStats ) { - if( fluxStats.getFluxName() == testParams.sourceFluxName ) + if( fluxStats.getFluxName() == testSet.inputs.sourceFluxName ) { - EXPECT_DOUBLE_EQ( fluxStats.stats().m_producedMass, testParams.totalSourceMassProd ) << "The source flux did not inject the expected total mass."; - EXPECT_DOUBLE_EQ( fluxStats.stats().m_productionRate, testParams.sourceMeanRate ) << "The source flux did not inject at the expected rate."; - EXPECT_DOUBLE_EQ( fluxStats.stats().m_elementCount, testParams.sourceElementsCount ) << "The source flux did not target the expected elements."; + EXPECT_DOUBLE_EQ( fluxStats.stats().m_producedMass, testSet.totalSourceMassProd ) << "The source flux did not inject the expected total mass."; + EXPECT_DOUBLE_EQ( fluxStats.stats().m_productionRate, testSet.sourceMeanRate ) << "The source flux did not inject at the expected mean rate."; + EXPECT_DOUBLE_EQ( fluxStats.stats().m_elementCount, testSet.inputs.sourceElementsCount ) << "The source flux did not target the expected elements."; } - else if( fluxStats.getFluxName() == testParams.sinkFluxName ) + else if( fluxStats.getFluxName() == testSet.inputs.sinkFluxName ) { - EXPECT_DOUBLE_EQ( fluxStats.stats().m_producedMass, testParams.totalSinkMassProd ) << "The sink flux did not produce the expected total mass."; - EXPECT_DOUBLE_EQ( fluxStats.stats().m_productionRate, testParams.sinkMeanRate ) << "The sink flux did not produce at the expected rate."; - EXPECT_DOUBLE_EQ( fluxStats.stats().m_elementCount, testParams.sinkElementsCount ) << "The sink flux did not target the expected elements."; + EXPECT_DOUBLE_EQ( fluxStats.stats().m_producedMass, testSet.totalSinkMassProd ) << "The sink flux did not produce the expected total mass."; + EXPECT_DOUBLE_EQ( fluxStats.stats().m_productionRate, testSet.sinkMeanRate ) << "The sink flux did not produce at the expected mean rate."; + EXPECT_DOUBLE_EQ( fluxStats.stats().m_elementCount, testSet.inputs.sinkElementsCount ) << "The sink flux did not target the expected elements."; } else { @@ -385,8 +412,8 @@ TEST( FluidStatisticsTest, checkSinglePhaseFluxStatistics ) } } ); - EXPECT_DOUBLE_EQ( meshLevelStats.stats().m_producedMass, testParams.totalMassProd ) << "The fluxes did not produce the expected total mass."; - EXPECT_DOUBLE_EQ( meshLevelStats.stats().m_productionRate, testParams.totalMeanRate ) << "The fluxes did not produce at the expected rate."; + EXPECT_DOUBLE_EQ( meshLevelStats.stats().m_producedMass, testSet.totalMassProd ) << "The fluxes did not produce the expected total mass."; + EXPECT_DOUBLE_EQ( meshLevelStats.stats().m_productionRate, testSet.totalMeanRate ) << "The fluxes did not produce at the expected rate."; } ); } @@ -394,11 +421,11 @@ TEST( FluidStatisticsTest, checkSinglePhaseFluxStatistics ) //////////////////////////////// Multiphase Flux Statistics Test //////////////////////////////// -TestParams getMultiphaseXmlInput() +TestInputs getMultiphaseXmlInput() { - TestParams testParams; + TestInputs testInputs; - testParams.xmlInput = + testInputs.xmlInput = R"xml( @@ -559,15 +586,15 @@ TestParams getMultiphaseXmlInput() )xml"; - testParams.sourceFluxName = "sourceFlux"; - testParams.sinkFluxName = "sinkFlux"; + testInputs.sourceFluxName = "sourceFlux"; + testInputs.sinkFluxName = "sinkFlux"; // compute the expected statistics { //!\\ TODO } - return testParams; + return testInputs; } From b806da723385991a45a9ae42ddcf0623156f21cb Mon Sep 17 00:00:00 2001 From: MelReyCG Date: Tue, 6 Feb 2024 16:21:54 +0100 Subject: [PATCH 30/98] unit test: cleaning comments --- .../unitTests/fluidFlowTests/testFluidStatistics.cpp | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/coreComponents/unitTests/fluidFlowTests/testFluidStatistics.cpp b/src/coreComponents/unitTests/fluidFlowTests/testFluidStatistics.cpp index 48f966c14c6..cf1d88642fc 100644 --- a/src/coreComponents/unitTests/fluidFlowTests/testFluidStatistics.cpp +++ b/src/coreComponents/unitTests/fluidFlowTests/testFluidStatistics.cpp @@ -135,7 +135,6 @@ class TimeStepChecker : public TaskBase { EXPECT_LT( m_timestepId, m_testSet->timestepCount ) << "The tested time-step count were higher than expected."; SourceFluxStatsAggregator & timestepStats = getGroupByPath< SourceFluxStatsAggregator >( "/Tasks/timestepStats" ); - GEOS_LOG( GEOS_FMT( "TS[{}]: Start checking {}", m_timestepId, timestepStats.getName() ) ); //!\\ temp log timestepStats.forMeshLevelStatsWrapper( domain, [&] ( MeshLevel & meshLevel, SourceFluxStatsAggregator::WrappedStats & ) @@ -144,7 +143,6 @@ class TimeStepChecker : public TaskBase [&] ( MeshLevel &, SourceFluxStatsAggregator::WrappedStats & fluxStats ) { - GEOS_LOG( GEOS_FMT( "TS[{}]: Check {}.{}", m_timestepId, fluxStats.getAggregatorName(), fluxStats.getFluxName() ) );//!\\ temp log if( fluxStats.getFluxName() == m_testSet->inputs.sourceFluxName ) { checkTimestepFluxStats( fluxStats, @@ -180,12 +178,6 @@ class TimeStepChecker : public TaskBase std::vector< real64 > const & expectedMasses, integer const expectedElementCount ) { - GEOS_LOG( GEOS_FMT( "TS[{}]: - computed mass = {} <=> expected mass {}", - m_timestepId, stats.stats().m_producedMass, expectedMasses[m_timestepId] ) );//!\\ temp log - GEOS_LOG( GEOS_FMT( "TS[{}]: - computed rate = {} <=> expected rate {}", - m_timestepId, stats.stats().m_productionRate, expectedRates[m_timestepId] ) );//!\\ temp log - GEOS_LOG( GEOS_FMT( "TS[{}]: - computed elements = {} <=> expected elements {}", - m_timestepId, stats.stats().m_elementCount, expectedElementCount ) );//!\\ temp log EXPECT_DOUBLE_EQ( stats.stats().m_producedMass, expectedMasses[m_timestepId] ) << GEOS_FMT( "The flux named '{}' did not produce the expected mass.", stats.getFluxName() ); EXPECT_DOUBLE_EQ( stats.stats().m_productionRate, expectedRates[m_timestepId] ) << GEOS_FMT( "The flux named '{}' did not produce at the expected rate.", stats.getFluxName() ); EXPECT_DOUBLE_EQ( stats.stats().m_elementCount, expectedElementCount ) << GEOS_FMT( "The flux named '{}' did not produce in the expected elements.", stats.getFluxName() ); From aa4b25067e5b604bd2b12a169138c20de11ad252 Mon Sep 17 00:00:00 2001 From: MelReyCG Date: Wed, 7 Feb 2024 09:22:55 +0100 Subject: [PATCH 31/98] unit test: compositional multiphase sim now runs --- .../fluidFlowTests/testFluidStatistics.cpp | 102 +++++++++++++++--- 1 file changed, 87 insertions(+), 15 deletions(-) diff --git a/src/coreComponents/unitTests/fluidFlowTests/testFluidStatistics.cpp b/src/coreComponents/unitTests/fluidFlowTests/testFluidStatistics.cpp index cf1d88642fc..18dd05af664 100644 --- a/src/coreComponents/unitTests/fluidFlowTests/testFluidStatistics.cpp +++ b/src/coreComponents/unitTests/fluidFlowTests/testFluidStatistics.cpp @@ -26,6 +26,7 @@ using namespace geos::testing; CommandLineOptions g_commandLineOptions; + //////////////////////////////// Test base utilities //////////////////////////////// @@ -35,6 +36,7 @@ CommandLineOptions g_commandLineOptions; struct TestInputs { string xmlInput; + std::map< string, string > tableFiles; string sourceFluxName; string sinkFluxName; @@ -186,13 +188,43 @@ class TimeStepChecker : public TaskBase REGISTER_CATALOG_ENTRY( TaskBase, TimeStepChecker, string const &, Group * const ) +class FluidStatisticsTest : public ::testing::Test +{ +public: + + void writeTableFiles( std::map< string, string > const & files ) + { + for( auto const & [fileName, content] : files ) + { + std::ofstream os( fileName ); + ASSERT_TRUE( os.is_open() ); + os << content; + os.close(); + + m_tableFileNames.push_back( fileName ); + } + } + + void TearDown() override + { + // removing temp table files + for( string const & fileName : m_tableFileNames ) + { + ASSERT_TRUE( std::remove( fileName.c_str() ) == 0 ); + } + } + +private: + std::vector< string > m_tableFileNames; +}; + //////////////////////////////// SinglePhase Flux Statistics Test //////////////////////////////// namespace SinglePhaseFluxStatisticsTest { -TestSet getXmlInput() +TestSet getTestSet() { TestInputs testInputs; @@ -359,9 +391,9 @@ TestSet getXmlInput() return TestSet( testInputs ); } -TEST( FluidStatisticsTest, checkSinglePhaseFluxStatistics ) +TEST_F( FluidStatisticsTest, checkSinglePhaseFluxStatistics ) { - static TestSet testSet = getXmlInput(); + static TestSet const testSet = getTestSet(); GeosxState state( std::make_unique< CommandLineOptions >( g_commandLineOptions ) ); ProblemManager & problem = state.getProblemManager(); @@ -373,10 +405,9 @@ TEST( FluidStatisticsTest, checkSinglePhaseFluxStatistics ) // run simulation EXPECT_FALSE( problem.runSimulation() ) << "Simulation exited early."; + // verification that the source flux statistics are correct over the whole simulation DomainPartition & domain = problem.getDomainPartition(); SourceFluxStatsAggregator & wholeSimStats = problem.getGroupByPath< SourceFluxStatsAggregator >( "/Tasks/wholeSimStats" ); - - // verification that the source flux statistics are correct over the whole simulation EXPECT_EQ( timeStepChecker.getTestedTimeStepCount(), testSet.timestepCount ) << "The tested time-step were different than expected."; wholeSimStats.forMeshLevelStatsWrapper( domain, [&] ( MeshLevel & meshLevel, @@ -410,10 +441,15 @@ TEST( FluidStatisticsTest, checkSinglePhaseFluxStatistics ) } +} /* namespace SinglePhaseFluxStatisticsTest */ + + //////////////////////////////// Multiphase Flux Statistics Test //////////////////////////////// +namespace MultiPhaseFluxStatisticsTest +{ -TestInputs getMultiphaseXmlInput() +TestSet getTestSet() { TestInputs testInputs; @@ -424,7 +460,8 @@ TestInputs getMultiphaseXmlInput() + targetRegions="{ reservoir }" + temperature="366.483" > )xml"; + testInputs.tableFiles["pvtgas.txt"] = "DensityFun SpanWagnerCO2Density 1.0e5 5.0e7 1e5 285.15 395.15 2\n" + "ViscosityFun FenghourCO2Viscosity 1.0e5 5.0e7 1e5 285.15 395.15 2\n"; + + testInputs.tableFiles["pvtliquid.txt"] = "DensityFun EzrokhiBrineDensity 0.1033 -2.2991e-5 -2.3658e-6\n" + "ViscosityFun EzrokhiBrineViscosity 0 0 0\n"; + + testInputs.tableFiles["co2flash.txt"] = "FlashModel CO2Solubility 1.0e5 4e7 1e5 285.15 395.15 2 0\n"; + testInputs.sourceFluxName = "sourceFlux"; testInputs.sinkFluxName = "sinkFlux"; + testInputs.dt = 500.0; + testInputs.sourceElementsCount = 2; + testInputs.sinkElementsCount = 4; - // compute the expected statistics - { - //!\\ TODO - } + // FluxRate table from 0.0s to 5000.0s + //!\\ TODO : setup multi-component values here ! + testInputs.fluxRates = { 0.000, 0.000, 0.767, 0.894, 0.561, 0.234, 0.194, 0.178, 0.162, 0.059, 0.000 }; + + // sink is 4x source production + testInputs.sourceRateFactor = -1.0; + testInputs.sinkRateFactor = 4.0; - return testInputs; + return TestSet( testInputs ); } -} /* namespace SinglePhaseFluxStatisticsTest */ +TEST_F( FluidStatisticsTest, checkMultiPhaseFluxStatistics ) +{ + static TestSet const testSet = getTestSet(); + writeTableFiles( testSet.inputs.tableFiles ); + + GeosxState state( std::make_unique< CommandLineOptions >( g_commandLineOptions ) ); + ProblemManager & problem = state.getProblemManager(); + + setupProblemFromXML( problem, testSet.inputs.xmlInput.data() ); + + //!\\ TODO : récupération du timestepChecker (à ajouter dans le xml) + + // run simulation + EXPECT_FALSE( problem.runSimulation() ) << "Simulation exited early."; + + // verification that the source flux statistics are correct over the whole simulation + //!\\ TODO + +} + + +} /* namespace MultiPhaseFluxStatisticsTest */ //////////////////////////////// Main //////////////////////////////// From c2fa0f81d2640b05bed9f977ff229072e9f5b66d Mon Sep 17 00:00:00 2001 From: MelReyCG Date: Wed, 7 Feb 2024 17:17:28 +0100 Subject: [PATCH 32/98] allowed multiple component stats for SourceFluxStatistics --- .../SourceFluxStatistics.cpp | 126 +++++++++--- .../SourceFluxStatistics.hpp | 59 +++++- .../fluidFlow/CompositionalMultiphaseBase.cpp | 27 ++- .../fluidFlow/SinglePhaseBase.cpp | 1 - .../fluidFlowTests/testFluidStatistics.cpp | 192 +++++++++++------- 5 files changed, 291 insertions(+), 114 deletions(-) diff --git a/src/coreComponents/fieldSpecification/SourceFluxStatistics.cpp b/src/coreComponents/fieldSpecification/SourceFluxStatistics.cpp index abe728e5b59..9faf1b6a76c 100644 --- a/src/coreComponents/fieldSpecification/SourceFluxStatistics.cpp +++ b/src/coreComponents/fieldSpecification/SourceFluxStatistics.cpp @@ -20,6 +20,7 @@ #include "SourceFluxBoundaryCondition.hpp" #include "FieldSpecificationManager.hpp" +#include "LvArray/src/tensorOps.hpp" namespace geos { @@ -147,12 +148,26 @@ void SourceFluxStatsAggregator::writeStatData( integer minLogLevel, GEOS_LOG_RANK( GEOS_FMT( "{} {} (of {}, in {}): Producting on {} elements", catalogName(), getName(), wrappedStats.getFluxName(), elementSetName, wrappedStats.stats().m_elementCount ) ); - GEOS_LOG_RANK( GEOS_FMT( "{} {} (of {}, in {}): Produced mass = {} kg", - catalogName(), getName(), wrappedStats.getFluxName(), elementSetName, - wrappedStats.stats().m_producedMass ) ); - GEOS_LOG_RANK( GEOS_FMT( "{} {} (of {}, in {}): Production rate = {} kg/s", - catalogName(), getName(), wrappedStats.getFluxName(), elementSetName, - wrappedStats.stats().m_productionRate ) ); + + // we want to format differently if we have got multiple phases or not + if( wrappedStats.stats().m_producedMass.size() == 1 ) + { + GEOS_LOG_RANK( GEOS_FMT( "{} {} (of {}, in {}): Produced mass = {} kg", + catalogName(), getName(), wrappedStats.getFluxName(), elementSetName, + wrappedStats.stats().m_producedMass[0] ) ); + GEOS_LOG_RANK( GEOS_FMT( "{} {} (of {}, in {}): Production rate = {} kg/s", + catalogName(), getName(), wrappedStats.getFluxName(), elementSetName, + wrappedStats.stats().m_productionRate[0] ) ); + } + else + { + GEOS_LOG_RANK( GEOS_FMT( "{} {} (of {}, in {}): Produced mass = {} kg", + catalogName(), getName(), wrappedStats.getFluxName(), elementSetName, + wrappedStats.stats().m_producedMass ) ); + GEOS_LOG_RANK( GEOS_FMT( "{} {} (of {}, in {}): Production rate = {} kg/s", + catalogName(), getName(), wrappedStats.getFluxName(), elementSetName, + wrappedStats.stats().m_productionRate ) ); + } } } @@ -172,7 +187,7 @@ bool SourceFluxStatsAggregator::execute( real64 const GEOS_UNUSED_PARAM( time_n [&] ( MeshLevel &, WrappedStats & fluxStats ) { fluxStats.stats() = StatData(); - + forAllRegionStatsWrappers( meshLevel, fluxStats.getFluxName(), [&] ( ElementRegionBase & region, WrappedStats & regionStats ) { @@ -203,16 +218,41 @@ bool SourceFluxStatsAggregator::execute( real64 const GEOS_UNUSED_PARAM( time_n +void SourceFluxStatsAggregator::StatData::allocate( integer phaseCount ) +{ + if( m_producedMass.size() != phaseCount ) + { + m_producedMass.resize( phaseCount ); + m_productionRate.resize( phaseCount ); + } +} +void SourceFluxStatsAggregator::StatData::reset() +{ + for( int ip = 0; ip < getPhaseCount(); ++ip ) + { + m_producedMass[ip] = 0.0; + m_productionRate[ip] = 0.0; + } + m_elementCount = 0; +} void SourceFluxStatsAggregator::StatData::combine( StatData const & other ) { - m_producedMass += other.m_producedMass; - m_productionRate += other.m_productionRate; + allocate( other.getPhaseCount() ); + + for( int ip = 0; ip < other.getPhaseCount(); ++ip ) + { + m_producedMass[ip] += other.m_producedMass[ip]; + m_productionRate[ip] += other.m_productionRate[ip]; + } m_elementCount += other.m_elementCount; } void SourceFluxStatsAggregator::StatData::mpiReduce() { - m_producedMass = MpiWrapper::sum( m_producedMass ); - m_productionRate = MpiWrapper::sum( m_productionRate ); + for( int ip = 0; ip < getPhaseCount(); ++ip ) + { + m_producedMass[ip] = MpiWrapper::sum( m_producedMass[ip] ); + m_productionRate[ip] = MpiWrapper::sum( m_productionRate[ip] ); + } m_elementCount = MpiWrapper::sum( m_elementCount ); } @@ -222,38 +262,78 @@ void SourceFluxStatsAggregator::WrappedStats::setTarget( string_view aggregatorN m_aggregatorName = aggregatorName; m_fluxName = fluxName; } +void SourceFluxStatsAggregator::WrappedStats::gatherTimeStepStats( real64 const dt, + real64 producedMass, + integer const elementCount, + bool const overwriteTimeStepStats ) +{ + array1d< real64 > phaseProducedMass{ 1 }; + phaseProducedMass[0] = producedMass; + gatherTimeStepStats( dt, phaseProducedMass, elementCount, overwriteTimeStepStats ); +} void SourceFluxStatsAggregator::WrappedStats::gatherTimeStepStats( real64 dt, - real64 productedMass, + array1d< real64 > const & producedMass, integer elementCount, bool overwriteTimeStepStats ) { - // we are beginning a new timestep, so we must aggregate the pending stats (mass & dt) before collecting the current stats data + m_periodStats.allocate( producedMass.size() ); + + // if beginning a new timestep, we must aggregate the stats from previous timesteps (mass & dt) before collecting the new ones if( !overwriteTimeStepStats ) { - m_periodStats.m_periodPendingMass += m_periodStats.m_timeStepMass; - m_periodStats.m_timeStepMass = 0; + for( int ip = 0; ip < m_periodStats.getPhaseCount(); ++ip ) + { + m_periodStats.m_periodPendingMass[ip] += m_periodStats.m_timeStepMass[ip]; + m_periodStats.m_timeStepMass[ip] = 0; + } m_periodStats.m_periodDeltaTime += dt; m_periodStats.m_elementCount = elementCount; } - m_periodStats.m_timeStepMass = productedMass; + for( int ip = 0; ip < m_periodStats.getPhaseCount(); ++ip ) + { + m_periodStats.m_timeStepMass = producedMass; + } } void SourceFluxStatsAggregator::WrappedStats::finalizePeriod() { + // init phase data memory allocation if needed + m_stats.allocate( m_periodStats.getPhaseCount() ); + // produce timestep stats of this ranks - real64 periodMass = m_periodStats.m_timeStepMass + m_periodStats.m_periodPendingMass; - m_stats.m_producedMass = periodMass; - m_stats.m_productionRate = m_periodStats.m_periodDeltaTime > 0.0 ? - periodMass / m_periodStats.m_periodDeltaTime : - 0.0; m_stats.m_elementCount = m_periodStats.m_elementCount; + real64 timeDivisor = m_periodStats.m_periodDeltaTime > 0.0 ? 1.0 / m_periodStats.m_periodDeltaTime : 0.0; + for( int ip = 0; ip < m_periodStats.getPhaseCount(); ++ip ) + { + real64 periodMass = m_periodStats.m_timeStepMass[ip] + m_periodStats.m_periodPendingMass[ip]; + m_stats.m_producedMass[ip] = periodMass; + m_stats.m_productionRate[ip] = periodMass * timeDivisor; + } + // combine period results from all MPI ranks m_stats.mpiReduce(); // start a new timestep - m_periodStats = WrappedStats::PeriodStats(); - + m_periodStats.reset(); +} +void SourceFluxStatsAggregator::WrappedStats::PeriodStats::allocate( integer phaseCount ) +{ + if( m_timeStepMass.size() != phaseCount ) + { + m_timeStepMass.resize( phaseCount ); + m_periodPendingMass.resize( phaseCount ); + } +} +void SourceFluxStatsAggregator::WrappedStats::PeriodStats::reset() +{ + for( int ip = 0; ip < getPhaseCount(); ++ip ) + { + m_timeStepMass[ip] = 0.0; + m_periodPendingMass[ip] = 0.0; + } + m_periodDeltaTime = 0.0; + m_elementCount = 0; } diff --git a/src/coreComponents/fieldSpecification/SourceFluxStatistics.hpp b/src/coreComponents/fieldSpecification/SourceFluxStatistics.hpp index 2372b3d7856..19fe4d0cbb3 100644 --- a/src/coreComponents/fieldSpecification/SourceFluxStatistics.hpp +++ b/src/coreComponents/fieldSpecification/SourceFluxStatistics.hpp @@ -41,13 +41,27 @@ class SourceFluxStatsAggregator : public FieldStatisticsBase< FlowSolverBase > */ struct StatData { - /// fluid mass produced by the flux(es) (kg). Negative if injecting. - real64 m_producedMass = 0.0; - /// flux(es) production rate (kg/s). Negative if injecting. - real64 m_productionRate = 0.0; + /// fluid mass produced by the flux(es) (kg). Negative if injecting. One value for each fluid phase. + array1d< real64 > m_producedMass; + /// flux(es) production rate (kg/s). Negative if injecting. One value for each fluid phase. + array1d< real64 > m_productionRate; /// Number of elements in which we are producing / injecting integer m_elementCount = 0; + /** + * @brief resize the phase data arrays if needed + * @param phaseCount the count of phases + */ + void allocate( integer phaseCount ); + /** + * @brief reset the stats to 0.0 + */ + void reset(); + /** + * @return the phase count for phasic stats + */ + integer getPhaseCount() const + { return m_producedMass.size(); } /** * @brief Aggregate the statistics of the instance with those of another one. * @param other the other stats structure. @@ -74,14 +88,24 @@ class SourceFluxStatsAggregator : public FieldStatisticsBase< FlowSolverBase > void setTarget( string_view aggregatorName, string_view fluxName ); /** - * @brief Set the current time step stats. + * @brief Set the current time step stats. Single-phase version + * @param dt time delta of the current timestep + * @param producedMass time-step producted mass (see StatData::m_producedMass). + * @param elementCount number of cell elements concerned by this instance * @param overwriteTimeStepStats false when this is the first time we're writing the current * timestep data, true otherwise (i.e. new solver iteration) + */ + void gatherTimeStepStats( real64 dt, real64 producedMass, integer elementCount, + bool overwriteTimeStepStats ); + /** + * @brief Set the current time step stats. Multi-phase version * @param dt time delta of the current timestep - * @param productedMass time-step producted mass (see StatData::m_producedMass). + * @param producedMass time-step producted mass (see StatData::m_producedMass). * @param elementCount number of cell elements concerned by this instance + * @param overwriteTimeStepStats false when this is the first time we're writing the current + * timestep data, true otherwise (i.e. new solver iteration) */ - void gatherTimeStepStats( real64 dt, real64 productedMass, integer elementCount, + void gatherTimeStepStats( real64 dt, array1d< real64 > const & producedMass, integer elementCount, bool overwriteTimeStepStats ); /** @@ -120,21 +144,34 @@ class SourceFluxStatsAggregator : public FieldStatisticsBase< FlowSolverBase > struct PeriodStats { /// producted mass of the current time-step. - real64 m_timeStepMass = 0.0; + array1d< real64 > m_timeStepMass; /// producted mass sum from all previous time-step of the current period. - real64 m_periodPendingMass = 0.0; + array1d< real64 > m_periodPendingMass; /// delta time the current period real64 m_periodDeltaTime = 0.0; /// number of cell elements concerned by this instance integer m_elementCount = 0; + + /** + * @brief resize the phase data arrays if needed + * @param phaseCount the count of phases + */ + void allocate( integer phaseCount ); + /** + * @brief reset the stats to 0.0 + */ + void reset(); + /** + * @return the phase count for phasic stats + */ + integer getPhaseCount() const + { return m_timeStepMass.size(); } } m_periodStats; /// Name of the SourceFluxStatsAggregator that want to collect data on this instance. string m_aggregatorName; /// Name of the SourceFluxBoundaryCondition from which we are collecting data on this instance. string m_fluxName; - - std::set elementSet; }; diff --git a/src/coreComponents/physicsSolvers/fluidFlow/CompositionalMultiphaseBase.cpp b/src/coreComponents/physicsSolvers/fluidFlow/CompositionalMultiphaseBase.cpp index 6db5fe77bfa..ebfde4148e2 100644 --- a/src/coreComponents/physicsSolvers/fluidFlow/CompositionalMultiphaseBase.cpp +++ b/src/coreComponents/physicsSolvers/fluidFlow/CompositionalMultiphaseBase.cpp @@ -39,6 +39,7 @@ #include "fieldSpecification/AquiferBoundaryCondition.hpp" #include "fieldSpecification/EquilibriumInitialCondition.hpp" #include "fieldSpecification/SourceFluxBoundaryCondition.hpp" +#include "fieldSpecification/SourceFluxStatistics.hpp" #include "mesh/DomainPartition.hpp" #include "mesh/mpiCommunications/CommunicationTools.hpp" #include "physicsSolvers/fluidFlow/CompositionalMultiphaseBaseFields.hpp" @@ -1483,6 +1484,9 @@ void CompositionalMultiphaseBase::applySourceFluxBC( real64 const time, return; } + // production stats for this SourceFluxBoundaryCondition in this subRegion + array1d< real64 > producedMass{ m_numComponents }; + arrayView1d< globalIndex const > const dofNumber = subRegion.getReference< array1d< globalIndex > >( dofKey ); arrayView1d< integer const > const ghostRank = subRegion.ghostRank(); @@ -1528,7 +1532,8 @@ void CompositionalMultiphaseBase::applySourceFluxBC( real64 const time, useTotalMassEquation, dofNumber, rhsContributionArrayView, - localRhs] GEOS_HOST_DEVICE ( localIndex const a ) + localRhs, + &producedMass] GEOS_HOST_DEVICE ( localIndex const a ) { // we need to filter out ghosts here, because targetSet may contain them localIndex const ei = targetSet[a]; @@ -1537,27 +1542,33 @@ void CompositionalMultiphaseBase::applySourceFluxBC( real64 const time, return; } + real64 const rhsValue = rhsContributionArrayView[a] / sizeScalingFactor; // scale the contribution by the sizeScalingFactor here! + producedMass[fluidComponentId] += rhsValue; if( useTotalMassEquation > 0 ) { // for all "fluid components", we add the value to the total mass balance equation globalIndex const totalMassBalanceRow = dofNumber[ei] - rankOffset; - localRhs[totalMassBalanceRow] += rhsContributionArrayView[a] / sizeScalingFactor; // scale the contribution by the - // sizeScalingFactor - // here + localRhs[totalMassBalanceRow] += rhsValue; if( fluidComponentId < numFluidComponents - 1 ) { globalIndex const compMassBalanceRow = totalMassBalanceRow + fluidComponentId + 1; // component mass bal equations are shifted - localRhs[compMassBalanceRow] += rhsContributionArrayView[a] / sizeScalingFactor; // scale the contribution by the - // sizeScalingFactor here + localRhs[compMassBalanceRow] += rhsValue; } } else { globalIndex const compMassBalanceRow = dofNumber[ei] - rankOffset + fluidComponentId; - localRhs[compMassBalanceRow] += rhsContributionArrayView[a] / sizeScalingFactor; // scale the contribution by the - // sizeScalingFactor here + localRhs[compMassBalanceRow] += rhsValue; } } ); + + SourceFluxStatsAggregator::forAllFluxStatWrappers( subRegion, fs.getName(), + [&]( SourceFluxStatsAggregator::WrappedStats & wrapper ) + { + // set the new sub-region statistics for this timestep + wrapper.gatherTimeStepStats( dt, producedMass, targetSet.size(), + m_nonlinearSolverParameters.m_numNewtonIterations != 0 ); + } ); } ); } ); } diff --git a/src/coreComponents/physicsSolvers/fluidFlow/SinglePhaseBase.cpp b/src/coreComponents/physicsSolvers/fluidFlow/SinglePhaseBase.cpp index cc7d49353da..b050a355642 100644 --- a/src/coreComponents/physicsSolvers/fluidFlow/SinglePhaseBase.cpp +++ b/src/coreComponents/physicsSolvers/fluidFlow/SinglePhaseBase.cpp @@ -1129,7 +1129,6 @@ void SinglePhaseBase::applySourceFluxBC( real64 const time_n, // set the new sub-region statistics for this timestep wrapper.gatherTimeStepStats( dt, producedMass, targetSet.size(), m_nonlinearSolverParameters.m_numNewtonIterations != 0 ); - // GEOS_LOG(wrapper.getParent().getPath()<<"->"<inputs.sourceFluxName ) { - checkTimestepFluxStats( fluxStats, - m_testSet->sourceRates, - m_testSet->sourceMassProd, - m_testSet->inputs.sourceElementsCount ); + checkFluxStats( m_testSet->sourceMassProd[m_timestepId], + m_testSet->sourceRates[m_timestepId], + m_testSet->inputs.sourceElementsCount, + fluxStats, GEOS_FMT( "time = {}", time_n ) ); } else if( fluxStats.getFluxName() == m_testSet->inputs.sinkFluxName ) { - checkTimestepFluxStats( fluxStats, - m_testSet->sinkRates, - m_testSet->sinkMassProd, - m_testSet->inputs.sinkElementsCount ); + checkFluxStats( m_testSet->sinkMassProd[m_timestepId], + m_testSet->sinkRates[m_timestepId], + m_testSet->inputs.sinkElementsCount, + fluxStats, GEOS_FMT( "time = {}", time_n ) ); } else { @@ -173,17 +223,6 @@ class TimeStepChecker : public TaskBase private: TestSet const * m_testSet = nullptr; int m_timestepId = 0; - - - void checkTimestepFluxStats( SourceFluxStatsAggregator::WrappedStats const & stats, - std::vector< real64 > const & expectedRates, - std::vector< real64 > const & expectedMasses, - integer const expectedElementCount ) - { - EXPECT_DOUBLE_EQ( stats.stats().m_producedMass, expectedMasses[m_timestepId] ) << GEOS_FMT( "The flux named '{}' did not produce the expected mass.", stats.getFluxName() ); - EXPECT_DOUBLE_EQ( stats.stats().m_productionRate, expectedRates[m_timestepId] ) << GEOS_FMT( "The flux named '{}' did not produce at the expected rate.", stats.getFluxName() ); - EXPECT_DOUBLE_EQ( stats.stats().m_elementCount, expectedElementCount ) << GEOS_FMT( "The flux named '{}' did not produce in the expected elements.", stats.getFluxName() ); - } }; REGISTER_CATALOG_ENTRY( TaskBase, TimeStepChecker, string const &, Group * const ) @@ -382,7 +421,7 @@ TestSet getTestSet() testInputs.sinkElementsCount = 4; // FluxRate table from 0.0s to 5000.0s - testInputs.fluxRates = { 0.000, 0.000, 0.767, 0.894, 0.561, 0.234, 0.194, 0.178, 0.162, 0.059, 0.000 }; + testInputs.setFluxRates( { { 0.000 }, { 0.000 }, { 0.767 }, { 0.894 }, { 0.561 }, { 0.234 }, { 0.194 }, { 0.178 }, { 0.162 }, { 0.059 }, { 0.000 } } ); // sink is 4x source production testInputs.sourceRateFactor = -1.0; @@ -419,15 +458,17 @@ TEST_F( FluidStatisticsTest, checkSinglePhaseFluxStatistics ) { if( fluxStats.getFluxName() == testSet.inputs.sourceFluxName ) { - EXPECT_DOUBLE_EQ( fluxStats.stats().m_producedMass, testSet.totalSourceMassProd ) << "The source flux did not inject the expected total mass."; - EXPECT_DOUBLE_EQ( fluxStats.stats().m_productionRate, testSet.sourceMeanRate ) << "The source flux did not inject at the expected mean rate."; - EXPECT_DOUBLE_EQ( fluxStats.stats().m_elementCount, testSet.inputs.sourceElementsCount ) << "The source flux did not target the expected elements."; + checkFluxStats( testSet.totalSourceMassProd, + testSet.sourceMeanRate, + testSet.inputs.sourceElementsCount, + fluxStats, "whole simulation" ); } else if( fluxStats.getFluxName() == testSet.inputs.sinkFluxName ) { - EXPECT_DOUBLE_EQ( fluxStats.stats().m_producedMass, testSet.totalSinkMassProd ) << "The sink flux did not produce the expected total mass."; - EXPECT_DOUBLE_EQ( fluxStats.stats().m_productionRate, testSet.sinkMeanRate ) << "The sink flux did not produce at the expected mean rate."; - EXPECT_DOUBLE_EQ( fluxStats.stats().m_elementCount, testSet.inputs.sinkElementsCount ) << "The sink flux did not target the expected elements."; + checkFluxStats( testSet.totalSinkMassProd, + testSet.sinkMeanRate, + testSet.inputs.sinkElementsCount, + fluxStats, "whole simulation" ); } else { @@ -435,8 +476,11 @@ TEST_F( FluidStatisticsTest, checkSinglePhaseFluxStatistics ) } } ); - EXPECT_DOUBLE_EQ( meshLevelStats.stats().m_producedMass, testSet.totalMassProd ) << "The fluxes did not produce the expected total mass."; - EXPECT_DOUBLE_EQ( meshLevelStats.stats().m_productionRate, testSet.totalMeanRate ) << "The fluxes did not produce at the expected rate."; + for( int ip = 0; ip < meshLevelStats.stats().getPhaseCount(); ++ip ) + { + EXPECT_DOUBLE_EQ( meshLevelStats.stats().m_producedMass[ip], testSet.totalMassProd[ip] ) << "The fluxes did not produce the expected total mass."; + EXPECT_DOUBLE_EQ( meshLevelStats.stats().m_productionRate[ip], testSet.totalMeanRate[ip] ) << "The fluxes did not produce at the expected rate."; + } } ); } @@ -587,11 +631,18 @@ TestSet getTestSet() + Date: Thu, 8 Feb 2024 10:03:24 +0100 Subject: [PATCH 33/98] changed singlephase parameters so that they are not multiple among themselves --- .../unitTests/fluidFlowTests/testFluidStatistics.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/coreComponents/unitTests/fluidFlowTests/testFluidStatistics.cpp b/src/coreComponents/unitTests/fluidFlowTests/testFluidStatistics.cpp index 3128d2e5b92..3cb4f63bb9c 100644 --- a/src/coreComponents/unitTests/fluidFlowTests/testFluidStatistics.cpp +++ b/src/coreComponents/unitTests/fluidFlowTests/testFluidStatistics.cpp @@ -338,11 +338,11 @@ TestSet getTestSet() scale="-1" functionName="FluxRate" setNames="{ sourceBox }" /> - + @@ -360,7 +360,7 @@ TestSet getTestSet() xMax="{ 2.01, 1.01, 1.01 }" /> @@ -418,14 +418,14 @@ TestSet getTestSet() testInputs.sinkFluxName = "sinkFlux"; testInputs.dt = 500.0; testInputs.sourceElementsCount = 2; - testInputs.sinkElementsCount = 4; + testInputs.sinkElementsCount = 5; // FluxRate table from 0.0s to 5000.0s testInputs.setFluxRates( { { 0.000 }, { 0.000 }, { 0.767 }, { 0.894 }, { 0.561 }, { 0.234 }, { 0.194 }, { 0.178 }, { 0.162 }, { 0.059 }, { 0.000 } } ); - // sink is 4x source production + // sink is 3x source production testInputs.sourceRateFactor = -1.0; - testInputs.sinkRateFactor = 4.0; + testInputs.sinkRateFactor = 3.0; return TestSet( testInputs ); } From c2c74f02dfd82ae10cd2ab09892314e63c2ac217 Mon Sep 17 00:00:00 2001 From: MelReyCG Date: Thu, 8 Feb 2024 10:38:38 +0100 Subject: [PATCH 34/98] forgot to replace some hard coded values --- .../fluidFlowTests/testFluidStatistics.cpp | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/coreComponents/unitTests/fluidFlowTests/testFluidStatistics.cpp b/src/coreComponents/unitTests/fluidFlowTests/testFluidStatistics.cpp index 3cb4f63bb9c..13caedb8465 100644 --- a/src/coreComponents/unitTests/fluidFlowTests/testFluidStatistics.cpp +++ b/src/coreComponents/unitTests/fluidFlowTests/testFluidStatistics.cpp @@ -119,16 +119,16 @@ struct TestSet for( integer timestepId = 0; timestepId < inputs.fluxRates.size(); ++timestepId ) { // mass production / injection calculation - sourceRates[timestepId][ip] = inputs.fluxRates[timestepId][ip] * -1.0; - sourceMassProd[timestepId][ip] = inputs.fluxRates[timestepId][ip] * inputs.dt * -1.0; + sourceRates[timestepId][ip] = inputs.fluxRates[timestepId][ip] * inputs.sourceRateFactor; + sourceMassProd[timestepId][ip] = inputs.fluxRates[timestepId][ip] * inputs.dt * inputs.sourceRateFactor; totalSourceMassProd[ip] += sourceMassProd[timestepId][ip]; - sinkRates[timestepId][ip] = inputs.fluxRates[timestepId][ip] * 4.0; - sinkMassProd[timestepId][ip] = inputs.fluxRates[timestepId][ip] * inputs.dt * 4.0; + sinkRates[timestepId][ip] = inputs.fluxRates[timestepId][ip] * inputs.sinkRateFactor; + sinkMassProd[timestepId][ip] = inputs.fluxRates[timestepId][ip] * inputs.dt * inputs.sinkRateFactor; massDeltas[timestepId][ip] = -( sourceMassProd[timestepId][ip] + sinkMassProd[timestepId][ip] ); totalSinkMassProd[ip] += sinkMassProd[timestepId][ip]; // rates accumulations - sourceMeanRate[ip] += inputs.fluxRates[timestepId][ip] * -1.0; - sinkMeanRate[ip] += inputs.fluxRates[timestepId][ip] * 4.0; + sourceMeanRate[ip] += inputs.fluxRates[timestepId][ip] * inputs.sourceRateFactor; + sinkMeanRate[ip] += inputs.fluxRates[timestepId][ip] * inputs.sinkRateFactor; } // mean rates calculation real64 const ratesMeanDivisor = 1.0 / double( timestepCount - 1 ); @@ -338,11 +338,11 @@ TestSet getTestSet() scale="-1" functionName="FluxRate" setNames="{ sourceBox }" /> - + @@ -360,7 +360,7 @@ TestSet getTestSet() xMax="{ 2.01, 1.01, 1.01 }" /> @@ -418,14 +418,14 @@ TestSet getTestSet() testInputs.sinkFluxName = "sinkFlux"; testInputs.dt = 500.0; testInputs.sourceElementsCount = 2; - testInputs.sinkElementsCount = 5; + testInputs.sinkElementsCount = 4; // FluxRate table from 0.0s to 5000.0s testInputs.setFluxRates( { { 0.000 }, { 0.000 }, { 0.767 }, { 0.894 }, { 0.561 }, { 0.234 }, { 0.194 }, { 0.178 }, { 0.162 }, { 0.059 }, { 0.000 } } ); - // sink is 3x source production + // sink is 4x source production testInputs.sourceRateFactor = -1.0; - testInputs.sinkRateFactor = 3.0; + testInputs.sinkRateFactor = 4.0; return TestSet( testInputs ); } From 0a0fb7b15337771d0a26f4858a8d5e3bc97ced99 Mon Sep 17 00:00:00 2001 From: MelReyCG Date: Thu, 8 Feb 2024 10:59:28 +0100 Subject: [PATCH 35/98] Whole multiphase sim stat check --- .../fluidFlowTests/testFluidStatistics.cpp | 253 ++++++++++++------ 1 file changed, 166 insertions(+), 87 deletions(-) diff --git a/src/coreComponents/unitTests/fluidFlowTests/testFluidStatistics.cpp b/src/coreComponents/unitTests/fluidFlowTests/testFluidStatistics.cpp index 13caedb8465..e965283c7ee 100644 --- a/src/coreComponents/unitTests/fluidFlowTests/testFluidStatistics.cpp +++ b/src/coreComponents/unitTests/fluidFlowTests/testFluidStatistics.cpp @@ -40,6 +40,9 @@ struct TestInputs string sourceFluxName; string sinkFluxName; + string timeStepCheckerPath; + string timeStepFluxStatsPath; + string wholeSimFluxStatsPath; // rates for each timesteps, for each phases array2d< real64 > fluxRates; @@ -93,7 +96,7 @@ struct TestSet array1d< real64 > totalMeanRate; /** - * @brief Compute the expected statistics set + * @brief Compute the expected statistics set for the tested simulation. * @param inputParams the test simulation input parameters */ TestSet( TestInputs const & inputParams ): @@ -142,6 +145,14 @@ struct TestSet }; +/** + * @brief Verification that the source flux statistics are correct for the current timestep + * @param expectedMasses the expected mass values per phase + * @param expectedRates the expected rate values per phase + * @param expectedElementCount the number of expected targeted elements + * @param stats the timestep stats + * @param context a context string to provide in any error message. + */ void checkFluxStats( arraySlice1d< real64 > const & expectedMasses, arraySlice1d< real64 > const & expectedRates, integer const expectedElementCount, @@ -150,18 +161,63 @@ void checkFluxStats( arraySlice1d< real64 > const & expectedMasses, { for( int ip = 0; ip < stats.stats().getPhaseCount(); ++ip ) { - EXPECT_DOUBLE_EQ( stats.stats().m_producedMass[ip], expectedMasses[ip] ) - << "The flux named '" << stats.getFluxName() << "' did not produce the expected mass (" << context << ")."; - EXPECT_DOUBLE_EQ( stats.stats().m_productionRate[ip], expectedRates[ip] ) - << "The flux named '" << stats.getFluxName() << "' did not produce at the expected rate (" << context << ")."; + EXPECT_DOUBLE_EQ( stats.stats().m_producedMass[ip], expectedMasses[ip] ) << GEOS_FMT( "The flux named '{}' did not produce the expected mass ({}, phase = {}).", + stats.getFluxName(), context, ip ); + EXPECT_DOUBLE_EQ( stats.stats().m_productionRate[ip], expectedRates[ip] ) << GEOS_FMT( "The flux named '{}' did not produce at the expected rate ({}, phase = {}).", + stats.getFluxName(), context, ip ); } - EXPECT_DOUBLE_EQ( stats.stats().m_elementCount, expectedElementCount ) - << "The flux named '" << stats.getFluxName() << "' did not produce in the expected elements (" << context << ")."; + EXPECT_DOUBLE_EQ( stats.stats().m_elementCount, expectedElementCount ) << GEOS_FMT( "The flux named '{}' did not produce in the expected elements ({}).", + stats.getFluxName(), context ); +} + +/** + * @brief Verification that the source flux statistics are correct over the whole simulation + * @param problem the simulation ProblemManager + * @param testSet the simulation TestSet + */ +void checkWholeSimFluxStatistics( ProblemManager & problem, TestSet const & testSet ) +{ + DomainPartition & domain = problem.getDomainPartition(); + SourceFluxStatsAggregator & wholeSimStats = problem.getGroupByPath< SourceFluxStatsAggregator >( testSet.inputs.wholeSimFluxStatsPath ); + wholeSimStats.forMeshLevelStatsWrapper( domain, + [&] ( MeshLevel & meshLevel, + SourceFluxStatsAggregator::WrappedStats & meshLevelStats ) + { + wholeSimStats.forAllFluxStatsWrappers( meshLevel, + [&] ( MeshLevel &, + SourceFluxStatsAggregator::WrappedStats & fluxStats ) + { + if( fluxStats.getFluxName() == testSet.inputs.sourceFluxName ) + { + checkFluxStats( testSet.totalSourceMassProd, + testSet.sourceMeanRate, + testSet.inputs.sourceElementsCount, + fluxStats, "over whole simulation" ); + } + else if( fluxStats.getFluxName() == testSet.inputs.sinkFluxName ) + { + checkFluxStats( testSet.totalSinkMassProd, + testSet.sinkMeanRate, + testSet.inputs.sinkElementsCount, + fluxStats, "over whole simulation" ); + } + else + { + FAIL() << "Unexpected SourceFlux found!"; + } + } ); + + for( int ip = 0; ip < meshLevelStats.stats().getPhaseCount(); ++ip ) + { + EXPECT_DOUBLE_EQ( meshLevelStats.stats().m_producedMass[ip], testSet.totalMassProd[ip] ) << "The fluxes did not produce the expected total mass (over whole simulation, phase = " << ip << ")."; + EXPECT_DOUBLE_EQ( meshLevelStats.stats().m_productionRate[ip], testSet.totalMeanRate[ip] ) << "The fluxes did not produce at the expected rate (over whole simulation, phase = " << ip << ")."; + } + } ); } /** - * @brief This Task allows to extract and check each timestep stats. + * @brief This Task allows to extract and check each timestep stats during the simulation. */ class TimeStepChecker : public TaskBase { @@ -186,7 +242,7 @@ class TimeStepChecker : public TaskBase DomainPartition & domain ) { EXPECT_LT( m_timestepId, m_testSet->timestepCount ) << "The tested time-step count were higher than expected."; - SourceFluxStatsAggregator & timestepStats = getGroupByPath< SourceFluxStatsAggregator >( "/Tasks/timestepStats" ); + SourceFluxStatsAggregator & timestepStats = getGroupByPath< SourceFluxStatsAggregator >( m_testSet->inputs.timeStepFluxStatsPath ); timestepStats.forMeshLevelStatsWrapper( domain, [&] ( MeshLevel & meshLevel, SourceFluxStatsAggregator::WrappedStats & ) @@ -200,14 +256,14 @@ class TimeStepChecker : public TaskBase checkFluxStats( m_testSet->sourceMassProd[m_timestepId], m_testSet->sourceRates[m_timestepId], m_testSet->inputs.sourceElementsCount, - fluxStats, GEOS_FMT( "time = {}", time_n ) ); + fluxStats, GEOS_FMT( "for timestep at t = {} s", time_n ) ); } else if( fluxStats.getFluxName() == m_testSet->inputs.sinkFluxName ) { checkFluxStats( m_testSet->sinkMassProd[m_timestepId], m_testSet->sinkRates[m_timestepId], m_testSet->inputs.sinkElementsCount, - fluxStats, GEOS_FMT( "time = {}", time_n ) ); + fluxStats, GEOS_FMT( "for timestep at t = {} s", time_n ) ); } else { @@ -338,11 +394,11 @@ TestSet getTestSet() scale="-1" functionName="FluxRate" setNames="{ sourceBox }" /> - + @@ -360,7 +416,7 @@ TestSet getTestSet() xMax="{ 2.01, 1.01, 1.01 }" /> @@ -374,7 +430,7 @@ TestSet getTestSet() targetExactTimestep="1" targetExactStartStop="1" beginTime="0" - target="/Tasks/timestepStats" /> + target="/Tasks/timeStepFluxStats" /> + target="/Tasks/wholeSimFluxStats" /> - - @@ -416,72 +472,56 @@ TestSet getTestSet() testInputs.sourceFluxName = "sourceFlux"; testInputs.sinkFluxName = "sinkFlux"; + testInputs.timeStepCheckerPath = "/Tasks/timeStepChecker"; + testInputs.timeStepFluxStatsPath = "/Tasks/timeStepFluxStats"; + testInputs.wholeSimFluxStatsPath = "/Tasks/wholeSimFluxStats"; + testInputs.dt = 500.0; testInputs.sourceElementsCount = 2; - testInputs.sinkElementsCount = 4; + testInputs.sinkElementsCount = 5; // FluxRate table from 0.0s to 5000.0s - testInputs.setFluxRates( { { 0.000 }, { 0.000 }, { 0.767 }, { 0.894 }, { 0.561 }, { 0.234 }, { 0.194 }, { 0.178 }, { 0.162 }, { 0.059 }, { 0.000 } } ); - - // sink is 4x source production + testInputs.setFluxRates( { { 0.000 }, + { 0.000 }, + { 0.767 }, + { 0.894 }, + { 0.561 }, + { 0.234 }, + { 0.194 }, + { 0.178 }, + { 0.162 }, + { 0.059 }, + { 0.000 } } ); + + // sink is 3x source production testInputs.sourceRateFactor = -1.0; - testInputs.sinkRateFactor = 4.0; + testInputs.sinkRateFactor = 3.0; return TestSet( testInputs ); } TEST_F( FluidStatisticsTest, checkSinglePhaseFluxStatistics ) { - static TestSet const testSet = getTestSet(); + TestSet const testSet = getTestSet(); + GeosxState state( std::make_unique< CommandLineOptions >( g_commandLineOptions ) ); ProblemManager & problem = state.getProblemManager(); setupProblemFromXML( problem, testSet.inputs.xmlInput.data() ); - TimeStepChecker & timeStepChecker = problem.getGroupByPath< TimeStepChecker >( "/Tasks/timeStepChecker" ); + TimeStepChecker & timeStepChecker = problem.getGroupByPath< TimeStepChecker >( testSet.inputs.timeStepCheckerPath ); timeStepChecker.setTestSet( testSet ); // run simulation EXPECT_FALSE( problem.runSimulation() ) << "Simulation exited early."; - // verification that the source flux statistics are correct over the whole simulation - DomainPartition & domain = problem.getDomainPartition(); - SourceFluxStatsAggregator & wholeSimStats = problem.getGroupByPath< SourceFluxStatsAggregator >( "/Tasks/wholeSimStats" ); EXPECT_EQ( timeStepChecker.getTestedTimeStepCount(), testSet.timestepCount ) << "The tested time-step were different than expected."; - wholeSimStats.forMeshLevelStatsWrapper( domain, - [&] ( MeshLevel & meshLevel, - SourceFluxStatsAggregator::WrappedStats & meshLevelStats ) - { - wholeSimStats.forAllFluxStatsWrappers( meshLevel, - [&] ( MeshLevel &, - SourceFluxStatsAggregator::WrappedStats & fluxStats ) - { - if( fluxStats.getFluxName() == testSet.inputs.sourceFluxName ) - { - checkFluxStats( testSet.totalSourceMassProd, - testSet.sourceMeanRate, - testSet.inputs.sourceElementsCount, - fluxStats, "whole simulation" ); - } - else if( fluxStats.getFluxName() == testSet.inputs.sinkFluxName ) - { - checkFluxStats( testSet.totalSinkMassProd, - testSet.sinkMeanRate, - testSet.inputs.sinkElementsCount, - fluxStats, "whole simulation" ); - } - else - { - FAIL() << "Unexpected SourceFlux found!"; - } - } ); - for( int ip = 0; ip < meshLevelStats.stats().getPhaseCount(); ++ip ) - { - EXPECT_DOUBLE_EQ( meshLevelStats.stats().m_producedMass[ip], testSet.totalMassProd[ip] ) << "The fluxes did not produce the expected total mass."; - EXPECT_DOUBLE_EQ( meshLevelStats.stats().m_productionRate[ip], testSet.totalMeanRate[ip] ) << "The fluxes did not produce at the expected rate."; - } - } ); + checkWholeSimFluxStatistics( problem, testSet ); + + GEOS_LOG("c'est toi ? " << __FILE__ << ":" << __LINE__ ); + geos::basicCleanup(); + GEOS_LOG("non..."); } @@ -563,18 +603,18 @@ TestSet getTestSet() - + - + @@ -593,10 +633,10 @@ TestSet getTestSet() + xMax="{ 1.01, 1.01, 1.01 }" /> @@ -610,39 +650,50 @@ TestSet getTestSet() targetExactTimestep="1" targetExactStartStop="1" beginTime="0" - target="/Tasks/timestepStats" /> + target="/Tasks/timeStepFluxStats" /> + + target="/Tasks/wholeSimFluxStats" /> - - + + flowSolverName="testSolver" + logLevel="1" /> + + - + + ( g_commandLineOptions ) ); + GEOS_LOG("non..."); ProblemManager & problem = state.getProblemManager(); + GEOS_LOG("c'est toi ? " << __FILE__ << ":" << __LINE__ ); setupProblemFromXML( problem, testSet.inputs.xmlInput.data() ); + GEOS_LOG("non..."); //!\\ TODO : récupération du timestepChecker (à ajouter dans le xml) // run simulation + GEOS_LOG("c'est toi ? " << __FILE__ << ":" << __LINE__ ); EXPECT_FALSE( problem.runSimulation() ) << "Simulation exited early."; + GEOS_LOG("non..."); + + // EXPECT_EQ( timeStepChecker.getTestedTimeStepCount(), testSet.timestepCount ) << "The tested time-step were different than expected."; - // verification that the source flux statistics are correct over the whole simulation - //!\\ TODO + checkWholeSimFluxStatistics( problem, testSet ); + GEOS_LOG("c'est toi ? " << __FILE__ << ":" << __LINE__ ); + geos::basicCleanup(); + GEOS_LOG("non..."); } @@ -723,6 +803,5 @@ int main( int argc, char * * argv ) ::testing::InitGoogleTest( &argc, argv ); g_commandLineOptions = *geos::basicSetup( argc, argv ); int const result = RUN_ALL_TESTS(); - geos::basicCleanup(); return result; } From e2ac4465356fa6c2d8f4d640a17fed02202e3c4c Mon Sep 17 00:00:00 2001 From: MelReyCG Date: Thu, 8 Feb 2024 11:06:41 +0100 Subject: [PATCH 36/98] crash investigating... --- .../TOTAL/pangea2-GEOSIntegration.cmake | 86 ++ .../TOTAL/pangea2-intlog-gcc@8.3.0.cmake | 88 ++ host-configs/TOTAL/xrai-gcc@8.2.0.cmake | 123 ++ host-configs/TOTAL/xrai-gcc@8.3.0.cmake | 100 ++ mesh hierarchy | 1161 +++++++++++++++++ 5 files changed, 1558 insertions(+) create mode 100644 host-configs/TOTAL/pangea2-GEOSIntegration.cmake create mode 100644 host-configs/TOTAL/pangea2-intlog-gcc@8.3.0.cmake create mode 100644 host-configs/TOTAL/xrai-gcc@8.2.0.cmake create mode 100644 host-configs/TOTAL/xrai-gcc@8.3.0.cmake create mode 100644 mesh hierarchy diff --git a/host-configs/TOTAL/pangea2-GEOSIntegration.cmake b/host-configs/TOTAL/pangea2-GEOSIntegration.cmake new file mode 100644 index 00000000000..470438d2333 --- /dev/null +++ b/host-configs/TOTAL/pangea2-GEOSIntegration.cmake @@ -0,0 +1,86 @@ +####################################### +# +# Pangea2 / intlog - Intel 19 build +# +# Load modules in this order: +# 1) cmake/3.23.2 +# 2) gcc/8.3.0 +# 3) openmpi/3.1.0 +# 4) python/3.9.13 +# +######################################## + +set( CONFIG_NAME "pangea2-GEOSIntegration" CACHE PATH "" ) + + +####################################### +# Compilers +####################################### + +set( CMAKE_HOME "/data_local/sw/gcc/RHEL7/8.3.0" CACHE PATH "" ) +set( CMAKE_C_COMPILER "${CMAKE_HOME}/bin/gcc" CACHE PATH "" ) +set( CMAKE_CXX_COMPILER "${CMAKE_HOME}/bin/g++" CACHE PATH "" ) +set( CMAKE_Fortran_COMPILER "${CMAKE_HOME}/bin/gfortran" CACHE PATH "" ) + +set( ENABLE_FORTRAN OFF CACHE BOOL "" FORCE ) + +set( ENABLE_MPI ON CACHE BOOL "" FORCE ) +set( MPI_HOME "/data_local/sw/OpenMPI/RHEL7/4.0.3/gcc/8.3.0" CACHE PATH "" ) +set( MPI_C_COMPILER "${MPI_HOME}/bin/mpicc" CACHE PATH "" ) +set( MPI_CXX_COMPILER "${MPI_HOME}/bin/mpicxx" CACHE PATH "" ) +set( MPI_Fortran_COMPILER "${MPI_HOME}/bin/mpifort" CACHE PATH "" ) +set( MPIEXEC "${MPI_HOME}/bin/mpirun" CACHE PATH "" ) +set( MPIEXEC_NUMPROC_FLAG "-n" CACHE PATH "" ) + +set( ENABLE_MKL ON CACHE BOOL "" ) +set( MKL_ROOT /data_local/sw/intel/RHEL7/compilers_and_libraries_2019.3.199/linux/mkl ) +set( MKL_INCLUDE_DIRS ${MKL_ROOT}/include CACHE STRING "" ) +set( MKL_LIBRARIES ${MKL_ROOT}/lib/intel64/libmkl_intel_lp64.so + ${MKL_ROOT}/lib/intel64/libmkl_sequential.so + ${MKL_ROOT}/lib/intel64/libmkl_core.so + CACHE STRING "" ) + +set( GEOSX_BUILD_OBJ_LIBS OFF CACHE BOOL "" FORCE ) +set( GEOSX_BUILD_SHARED_LIBS ON CACHE BOOL "" FORCE ) + +####################################### +# GENERAL TPLs +####################################### +set( GEOSX_TPL_DIR "/workrd/users/j1092630/GEOS_develop/tplInstall_melXmlV4" CACHE PATH "" FORCE ) + +#set( ENABLE_PYGEOSX ON CACHE BOOL "" ) +set( ENABLE_GTEST_DEATH_TESTS ON CACHE BOOL "" FORCE ) +set( ENABLE_VTK ON CACHE BOOL "" FORCE ) +set( ENABLE_PVTPackage ON CACHE BOOL "" FORCE ) +set( ENABLE_MATHPRESSO ON CACHE BOOL "" FORCE ) +set( ENABLE_BENCHMARKS OFF CACHE BOOL "" FORCE ) + +####################################### +# Solvers dependencies +####################################### +set( ENABLE_HYPRE ON CACHE BOOL "" FORCE ) +set( ENABLE_PETSC OFF CACHE BOOL "" FORCE ) + +####################################### +# Docs & schema generation +####################################### +set( ENABLE_XML_UPDATES OFF CACHE BOOL "" FORCE ) +set( ENABLE_DOCS OFF CACHE BOOL "" FORCE ) +set( ENABLE_DOXYGEN OFF CACHE BOOL "" FORCE ) +set( ENABLE_SPHINX OFF CACHE BOOL "" FORCE ) +set( ENABLE_UNCRUSTIFY ON CACHE BOOL "" FORCE ) + +####################################### +# RAJA/CHAI SETUP +####################################### +option( RAJA_ENABLE_TBB "" OFF ) +option( ENABLE_CALIPER "Enables CALIPER" ON ) +set( ENABLE_CUDA "OFF" CACHE PATH "" FORCE ) +set( CHAI_BUILD_TYPE "cpu-no-rm" CACHE PATH "" FORCE ) +set( CHAI_ARGS "" CACHE PATH "" FORCE ) +set( ENABLE_OPENMP "OFF" CACHE PATH "" FORCE ) +set( RAJA_ENABLE_OPENMP "OFF" CACHE PATH "" FORCE ) + + + +include( ${CMAKE_CURRENT_LIST_DIR}/../tpls.cmake ) diff --git a/host-configs/TOTAL/pangea2-intlog-gcc@8.3.0.cmake b/host-configs/TOTAL/pangea2-intlog-gcc@8.3.0.cmake new file mode 100644 index 00000000000..ee5fb4b1509 --- /dev/null +++ b/host-configs/TOTAL/pangea2-intlog-gcc@8.3.0.cmake @@ -0,0 +1,88 @@ +####################################### +# +# Pangea2 / intlog - Intel 19 build +# +# Load modules in this order: +# 1) cmake/3.23.2 +# 2) gcc/8.3.0 +# 3) openmpi/3.1.0 +# 4) python/3.9.13 +# +######################################## + + +set( CONFIG_NAME "pangea2-intlog-gcc@8.3.0" CACHE PATH "" ) + +####################################### +# Compilers +####################################### + +set( CMAKE_HOME "/data_local/sw/gcc/RHEL7/8.3.0" CACHE PATH "" ) +set( CMAKE_C_COMPILER "${CMAKE_HOME}/bin/gcc" CACHE PATH "" ) +set( CMAKE_CXX_COMPILER "${CMAKE_HOME}/bin/g++" CACHE PATH "" ) +set( CMAKE_Fortran_COMPILER "${CMAKE_HOME}/bin/gfortran" CACHE PATH "" ) + +set( ENABLE_FORTRAN OFF CACHE BOOL "" FORCE ) + +set( ENABLE_MPI ON CACHE BOOL "" FORCE ) +set( MPI_HOME "/data_local/sw/OpenMPI/RHEL7/4.0.3/gcc/8.3.0" CACHE PATH "" ) +set( MPI_C_COMPILER "${MPI_HOME}/bin/mpicc" CACHE PATH "" ) +set( MPI_CXX_COMPILER "${MPI_HOME}/bin/mpicxx" CACHE PATH "" ) +set( MPI_Fortran_COMPILER "${MPI_HOME}/bin/mpifort" CACHE PATH "" ) +set( MPIEXEC "${MPI_HOME}/bin/mpirun" CACHE PATH "" ) +set( MPIEXEC_NUMPROC_FLAG "-n" CACHE PATH "" ) + +set( ENABLE_MKL ON CACHE BOOL "" ) +set( MKL_ROOT /data_local/sw/intel/RHEL7/compilers_and_libraries_2019.3.199/linux/mkl ) +set( MKL_INCLUDE_DIRS ${MKL_ROOT}/include CACHE STRING "" ) +set( MKL_LIBRARIES ${MKL_ROOT}/lib/intel64/libmkl_intel_lp64.so + ${MKL_ROOT}/lib/intel64/libmkl_sequential.so + ${MKL_ROOT}/lib/intel64/libmkl_core.so + CACHE STRING "" ) + +set( GEOSX_BUILD_OBJ_LIBS OFF CACHE BOOL "" ) +set( GEOSX_BUILD_SHARED_LIBS ON CACHE BOOL "" FORCE ) + +####################################### +# GENERAL TPLs +####################################### +set( GEOSX_TPL_DIR "/data/pau901/VDG_GSI/MelvinREY/WorkEnv/GEOSX_repos/thirdPartyLibs/install-pangea2-intlog-gcc@8.3.0-release" CACHE PATH "" FORCE ) + +set( ENABLE_PYGEOSX ON CACHE BOOL "" ) +set( ENABLE_GTEST_DEATH_TESTS ON CACHE BOOL "" FORCE ) +set( ENABLE_VTK ON CACHE BOOL "" FORCE ) +set( ENABLE_PVTPackage ON CACHE BOOL "" FORCE ) +set( ENABLE_MATHPRESSO ON CACHE BOOL "" FORCE ) +set( ENABLE_BENCHMARKS OFF CACHE BOOL "" FORCE ) + +####################################### +# Solvers dependencies +####################################### +set( ENABLE_HYPRE ON CACHE BOOL "" FORCE ) +set( ENABLE_PETSC OFF CACHE BOOL "" FORCE ) + +####################################### +# Docs & schema generation +####################################### +set( ENABLE_XML_UPDATES ON CACHE BOOL "" FORCE ) +set( ENABLE_DOCS ON CACHE BOOL "" FORCE ) +set( ENABLE_DOXYGEN OFF CACHE BOOL "" FORCE ) +set( ENABLE_SPHINX ON CACHE BOOL "" FORCE ) +set( ENABLE_UNCRUSTIFY ON CACHE BOOL "" FORCE ) + +####################################### +# RAJA/CHAI SETUP +####################################### +option( RAJA_ENABLE_TBB "" OFF ) +option( ENABLE_CALIPER "Enables CALIPER" ON ) +set( ENABLE_CUDA "OFF" CACHE PATH "" FORCE ) +set( CHAI_BUILD_TYPE "cpu-no-rm" CACHE PATH "" FORCE ) +set( CHAI_ARGS "" CACHE PATH "" FORCE ) +set( ENABLE_OPENMP "OFF" CACHE PATH "" FORCE ) +set( RAJA_ENABLE_OPENMP "OFF" CACHE PATH "" FORCE ) + + + + + +include( ${CMAKE_CURRENT_LIST_DIR}/../tpls.cmake ) diff --git a/host-configs/TOTAL/xrai-gcc@8.2.0.cmake b/host-configs/TOTAL/xrai-gcc@8.2.0.cmake new file mode 100644 index 00000000000..a3f513998f6 --- /dev/null +++ b/host-configs/TOTAL/xrai-gcc@8.2.0.cmake @@ -0,0 +1,123 @@ +site_name(HOST_NAME) + + +set(CMAKE_C_COMPILER "$ENV{CC}" CACHE PATH "" FORCE) +set(CMAKE_CXX_COMPILER "$ENV{CXX}" CACHE PATH "" FORCE) +set(ENABLE_FORTRAN OFF CACHE BOOL "" FORCE) + +set(ENABLE_MPI ON CACHE PATH "" FORCE) +set(MPI_C_COMPILER "$ENV{MPI_ROOT}/bin/mpicc" CACHE PATH "" FORCE) +set(MPI_CXX_COMPILER "$ENV{MPI_ROOT}/bin/mpic++" CACHE PATH "" FORCE) +set(MPI_Fortran_COMPILER "$ENV{MPI_ROOT}/bin/mpifort" CACHE PATH "" FORCE) +set(MPIEXEC_EXECUTABLE "$ENV{MPIEXEC}" CACHE PATH "" FORCE) + +set(ENABLE_GTEST_DEATH_TESTS ON CACHE BOOL "" FORCE) +set(ENABLE_CALIPER ON CACHE BOOL "") + +set(ENABLE_HYPRE ON CACHE BOOL "" FORCE) + +# If not defined as argument, take from the environment... +if(NOT DEFINED ENABLE_HYPRE) + set(ENABLE_HYPRE "$ENV{ENABLE_HYPRE}" CACHE BOOL "" FORCE) +endif() +# ... and then check the value. +if(ENABLE_HYPRE) + set(GEOSX_LA_INTERFACE "Hypre" CACHE STRING "" FORCE) +else() + set(ENABLE_HYPRE OFF CACHE BOOL "" FORCE) +endif() + +# Same pattern +if(NOT DEFINED ENABLE_TRILINOS) + set(ENABLE_TRILINOS "$ENV{ENABLE_TRILINOS}" CACHE BOOL "" FORCE) +endif() +if(ENABLE_TRILINOS) + set(GEOSX_LA_INTERFACE "Trilinos" CACHE STRING "" FORCE) +else() + set(ENABLE_TRILINOS FALSE CACHE BOOL "" FORCE) +endif() + +if( (ENABLE_HYPRE AND ENABLE_TRILINOS) OR (NOT ENABLE_TRILINOS AND NOT ENABLE_HYPRE)) + MESSAGE(SEND_ERROR "Exactly one of ENABLE_HYPRE and ENABLE_TRILINOS must be defined.") + MESSAGE(SEND_ERROR "ENABLE_HYPRE = ${ENABLE_HYPRE}.") + MESSAGE(SEND_ERROR "ENABLE_TRILINOS = ${ENABLE_TRILINOS}.") +endif() + +MESSAGE(STATUS "GEOSX_LA_INTERFACE = ${GEOSX_LA_INTERFACE}") + +set(ENABLE_CUDA "$ENV{ENABLE_CUDA}" CACHE BOOL "" FORCE) +if(ENABLE_CUDA) + + set(CMAKE_CUDA_FLAGS "$ENV{CMAKE_CUDA_FLAGS}" CACHE STRING "" FORCE) + if(NOT CMAKE_CUDA_FLAGS) + set(CMAKE_CUDA_FLAGS "Unused" CACHE STRING "" FORCE) + endif() + + set(CUDA_TOOLKIT_ROOT_DIR "$ENV{CUDA_TOOLKIT_ROOT_DIR}" CACHE PATH "" FORCE) + if(NOT CUDA_TOOLKIT_ROOT_DIR) + set(CUDA_TOOLKIT_ROOT_DIR "/usr/local/cuda" CACHE PATH "" FORCE) + endif() + + set(CUDA_ARCH "$ENV{CUDA_ARCH}" CACHE STRING "" FORCE) + if(NOT CUDA_ARCH) + set(CUDA_ARCH "sm_70" CACHE STRING "" FORCE) + endif() + + if(ENABLE_HYPRE) + set(ENABLE_HYPRE_CUDA ON CACHE BOOL "" FORCE) + endif() + + set(CMAKE_CUDA_FLAGS_RELEASE "-O3 -DNDEBUG -Xcompiler -DNDEBUG -Xcompiler -O3" CACHE STRING "") + set(CMAKE_CUDA_FLAGS_RELWITHDEBINFO "-g -lineinfo ${CMAKE_CUDA_FLAGS_RELEASE}" CACHE STRING "") + set(CMAKE_CUDA_FLAGS_DEBUG "-g -G -O0 -Xcompiler -O0" CACHE STRING "") + +endif() + + +set(ENABLE_PETSC OFF CACHE BOOL "" FORCE) +set(ENABLE_FESAPI OFF CACHE BOOL "" FORCE) + +####################################### +# Docs & schema generation +####################################### +set( ENABLE_XML_UPDATES ON CACHE BOOL "" FORCE ) +set( ENABLE_DOCS ON CACHE BOOL "" FORCE ) +set( ENABLE_DOXYGEN OFF CACHE BOOL "" FORCE ) +set( ENABLE_SPHINX ON CACHE BOOL "" FORCE ) +set( ENABLE_UNCRUSTIFY ON CACHE BOOL "" FORCE ) + + +set(ENABLE_MKL OFF CACHE BOOL "" FORCE) +#set( ENABLE_MKL ON CACHE BOOL "" ) +#set( MKL_ROOT /data_local/sw/intel/RHEL7/compilers_and_libraries_2019.3.199/linux/mkl ) +#set( MKL_INCLUDE_DIRS ${MKL_ROOT}/include CACHE STRING "" ) +#set( MKL_LIBRARIES ${MKL_ROOT}/lib/intel64/libmkl_intel_lp64.so +# ${MKL_ROOT}/lib/intel64/libmkl_sequential.so +# ${MKL_ROOT}/lib/intel64/libmkl_core.so +# CACHE STRING "" ) + + +set(GEOSX_TPL_DIR "${CMAKE_CURRENT_LIST_DIR}/../../../thirdPartyLibs/install-xrai-gcc\@8.2.0-release" CACHE PATH "" FORCE) +if(EXISTS ${GEOSX_TPL_DIR}) + set(GEOSX_TPL_DIR_EXISTS "YES") +endif() + +include(${CMAKE_CURRENT_LIST_DIR}/../tpls.cmake) + + + + +MESSAGE(STATUS "Host config verifications : ") +MESSAGE(STATUS " ENABLE_PETSC = ${ENABLE_PETSC}") +MESSAGE(STATUS " ENABLE_FESAPI = ${ENABLE_FESAPI}") +MESSAGE(STATUS " ENABLE_MKL = ${ENABLE_MKL}") +MESSAGE(STATUS " ENABLE_DOXYGEN = ${ENABLE_DOXYGEN}") +MESSAGE(STATUS " ENABLE_SPHINX = ${ENABLE_SPHINX}") +MESSAGE(STATUS " ENABLE_UNCRUSTIFY =${ENABLE_UNCRUSTIFY}") +MESSAGE(STATUS " TPL_DIR = '${GEOSX_TPL_DIR}'") +MESSAGE(STATUS " TPL_DIR_EXISTS ='${GEOSX_TPL_DIR_EXISTS}'") +MESSAGE(STATUS " HDF5_DIR = '${HDF5_DIR}'") +MESSAGE(STATUS " CONDUIT_DIR = '${CONDUIT_DIR}'") +MESSAGE(STATUS " MPICXXCompiler ='${MPI_CXX_COMPILER}'") +MESSAGE(STATUS " MPIEXECUTABLE = '${MPIEXEC_EXECUTABLE}'") + diff --git a/host-configs/TOTAL/xrai-gcc@8.3.0.cmake b/host-configs/TOTAL/xrai-gcc@8.3.0.cmake new file mode 100644 index 00000000000..9a08bec95ed --- /dev/null +++ b/host-configs/TOTAL/xrai-gcc@8.3.0.cmake @@ -0,0 +1,100 @@ +####################################### +# +# XRAI - ????? build +# +# Load modules in this order: +# +######################################## + + +set( CONFIG_NAME "pangea2-gcc@8.3.0" CACHE PATH "" ) + +####################################### +# Compilers +####################################### + +set( CMAKE_HOME "/appli_res/RESERVOIR/TPP-COREMATCH/gcc/8.3.0" CACHE PATH "" ) +set( CMAKE_C_COMPILER "${CMAKE_HOME}/bin/gcc" CACHE PATH "" ) +set( CMAKE_CXX_COMPILER "${CMAKE_HOME}/bin/g++" CACHE PATH "" ) +set( CMAKE_Fortran_COMPILER "${CMAKE_HOME}/bin/gfortran" CACHE PATH "" ) + +set( ENABLE_FORTRAN OFF CACHE BOOL "" FORCE ) + +set( ENABLE_MPI ON CACHE BOOL "" FORCE ) +set( MPI_HOME "/data/appli_PITSI/MAJIX2018/soft/mpi/install/openmpi-1.10.7" CACHE PATH "" ) +set( MPI_C_COMPILER "${MPI_HOME}/bin/mpicc" CACHE PATH "" ) +set( MPI_CXX_COMPILER "${MPI_HOME}/bin/mpicxx" CACHE PATH "" ) +set( MPI_Fortran_COMPILER "${MPI_HOME}/bin/mpifort" CACHE PATH "" ) +set( MPIEXEC "${MPI_HOME}/bin/mpirun" CACHE PATH "" ) +set( MPIEXEC_NUMPROC_FLAG "-n" CACHE PATH "" ) + +set(ENABLE_MKL OFF CACHE BOOL "" FORCE) +#set( ENABLE_MKL ON CACHE BOOL "" ) +#set( MKL_ROOT /data_local/sw/intel/RHEL7/compilers_and_libraries_2019.3.199/linux/mkl ) +#set( MKL_INCLUDE_DIRS ${MKL_ROOT}/include CACHE STRING "" ) +#set( MKL_LIBRARIES ${MKL_ROOT}/lib/intel64/libmkl_intel_lp64.so +# ${MKL_ROOT}/lib/intel64/libmkl_sequential.so +# ${MKL_ROOT}/lib/intel64/libmkl_core.so +# CACHE STRING "" ) + +set( GEOSX_BUILD_OBJ_LIBS OFF CACHE BOOL "" ) +set( GEOSX_BUILD_SHARED_LIBS ON CACHE BOOL "" FORCE ) + +####################################### +# GENERAL TPLs +####################################### +set( GEOSX_TPL_DIR "/data/pau901/VDG_GSI/MelvinREY/WorkEnv/GEOSX_repos/thirdPartyLibs/install-xrai-gcc@8.3.0-release" CACHE PATH "" FORCE ) + +set( ENABLE_PYGEOSX ON CACHE BOOL "" ) +set( ENABLE_GTEST_DEATH_TESTS ON CACHE BOOL "" FORCE ) +set( ENABLE_VTK ON CACHE BOOL "" FORCE ) +set( ENABLE_PVTPackage ON CACHE BOOL "" FORCE ) +set( ENABLE_MATHPRESSO ON CACHE BOOL "" FORCE ) +set( ENABLE_BENCHMARKS OFF CACHE BOOL "" FORCE ) + +####################################### +# Solvers dependencies +####################################### +set( ENABLE_HYPRE ON CACHE BOOL "" FORCE ) +set( ENABLE_PETSC OFF CACHE BOOL "" FORCE ) +set(ENABLE_FESAPI OFF CACHE BOOL "" FORCE) + +####################################### +# Docs & schema generation +####################################### +set( ENABLE_XML_UPDATES ON CACHE BOOL "" FORCE ) +set( ENABLE_DOCS ON CACHE BOOL "" FORCE ) +set( ENABLE_DOXYGEN OFF CACHE BOOL "" FORCE ) +set( ENABLE_SPHINX ON CACHE BOOL "" FORCE ) +set( ENABLE_UNCRUSTIFY ON CACHE BOOL "" FORCE ) + +####################################### +# RAJA/CHAI SETUP +####################################### +option( RAJA_ENABLE_TBB "" OFF ) +option( ENABLE_CALIPER "Enables CALIPER" ON ) +set( ENABLE_CUDA "OFF" CACHE PATH "" FORCE ) +set( CHAI_BUILD_TYPE "cpu-no-rm" CACHE PATH "" FORCE ) +set( CHAI_ARGS "" CACHE PATH "" FORCE ) +set( ENABLE_OPENMP "OFF" CACHE PATH "" FORCE ) +set( RAJA_ENABLE_OPENMP "OFF" CACHE PATH "" FORCE ) + + + + + +include( ${CMAKE_CURRENT_LIST_DIR}/../tpls.cmake ) + +MESSAGE(STATUS "Host config verifications : ") +MESSAGE(STATUS " ENABLE_PETSC = ${ENABLE_PETSC}") +MESSAGE(STATUS " ENABLE_FESAPI = ${ENABLE_FESAPI}") +MESSAGE(STATUS " ENABLE_MKL = ${ENABLE_MKL}") +MESSAGE(STATUS " ENABLE_DOXYGEN = ${ENABLE_DOXYGEN}") +MESSAGE(STATUS " ENABLE_SPHINX = ${ENABLE_SPHINX}") +MESSAGE(STATUS " ENABLE_UNCRUSTIFY =${ENABLE_UNCRUSTIFY}") +MESSAGE(STATUS " TPL_DIR = '${GEOSX_TPL_DIR}'") +MESSAGE(STATUS " TPL_DIR_EXISTS ='${GEOSX_TPL_DIR_EXISTS}'") +MESSAGE(STATUS " HDF5_DIR = '${HDF5_DIR}'") +MESSAGE(STATUS " CONDUIT_DIR = '${CONDUIT_DIR}'") +MESSAGE(STATUS " MPICXXCompiler ='${MPI_CXX_COMPILER}'") +MESSAGE(STATUS " MPIEXECUTABLE = '${MPIEXEC_EXECUTABLE}'") diff --git a/mesh hierarchy b/mesh hierarchy new file mode 100644 index 00000000000..afa22811635 --- /dev/null +++ b/mesh hierarchy @@ -0,0 +1,1161 @@ + 1/193 Test #1: blt_gtest_smoke ...................................... Passed 0.02 sec + 2/193 Test #2: blt_mpi_smoke ........................................ Passed 0.60 sec + 3/193 Test #3: testUncrustifyCheck ..................................***Failed 56.19 sec + 4/193 Test #4: testArray1D .......................................... Passed 0.07 sec + 5/193 Test #5: testArray1DOfArray1D ................................. Passed 0.04 sec + 6/193 Test #6: testArray1DOfArray1DOfArray1D ........................ Passed 0.06 sec + 7/193 Test #7: testArrayOfArrays .................................... Passed 0.38 sec + 8/193 Test #8: testArrayOfSets ...................................... Passed 0.21 sec + 9/193 Test #9: testArraySlice ....................................... Passed 0.03 sec + 10/193 Test #10: testArrayView_copyAssignmentOperator ................. Passed 0.04 sec + 11/193 Test #11: testArrayView_copyConstructor ........................ Passed 0.04 sec + 12/193 Test #12: testArrayView_defaultConstructor ..................... Passed 0.03 sec + 13/193 Test #13: testArrayView_emptyMove .............................. Passed 0.03 sec + 14/193 Test #14: testArrayView_modifyInKernel ......................... Passed 0.03 sec + 15/193 Test #15: testArrayView_modifyInMultipleKernels ................ Passed 0.03 sec + 16/193 Test #16: testArrayView_move ................................... Passed 0.03 sec + 17/193 Test #17: testArrayView_moveMultipleTimes ...................... Passed 0.03 sec + 18/193 Test #18: testArrayView_moveNoTouch ............................ Passed 0.03 sec + 19/193 Test #19: testArrayView_readInKernel ........................... Passed 0.03 sec + 20/193 Test #20: testArrayView_setValues .............................. Passed 0.03 sec + 21/193 Test #21: testArrayView_setValuesFromView ...................... Passed 0.03 sec + 22/193 Test #22: testArrayView_toSlice ................................ Passed 0.04 sec + 23/193 Test #23: testArrayView_toSliceConst ........................... Passed 0.04 sec + 24/193 Test #24: testArrayView_toView ................................. Passed 0.04 sec + 25/193 Test #25: testArrayView_toViewConst ............................ Passed 0.04 sec + 26/193 Test #26: testArrayView_typeConversion ......................... Passed 0.03 sec + 27/193 Test #27: testArrayView_udcToSlice ............................. Passed 0.04 sec + 28/193 Test #28: testArrayView_udcToSliceConst ........................ Passed 0.04 sec + 29/193 Test #29: testArrayView_udcToViewConst ......................... Passed 0.04 sec + 30/193 Test #30: testArrayView_zero ................................... Passed 0.03 sec + 31/193 Test #31: testArray_clear ...................................... Passed 0.05 sec + 32/193 Test #32: testArray_copyAssignmentOperator ..................... Passed 0.05 sec + 33/193 Test #33: testArray_copyConstructor ............................ Passed 0.04 sec + 34/193 Test #34: testArray_defaultConstructor ......................... Passed 0.03 sec + 35/193 Test #35: testArray_getSetSingleParameterResizeIndex ........... Passed 0.04 sec + 36/193 Test #36: testArray_indexing ................................... Passed 0.04 sec + 37/193 Test #37: testArray_moveAssignmentOperator ..................... Passed 0.05 sec + 38/193 Test #38: testArray_moveConstructor ............................ Passed 0.04 sec + 39/193 Test #39: testArray_reserveAndCapacity ......................... Passed 0.07 sec + 40/193 Test #40: testArray_resize ..................................... Passed 0.18 sec + 41/193 Test #41: testArray_resizeDefault .............................. Passed 0.17 sec + 42/193 Test #42: testArray_resizeDimension ............................ Passed 0.10 sec + 43/193 Test #43: testArray_resizeFromArgs ............................. Passed 0.06 sec + 44/193 Test #44: testArray_resizeFromPointer .......................... Passed 0.06 sec + 45/193 Test #45: testArray_resizeWithoutInitializationOrDestruction ... Passed 0.04 sec + 46/193 Test #46: testArray_sizedConstructor ........................... Passed 0.04 sec + 47/193 Test #47: testArray_toView ..................................... Passed 0.05 sec + 48/193 Test #48: testArray_toViewConst ................................ Passed 0.05 sec + 49/193 Test #49: testBuffers .......................................... Passed 0.04 sec + 50/193 Test #50: testCRSMatrix ........................................ Passed 0.14 sec + 51/193 Test #51: testIndexing ......................................... Passed 0.43 sec + 52/193 Test #52: testInput ............................................ Passed 0.03 sec + 53/193 Test #53: testIntegerConversion ................................ Passed 0.11 sec + 54/193 Test #54: testMath ............................................. Passed 0.03 sec + 55/193 Test #55: testMemcpy ........................................... Passed 0.04 sec + 56/193 Test #56: testSliceHelpers ..................................... Passed 0.04 sec + 57/193 Test #57: testSortedArray ...................................... Passed 0.07 sec + 58/193 Test #58: testSortedArrayManipulation .......................... Passed 0.06 sec + 59/193 Test #59: testSparsityPattern .................................. Passed 0.22 sec + 60/193 Test #60: testStackArray ....................................... Passed 0.15 sec + 61/193 Test #61: testTensorOpsDeterminant ............................. Passed 0.04 sec + 62/193 Test #62: testTensorOpsEigen ................................... Passed 0.04 sec + 63/193 Test #63: testTensorOpsInverseOneArg ........................... Passed 0.03 sec + 64/193 Test #64: testTensorOpsInverseTwoArgs .......................... Passed 0.04 sec + 65/193 Test #65: testTensorOpsSymDeterminant .......................... Passed 0.03 sec + 66/193 Test #66: testTensorOpsSymInverseOneArg ........................ Passed 0.03 sec + 67/193 Test #67: testTensorOpsSymInverseTwoArgs ....................... Passed 0.03 sec + 68/193 Test #68: testTypeManipulation ................................. Passed 0.04 sec + 69/193 Test #69: testStackTrace ....................................... Passed 0.02 sec + 70/193 Test #70: testInvalidOperations ................................ Passed 0.03 sec + 71/193 Test #71: testChaiBuffer ....................................... Passed 0.03 sec + 72/193 Test #72: testArray_ChaiBuffer ................................. Passed 0.03 sec + 73/193 Test #73: testFloatingPointExceptions .......................... Passed 0.09 sec + 74/193 Test #74: testTensorOps ........................................ Passed 0.09 sec + 75/193 Test #75: testPyArray .......................................... Passed 1.52 sec + 76/193 Test #76: testPySortedArray .................................... Passed 0.39 sec + 77/193 Test #77: testPyCRSMatrix ...................................... Passed 0.72 sec + 78/193 Test #78: testPythonScalars .................................... Passed 0.39 sec + 79/193 Test #79: testPythonListOfStrings .............................. Passed 0.35 sec + 80/193 Test #80: testPyCallback ....................................... Passed 0.35 sec + 81/193 Test #81: testPyArrayOfArrays .................................. Passed 0.38 sec + 82/193 Test #82: testPyArrayOfSets .................................... Passed 0.36 sec + 83/193 Test #83: exampleTestFoo ....................................... Passed 0.03 sec + 84/193 Test #84: exampleBuffers ....................................... Passed 0.04 sec + 85/193 Test #85: exampleArray ......................................... Passed 0.03 sec + 86/193 Test #86: exampleSortedArray ................................... Passed 0.03 sec + 87/193 Test #87: exampleArrayOfArrays ................................. Passed 0.04 sec + 88/193 Test #88: exampleArrayOfSets ................................... Passed 0.02 sec + 89/193 Test #89: exampleSparsityPatternAndCRSMatrix ................... Passed 0.02 sec + 90/193 Test #90: exampleTensorOps ..................................... Passed 0.03 sec + 91/193 Test #91: testDataTypes ........................................ Passed 0.04 sec + 92/193 Test #92: testFixedSizeDeque ................................... Passed 0.04 sec + 93/193 Test #93: testTypeDispatch ..................................... Passed 0.04 sec + 94/193 Test #94: testLifoStorage ...................................... Passed 0.12 sec + 95/193 Test #95: testUnits ............................................ Passed 0.04 sec + 96/193 Test #96: testCaliperSmoke ..................................... Passed 0.04 sec + 97/193 Test #97: testGeosxTraits ...................................... Passed 0.04 sec + 98/193 Test #98: testStringUtilities .................................. Passed 0.04 sec + 99/193 Test #99: testParsing .......................................... Passed 0.08 sec +100/193 Test #100: testDefaultValue ..................................... Passed 0.04 sec +101/193 Test #101: testWrapper .......................................... Passed 0.06 sec +102/193 Test #102: testXmlWrapper ....................................... Passed 0.15 sec +103/193 Test #103: testBufferOps ........................................ Passed 0.04 sec +104/193 Test #104: testFunctions ........................................ Passed 0.25 sec +105/193 Test #105: testCompositionalProperties .......................... Passed 0.22 sec +106/193 Test #106: testDamageUtilities .................................. Passed 0.13 sec +107/193 Test #107: testDruckerPrager .................................... Passed 0.17 sec +108/193 Test #108: testElasticIsotropic ................................. Passed 0.15 sec +109/193 Test #109: testKValueInitialization ............................. Passed 0.13 sec +110/193 Test #110: testModifiedCamClay .................................. Passed 0.15 sec +111/193 Test #111: testNegativeTwoPhaseFlash ............................ Passed 0.14 sec +112/193 Test #112: testParticleFluidEnums ............................... Passed 0.13 sec +113/193 Test #113: testPropertyConversions .............................. Passed 0.13 sec +114/193 Test #114: testCubicEOS ......................................... Passed 0.14 sec +115/193 Test #115: testRachfordRice ..................................... Passed 0.13 sec +116/193 Test #116: testMeshObjectPath ................................... Passed 0.49 sec +117/193 Test #117: testComputationalGeometry ............................ Passed 0.13 sec +118/193 Test #118: testGeometricObjects ................................. Passed 0.13 sec +119/193 Test #119: testBlasLapack ....................................... Passed 0.49 sec +120/193 Test #120: testLinearSolverParametersEnums ...................... Passed 0.87 sec +121/193 Test #121: testComponentMask .................................... Passed 0.41 sec +122/193 Test #122: testMatrices ......................................... Passed 0.83 sec +123/193 Test #123: testVectors .......................................... Passed 1.33 sec +124/193 Test #124: testExternalSolvers .................................. Passed 3.37 sec +125/193 Test #125: testKrylovSolvers .................................... Passed 2.50 sec +126/193 Test #126: testReverseCutHillMcKeeOrdering ...................... Passed 0.54 sec +127/193 Test #127: testFiniteElementBase ................................ Passed 0.13 sec +128/193 Test #128: testH1_QuadrilateralFace_Lagrange1_GaussLegendre2 .... Passed 0.04 sec +129/193 Test #129: testH1_Hexahedron_Lagrange1_GaussLegendre2 ........... Passed 0.04 sec +130/193 Test #130: testH1_Tetrahedron_Lagrange1_Gauss1 .................. Passed 0.04 sec +131/193 Test #131: testH1_Wedge_Lagrange1_Gauss6 ........................ Passed 0.04 sec +132/193 Test #132: testH1_Pyramid_Lagrange1_Gauss5 ...................... Passed 0.05 sec +133/193 Test #133: testH1_TriangleFace_Lagrange1_Gauss1 ................. Passed 0.04 sec +134/193 Test #134: testQ3_Hexahedron_Lagrange_GaussLobatto .............. Passed 0.04 sec +135/193 Test #135: testQ5_Hexahedron_Lagrange_GaussLobatto .............. Passed 0.05 sec +136/193 Test #136: testToolchain ........................................ Passed 0.40 sec +137/193 Test #137: testXML .............................................. Passed 0.99 sec +138/193 Test #138: testXMLFile_basic_input .............................. Passed 0.81 sec +139/193 Test #139: testXMLFile_include_input ............................ Passed 0.78 sec +140/193 Test #140: testXMLFile_multiple_input ........................... Passed 0.80 sec +141/193 Test #141: testConformingVirtualElementOrder1 ................... Passed 0.77 sec +142/193 Test #142: testDofManager ....................................... Passed 2.22 sec +143/193 Test #143: testLAIHelperFunctions ............................... Passed 0.87 sec +144/193 Test #144: testObjectCatalog .................................... Passed 0.68 sec +145/193 Test #145: testRestartBasic ..................................... Passed 3.40 sec +146/193 Test #146: testRestartExtended .................................. Passed 0.74 sec +147/193 Test #147: testPacking .......................................... Passed 0.81 sec +148/193 Test #148: testWrapperHelpers ................................... Passed 0.71 sec +149/193 Test #149: testGroupPath ........................................ Passed 0.99 sec +150/193 Test #150: testAquiferBoundaryCondition ......................... Passed 0.69 sec +151/193 Test #151: testFieldSpecificationsEnums ......................... Passed 0.35 sec +152/193 Test #152: testRecursiveFieldApplication ........................ Passed 0.95 sec +153/193 Test #153: testDamage ........................................... Passed 0.43 sec +154/193 Test #154: testRelPerm .......................................... Passed 0.75 sec +155/193 Test #155: testRelPermHysteresis ................................ Passed 0.71 sec +156/193 Test #156: testCapillaryPressure ................................ Passed 0.75 sec +157/193 Test #157: testMultiFluid ....................................... Passed 5.81 sec +158/193 Test #158: testCO2BrinePVTModels ................................ Passed 9.10 sec +159/193 Test #159: testTriaxial_druckerPragerExtended ................... Passed 0.75 sec +160/193 Test #160: testTriaxial_elasticIsotropic ........................ Passed 0.75 sec +161/193 Test #161: testTriaxial_elasticIsotropicPressureDependent ....... Passed 0.74 sec +162/193 Test #162: testTriaxial_modifiedCamClay ......................... Passed 0.80 sec +163/193 Test #163: testTriaxial_delftEggUseLinear ....................... Passed 0.80 sec +164/193 Test #164: testTriaxial_modifiedCamClayVolumetric ............... Passed 0.75 sec +165/193 Test #165: testTriaxial_delftEggLoadPathDryUseLinear ............ Passed 0.75 sec +166/193 Test #166: testTriaxial_delftEggLoadPathWetUseLinear ............ Passed 0.76 sec +167/193 Test #167: testTriaxial_delftEggCase1 ........................... Passed 0.76 sec +168/193 Test #168: testTriaxial_delftEggCase2 ........................... Passed 0.73 sec +169/193 Test #169: testPVT .............................................. Passed 0.84 sec +170/193 Test #170: testPVT_CO2Brine ..................................... Passed 0.94 sec +171/193 Test #171: testPVT_PhaseComposition ............................. Passed 0.87 sec +172/193 Test #172: testReactiveFluid .................................... Passed 0.82 sec +173/193 Test #173: testMeshEnums ........................................ Passed 0.37 sec +174/193 Test #174: testMeshGeneration ................................... Passed 0.74 sec +175/193 Test #175: testNeighborCommunicator ............................. Passed 0.78 sec +176/193 Test #176: testVTKImport ........................................ Passed 0.88 sec +177/193 Test #177: testNeighborCommunicator_mpi ......................... Passed 0.75 sec +178/193 Test #178: testVTKImport_mpi .................................... Passed 0.87 sec +179/193 Test #179: testMimeticInnerProducts ............................. Passed 0.79 sec +180/193 Test #180: testHDFFile .......................................... Passed 9.58 sec +181/193 Test #181: testHDFParallelFile .................................. Passed 8.98 sec +182/193 Test #182: testSinglePhaseBaseKernels ........................... Passed 0.69 sec +183/193 Test #183: testThermalCompMultiphaseFlow ........................ Passed 2.59 sec +184/193 Test #184: testThermalSinglePhaseFlow ........................... Passed 1.36 sec +185/193 Test # testFluidStatistics .................................. Passed 0.96 sec +186/193 Test #186: testCompMultiphaseFlow ............................... Passed 1.03 sec +187/193 Test #187: testCompMultiphaseFlowHybrid ......................... Passed 1.58 sec +188/193 Test #188: testReactiveCompositionalMultiphaseOBL ............... Passed 1.19 sec +189/193 Test #189: testReservoirSinglePhaseMSWells ...................... Passed 1.02 sec +190/193 Test #190: testWellEnums ........................................ Passed 0.63 sec +191/193 Test #191: testReservoirCompositionalMultiphaseMSWells .......... Passed 1.20 sec +192/193 Test #192: testWavePropagation .................................. Passed 0.76 sec +193/193 Test #193: testWavePropagationAcousticFirstOrder ................ Passed 0.73 sec + + + + Problem : geos::ProblemManager + + domain : geos::DomainPartition + -> Neighbors : geos::dataRepository::Wrapper > > + -> partitionManager : geos::dataRepository::Wrapper + + MeshBodies : geos::dataRepository::Group + + mesh : geos::MeshBody + + meshLevels : geos::dataRepository::Group + + Level0 : geos::MeshLevel + -> meshLevel : geos::dataRepository::Wrapper + + nodeManager : geos::NodeManager + -> localToGlobalMap : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> globalToLocalMap : geos::dataRepository::Wrapper > > + -> isExternal : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> ghostRank : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> domainBoundaryIndicator : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> ReferencePosition : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> edgeList : geos::dataRepository::Wrapper > > + -> faceList : geos::dataRepository::Wrapper > > + -> elemRegionList : geos::dataRepository::Wrapper > + -> elemSubRegionList : geos::dataRepository::Wrapper > + -> elemList : geos::dataRepository::Wrapper > + + sets : geos::dataRepository::Group + -> externalSet : geos::dataRepository::Wrapper > + -> all : geos::dataRepository::Wrapper > + -> xneg : geos::dataRepository::Wrapper > + -> xpos : geos::dataRepository::Wrapper > + -> yneg : geos::dataRepository::Wrapper > + -> ypos : geos::dataRepository::Wrapper > + -> zneg : geos::dataRepository::Wrapper > + -> zpos : geos::dataRepository::Wrapper > + -> sourceBox : geos::dataRepository::Wrapper > + -> sinkBox : geos::dataRepository::Wrapper > + + neighborData : geos::dataRepository::Group + + ParticleRegions : geos::ParticleManager + -> localToGlobalMap : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> globalToLocalMap : geos::dataRepository::Wrapper > > + -> isExternal : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> ghostRank : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> domainBoundaryIndicator : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + + sets : geos::dataRepository::Group + -> externalSet : geos::dataRepository::Wrapper > + + neighborData : geos::dataRepository::Group + + particleRegionsGroup : geos::dataRepository::Group + + edgeManager : geos::EdgeManager + -> localToGlobalMap : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> globalToLocalMap : geos::dataRepository::Wrapper > > + -> isExternal : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> ghostRank : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> domainBoundaryIndicator : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> nodeList : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > > + -> faceList : geos::dataRepository::Wrapper > > + + sets : geos::dataRepository::Group + -> externalSet : geos::dataRepository::Wrapper > + -> all : geos::dataRepository::Wrapper > + -> xneg : geos::dataRepository::Wrapper > + -> xpos : geos::dataRepository::Wrapper > + -> yneg : geos::dataRepository::Wrapper > + -> ypos : geos::dataRepository::Wrapper > + -> zneg : geos::dataRepository::Wrapper > + -> zpos : geos::dataRepository::Wrapper > + -> sourceBox : geos::dataRepository::Wrapper > + -> sinkBox : geos::dataRepository::Wrapper > + + neighborData : geos::dataRepository::Group + + faceManager : geos::FaceManager + -> localToGlobalMap : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> globalToLocalMap : geos::dataRepository::Wrapper > > + -> isExternal : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> ghostRank : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> domainBoundaryIndicator : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> nodeList : geos::dataRepository::Wrapper > > + -> edgeList : geos::dataRepository::Wrapper > > + -> elemRegionList : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> elemSubRegionList : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> elemList : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> faceArea : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> faceCenter : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> faceNormal : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> gravityCoefficient : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> permeabilityTransMultiplier : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> facePressure : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + + sets : geos::dataRepository::Group + -> externalSet : geos::dataRepository::Wrapper > + -> all : geos::dataRepository::Wrapper > + -> xneg : geos::dataRepository::Wrapper > + -> xpos : geos::dataRepository::Wrapper > + -> yneg : geos::dataRepository::Wrapper > + -> ypos : geos::dataRepository::Wrapper > + -> zneg : geos::dataRepository::Wrapper > + -> zpos : geos::dataRepository::Wrapper > + -> sourceBox : geos::dataRepository::Wrapper > + -> sinkBox : geos::dataRepository::Wrapper > + + neighborData : geos::dataRepository::Group + + ElementRegions : geos::ElementRegionManager + -> localToGlobalMap : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> globalToLocalMap : geos::dataRepository::Wrapper > > + -> isExternal : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> ghostRank : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> domainBoundaryIndicator : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + + sets : geos::dataRepository::Group + -> externalSet : geos::dataRepository::Wrapper > + + neighborData : geos::dataRepository::Group + + elementRegionsGroup : geos::dataRepository::Group + + reservoir : geos::CellElementRegion + -> localToGlobalMap : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> globalToLocalMap : geos::dataRepository::Wrapper > > + -> isExternal : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> ghostRank : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> domainBoundaryIndicator : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> materialList : geos::dataRepository::Wrapper, std::allocator >, 1, camp::int_seq, int, LvArray::ChaiBuffer> > + -> meshBody : geos::dataRepository::Wrapper, std::allocator > > + -> cellBlocks : geos::dataRepository::Wrapper, std::allocator >, 1, camp::int_seq, int, LvArray::ChaiBuffer> > + -> coarseningRatio : geos::dataRepository::Wrapper + -> sourceFlux_region_stats_for_timestepsStats : geos::dataRepository::Wrapper + -> sinkFlux_region_stats_for_timestepsStats : geos::dataRepository::Wrapper + -> sourceFlux_region_stats_for_wholeSimStats : geos::dataRepository::Wrapper + -> sinkFlux_region_stats_for_wholeSimStats : geos::dataRepository::Wrapper + + sets : geos::dataRepository::Group + -> externalSet : geos::dataRepository::Wrapper > + + neighborData : geos::dataRepository::Group + + elementSubRegions : geos::dataRepository::Group + + cellBlock : geos::CellElementSubRegion + -> localToGlobalMap : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> globalToLocalMap : geos::dataRepository::Wrapper > > + -> isExternal : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> ghostRank : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> domainBoundaryIndicator : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> numNodesPerElement : geos::dataRepository::Wrapper + -> numEdgesPerElement : geos::dataRepository::Wrapper + -> numFacesPerElement : geos::dataRepository::Wrapper + -> elementCenter : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> elementVolume : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> nodeList : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > > + -> edgeList : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > > + -> faceList : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > > + -> ConstitutiveGrouping : geos::dataRepository::Wrapper, std::allocator >, LvArray::Array, int, LvArray::ChaiBuffer>, std::integral_constant > > + -> ConstitutivePointVolumeFraction : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> dNdX : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> detJ : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> ToEmbeddedSurfaces : geos::dataRepository::Wrapper > > + -> fracturedCells : geos::dataRepository::Wrapper > + -> water_density : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> water_dDensity_dPressure : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> water_dDensity_dTemperature : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> water_density_n : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> water_viscosity : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> water_dViscosity_dPressure : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> water_dViscosity_dTemperature : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> water_internalEnergy : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> water_internalEnergy_n : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> water_dInternalEnergy_dPressure : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> water_dInternalEnergy_dTemperature : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> water_enthalpy : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> water_dEnthalpy_dPressure : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> water_dEnthalpy_dTemperature : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> rockPorosity_porosity : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> rockPorosity_porosity_n : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> rockPorosity_dPorosity_dPressure : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> rockPorosity_dPorosity_dTemperature : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> rockPorosity_initialPorosity : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> rockPorosity_referencePorosity : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> rockPerm_permeability : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> rockPerm_dPerm_dPressure : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> fluidNames : geos::dataRepository::Wrapper, std::allocator > > + -> solidNames : geos::dataRepository::Wrapper, std::allocator > > + -> permeabilityNames : geos::dataRepository::Wrapper, std::allocator > > + -> gravityCoefficient : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> netToGross : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> pressure : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> pressure_n : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> initialPressure : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> deltaPressure : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> bcPressure : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> deltaVolume : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> temperature : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> temperature_n : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> initialTemperature : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> bcTemperature : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> mobility : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> dMobility_dPressure : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> sourceFlux_region_stats_for_timestepsStats : geos::dataRepository::Wrapper + -> sinkFlux_region_stats_for_timestepsStats : geos::dataRepository::Wrapper + -> sourceFlux_region_stats_for_wholeSimStats : geos::dataRepository::Wrapper + -> sinkFlux_region_stats_for_wholeSimStats : geos::dataRepository::Wrapper + + sets : geos::dataRepository::Group + -> externalSet : geos::dataRepository::Wrapper > + -> all : geos::dataRepository::Wrapper > + -> xneg : geos::dataRepository::Wrapper > + -> xpos : geos::dataRepository::Wrapper > + -> yneg : geos::dataRepository::Wrapper > + -> ypos : geos::dataRepository::Wrapper > + -> zneg : geos::dataRepository::Wrapper > + -> zpos : geos::dataRepository::Wrapper > + -> sourceBox : geos::dataRepository::Wrapper > + -> sinkBox : geos::dataRepository::Wrapper > + + neighborData : geos::dataRepository::Group + + ConstitutiveModels : geos::dataRepository::Group + + water : geos::constitutive::CompressibleSinglePhaseFluid + -> density : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> dDensity_dPressure : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> dDensity_dTemperature : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> density_n : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> viscosity : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> dViscosity_dPressure : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> dViscosity_dTemperature : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> internalEnergy : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> internalEnergy_n : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> dInternalEnergy_dPressure : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> dInternalEnergy_dTemperature : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> enthalpy : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> dEnthalpy_dPressure : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> dEnthalpy_dTemperature : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> defaultDensity : geos::dataRepository::Wrapper + -> defaultViscosity : geos::dataRepository::Wrapper + -> compressibility : geos::dataRepository::Wrapper + -> viscosibility : geos::dataRepository::Wrapper + -> referencePressure : geos::dataRepository::Wrapper + -> referenceDensity : geos::dataRepository::Wrapper + -> referenceViscosity : geos::dataRepository::Wrapper + -> densityModelType : geos::dataRepository::Wrapper + -> viscosityModelType : geos::dataRepository::Wrapper + + rock : geos::constitutive::CompressibleSolid + -> solidModelName : geos::dataRepository::Wrapper, std::allocator > > + -> porosityModelName : geos::dataRepository::Wrapper, std::allocator > > + -> permeabilityModelName : geos::dataRepository::Wrapper, std::allocator > > + -> solidInternalEnergyModelName : geos::dataRepository::Wrapper, std::allocator > > + + nullSolid : geos::constitutive::NullModel + + rockPorosity : geos::constitutive::PressurePorosity + -> defaultReferencePorosity : geos::dataRepository::Wrapper + -> porosity : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> porosity_n : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> dPorosity_dPressure : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> dPorosity_dTemperature : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> initialPorosity : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> referencePorosity : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> referencePressure : geos::dataRepository::Wrapper + -> compressibility : geos::dataRepository::Wrapper + + rockPerm : geos::constitutive::ConstantPermeability + -> permeability : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> dPerm_dPressure : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> permeabilityComponents : geos::dataRepository::Wrapper > + + embeddedSurfacesEdgeManager : geos::EdgeManager + -> localToGlobalMap : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> globalToLocalMap : geos::dataRepository::Wrapper > > + -> isExternal : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> ghostRank : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> domainBoundaryIndicator : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> nodeList : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > > + -> faceList : geos::dataRepository::Wrapper > > + + sets : geos::dataRepository::Group + -> externalSet : geos::dataRepository::Wrapper > + + neighborData : geos::dataRepository::Group + + embeddedSurfacesNodeManager : geos::EmbeddedSurfaceNodeManager + -> localToGlobalMap : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> globalToLocalMap : geos::dataRepository::Wrapper > > + -> isExternal : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> ghostRank : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> domainBoundaryIndicator : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> referencePosition : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> edgeList : geos::dataRepository::Wrapper > > + -> elemRegionList : geos::dataRepository::Wrapper > + -> elemSubRegionList : geos::dataRepository::Wrapper > + -> elemList : geos::dataRepository::Wrapper > + -> parentEdgeGlobalIndex : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + + sets : geos::dataRepository::Group + -> externalSet : geos::dataRepository::Wrapper > + + neighborData : geos::dataRepository::Group + + finiteVolumeStencils : geos::dataRepository::Group + + singlePhaseTPFA : geos::dataRepository::Group + -> cellStencil : geos::dataRepository::Wrapper + -> fractureStencil : geos::dataRepository::Wrapper + -> edfmStencil : geos::dataRepository::Wrapper + -> faceElementToCellStencil : geos::dataRepository::Wrapper + + singlePhaseTPFA : geos::MeshLevel + -> meshLevel : geos::dataRepository::Wrapper + -> flux_set_region_stats_for_timestepsStats : geos::dataRepository::Wrapper + -> sourceFlux_region_stats_for_timestepsStats : geos::dataRepository::Wrapper + -> sinkFlux_region_stats_for_timestepsStats : geos::dataRepository::Wrapper + -> flux_set_region_stats_for_wholeSimStats : geos::dataRepository::Wrapper + -> sourceFlux_region_stats_for_wholeSimStats : geos::dataRepository::Wrapper + -> sinkFlux_region_stats_for_wholeSimStats : geos::dataRepository::Wrapper + + nodeManager : geos::NodeManager + -> localToGlobalMap : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> globalToLocalMap : geos::dataRepository::Wrapper > > + -> isExternal : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> ghostRank : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> domainBoundaryIndicator : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> ReferencePosition : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> edgeList : geos::dataRepository::Wrapper > > + -> faceList : geos::dataRepository::Wrapper > > + -> elemRegionList : geos::dataRepository::Wrapper > + -> elemSubRegionList : geos::dataRepository::Wrapper > + -> elemList : geos::dataRepository::Wrapper > + + sets : geos::dataRepository::Group + -> externalSet : geos::dataRepository::Wrapper > + -> all : geos::dataRepository::Wrapper > + -> xneg : geos::dataRepository::Wrapper > + -> xpos : geos::dataRepository::Wrapper > + -> yneg : geos::dataRepository::Wrapper > + -> ypos : geos::dataRepository::Wrapper > + -> zneg : geos::dataRepository::Wrapper > + -> zpos : geos::dataRepository::Wrapper > + -> sourceBox : geos::dataRepository::Wrapper > + -> sinkBox : geos::dataRepository::Wrapper > + + neighborData : geos::dataRepository::Group + + edgeManager : geos::EdgeManager + -> localToGlobalMap : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> globalToLocalMap : geos::dataRepository::Wrapper > > + -> isExternal : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> ghostRank : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> domainBoundaryIndicator : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> nodeList : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > > + -> faceList : geos::dataRepository::Wrapper > > + + sets : geos::dataRepository::Group + -> externalSet : geos::dataRepository::Wrapper > + -> all : geos::dataRepository::Wrapper > + -> xneg : geos::dataRepository::Wrapper > + -> xpos : geos::dataRepository::Wrapper > + -> yneg : geos::dataRepository::Wrapper > + -> ypos : geos::dataRepository::Wrapper > + -> zneg : geos::dataRepository::Wrapper > + -> zpos : geos::dataRepository::Wrapper > + -> sourceBox : geos::dataRepository::Wrapper > + -> sinkBox : geos::dataRepository::Wrapper > + + neighborData : geos::dataRepository::Group + + faceManager : geos::FaceManager + -> localToGlobalMap : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> globalToLocalMap : geos::dataRepository::Wrapper > > + -> isExternal : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> ghostRank : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> domainBoundaryIndicator : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> nodeList : geos::dataRepository::Wrapper > > + -> edgeList : geos::dataRepository::Wrapper > > + -> elemRegionList : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> elemSubRegionList : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> elemList : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> faceArea : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> faceCenter : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> faceNormal : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> gravityCoefficient : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> permeabilityTransMultiplier : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> facePressure : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + + sets : geos::dataRepository::Group + -> externalSet : geos::dataRepository::Wrapper > + -> all : geos::dataRepository::Wrapper > + -> xneg : geos::dataRepository::Wrapper > + -> xpos : geos::dataRepository::Wrapper > + -> yneg : geos::dataRepository::Wrapper > + -> ypos : geos::dataRepository::Wrapper > + -> zneg : geos::dataRepository::Wrapper > + -> zpos : geos::dataRepository::Wrapper > + -> sourceBox : geos::dataRepository::Wrapper > + -> sinkBox : geos::dataRepository::Wrapper > + + neighborData : geos::dataRepository::Group + + ElementRegions : geos::ElementRegionManager + -> localToGlobalMap : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> globalToLocalMap : geos::dataRepository::Wrapper > > + -> isExternal : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> ghostRank : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> domainBoundaryIndicator : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + + sets : geos::dataRepository::Group + -> externalSet : geos::dataRepository::Wrapper > + + neighborData : geos::dataRepository::Group + + elementRegionsGroup : geos::dataRepository::Group + + reservoir : geos::CellElementRegion + -> localToGlobalMap : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> globalToLocalMap : geos::dataRepository::Wrapper > > + -> isExternal : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> ghostRank : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> domainBoundaryIndicator : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> materialList : geos::dataRepository::Wrapper, std::allocator >, 1, camp::int_seq, int, LvArray::ChaiBuffer> > + -> meshBody : geos::dataRepository::Wrapper, std::allocator > > + -> cellBlocks : geos::dataRepository::Wrapper, std::allocator >, 1, camp::int_seq, int, LvArray::ChaiBuffer> > + -> coarseningRatio : geos::dataRepository::Wrapper + -> sourceFlux_region_stats_for_timestepsStats : geos::dataRepository::Wrapper + -> sinkFlux_region_stats_for_timestepsStats : geos::dataRepository::Wrapper + -> sourceFlux_region_stats_for_wholeSimStats : geos::dataRepository::Wrapper + -> sinkFlux_region_stats_for_wholeSimStats : geos::dataRepository::Wrapper + + sets : geos::dataRepository::Group + -> externalSet : geos::dataRepository::Wrapper > + + neighborData : geos::dataRepository::Group + + elementSubRegions : geos::dataRepository::Group + + cellBlock : geos::CellElementSubRegion + -> localToGlobalMap : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> globalToLocalMap : geos::dataRepository::Wrapper > > + -> isExternal : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> ghostRank : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> domainBoundaryIndicator : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> numNodesPerElement : geos::dataRepository::Wrapper + -> numEdgesPerElement : geos::dataRepository::Wrapper + -> numFacesPerElement : geos::dataRepository::Wrapper + -> elementCenter : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> elementVolume : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> nodeList : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > > + -> edgeList : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > > + -> faceList : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > > + -> ConstitutiveGrouping : geos::dataRepository::Wrapper, std::allocator >, LvArray::Array, int, LvArray::ChaiBuffer>, std::integral_constant > > + -> ConstitutivePointVolumeFraction : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> dNdX : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> detJ : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> ToEmbeddedSurfaces : geos::dataRepository::Wrapper > > + -> fracturedCells : geos::dataRepository::Wrapper > + -> water_density : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> water_dDensity_dPressure : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> water_dDensity_dTemperature : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> water_density_n : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> water_viscosity : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> water_dViscosity_dPressure : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> water_dViscosity_dTemperature : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> water_internalEnergy : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> water_internalEnergy_n : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> water_dInternalEnergy_dPressure : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> water_dInternalEnergy_dTemperature : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> water_enthalpy : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> water_dEnthalpy_dPressure : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> water_dEnthalpy_dTemperature : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> rockPorosity_porosity : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> rockPorosity_porosity_n : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> rockPorosity_dPorosity_dPressure : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> rockPorosity_dPorosity_dTemperature : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> rockPorosity_initialPorosity : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> rockPorosity_referencePorosity : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> rockPerm_permeability : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> rockPerm_dPerm_dPressure : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> fluidNames : geos::dataRepository::Wrapper, std::allocator > > + -> solidNames : geos::dataRepository::Wrapper, std::allocator > > + -> permeabilityNames : geos::dataRepository::Wrapper, std::allocator > > + -> gravityCoefficient : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> netToGross : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> pressure : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> pressure_n : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> initialPressure : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> deltaPressure : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> bcPressure : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> deltaVolume : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> temperature : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> temperature_n : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> initialTemperature : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> bcTemperature : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> mobility : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> dMobility_dPressure : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> sourceFlux_region_stats_for_timestepsStats : geos::dataRepository::Wrapper + -> sinkFlux_region_stats_for_timestepsStats : geos::dataRepository::Wrapper + -> sourceFlux_region_stats_for_wholeSimStats : geos::dataRepository::Wrapper + -> sinkFlux_region_stats_for_wholeSimStats : geos::dataRepository::Wrapper + + sets : geos::dataRepository::Group + -> externalSet : geos::dataRepository::Wrapper > + -> all : geos::dataRepository::Wrapper > + -> xneg : geos::dataRepository::Wrapper > + -> xpos : geos::dataRepository::Wrapper > + -> yneg : geos::dataRepository::Wrapper > + -> ypos : geos::dataRepository::Wrapper > + -> zneg : geos::dataRepository::Wrapper > + -> zpos : geos::dataRepository::Wrapper > + -> sourceBox : geos::dataRepository::Wrapper > + -> sinkBox : geos::dataRepository::Wrapper > + + neighborData : geos::dataRepository::Group + + ConstitutiveModels : geos::dataRepository::Group + + water : geos::constitutive::CompressibleSinglePhaseFluid + -> density : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> dDensity_dPressure : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> dDensity_dTemperature : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> density_n : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> viscosity : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> dViscosity_dPressure : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> dViscosity_dTemperature : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> internalEnergy : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> internalEnergy_n : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> dInternalEnergy_dPressure : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> dInternalEnergy_dTemperature : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> enthalpy : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> dEnthalpy_dPressure : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> dEnthalpy_dTemperature : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> defaultDensity : geos::dataRepository::Wrapper + -> defaultViscosity : geos::dataRepository::Wrapper + -> compressibility : geos::dataRepository::Wrapper + -> viscosibility : geos::dataRepository::Wrapper + -> referencePressure : geos::dataRepository::Wrapper + -> referenceDensity : geos::dataRepository::Wrapper + -> referenceViscosity : geos::dataRepository::Wrapper + -> densityModelType : geos::dataRepository::Wrapper + -> viscosityModelType : geos::dataRepository::Wrapper + + rock : geos::constitutive::CompressibleSolid + -> solidModelName : geos::dataRepository::Wrapper, std::allocator > > + -> porosityModelName : geos::dataRepository::Wrapper, std::allocator > > + -> permeabilityModelName : geos::dataRepository::Wrapper, std::allocator > > + -> solidInternalEnergyModelName : geos::dataRepository::Wrapper, std::allocator > > + + nullSolid : geos::constitutive::NullModel + + rockPorosity : geos::constitutive::PressurePorosity + -> defaultReferencePorosity : geos::dataRepository::Wrapper + -> porosity : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> porosity_n : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> dPorosity_dPressure : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> dPorosity_dTemperature : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> initialPorosity : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> referencePorosity : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> referencePressure : geos::dataRepository::Wrapper + -> compressibility : geos::dataRepository::Wrapper + + rockPerm : geos::constitutive::ConstantPermeability + -> permeability : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> dPerm_dPressure : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> permeabilityComponents : geos::dataRepository::Wrapper > + + embeddedSurfacesEdgeManager : geos::EdgeManager + -> localToGlobalMap : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> globalToLocalMap : geos::dataRepository::Wrapper > > + -> isExternal : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> ghostRank : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> domainBoundaryIndicator : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> nodeList : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > > + -> faceList : geos::dataRepository::Wrapper > > + + sets : geos::dataRepository::Group + -> externalSet : geos::dataRepository::Wrapper > + + neighborData : geos::dataRepository::Group + + embeddedSurfacesNodeManager : geos::EmbeddedSurfaceNodeManager + -> localToGlobalMap : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> globalToLocalMap : geos::dataRepository::Wrapper > > + -> isExternal : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> ghostRank : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> domainBoundaryIndicator : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> referencePosition : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> edgeList : geos::dataRepository::Wrapper > > + -> elemRegionList : geos::dataRepository::Wrapper > + -> elemSubRegionList : geos::dataRepository::Wrapper > + -> elemList : geos::dataRepository::Wrapper > + -> parentEdgeGlobalIndex : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + + sets : geos::dataRepository::Group + -> externalSet : geos::dataRepository::Wrapper > + + neighborData : geos::dataRepository::Group + + finiteVolumeStencils : geos::dataRepository::Group + + singlePhaseTPFA : geos::dataRepository::Group + -> cellStencil : geos::dataRepository::Wrapper + -> fractureStencil : geos::dataRepository::Wrapper + -> edfmStencil : geos::dataRepository::Wrapper + -> faceElementToCellStencil : geos::dataRepository::Wrapper + + Constitutive : geos::constitutive::ConstitutiveManager + + water : geos::constitutive::CompressibleSinglePhaseFluid + -> density : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> dDensity_dPressure : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> dDensity_dTemperature : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> density_n : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> viscosity : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> dViscosity_dPressure : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> dViscosity_dTemperature : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> internalEnergy : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> internalEnergy_n : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> dInternalEnergy_dPressure : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> dInternalEnergy_dTemperature : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> enthalpy : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> dEnthalpy_dPressure : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> dEnthalpy_dTemperature : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> defaultDensity : geos::dataRepository::Wrapper + -> defaultViscosity : geos::dataRepository::Wrapper + -> compressibility : geos::dataRepository::Wrapper + -> viscosibility : geos::dataRepository::Wrapper + -> referencePressure : geos::dataRepository::Wrapper + -> referenceDensity : geos::dataRepository::Wrapper + -> referenceViscosity : geos::dataRepository::Wrapper + -> densityModelType : geos::dataRepository::Wrapper + -> viscosityModelType : geos::dataRepository::Wrapper + + rock : geos::constitutive::CompressibleSolid + -> solidModelName : geos::dataRepository::Wrapper, std::allocator > > + -> porosityModelName : geos::dataRepository::Wrapper, std::allocator > > + -> permeabilityModelName : geos::dataRepository::Wrapper, std::allocator > > + -> solidInternalEnergyModelName : geos::dataRepository::Wrapper, std::allocator > > + + nullSolid : geos::constitutive::NullModel + + rockPorosity : geos::constitutive::PressurePorosity + -> defaultReferencePorosity : geos::dataRepository::Wrapper + -> porosity : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> porosity_n : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> dPorosity_dPressure : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> dPorosity_dTemperature : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> initialPorosity : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> referencePorosity : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> referencePressure : geos::dataRepository::Wrapper + -> compressibility : geos::dataRepository::Wrapper + + rockPerm : geos::constitutive::ConstantPermeability + -> permeability : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> dPerm_dPressure : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> permeabilityComponents : geos::dataRepository::Wrapper > + + commandLine : geos::dataRepository::Group + -> inputFileName : geos::dataRepository::Wrapper, std::allocator > > + -> restartFileName : geos::dataRepository::Wrapper, std::allocator > > + -> beginFromRestart : geos::dataRepository::Wrapper + -> problemName : geos::dataRepository::Wrapper, std::allocator > > + -> outputDirectory : geos::dataRepository::Wrapper, std::allocator > > + -> xPartitionsOverride : geos::dataRepository::Wrapper + -> yPartitionsOverride : geos::dataRepository::Wrapper + -> zPartitionsOverride : geos::dataRepository::Wrapper + -> overridePartitionNumbers : geos::dataRepository::Wrapper + -> schemaFileName : geos::dataRepository::Wrapper, std::allocator > > + -> useNonblockingMPI : geos::dataRepository::Wrapper + -> suppressPinned : geos::dataRepository::Wrapper + + FieldSpecifications : geos::FieldSpecificationManager + + initialPressure : geos::FieldSpecificationBase + -> setNames : geos::dataRepository::Wrapper, std::allocator >, 1, camp::int_seq, int, LvArray::ChaiBuffer> > + -> objectPath : geos::dataRepository::Wrapper, std::allocator > > + -> fieldName : geos::dataRepository::Wrapper, std::allocator > > + -> component : geos::dataRepository::Wrapper + -> direction : geos::dataRepository::Wrapper > + -> functionName : geos::dataRepository::Wrapper, std::allocator > > + -> bcApplicationTableName : geos::dataRepository::Wrapper, std::allocator > > + -> scale : geos::dataRepository::Wrapper + -> initialCondition : geos::dataRepository::Wrapper + -> beginTime : geos::dataRepository::Wrapper + -> endTime : geos::dataRepository::Wrapper + -> logLevel : geos::dataRepository::Wrapper + + sourceFlux : geos::SourceFluxBoundaryCondition + -> setNames : geos::dataRepository::Wrapper, std::allocator >, 1, camp::int_seq, int, LvArray::ChaiBuffer> > + -> objectPath : geos::dataRepository::Wrapper, std::allocator > > + -> fieldName : geos::dataRepository::Wrapper, std::allocator > > + -> component : geos::dataRepository::Wrapper + -> direction : geos::dataRepository::Wrapper > + -> functionName : geos::dataRepository::Wrapper, std::allocator > > + -> bcApplicationTableName : geos::dataRepository::Wrapper, std::allocator > > + -> scale : geos::dataRepository::Wrapper + -> initialCondition : geos::dataRepository::Wrapper + -> beginTime : geos::dataRepository::Wrapper + -> endTime : geos::dataRepository::Wrapper + -> logLevel : geos::dataRepository::Wrapper + + sinkFlux : geos::SourceFluxBoundaryCondition + -> setNames : geos::dataRepository::Wrapper, std::allocator >, 1, camp::int_seq, int, LvArray::ChaiBuffer> > + -> objectPath : geos::dataRepository::Wrapper, std::allocator > > + -> fieldName : geos::dataRepository::Wrapper, std::allocator > > + -> component : geos::dataRepository::Wrapper + -> direction : geos::dataRepository::Wrapper > + -> functionName : geos::dataRepository::Wrapper, std::allocator > > + -> bcApplicationTableName : geos::dataRepository::Wrapper, std::allocator > > + -> scale : geos::dataRepository::Wrapper + -> initialCondition : geos::dataRepository::Wrapper + -> beginTime : geos::dataRepository::Wrapper + -> endTime : geos::dataRepository::Wrapper + -> logLevel : geos::dataRepository::Wrapper + + Events : geos::EventManager + -> logLevel : geos::dataRepository::Wrapper + -> minTime : geos::dataRepository::Wrapper + -> maxTime : geos::dataRepository::Wrapper + -> maxCycle : geos::dataRepository::Wrapper + -> time : geos::dataRepository::Wrapper + -> dt : geos::dataRepository::Wrapper + -> cycle : geos::dataRepository::Wrapper + -> currentSubEvent : geos::dataRepository::Wrapper + -> timeOutputFormat : geos::dataRepository::Wrapper + + solverApplications : geos::PeriodicEvent + -> logLevel : geos::dataRepository::Wrapper + -> target : geos::dataRepository::Wrapper, std::allocator > > + -> beginTime : geos::dataRepository::Wrapper + -> endTime : geos::dataRepository::Wrapper + -> forceDt : geos::dataRepository::Wrapper + -> maxEventDt : geos::dataRepository::Wrapper + -> finalDtStretch : geos::dataRepository::Wrapper + -> targetExactStartStop : geos::dataRepository::Wrapper + -> lastTime : geos::dataRepository::Wrapper + -> lastCycle : geos::dataRepository::Wrapper + -> eventForecast : geos::dataRepository::Wrapper + -> currentSubEvent : geos::dataRepository::Wrapper + -> isTargetExecuting : geos::dataRepository::Wrapper + -> timeFrequency : geos::dataRepository::Wrapper + -> cycleFrequency : geos::dataRepository::Wrapper + -> targetExactTimestep : geos::dataRepository::Wrapper + -> function : geos::dataRepository::Wrapper, std::allocator > > + -> object : geos::dataRepository::Wrapper, std::allocator > > + -> set : geos::dataRepository::Wrapper, std::allocator > > + -> stat : geos::dataRepository::Wrapper + -> threshold : geos::dataRepository::Wrapper + + timestepsStatsEvent : geos::PeriodicEvent + -> logLevel : geos::dataRepository::Wrapper + -> target : geos::dataRepository::Wrapper, std::allocator > > + -> beginTime : geos::dataRepository::Wrapper + -> endTime : geos::dataRepository::Wrapper + -> forceDt : geos::dataRepository::Wrapper + -> maxEventDt : geos::dataRepository::Wrapper + -> finalDtStretch : geos::dataRepository::Wrapper + -> targetExactStartStop : geos::dataRepository::Wrapper + -> lastTime : geos::dataRepository::Wrapper + -> lastCycle : geos::dataRepository::Wrapper + -> eventForecast : geos::dataRepository::Wrapper + -> currentSubEvent : geos::dataRepository::Wrapper + -> isTargetExecuting : geos::dataRepository::Wrapper + -> timeFrequency : geos::dataRepository::Wrapper + -> cycleFrequency : geos::dataRepository::Wrapper + -> targetExactTimestep : geos::dataRepository::Wrapper + -> function : geos::dataRepository::Wrapper, std::allocator > > + -> object : geos::dataRepository::Wrapper, std::allocator > > + -> set : geos::dataRepository::Wrapper, std::allocator > > + -> stat : geos::dataRepository::Wrapper + -> threshold : geos::dataRepository::Wrapper + + wholeSimStatsEvent : geos::PeriodicEvent + -> logLevel : geos::dataRepository::Wrapper + -> target : geos::dataRepository::Wrapper, std::allocator > > + -> beginTime : geos::dataRepository::Wrapper + -> endTime : geos::dataRepository::Wrapper + -> forceDt : geos::dataRepository::Wrapper + -> maxEventDt : geos::dataRepository::Wrapper + -> finalDtStretch : geos::dataRepository::Wrapper + -> targetExactStartStop : geos::dataRepository::Wrapper + -> lastTime : geos::dataRepository::Wrapper + -> lastCycle : geos::dataRepository::Wrapper + -> eventForecast : geos::dataRepository::Wrapper + -> currentSubEvent : geos::dataRepository::Wrapper + -> isTargetExecuting : geos::dataRepository::Wrapper + -> timeFrequency : geos::dataRepository::Wrapper + -> cycleFrequency : geos::dataRepository::Wrapper + -> targetExactTimestep : geos::dataRepository::Wrapper + -> function : geos::dataRepository::Wrapper, std::allocator > > + -> object : geos::dataRepository::Wrapper, std::allocator > > + -> set : geos::dataRepository::Wrapper, std::allocator > > + -> stat : geos::dataRepository::Wrapper + -> threshold : geos::dataRepository::Wrapper + + NumericalMethods : geos::NumericalMethodsManager + + FiniteElements : geos::FiniteElementDiscretizationManager + + FiniteVolume : geos::FiniteVolumeManager + + singlePhaseTPFA : geos::TwoPointFluxApproximation + -> fieldName : geos::dataRepository::Wrapper, std::allocator >, 1, camp::int_seq, int, LvArray::ChaiBuffer> > + -> coefficientName : geos::dataRepository::Wrapper, std::allocator > > + -> targetRegions : geos::dataRepository::Wrapper, std::allocator >, LvArray::Array, std::allocator >, 1, camp::int_seq, int, LvArray::ChaiBuffer>, std::integral_constant > > + -> areaRelTol : geos::dataRepository::Wrapper + -> upwindingScheme : geos::dataRepository::Wrapper + -> meanPermCoefficient : geos::dataRepository::Wrapper + -> cellStencil : geos::dataRepository::Wrapper + -> fractureStencil : geos::dataRepository::Wrapper + -> edfmStencil : geos::dataRepository::Wrapper + -> faceElementToCellStencil : geos::dataRepository::Wrapper + -> usePEDFM : geos::dataRepository::Wrapper + + Geometry : geos::GeometricObjectManager + + sourceBox : geos::Box + -> xMin : geos::dataRepository::Wrapper > + -> xMax : geos::dataRepository::Wrapper > + -> strike : geos::dataRepository::Wrapper + -> center : geos::dataRepository::Wrapper > + -> cosStrike : geos::dataRepository::Wrapper + -> sinStrike : geos::dataRepository::Wrapper + + sinkBox : geos::Box + -> xMin : geos::dataRepository::Wrapper > + -> xMax : geos::dataRepository::Wrapper > + -> strike : geos::dataRepository::Wrapper + -> center : geos::dataRepository::Wrapper > + -> cosStrike : geos::dataRepository::Wrapper + -> sinStrike : geos::dataRepository::Wrapper + + Mesh : geos::MeshManager + + mesh : geos::InternalMeshGenerator + -> xCoords : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> yCoords : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> zCoords : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> nx : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> ny : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> nz : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> xBias : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> yBias : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> zBias : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> cellBlockNames : geos::dataRepository::Wrapper, std::allocator >, 1, camp::int_seq, int, LvArray::ChaiBuffer> > + -> elementTypes : geos::dataRepository::Wrapper, std::allocator >, 1, camp::int_seq, int, LvArray::ChaiBuffer> > + -> trianglePattern : geos::dataRepository::Wrapper + -> positionTolerance : geos::dataRepository::Wrapper + + Outputs : geos::OutputManager + + Solvers : geos::PhysicsSolverManager + -> gravityVector : geos::dataRepository::Wrapper > + + testSolver : geos::SinglePhaseFVM + -> logLevel : geos::dataRepository::Wrapper + -> cflFactor : geos::dataRepository::Wrapper + -> maxStableDt : geos::dataRepository::Wrapper + -> discretization : geos::dataRepository::Wrapper, std::allocator > > + -> targetRegions : geos::dataRepository::Wrapper, std::allocator >, 1, camp::int_seq, int, LvArray::ChaiBuffer> > + -> meshTargets : geos::dataRepository::Wrapper, std::allocator >, std::__cxx11::basic_string, std::allocator > >, LvArray::Array, std::allocator >, 1, camp::int_seq, int, LvArray::ChaiBuffer>, std::integral_constant > > + -> initialDt : geos::dataRepository::Wrapper + -> isThermal : geos::dataRepository::Wrapper + -> maxAbsolutePressureChange : geos::dataRepository::Wrapper + -> allowNegativePressure : geos::dataRepository::Wrapper + -> temperature : geos::dataRepository::Wrapper + + LinearSolverParameters : geos::LinearSolverParametersInput + -> logLevel : geos::dataRepository::Wrapper + -> solverType : geos::dataRepository::Wrapper + -> preconditionerType : geos::dataRepository::Wrapper + -> stopIfError : geos::dataRepository::Wrapper + -> directCheckResidual : geos::dataRepository::Wrapper + -> directEquil : geos::dataRepository::Wrapper + -> directColPerm : geos::dataRepository::Wrapper + -> directRowPerm : geos::dataRepository::Wrapper + -> directReplTinyPivot : geos::dataRepository::Wrapper + -> directIterRef : geos::dataRepository::Wrapper + -> directParallel : geos::dataRepository::Wrapper + -> krylovMaxIter : geos::dataRepository::Wrapper + -> krylovMaxRestart : geos::dataRepository::Wrapper + -> krylovTol : geos::dataRepository::Wrapper + -> krylovAdaptiveTol : geos::dataRepository::Wrapper + -> krylovWeakestTol : geos::dataRepository::Wrapper + -> amgNumSweeps : geos::dataRepository::Wrapper + -> amgSmootherType : geos::dataRepository::Wrapper + -> amgRelaxWeight : geos::dataRepository::Wrapper + -> amgCoarseSolver : geos::dataRepository::Wrapper + -> amgCoarseningType : geos::dataRepository::Wrapper + -> amgInterpolationType : geos::dataRepository::Wrapper + -> amgInterpolationMaxNonZeros : geos::dataRepository::Wrapper + -> amgNumFunctions : geos::dataRepository::Wrapper + -> amgAggressiveCoarseningPaths : geos::dataRepository::Wrapper + -> amgAggressiveCoarseningLevels : geos::dataRepository::Wrapper + -> amgAggressiveInterpType : geos::dataRepository::Wrapper + -> amgThreshold : geos::dataRepository::Wrapper + -> amgSeparateComponents : geos::dataRepository::Wrapper + -> amgNullSpaceType : geos::dataRepository::Wrapper + -> iluFill : geos::dataRepository::Wrapper + -> iluThreshold : geos::dataRepository::Wrapper + + NonlinearSolverParameters : geos::NonlinearSolverParameters + -> logLevel : geos::dataRepository::Wrapper + -> lineSearchAction : geos::dataRepository::Wrapper + -> lineSearchInterpolationType : geos::dataRepository::Wrapper + -> lineSearchMaxCuts : geos::dataRepository::Wrapper + -> lineSearchCutFactor : geos::dataRepository::Wrapper + -> normType : geos::dataRepository::Wrapper + -> minNormalizer : geos::dataRepository::Wrapper + -> newtonTol : geos::dataRepository::Wrapper + -> newtonMaxIter : geos::dataRepository::Wrapper + -> newtonMinIter : geos::dataRepository::Wrapper + -> newtonNumberOfIterations : geos::dataRepository::Wrapper + -> maxAllowedResidualNorm : geos::dataRepository::Wrapper + -> allowNonConverged : geos::dataRepository::Wrapper + -> timeStepDecreaseIterLimit : geos::dataRepository::Wrapper + -> timeStepIncreaseIterLimit : geos::dataRepository::Wrapper + -> timeStepDecreaseFactor : geos::dataRepository::Wrapper + -> timeStepIncreaseFactor : geos::dataRepository::Wrapper + -> timeStepCutFactor : geos::dataRepository::Wrapper + -> maxTimeStepCuts : geos::dataRepository::Wrapper + -> maxSubSteps : geos::dataRepository::Wrapper + -> maxNumConfigurationAttempts : geos::dataRepository::Wrapper + -> couplingType : geos::dataRepository::Wrapper + -> sequentialConvergenceCriterion : geos::dataRepository::Wrapper + -> subcycling : geos::dataRepository::Wrapper + -> nonlinearAccelerationType : geos::dataRepository::Wrapper + + SolverStatistics : geos::SolverStatistics + -> numTimeSteps : geos::dataRepository::Wrapper + -> numTimeStepCuts : geos::dataRepository::Wrapper + -> numSuccessfulOuterLoopIterations : geos::dataRepository::Wrapper + -> numSuccessfulNonlinearIterations : geos::dataRepository::Wrapper + -> numSuccessfulLinearIterations : geos::dataRepository::Wrapper + -> numDiscardedOuterLoopIterations : geos::dataRepository::Wrapper + -> numDiscardedNonlinearIterations : geos::dataRepository::Wrapper + -> numDiscardedLinearIterations : geos::dataRepository::Wrapper + + Tasks : geos::TasksManager + + timestepsStats : geos::SourceFluxStatsAggregator + -> logLevel : geos::dataRepository::Wrapper + -> flowSolverName : geos::dataRepository::Wrapper, std::allocator > > + -> fluxNames : geos::dataRepository::Wrapper, std::allocator >, 1, camp::int_seq, int, LvArray::ChaiBuffer> > + + wholeSimStats : geos::SourceFluxStatsAggregator + -> logLevel : geos::dataRepository::Wrapper + -> flowSolverName : geos::dataRepository::Wrapper, std::allocator > > + -> fluxNames : geos::dataRepository::Wrapper, std::allocator >, 1, camp::int_seq, int, LvArray::ChaiBuffer> > + + Functions : geos::FunctionManager + + FluxRate : geos::TableFunction + -> inputVarNames : geos::dataRepository::Wrapper, std::allocator >, 1, camp::int_seq, int, LvArray::ChaiBuffer> > + -> coordinates : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> values : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> coordinateFiles : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > + -> voxelFile : geos::dataRepository::Wrapper + -> interpolation : geos::dataRepository::Wrapper \ No newline at end of file From 4c3fa0b8206347bb7ddb8d037a3381fe7a2292e4 Mon Sep 17 00:00:00 2001 From: MelReyCG Date: Thu, 8 Feb 2024 13:13:30 +0100 Subject: [PATCH 37/98] fixed crashed :) --- .../fluidFlowTests/testFluidStatistics.cpp | 23 +++---------------- 1 file changed, 3 insertions(+), 20 deletions(-) diff --git a/src/coreComponents/unitTests/fluidFlowTests/testFluidStatistics.cpp b/src/coreComponents/unitTests/fluidFlowTests/testFluidStatistics.cpp index e965283c7ee..83b44773cce 100644 --- a/src/coreComponents/unitTests/fluidFlowTests/testFluidStatistics.cpp +++ b/src/coreComponents/unitTests/fluidFlowTests/testFluidStatistics.cpp @@ -119,7 +119,7 @@ struct TestSet totalMeanRate.resize( phaseCount ); for( integer ip = 0; ip < phaseCount; ++ip ) { - for( integer timestepId = 0; timestepId < inputs.fluxRates.size(); ++timestepId ) + for( integer timestepId = 0; timestepId < timestepCount; ++timestepId ) { // mass production / injection calculation sourceRates[timestepId][ip] = inputs.fluxRates[timestepId][ip] * inputs.sourceRateFactor; @@ -307,6 +307,7 @@ class FluidStatisticsTest : public ::testing::Test { ASSERT_TRUE( std::remove( fileName.c_str() ) == 0 ); } + m_tableFileNames.clear(); } private: @@ -518,10 +519,6 @@ TEST_F( FluidStatisticsTest, checkSinglePhaseFluxStatistics ) EXPECT_EQ( timeStepChecker.getTestedTimeStepCount(), testSet.timestepCount ) << "The tested time-step were different than expected."; checkWholeSimFluxStatistics( problem, testSet ); - - GEOS_LOG("c'est toi ? " << __FILE__ << ":" << __LINE__ ); - geos::basicCleanup(); - GEOS_LOG("non..."); } @@ -734,7 +731,6 @@ TestSet getTestSet() testInputs.dt = 500.0; testInputs.sourceElementsCount = 1; testInputs.sinkElementsCount = 1; - GEOS_LOG("c'est toi ? " << __FILE__ << ":" << __LINE__ ); // FluxRate table from 0.0s to 5000.0s testInputs.setFluxRates( { { 0.000, 0.000 }, @@ -749,12 +745,10 @@ TestSet getTestSet() { 0.000, 0.088 }, { 0.000, 0.059 }, { 0.000, 0.000 } } ); - GEOS_LOG("non..."); testInputs.sourceRateFactor = -1.0; testInputs.sinkRateFactor = 1.0; - GEOS_LOG("c'est toi ? " << __FILE__ << ":" << __LINE__ ); return TestSet( testInputs ); } @@ -762,33 +756,21 @@ TestSet getTestSet() TEST_F( FluidStatisticsTest, checkMultiPhaseFluxStatistics ) { TestSet const testSet = getTestSet(); - GEOS_LOG("c'est toi ? " << __FILE__ << ":" << __LINE__ ); writeTableFiles( testSet.inputs.tableFiles ); - GEOS_LOG("non..."); - GEOS_LOG("c'est toi ? " << __FILE__ << ":" << __LINE__ ); GeosxState state( std::make_unique< CommandLineOptions >( g_commandLineOptions ) ); - GEOS_LOG("non..."); ProblemManager & problem = state.getProblemManager(); - GEOS_LOG("c'est toi ? " << __FILE__ << ":" << __LINE__ ); setupProblemFromXML( problem, testSet.inputs.xmlInput.data() ); - GEOS_LOG("non..."); //!\\ TODO : récupération du timestepChecker (à ajouter dans le xml) // run simulation - GEOS_LOG("c'est toi ? " << __FILE__ << ":" << __LINE__ ); EXPECT_FALSE( problem.runSimulation() ) << "Simulation exited early."; - GEOS_LOG("non..."); // EXPECT_EQ( timeStepChecker.getTestedTimeStepCount(), testSet.timestepCount ) << "The tested time-step were different than expected."; checkWholeSimFluxStatistics( problem, testSet ); - - GEOS_LOG("c'est toi ? " << __FILE__ << ":" << __LINE__ ); - geos::basicCleanup(); - GEOS_LOG("non..."); } @@ -803,5 +785,6 @@ int main( int argc, char * * argv ) ::testing::InitGoogleTest( &argc, argv ); g_commandLineOptions = *geos::basicSetup( argc, argv ); int const result = RUN_ALL_TESTS(); + geos::basicCleanup(); return result; } From 41b0fc81bd2d4e6928abf02ec6c7f4bb13a673cc Mon Sep 17 00:00:00 2001 From: MelReyCG Date: Thu, 8 Feb 2024 13:15:26 +0100 Subject: [PATCH 38/98] Revert unwanted pushed files This reverts commit e2ac4465356fa6c2d8f4d640a17fed02202e3c4c. --- .../TOTAL/pangea2-GEOSIntegration.cmake | 86 -- .../TOTAL/pangea2-intlog-gcc@8.3.0.cmake | 88 -- host-configs/TOTAL/xrai-gcc@8.2.0.cmake | 123 -- host-configs/TOTAL/xrai-gcc@8.3.0.cmake | 100 -- mesh hierarchy | 1161 ----------------- 5 files changed, 1558 deletions(-) delete mode 100644 host-configs/TOTAL/pangea2-GEOSIntegration.cmake delete mode 100644 host-configs/TOTAL/pangea2-intlog-gcc@8.3.0.cmake delete mode 100644 host-configs/TOTAL/xrai-gcc@8.2.0.cmake delete mode 100644 host-configs/TOTAL/xrai-gcc@8.3.0.cmake delete mode 100644 mesh hierarchy diff --git a/host-configs/TOTAL/pangea2-GEOSIntegration.cmake b/host-configs/TOTAL/pangea2-GEOSIntegration.cmake deleted file mode 100644 index 470438d2333..00000000000 --- a/host-configs/TOTAL/pangea2-GEOSIntegration.cmake +++ /dev/null @@ -1,86 +0,0 @@ -####################################### -# -# Pangea2 / intlog - Intel 19 build -# -# Load modules in this order: -# 1) cmake/3.23.2 -# 2) gcc/8.3.0 -# 3) openmpi/3.1.0 -# 4) python/3.9.13 -# -######################################## - -set( CONFIG_NAME "pangea2-GEOSIntegration" CACHE PATH "" ) - - -####################################### -# Compilers -####################################### - -set( CMAKE_HOME "/data_local/sw/gcc/RHEL7/8.3.0" CACHE PATH "" ) -set( CMAKE_C_COMPILER "${CMAKE_HOME}/bin/gcc" CACHE PATH "" ) -set( CMAKE_CXX_COMPILER "${CMAKE_HOME}/bin/g++" CACHE PATH "" ) -set( CMAKE_Fortran_COMPILER "${CMAKE_HOME}/bin/gfortran" CACHE PATH "" ) - -set( ENABLE_FORTRAN OFF CACHE BOOL "" FORCE ) - -set( ENABLE_MPI ON CACHE BOOL "" FORCE ) -set( MPI_HOME "/data_local/sw/OpenMPI/RHEL7/4.0.3/gcc/8.3.0" CACHE PATH "" ) -set( MPI_C_COMPILER "${MPI_HOME}/bin/mpicc" CACHE PATH "" ) -set( MPI_CXX_COMPILER "${MPI_HOME}/bin/mpicxx" CACHE PATH "" ) -set( MPI_Fortran_COMPILER "${MPI_HOME}/bin/mpifort" CACHE PATH "" ) -set( MPIEXEC "${MPI_HOME}/bin/mpirun" CACHE PATH "" ) -set( MPIEXEC_NUMPROC_FLAG "-n" CACHE PATH "" ) - -set( ENABLE_MKL ON CACHE BOOL "" ) -set( MKL_ROOT /data_local/sw/intel/RHEL7/compilers_and_libraries_2019.3.199/linux/mkl ) -set( MKL_INCLUDE_DIRS ${MKL_ROOT}/include CACHE STRING "" ) -set( MKL_LIBRARIES ${MKL_ROOT}/lib/intel64/libmkl_intel_lp64.so - ${MKL_ROOT}/lib/intel64/libmkl_sequential.so - ${MKL_ROOT}/lib/intel64/libmkl_core.so - CACHE STRING "" ) - -set( GEOSX_BUILD_OBJ_LIBS OFF CACHE BOOL "" FORCE ) -set( GEOSX_BUILD_SHARED_LIBS ON CACHE BOOL "" FORCE ) - -####################################### -# GENERAL TPLs -####################################### -set( GEOSX_TPL_DIR "/workrd/users/j1092630/GEOS_develop/tplInstall_melXmlV4" CACHE PATH "" FORCE ) - -#set( ENABLE_PYGEOSX ON CACHE BOOL "" ) -set( ENABLE_GTEST_DEATH_TESTS ON CACHE BOOL "" FORCE ) -set( ENABLE_VTK ON CACHE BOOL "" FORCE ) -set( ENABLE_PVTPackage ON CACHE BOOL "" FORCE ) -set( ENABLE_MATHPRESSO ON CACHE BOOL "" FORCE ) -set( ENABLE_BENCHMARKS OFF CACHE BOOL "" FORCE ) - -####################################### -# Solvers dependencies -####################################### -set( ENABLE_HYPRE ON CACHE BOOL "" FORCE ) -set( ENABLE_PETSC OFF CACHE BOOL "" FORCE ) - -####################################### -# Docs & schema generation -####################################### -set( ENABLE_XML_UPDATES OFF CACHE BOOL "" FORCE ) -set( ENABLE_DOCS OFF CACHE BOOL "" FORCE ) -set( ENABLE_DOXYGEN OFF CACHE BOOL "" FORCE ) -set( ENABLE_SPHINX OFF CACHE BOOL "" FORCE ) -set( ENABLE_UNCRUSTIFY ON CACHE BOOL "" FORCE ) - -####################################### -# RAJA/CHAI SETUP -####################################### -option( RAJA_ENABLE_TBB "" OFF ) -option( ENABLE_CALIPER "Enables CALIPER" ON ) -set( ENABLE_CUDA "OFF" CACHE PATH "" FORCE ) -set( CHAI_BUILD_TYPE "cpu-no-rm" CACHE PATH "" FORCE ) -set( CHAI_ARGS "" CACHE PATH "" FORCE ) -set( ENABLE_OPENMP "OFF" CACHE PATH "" FORCE ) -set( RAJA_ENABLE_OPENMP "OFF" CACHE PATH "" FORCE ) - - - -include( ${CMAKE_CURRENT_LIST_DIR}/../tpls.cmake ) diff --git a/host-configs/TOTAL/pangea2-intlog-gcc@8.3.0.cmake b/host-configs/TOTAL/pangea2-intlog-gcc@8.3.0.cmake deleted file mode 100644 index ee5fb4b1509..00000000000 --- a/host-configs/TOTAL/pangea2-intlog-gcc@8.3.0.cmake +++ /dev/null @@ -1,88 +0,0 @@ -####################################### -# -# Pangea2 / intlog - Intel 19 build -# -# Load modules in this order: -# 1) cmake/3.23.2 -# 2) gcc/8.3.0 -# 3) openmpi/3.1.0 -# 4) python/3.9.13 -# -######################################## - - -set( CONFIG_NAME "pangea2-intlog-gcc@8.3.0" CACHE PATH "" ) - -####################################### -# Compilers -####################################### - -set( CMAKE_HOME "/data_local/sw/gcc/RHEL7/8.3.0" CACHE PATH "" ) -set( CMAKE_C_COMPILER "${CMAKE_HOME}/bin/gcc" CACHE PATH "" ) -set( CMAKE_CXX_COMPILER "${CMAKE_HOME}/bin/g++" CACHE PATH "" ) -set( CMAKE_Fortran_COMPILER "${CMAKE_HOME}/bin/gfortran" CACHE PATH "" ) - -set( ENABLE_FORTRAN OFF CACHE BOOL "" FORCE ) - -set( ENABLE_MPI ON CACHE BOOL "" FORCE ) -set( MPI_HOME "/data_local/sw/OpenMPI/RHEL7/4.0.3/gcc/8.3.0" CACHE PATH "" ) -set( MPI_C_COMPILER "${MPI_HOME}/bin/mpicc" CACHE PATH "" ) -set( MPI_CXX_COMPILER "${MPI_HOME}/bin/mpicxx" CACHE PATH "" ) -set( MPI_Fortran_COMPILER "${MPI_HOME}/bin/mpifort" CACHE PATH "" ) -set( MPIEXEC "${MPI_HOME}/bin/mpirun" CACHE PATH "" ) -set( MPIEXEC_NUMPROC_FLAG "-n" CACHE PATH "" ) - -set( ENABLE_MKL ON CACHE BOOL "" ) -set( MKL_ROOT /data_local/sw/intel/RHEL7/compilers_and_libraries_2019.3.199/linux/mkl ) -set( MKL_INCLUDE_DIRS ${MKL_ROOT}/include CACHE STRING "" ) -set( MKL_LIBRARIES ${MKL_ROOT}/lib/intel64/libmkl_intel_lp64.so - ${MKL_ROOT}/lib/intel64/libmkl_sequential.so - ${MKL_ROOT}/lib/intel64/libmkl_core.so - CACHE STRING "" ) - -set( GEOSX_BUILD_OBJ_LIBS OFF CACHE BOOL "" ) -set( GEOSX_BUILD_SHARED_LIBS ON CACHE BOOL "" FORCE ) - -####################################### -# GENERAL TPLs -####################################### -set( GEOSX_TPL_DIR "/data/pau901/VDG_GSI/MelvinREY/WorkEnv/GEOSX_repos/thirdPartyLibs/install-pangea2-intlog-gcc@8.3.0-release" CACHE PATH "" FORCE ) - -set( ENABLE_PYGEOSX ON CACHE BOOL "" ) -set( ENABLE_GTEST_DEATH_TESTS ON CACHE BOOL "" FORCE ) -set( ENABLE_VTK ON CACHE BOOL "" FORCE ) -set( ENABLE_PVTPackage ON CACHE BOOL "" FORCE ) -set( ENABLE_MATHPRESSO ON CACHE BOOL "" FORCE ) -set( ENABLE_BENCHMARKS OFF CACHE BOOL "" FORCE ) - -####################################### -# Solvers dependencies -####################################### -set( ENABLE_HYPRE ON CACHE BOOL "" FORCE ) -set( ENABLE_PETSC OFF CACHE BOOL "" FORCE ) - -####################################### -# Docs & schema generation -####################################### -set( ENABLE_XML_UPDATES ON CACHE BOOL "" FORCE ) -set( ENABLE_DOCS ON CACHE BOOL "" FORCE ) -set( ENABLE_DOXYGEN OFF CACHE BOOL "" FORCE ) -set( ENABLE_SPHINX ON CACHE BOOL "" FORCE ) -set( ENABLE_UNCRUSTIFY ON CACHE BOOL "" FORCE ) - -####################################### -# RAJA/CHAI SETUP -####################################### -option( RAJA_ENABLE_TBB "" OFF ) -option( ENABLE_CALIPER "Enables CALIPER" ON ) -set( ENABLE_CUDA "OFF" CACHE PATH "" FORCE ) -set( CHAI_BUILD_TYPE "cpu-no-rm" CACHE PATH "" FORCE ) -set( CHAI_ARGS "" CACHE PATH "" FORCE ) -set( ENABLE_OPENMP "OFF" CACHE PATH "" FORCE ) -set( RAJA_ENABLE_OPENMP "OFF" CACHE PATH "" FORCE ) - - - - - -include( ${CMAKE_CURRENT_LIST_DIR}/../tpls.cmake ) diff --git a/host-configs/TOTAL/xrai-gcc@8.2.0.cmake b/host-configs/TOTAL/xrai-gcc@8.2.0.cmake deleted file mode 100644 index a3f513998f6..00000000000 --- a/host-configs/TOTAL/xrai-gcc@8.2.0.cmake +++ /dev/null @@ -1,123 +0,0 @@ -site_name(HOST_NAME) - - -set(CMAKE_C_COMPILER "$ENV{CC}" CACHE PATH "" FORCE) -set(CMAKE_CXX_COMPILER "$ENV{CXX}" CACHE PATH "" FORCE) -set(ENABLE_FORTRAN OFF CACHE BOOL "" FORCE) - -set(ENABLE_MPI ON CACHE PATH "" FORCE) -set(MPI_C_COMPILER "$ENV{MPI_ROOT}/bin/mpicc" CACHE PATH "" FORCE) -set(MPI_CXX_COMPILER "$ENV{MPI_ROOT}/bin/mpic++" CACHE PATH "" FORCE) -set(MPI_Fortran_COMPILER "$ENV{MPI_ROOT}/bin/mpifort" CACHE PATH "" FORCE) -set(MPIEXEC_EXECUTABLE "$ENV{MPIEXEC}" CACHE PATH "" FORCE) - -set(ENABLE_GTEST_DEATH_TESTS ON CACHE BOOL "" FORCE) -set(ENABLE_CALIPER ON CACHE BOOL "") - -set(ENABLE_HYPRE ON CACHE BOOL "" FORCE) - -# If not defined as argument, take from the environment... -if(NOT DEFINED ENABLE_HYPRE) - set(ENABLE_HYPRE "$ENV{ENABLE_HYPRE}" CACHE BOOL "" FORCE) -endif() -# ... and then check the value. -if(ENABLE_HYPRE) - set(GEOSX_LA_INTERFACE "Hypre" CACHE STRING "" FORCE) -else() - set(ENABLE_HYPRE OFF CACHE BOOL "" FORCE) -endif() - -# Same pattern -if(NOT DEFINED ENABLE_TRILINOS) - set(ENABLE_TRILINOS "$ENV{ENABLE_TRILINOS}" CACHE BOOL "" FORCE) -endif() -if(ENABLE_TRILINOS) - set(GEOSX_LA_INTERFACE "Trilinos" CACHE STRING "" FORCE) -else() - set(ENABLE_TRILINOS FALSE CACHE BOOL "" FORCE) -endif() - -if( (ENABLE_HYPRE AND ENABLE_TRILINOS) OR (NOT ENABLE_TRILINOS AND NOT ENABLE_HYPRE)) - MESSAGE(SEND_ERROR "Exactly one of ENABLE_HYPRE and ENABLE_TRILINOS must be defined.") - MESSAGE(SEND_ERROR "ENABLE_HYPRE = ${ENABLE_HYPRE}.") - MESSAGE(SEND_ERROR "ENABLE_TRILINOS = ${ENABLE_TRILINOS}.") -endif() - -MESSAGE(STATUS "GEOSX_LA_INTERFACE = ${GEOSX_LA_INTERFACE}") - -set(ENABLE_CUDA "$ENV{ENABLE_CUDA}" CACHE BOOL "" FORCE) -if(ENABLE_CUDA) - - set(CMAKE_CUDA_FLAGS "$ENV{CMAKE_CUDA_FLAGS}" CACHE STRING "" FORCE) - if(NOT CMAKE_CUDA_FLAGS) - set(CMAKE_CUDA_FLAGS "Unused" CACHE STRING "" FORCE) - endif() - - set(CUDA_TOOLKIT_ROOT_DIR "$ENV{CUDA_TOOLKIT_ROOT_DIR}" CACHE PATH "" FORCE) - if(NOT CUDA_TOOLKIT_ROOT_DIR) - set(CUDA_TOOLKIT_ROOT_DIR "/usr/local/cuda" CACHE PATH "" FORCE) - endif() - - set(CUDA_ARCH "$ENV{CUDA_ARCH}" CACHE STRING "" FORCE) - if(NOT CUDA_ARCH) - set(CUDA_ARCH "sm_70" CACHE STRING "" FORCE) - endif() - - if(ENABLE_HYPRE) - set(ENABLE_HYPRE_CUDA ON CACHE BOOL "" FORCE) - endif() - - set(CMAKE_CUDA_FLAGS_RELEASE "-O3 -DNDEBUG -Xcompiler -DNDEBUG -Xcompiler -O3" CACHE STRING "") - set(CMAKE_CUDA_FLAGS_RELWITHDEBINFO "-g -lineinfo ${CMAKE_CUDA_FLAGS_RELEASE}" CACHE STRING "") - set(CMAKE_CUDA_FLAGS_DEBUG "-g -G -O0 -Xcompiler -O0" CACHE STRING "") - -endif() - - -set(ENABLE_PETSC OFF CACHE BOOL "" FORCE) -set(ENABLE_FESAPI OFF CACHE BOOL "" FORCE) - -####################################### -# Docs & schema generation -####################################### -set( ENABLE_XML_UPDATES ON CACHE BOOL "" FORCE ) -set( ENABLE_DOCS ON CACHE BOOL "" FORCE ) -set( ENABLE_DOXYGEN OFF CACHE BOOL "" FORCE ) -set( ENABLE_SPHINX ON CACHE BOOL "" FORCE ) -set( ENABLE_UNCRUSTIFY ON CACHE BOOL "" FORCE ) - - -set(ENABLE_MKL OFF CACHE BOOL "" FORCE) -#set( ENABLE_MKL ON CACHE BOOL "" ) -#set( MKL_ROOT /data_local/sw/intel/RHEL7/compilers_and_libraries_2019.3.199/linux/mkl ) -#set( MKL_INCLUDE_DIRS ${MKL_ROOT}/include CACHE STRING "" ) -#set( MKL_LIBRARIES ${MKL_ROOT}/lib/intel64/libmkl_intel_lp64.so -# ${MKL_ROOT}/lib/intel64/libmkl_sequential.so -# ${MKL_ROOT}/lib/intel64/libmkl_core.so -# CACHE STRING "" ) - - -set(GEOSX_TPL_DIR "${CMAKE_CURRENT_LIST_DIR}/../../../thirdPartyLibs/install-xrai-gcc\@8.2.0-release" CACHE PATH "" FORCE) -if(EXISTS ${GEOSX_TPL_DIR}) - set(GEOSX_TPL_DIR_EXISTS "YES") -endif() - -include(${CMAKE_CURRENT_LIST_DIR}/../tpls.cmake) - - - - -MESSAGE(STATUS "Host config verifications : ") -MESSAGE(STATUS " ENABLE_PETSC = ${ENABLE_PETSC}") -MESSAGE(STATUS " ENABLE_FESAPI = ${ENABLE_FESAPI}") -MESSAGE(STATUS " ENABLE_MKL = ${ENABLE_MKL}") -MESSAGE(STATUS " ENABLE_DOXYGEN = ${ENABLE_DOXYGEN}") -MESSAGE(STATUS " ENABLE_SPHINX = ${ENABLE_SPHINX}") -MESSAGE(STATUS " ENABLE_UNCRUSTIFY =${ENABLE_UNCRUSTIFY}") -MESSAGE(STATUS " TPL_DIR = '${GEOSX_TPL_DIR}'") -MESSAGE(STATUS " TPL_DIR_EXISTS ='${GEOSX_TPL_DIR_EXISTS}'") -MESSAGE(STATUS " HDF5_DIR = '${HDF5_DIR}'") -MESSAGE(STATUS " CONDUIT_DIR = '${CONDUIT_DIR}'") -MESSAGE(STATUS " MPICXXCompiler ='${MPI_CXX_COMPILER}'") -MESSAGE(STATUS " MPIEXECUTABLE = '${MPIEXEC_EXECUTABLE}'") - diff --git a/host-configs/TOTAL/xrai-gcc@8.3.0.cmake b/host-configs/TOTAL/xrai-gcc@8.3.0.cmake deleted file mode 100644 index 9a08bec95ed..00000000000 --- a/host-configs/TOTAL/xrai-gcc@8.3.0.cmake +++ /dev/null @@ -1,100 +0,0 @@ -####################################### -# -# XRAI - ????? build -# -# Load modules in this order: -# -######################################## - - -set( CONFIG_NAME "pangea2-gcc@8.3.0" CACHE PATH "" ) - -####################################### -# Compilers -####################################### - -set( CMAKE_HOME "/appli_res/RESERVOIR/TPP-COREMATCH/gcc/8.3.0" CACHE PATH "" ) -set( CMAKE_C_COMPILER "${CMAKE_HOME}/bin/gcc" CACHE PATH "" ) -set( CMAKE_CXX_COMPILER "${CMAKE_HOME}/bin/g++" CACHE PATH "" ) -set( CMAKE_Fortran_COMPILER "${CMAKE_HOME}/bin/gfortran" CACHE PATH "" ) - -set( ENABLE_FORTRAN OFF CACHE BOOL "" FORCE ) - -set( ENABLE_MPI ON CACHE BOOL "" FORCE ) -set( MPI_HOME "/data/appli_PITSI/MAJIX2018/soft/mpi/install/openmpi-1.10.7" CACHE PATH "" ) -set( MPI_C_COMPILER "${MPI_HOME}/bin/mpicc" CACHE PATH "" ) -set( MPI_CXX_COMPILER "${MPI_HOME}/bin/mpicxx" CACHE PATH "" ) -set( MPI_Fortran_COMPILER "${MPI_HOME}/bin/mpifort" CACHE PATH "" ) -set( MPIEXEC "${MPI_HOME}/bin/mpirun" CACHE PATH "" ) -set( MPIEXEC_NUMPROC_FLAG "-n" CACHE PATH "" ) - -set(ENABLE_MKL OFF CACHE BOOL "" FORCE) -#set( ENABLE_MKL ON CACHE BOOL "" ) -#set( MKL_ROOT /data_local/sw/intel/RHEL7/compilers_and_libraries_2019.3.199/linux/mkl ) -#set( MKL_INCLUDE_DIRS ${MKL_ROOT}/include CACHE STRING "" ) -#set( MKL_LIBRARIES ${MKL_ROOT}/lib/intel64/libmkl_intel_lp64.so -# ${MKL_ROOT}/lib/intel64/libmkl_sequential.so -# ${MKL_ROOT}/lib/intel64/libmkl_core.so -# CACHE STRING "" ) - -set( GEOSX_BUILD_OBJ_LIBS OFF CACHE BOOL "" ) -set( GEOSX_BUILD_SHARED_LIBS ON CACHE BOOL "" FORCE ) - -####################################### -# GENERAL TPLs -####################################### -set( GEOSX_TPL_DIR "/data/pau901/VDG_GSI/MelvinREY/WorkEnv/GEOSX_repos/thirdPartyLibs/install-xrai-gcc@8.3.0-release" CACHE PATH "" FORCE ) - -set( ENABLE_PYGEOSX ON CACHE BOOL "" ) -set( ENABLE_GTEST_DEATH_TESTS ON CACHE BOOL "" FORCE ) -set( ENABLE_VTK ON CACHE BOOL "" FORCE ) -set( ENABLE_PVTPackage ON CACHE BOOL "" FORCE ) -set( ENABLE_MATHPRESSO ON CACHE BOOL "" FORCE ) -set( ENABLE_BENCHMARKS OFF CACHE BOOL "" FORCE ) - -####################################### -# Solvers dependencies -####################################### -set( ENABLE_HYPRE ON CACHE BOOL "" FORCE ) -set( ENABLE_PETSC OFF CACHE BOOL "" FORCE ) -set(ENABLE_FESAPI OFF CACHE BOOL "" FORCE) - -####################################### -# Docs & schema generation -####################################### -set( ENABLE_XML_UPDATES ON CACHE BOOL "" FORCE ) -set( ENABLE_DOCS ON CACHE BOOL "" FORCE ) -set( ENABLE_DOXYGEN OFF CACHE BOOL "" FORCE ) -set( ENABLE_SPHINX ON CACHE BOOL "" FORCE ) -set( ENABLE_UNCRUSTIFY ON CACHE BOOL "" FORCE ) - -####################################### -# RAJA/CHAI SETUP -####################################### -option( RAJA_ENABLE_TBB "" OFF ) -option( ENABLE_CALIPER "Enables CALIPER" ON ) -set( ENABLE_CUDA "OFF" CACHE PATH "" FORCE ) -set( CHAI_BUILD_TYPE "cpu-no-rm" CACHE PATH "" FORCE ) -set( CHAI_ARGS "" CACHE PATH "" FORCE ) -set( ENABLE_OPENMP "OFF" CACHE PATH "" FORCE ) -set( RAJA_ENABLE_OPENMP "OFF" CACHE PATH "" FORCE ) - - - - - -include( ${CMAKE_CURRENT_LIST_DIR}/../tpls.cmake ) - -MESSAGE(STATUS "Host config verifications : ") -MESSAGE(STATUS " ENABLE_PETSC = ${ENABLE_PETSC}") -MESSAGE(STATUS " ENABLE_FESAPI = ${ENABLE_FESAPI}") -MESSAGE(STATUS " ENABLE_MKL = ${ENABLE_MKL}") -MESSAGE(STATUS " ENABLE_DOXYGEN = ${ENABLE_DOXYGEN}") -MESSAGE(STATUS " ENABLE_SPHINX = ${ENABLE_SPHINX}") -MESSAGE(STATUS " ENABLE_UNCRUSTIFY =${ENABLE_UNCRUSTIFY}") -MESSAGE(STATUS " TPL_DIR = '${GEOSX_TPL_DIR}'") -MESSAGE(STATUS " TPL_DIR_EXISTS ='${GEOSX_TPL_DIR_EXISTS}'") -MESSAGE(STATUS " HDF5_DIR = '${HDF5_DIR}'") -MESSAGE(STATUS " CONDUIT_DIR = '${CONDUIT_DIR}'") -MESSAGE(STATUS " MPICXXCompiler ='${MPI_CXX_COMPILER}'") -MESSAGE(STATUS " MPIEXECUTABLE = '${MPIEXEC_EXECUTABLE}'") diff --git a/mesh hierarchy b/mesh hierarchy deleted file mode 100644 index afa22811635..00000000000 --- a/mesh hierarchy +++ /dev/null @@ -1,1161 +0,0 @@ - 1/193 Test #1: blt_gtest_smoke ...................................... Passed 0.02 sec - 2/193 Test #2: blt_mpi_smoke ........................................ Passed 0.60 sec - 3/193 Test #3: testUncrustifyCheck ..................................***Failed 56.19 sec - 4/193 Test #4: testArray1D .......................................... Passed 0.07 sec - 5/193 Test #5: testArray1DOfArray1D ................................. Passed 0.04 sec - 6/193 Test #6: testArray1DOfArray1DOfArray1D ........................ Passed 0.06 sec - 7/193 Test #7: testArrayOfArrays .................................... Passed 0.38 sec - 8/193 Test #8: testArrayOfSets ...................................... Passed 0.21 sec - 9/193 Test #9: testArraySlice ....................................... Passed 0.03 sec - 10/193 Test #10: testArrayView_copyAssignmentOperator ................. Passed 0.04 sec - 11/193 Test #11: testArrayView_copyConstructor ........................ Passed 0.04 sec - 12/193 Test #12: testArrayView_defaultConstructor ..................... Passed 0.03 sec - 13/193 Test #13: testArrayView_emptyMove .............................. Passed 0.03 sec - 14/193 Test #14: testArrayView_modifyInKernel ......................... Passed 0.03 sec - 15/193 Test #15: testArrayView_modifyInMultipleKernels ................ Passed 0.03 sec - 16/193 Test #16: testArrayView_move ................................... Passed 0.03 sec - 17/193 Test #17: testArrayView_moveMultipleTimes ...................... Passed 0.03 sec - 18/193 Test #18: testArrayView_moveNoTouch ............................ Passed 0.03 sec - 19/193 Test #19: testArrayView_readInKernel ........................... Passed 0.03 sec - 20/193 Test #20: testArrayView_setValues .............................. Passed 0.03 sec - 21/193 Test #21: testArrayView_setValuesFromView ...................... Passed 0.03 sec - 22/193 Test #22: testArrayView_toSlice ................................ Passed 0.04 sec - 23/193 Test #23: testArrayView_toSliceConst ........................... Passed 0.04 sec - 24/193 Test #24: testArrayView_toView ................................. Passed 0.04 sec - 25/193 Test #25: testArrayView_toViewConst ............................ Passed 0.04 sec - 26/193 Test #26: testArrayView_typeConversion ......................... Passed 0.03 sec - 27/193 Test #27: testArrayView_udcToSlice ............................. Passed 0.04 sec - 28/193 Test #28: testArrayView_udcToSliceConst ........................ Passed 0.04 sec - 29/193 Test #29: testArrayView_udcToViewConst ......................... Passed 0.04 sec - 30/193 Test #30: testArrayView_zero ................................... Passed 0.03 sec - 31/193 Test #31: testArray_clear ...................................... Passed 0.05 sec - 32/193 Test #32: testArray_copyAssignmentOperator ..................... Passed 0.05 sec - 33/193 Test #33: testArray_copyConstructor ............................ Passed 0.04 sec - 34/193 Test #34: testArray_defaultConstructor ......................... Passed 0.03 sec - 35/193 Test #35: testArray_getSetSingleParameterResizeIndex ........... Passed 0.04 sec - 36/193 Test #36: testArray_indexing ................................... Passed 0.04 sec - 37/193 Test #37: testArray_moveAssignmentOperator ..................... Passed 0.05 sec - 38/193 Test #38: testArray_moveConstructor ............................ Passed 0.04 sec - 39/193 Test #39: testArray_reserveAndCapacity ......................... Passed 0.07 sec - 40/193 Test #40: testArray_resize ..................................... Passed 0.18 sec - 41/193 Test #41: testArray_resizeDefault .............................. Passed 0.17 sec - 42/193 Test #42: testArray_resizeDimension ............................ Passed 0.10 sec - 43/193 Test #43: testArray_resizeFromArgs ............................. Passed 0.06 sec - 44/193 Test #44: testArray_resizeFromPointer .......................... Passed 0.06 sec - 45/193 Test #45: testArray_resizeWithoutInitializationOrDestruction ... Passed 0.04 sec - 46/193 Test #46: testArray_sizedConstructor ........................... Passed 0.04 sec - 47/193 Test #47: testArray_toView ..................................... Passed 0.05 sec - 48/193 Test #48: testArray_toViewConst ................................ Passed 0.05 sec - 49/193 Test #49: testBuffers .......................................... Passed 0.04 sec - 50/193 Test #50: testCRSMatrix ........................................ Passed 0.14 sec - 51/193 Test #51: testIndexing ......................................... Passed 0.43 sec - 52/193 Test #52: testInput ............................................ Passed 0.03 sec - 53/193 Test #53: testIntegerConversion ................................ Passed 0.11 sec - 54/193 Test #54: testMath ............................................. Passed 0.03 sec - 55/193 Test #55: testMemcpy ........................................... Passed 0.04 sec - 56/193 Test #56: testSliceHelpers ..................................... Passed 0.04 sec - 57/193 Test #57: testSortedArray ...................................... Passed 0.07 sec - 58/193 Test #58: testSortedArrayManipulation .......................... Passed 0.06 sec - 59/193 Test #59: testSparsityPattern .................................. Passed 0.22 sec - 60/193 Test #60: testStackArray ....................................... Passed 0.15 sec - 61/193 Test #61: testTensorOpsDeterminant ............................. Passed 0.04 sec - 62/193 Test #62: testTensorOpsEigen ................................... Passed 0.04 sec - 63/193 Test #63: testTensorOpsInverseOneArg ........................... Passed 0.03 sec - 64/193 Test #64: testTensorOpsInverseTwoArgs .......................... Passed 0.04 sec - 65/193 Test #65: testTensorOpsSymDeterminant .......................... Passed 0.03 sec - 66/193 Test #66: testTensorOpsSymInverseOneArg ........................ Passed 0.03 sec - 67/193 Test #67: testTensorOpsSymInverseTwoArgs ....................... Passed 0.03 sec - 68/193 Test #68: testTypeManipulation ................................. Passed 0.04 sec - 69/193 Test #69: testStackTrace ....................................... Passed 0.02 sec - 70/193 Test #70: testInvalidOperations ................................ Passed 0.03 sec - 71/193 Test #71: testChaiBuffer ....................................... Passed 0.03 sec - 72/193 Test #72: testArray_ChaiBuffer ................................. Passed 0.03 sec - 73/193 Test #73: testFloatingPointExceptions .......................... Passed 0.09 sec - 74/193 Test #74: testTensorOps ........................................ Passed 0.09 sec - 75/193 Test #75: testPyArray .......................................... Passed 1.52 sec - 76/193 Test #76: testPySortedArray .................................... Passed 0.39 sec - 77/193 Test #77: testPyCRSMatrix ...................................... Passed 0.72 sec - 78/193 Test #78: testPythonScalars .................................... Passed 0.39 sec - 79/193 Test #79: testPythonListOfStrings .............................. Passed 0.35 sec - 80/193 Test #80: testPyCallback ....................................... Passed 0.35 sec - 81/193 Test #81: testPyArrayOfArrays .................................. Passed 0.38 sec - 82/193 Test #82: testPyArrayOfSets .................................... Passed 0.36 sec - 83/193 Test #83: exampleTestFoo ....................................... Passed 0.03 sec - 84/193 Test #84: exampleBuffers ....................................... Passed 0.04 sec - 85/193 Test #85: exampleArray ......................................... Passed 0.03 sec - 86/193 Test #86: exampleSortedArray ................................... Passed 0.03 sec - 87/193 Test #87: exampleArrayOfArrays ................................. Passed 0.04 sec - 88/193 Test #88: exampleArrayOfSets ................................... Passed 0.02 sec - 89/193 Test #89: exampleSparsityPatternAndCRSMatrix ................... Passed 0.02 sec - 90/193 Test #90: exampleTensorOps ..................................... Passed 0.03 sec - 91/193 Test #91: testDataTypes ........................................ Passed 0.04 sec - 92/193 Test #92: testFixedSizeDeque ................................... Passed 0.04 sec - 93/193 Test #93: testTypeDispatch ..................................... Passed 0.04 sec - 94/193 Test #94: testLifoStorage ...................................... Passed 0.12 sec - 95/193 Test #95: testUnits ............................................ Passed 0.04 sec - 96/193 Test #96: testCaliperSmoke ..................................... Passed 0.04 sec - 97/193 Test #97: testGeosxTraits ...................................... Passed 0.04 sec - 98/193 Test #98: testStringUtilities .................................. Passed 0.04 sec - 99/193 Test #99: testParsing .......................................... Passed 0.08 sec -100/193 Test #100: testDefaultValue ..................................... Passed 0.04 sec -101/193 Test #101: testWrapper .......................................... Passed 0.06 sec -102/193 Test #102: testXmlWrapper ....................................... Passed 0.15 sec -103/193 Test #103: testBufferOps ........................................ Passed 0.04 sec -104/193 Test #104: testFunctions ........................................ Passed 0.25 sec -105/193 Test #105: testCompositionalProperties .......................... Passed 0.22 sec -106/193 Test #106: testDamageUtilities .................................. Passed 0.13 sec -107/193 Test #107: testDruckerPrager .................................... Passed 0.17 sec -108/193 Test #108: testElasticIsotropic ................................. Passed 0.15 sec -109/193 Test #109: testKValueInitialization ............................. Passed 0.13 sec -110/193 Test #110: testModifiedCamClay .................................. Passed 0.15 sec -111/193 Test #111: testNegativeTwoPhaseFlash ............................ Passed 0.14 sec -112/193 Test #112: testParticleFluidEnums ............................... Passed 0.13 sec -113/193 Test #113: testPropertyConversions .............................. Passed 0.13 sec -114/193 Test #114: testCubicEOS ......................................... Passed 0.14 sec -115/193 Test #115: testRachfordRice ..................................... Passed 0.13 sec -116/193 Test #116: testMeshObjectPath ................................... Passed 0.49 sec -117/193 Test #117: testComputationalGeometry ............................ Passed 0.13 sec -118/193 Test #118: testGeometricObjects ................................. Passed 0.13 sec -119/193 Test #119: testBlasLapack ....................................... Passed 0.49 sec -120/193 Test #120: testLinearSolverParametersEnums ...................... Passed 0.87 sec -121/193 Test #121: testComponentMask .................................... Passed 0.41 sec -122/193 Test #122: testMatrices ......................................... Passed 0.83 sec -123/193 Test #123: testVectors .......................................... Passed 1.33 sec -124/193 Test #124: testExternalSolvers .................................. Passed 3.37 sec -125/193 Test #125: testKrylovSolvers .................................... Passed 2.50 sec -126/193 Test #126: testReverseCutHillMcKeeOrdering ...................... Passed 0.54 sec -127/193 Test #127: testFiniteElementBase ................................ Passed 0.13 sec -128/193 Test #128: testH1_QuadrilateralFace_Lagrange1_GaussLegendre2 .... Passed 0.04 sec -129/193 Test #129: testH1_Hexahedron_Lagrange1_GaussLegendre2 ........... Passed 0.04 sec -130/193 Test #130: testH1_Tetrahedron_Lagrange1_Gauss1 .................. Passed 0.04 sec -131/193 Test #131: testH1_Wedge_Lagrange1_Gauss6 ........................ Passed 0.04 sec -132/193 Test #132: testH1_Pyramid_Lagrange1_Gauss5 ...................... Passed 0.05 sec -133/193 Test #133: testH1_TriangleFace_Lagrange1_Gauss1 ................. Passed 0.04 sec -134/193 Test #134: testQ3_Hexahedron_Lagrange_GaussLobatto .............. Passed 0.04 sec -135/193 Test #135: testQ5_Hexahedron_Lagrange_GaussLobatto .............. Passed 0.05 sec -136/193 Test #136: testToolchain ........................................ Passed 0.40 sec -137/193 Test #137: testXML .............................................. Passed 0.99 sec -138/193 Test #138: testXMLFile_basic_input .............................. Passed 0.81 sec -139/193 Test #139: testXMLFile_include_input ............................ Passed 0.78 sec -140/193 Test #140: testXMLFile_multiple_input ........................... Passed 0.80 sec -141/193 Test #141: testConformingVirtualElementOrder1 ................... Passed 0.77 sec -142/193 Test #142: testDofManager ....................................... Passed 2.22 sec -143/193 Test #143: testLAIHelperFunctions ............................... Passed 0.87 sec -144/193 Test #144: testObjectCatalog .................................... Passed 0.68 sec -145/193 Test #145: testRestartBasic ..................................... Passed 3.40 sec -146/193 Test #146: testRestartExtended .................................. Passed 0.74 sec -147/193 Test #147: testPacking .......................................... Passed 0.81 sec -148/193 Test #148: testWrapperHelpers ................................... Passed 0.71 sec -149/193 Test #149: testGroupPath ........................................ Passed 0.99 sec -150/193 Test #150: testAquiferBoundaryCondition ......................... Passed 0.69 sec -151/193 Test #151: testFieldSpecificationsEnums ......................... Passed 0.35 sec -152/193 Test #152: testRecursiveFieldApplication ........................ Passed 0.95 sec -153/193 Test #153: testDamage ........................................... Passed 0.43 sec -154/193 Test #154: testRelPerm .......................................... Passed 0.75 sec -155/193 Test #155: testRelPermHysteresis ................................ Passed 0.71 sec -156/193 Test #156: testCapillaryPressure ................................ Passed 0.75 sec -157/193 Test #157: testMultiFluid ....................................... Passed 5.81 sec -158/193 Test #158: testCO2BrinePVTModels ................................ Passed 9.10 sec -159/193 Test #159: testTriaxial_druckerPragerExtended ................... Passed 0.75 sec -160/193 Test #160: testTriaxial_elasticIsotropic ........................ Passed 0.75 sec -161/193 Test #161: testTriaxial_elasticIsotropicPressureDependent ....... Passed 0.74 sec -162/193 Test #162: testTriaxial_modifiedCamClay ......................... Passed 0.80 sec -163/193 Test #163: testTriaxial_delftEggUseLinear ....................... Passed 0.80 sec -164/193 Test #164: testTriaxial_modifiedCamClayVolumetric ............... Passed 0.75 sec -165/193 Test #165: testTriaxial_delftEggLoadPathDryUseLinear ............ Passed 0.75 sec -166/193 Test #166: testTriaxial_delftEggLoadPathWetUseLinear ............ Passed 0.76 sec -167/193 Test #167: testTriaxial_delftEggCase1 ........................... Passed 0.76 sec -168/193 Test #168: testTriaxial_delftEggCase2 ........................... Passed 0.73 sec -169/193 Test #169: testPVT .............................................. Passed 0.84 sec -170/193 Test #170: testPVT_CO2Brine ..................................... Passed 0.94 sec -171/193 Test #171: testPVT_PhaseComposition ............................. Passed 0.87 sec -172/193 Test #172: testReactiveFluid .................................... Passed 0.82 sec -173/193 Test #173: testMeshEnums ........................................ Passed 0.37 sec -174/193 Test #174: testMeshGeneration ................................... Passed 0.74 sec -175/193 Test #175: testNeighborCommunicator ............................. Passed 0.78 sec -176/193 Test #176: testVTKImport ........................................ Passed 0.88 sec -177/193 Test #177: testNeighborCommunicator_mpi ......................... Passed 0.75 sec -178/193 Test #178: testVTKImport_mpi .................................... Passed 0.87 sec -179/193 Test #179: testMimeticInnerProducts ............................. Passed 0.79 sec -180/193 Test #180: testHDFFile .......................................... Passed 9.58 sec -181/193 Test #181: testHDFParallelFile .................................. Passed 8.98 sec -182/193 Test #182: testSinglePhaseBaseKernels ........................... Passed 0.69 sec -183/193 Test #183: testThermalCompMultiphaseFlow ........................ Passed 2.59 sec -184/193 Test #184: testThermalSinglePhaseFlow ........................... Passed 1.36 sec -185/193 Test # testFluidStatistics .................................. Passed 0.96 sec -186/193 Test #186: testCompMultiphaseFlow ............................... Passed 1.03 sec -187/193 Test #187: testCompMultiphaseFlowHybrid ......................... Passed 1.58 sec -188/193 Test #188: testReactiveCompositionalMultiphaseOBL ............... Passed 1.19 sec -189/193 Test #189: testReservoirSinglePhaseMSWells ...................... Passed 1.02 sec -190/193 Test #190: testWellEnums ........................................ Passed 0.63 sec -191/193 Test #191: testReservoirCompositionalMultiphaseMSWells .......... Passed 1.20 sec -192/193 Test #192: testWavePropagation .................................. Passed 0.76 sec -193/193 Test #193: testWavePropagationAcousticFirstOrder ................ Passed 0.73 sec - - - - Problem : geos::ProblemManager - - domain : geos::DomainPartition - -> Neighbors : geos::dataRepository::Wrapper > > - -> partitionManager : geos::dataRepository::Wrapper - - MeshBodies : geos::dataRepository::Group - - mesh : geos::MeshBody - - meshLevels : geos::dataRepository::Group - - Level0 : geos::MeshLevel - -> meshLevel : geos::dataRepository::Wrapper - - nodeManager : geos::NodeManager - -> localToGlobalMap : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> globalToLocalMap : geos::dataRepository::Wrapper > > - -> isExternal : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> ghostRank : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> domainBoundaryIndicator : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> ReferencePosition : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> edgeList : geos::dataRepository::Wrapper > > - -> faceList : geos::dataRepository::Wrapper > > - -> elemRegionList : geos::dataRepository::Wrapper > - -> elemSubRegionList : geos::dataRepository::Wrapper > - -> elemList : geos::dataRepository::Wrapper > - - sets : geos::dataRepository::Group - -> externalSet : geos::dataRepository::Wrapper > - -> all : geos::dataRepository::Wrapper > - -> xneg : geos::dataRepository::Wrapper > - -> xpos : geos::dataRepository::Wrapper > - -> yneg : geos::dataRepository::Wrapper > - -> ypos : geos::dataRepository::Wrapper > - -> zneg : geos::dataRepository::Wrapper > - -> zpos : geos::dataRepository::Wrapper > - -> sourceBox : geos::dataRepository::Wrapper > - -> sinkBox : geos::dataRepository::Wrapper > - - neighborData : geos::dataRepository::Group - - ParticleRegions : geos::ParticleManager - -> localToGlobalMap : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> globalToLocalMap : geos::dataRepository::Wrapper > > - -> isExternal : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> ghostRank : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> domainBoundaryIndicator : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - - sets : geos::dataRepository::Group - -> externalSet : geos::dataRepository::Wrapper > - - neighborData : geos::dataRepository::Group - - particleRegionsGroup : geos::dataRepository::Group - - edgeManager : geos::EdgeManager - -> localToGlobalMap : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> globalToLocalMap : geos::dataRepository::Wrapper > > - -> isExternal : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> ghostRank : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> domainBoundaryIndicator : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> nodeList : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > > - -> faceList : geos::dataRepository::Wrapper > > - - sets : geos::dataRepository::Group - -> externalSet : geos::dataRepository::Wrapper > - -> all : geos::dataRepository::Wrapper > - -> xneg : geos::dataRepository::Wrapper > - -> xpos : geos::dataRepository::Wrapper > - -> yneg : geos::dataRepository::Wrapper > - -> ypos : geos::dataRepository::Wrapper > - -> zneg : geos::dataRepository::Wrapper > - -> zpos : geos::dataRepository::Wrapper > - -> sourceBox : geos::dataRepository::Wrapper > - -> sinkBox : geos::dataRepository::Wrapper > - - neighborData : geos::dataRepository::Group - - faceManager : geos::FaceManager - -> localToGlobalMap : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> globalToLocalMap : geos::dataRepository::Wrapper > > - -> isExternal : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> ghostRank : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> domainBoundaryIndicator : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> nodeList : geos::dataRepository::Wrapper > > - -> edgeList : geos::dataRepository::Wrapper > > - -> elemRegionList : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> elemSubRegionList : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> elemList : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> faceArea : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> faceCenter : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> faceNormal : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> gravityCoefficient : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> permeabilityTransMultiplier : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> facePressure : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - - sets : geos::dataRepository::Group - -> externalSet : geos::dataRepository::Wrapper > - -> all : geos::dataRepository::Wrapper > - -> xneg : geos::dataRepository::Wrapper > - -> xpos : geos::dataRepository::Wrapper > - -> yneg : geos::dataRepository::Wrapper > - -> ypos : geos::dataRepository::Wrapper > - -> zneg : geos::dataRepository::Wrapper > - -> zpos : geos::dataRepository::Wrapper > - -> sourceBox : geos::dataRepository::Wrapper > - -> sinkBox : geos::dataRepository::Wrapper > - - neighborData : geos::dataRepository::Group - - ElementRegions : geos::ElementRegionManager - -> localToGlobalMap : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> globalToLocalMap : geos::dataRepository::Wrapper > > - -> isExternal : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> ghostRank : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> domainBoundaryIndicator : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - - sets : geos::dataRepository::Group - -> externalSet : geos::dataRepository::Wrapper > - - neighborData : geos::dataRepository::Group - - elementRegionsGroup : geos::dataRepository::Group - - reservoir : geos::CellElementRegion - -> localToGlobalMap : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> globalToLocalMap : geos::dataRepository::Wrapper > > - -> isExternal : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> ghostRank : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> domainBoundaryIndicator : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> materialList : geos::dataRepository::Wrapper, std::allocator >, 1, camp::int_seq, int, LvArray::ChaiBuffer> > - -> meshBody : geos::dataRepository::Wrapper, std::allocator > > - -> cellBlocks : geos::dataRepository::Wrapper, std::allocator >, 1, camp::int_seq, int, LvArray::ChaiBuffer> > - -> coarseningRatio : geos::dataRepository::Wrapper - -> sourceFlux_region_stats_for_timestepsStats : geos::dataRepository::Wrapper - -> sinkFlux_region_stats_for_timestepsStats : geos::dataRepository::Wrapper - -> sourceFlux_region_stats_for_wholeSimStats : geos::dataRepository::Wrapper - -> sinkFlux_region_stats_for_wholeSimStats : geos::dataRepository::Wrapper - - sets : geos::dataRepository::Group - -> externalSet : geos::dataRepository::Wrapper > - - neighborData : geos::dataRepository::Group - - elementSubRegions : geos::dataRepository::Group - - cellBlock : geos::CellElementSubRegion - -> localToGlobalMap : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> globalToLocalMap : geos::dataRepository::Wrapper > > - -> isExternal : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> ghostRank : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> domainBoundaryIndicator : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> numNodesPerElement : geos::dataRepository::Wrapper - -> numEdgesPerElement : geos::dataRepository::Wrapper - -> numFacesPerElement : geos::dataRepository::Wrapper - -> elementCenter : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> elementVolume : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> nodeList : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > > - -> edgeList : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > > - -> faceList : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > > - -> ConstitutiveGrouping : geos::dataRepository::Wrapper, std::allocator >, LvArray::Array, int, LvArray::ChaiBuffer>, std::integral_constant > > - -> ConstitutivePointVolumeFraction : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> dNdX : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> detJ : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> ToEmbeddedSurfaces : geos::dataRepository::Wrapper > > - -> fracturedCells : geos::dataRepository::Wrapper > - -> water_density : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> water_dDensity_dPressure : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> water_dDensity_dTemperature : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> water_density_n : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> water_viscosity : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> water_dViscosity_dPressure : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> water_dViscosity_dTemperature : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> water_internalEnergy : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> water_internalEnergy_n : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> water_dInternalEnergy_dPressure : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> water_dInternalEnergy_dTemperature : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> water_enthalpy : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> water_dEnthalpy_dPressure : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> water_dEnthalpy_dTemperature : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> rockPorosity_porosity : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> rockPorosity_porosity_n : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> rockPorosity_dPorosity_dPressure : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> rockPorosity_dPorosity_dTemperature : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> rockPorosity_initialPorosity : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> rockPorosity_referencePorosity : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> rockPerm_permeability : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> rockPerm_dPerm_dPressure : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> fluidNames : geos::dataRepository::Wrapper, std::allocator > > - -> solidNames : geos::dataRepository::Wrapper, std::allocator > > - -> permeabilityNames : geos::dataRepository::Wrapper, std::allocator > > - -> gravityCoefficient : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> netToGross : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> pressure : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> pressure_n : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> initialPressure : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> deltaPressure : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> bcPressure : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> deltaVolume : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> temperature : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> temperature_n : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> initialTemperature : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> bcTemperature : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> mobility : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> dMobility_dPressure : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> sourceFlux_region_stats_for_timestepsStats : geos::dataRepository::Wrapper - -> sinkFlux_region_stats_for_timestepsStats : geos::dataRepository::Wrapper - -> sourceFlux_region_stats_for_wholeSimStats : geos::dataRepository::Wrapper - -> sinkFlux_region_stats_for_wholeSimStats : geos::dataRepository::Wrapper - - sets : geos::dataRepository::Group - -> externalSet : geos::dataRepository::Wrapper > - -> all : geos::dataRepository::Wrapper > - -> xneg : geos::dataRepository::Wrapper > - -> xpos : geos::dataRepository::Wrapper > - -> yneg : geos::dataRepository::Wrapper > - -> ypos : geos::dataRepository::Wrapper > - -> zneg : geos::dataRepository::Wrapper > - -> zpos : geos::dataRepository::Wrapper > - -> sourceBox : geos::dataRepository::Wrapper > - -> sinkBox : geos::dataRepository::Wrapper > - - neighborData : geos::dataRepository::Group - - ConstitutiveModels : geos::dataRepository::Group - - water : geos::constitutive::CompressibleSinglePhaseFluid - -> density : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> dDensity_dPressure : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> dDensity_dTemperature : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> density_n : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> viscosity : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> dViscosity_dPressure : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> dViscosity_dTemperature : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> internalEnergy : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> internalEnergy_n : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> dInternalEnergy_dPressure : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> dInternalEnergy_dTemperature : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> enthalpy : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> dEnthalpy_dPressure : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> dEnthalpy_dTemperature : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> defaultDensity : geos::dataRepository::Wrapper - -> defaultViscosity : geos::dataRepository::Wrapper - -> compressibility : geos::dataRepository::Wrapper - -> viscosibility : geos::dataRepository::Wrapper - -> referencePressure : geos::dataRepository::Wrapper - -> referenceDensity : geos::dataRepository::Wrapper - -> referenceViscosity : geos::dataRepository::Wrapper - -> densityModelType : geos::dataRepository::Wrapper - -> viscosityModelType : geos::dataRepository::Wrapper - - rock : geos::constitutive::CompressibleSolid - -> solidModelName : geos::dataRepository::Wrapper, std::allocator > > - -> porosityModelName : geos::dataRepository::Wrapper, std::allocator > > - -> permeabilityModelName : geos::dataRepository::Wrapper, std::allocator > > - -> solidInternalEnergyModelName : geos::dataRepository::Wrapper, std::allocator > > - - nullSolid : geos::constitutive::NullModel - - rockPorosity : geos::constitutive::PressurePorosity - -> defaultReferencePorosity : geos::dataRepository::Wrapper - -> porosity : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> porosity_n : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> dPorosity_dPressure : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> dPorosity_dTemperature : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> initialPorosity : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> referencePorosity : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> referencePressure : geos::dataRepository::Wrapper - -> compressibility : geos::dataRepository::Wrapper - - rockPerm : geos::constitutive::ConstantPermeability - -> permeability : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> dPerm_dPressure : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> permeabilityComponents : geos::dataRepository::Wrapper > - - embeddedSurfacesEdgeManager : geos::EdgeManager - -> localToGlobalMap : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> globalToLocalMap : geos::dataRepository::Wrapper > > - -> isExternal : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> ghostRank : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> domainBoundaryIndicator : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> nodeList : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > > - -> faceList : geos::dataRepository::Wrapper > > - - sets : geos::dataRepository::Group - -> externalSet : geos::dataRepository::Wrapper > - - neighborData : geos::dataRepository::Group - - embeddedSurfacesNodeManager : geos::EmbeddedSurfaceNodeManager - -> localToGlobalMap : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> globalToLocalMap : geos::dataRepository::Wrapper > > - -> isExternal : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> ghostRank : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> domainBoundaryIndicator : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> referencePosition : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> edgeList : geos::dataRepository::Wrapper > > - -> elemRegionList : geos::dataRepository::Wrapper > - -> elemSubRegionList : geos::dataRepository::Wrapper > - -> elemList : geos::dataRepository::Wrapper > - -> parentEdgeGlobalIndex : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - - sets : geos::dataRepository::Group - -> externalSet : geos::dataRepository::Wrapper > - - neighborData : geos::dataRepository::Group - - finiteVolumeStencils : geos::dataRepository::Group - - singlePhaseTPFA : geos::dataRepository::Group - -> cellStencil : geos::dataRepository::Wrapper - -> fractureStencil : geos::dataRepository::Wrapper - -> edfmStencil : geos::dataRepository::Wrapper - -> faceElementToCellStencil : geos::dataRepository::Wrapper - - singlePhaseTPFA : geos::MeshLevel - -> meshLevel : geos::dataRepository::Wrapper - -> flux_set_region_stats_for_timestepsStats : geos::dataRepository::Wrapper - -> sourceFlux_region_stats_for_timestepsStats : geos::dataRepository::Wrapper - -> sinkFlux_region_stats_for_timestepsStats : geos::dataRepository::Wrapper - -> flux_set_region_stats_for_wholeSimStats : geos::dataRepository::Wrapper - -> sourceFlux_region_stats_for_wholeSimStats : geos::dataRepository::Wrapper - -> sinkFlux_region_stats_for_wholeSimStats : geos::dataRepository::Wrapper - - nodeManager : geos::NodeManager - -> localToGlobalMap : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> globalToLocalMap : geos::dataRepository::Wrapper > > - -> isExternal : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> ghostRank : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> domainBoundaryIndicator : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> ReferencePosition : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> edgeList : geos::dataRepository::Wrapper > > - -> faceList : geos::dataRepository::Wrapper > > - -> elemRegionList : geos::dataRepository::Wrapper > - -> elemSubRegionList : geos::dataRepository::Wrapper > - -> elemList : geos::dataRepository::Wrapper > - - sets : geos::dataRepository::Group - -> externalSet : geos::dataRepository::Wrapper > - -> all : geos::dataRepository::Wrapper > - -> xneg : geos::dataRepository::Wrapper > - -> xpos : geos::dataRepository::Wrapper > - -> yneg : geos::dataRepository::Wrapper > - -> ypos : geos::dataRepository::Wrapper > - -> zneg : geos::dataRepository::Wrapper > - -> zpos : geos::dataRepository::Wrapper > - -> sourceBox : geos::dataRepository::Wrapper > - -> sinkBox : geos::dataRepository::Wrapper > - - neighborData : geos::dataRepository::Group - - edgeManager : geos::EdgeManager - -> localToGlobalMap : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> globalToLocalMap : geos::dataRepository::Wrapper > > - -> isExternal : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> ghostRank : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> domainBoundaryIndicator : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> nodeList : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > > - -> faceList : geos::dataRepository::Wrapper > > - - sets : geos::dataRepository::Group - -> externalSet : geos::dataRepository::Wrapper > - -> all : geos::dataRepository::Wrapper > - -> xneg : geos::dataRepository::Wrapper > - -> xpos : geos::dataRepository::Wrapper > - -> yneg : geos::dataRepository::Wrapper > - -> ypos : geos::dataRepository::Wrapper > - -> zneg : geos::dataRepository::Wrapper > - -> zpos : geos::dataRepository::Wrapper > - -> sourceBox : geos::dataRepository::Wrapper > - -> sinkBox : geos::dataRepository::Wrapper > - - neighborData : geos::dataRepository::Group - - faceManager : geos::FaceManager - -> localToGlobalMap : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> globalToLocalMap : geos::dataRepository::Wrapper > > - -> isExternal : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> ghostRank : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> domainBoundaryIndicator : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> nodeList : geos::dataRepository::Wrapper > > - -> edgeList : geos::dataRepository::Wrapper > > - -> elemRegionList : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> elemSubRegionList : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> elemList : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> faceArea : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> faceCenter : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> faceNormal : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> gravityCoefficient : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> permeabilityTransMultiplier : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> facePressure : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - - sets : geos::dataRepository::Group - -> externalSet : geos::dataRepository::Wrapper > - -> all : geos::dataRepository::Wrapper > - -> xneg : geos::dataRepository::Wrapper > - -> xpos : geos::dataRepository::Wrapper > - -> yneg : geos::dataRepository::Wrapper > - -> ypos : geos::dataRepository::Wrapper > - -> zneg : geos::dataRepository::Wrapper > - -> zpos : geos::dataRepository::Wrapper > - -> sourceBox : geos::dataRepository::Wrapper > - -> sinkBox : geos::dataRepository::Wrapper > - - neighborData : geos::dataRepository::Group - - ElementRegions : geos::ElementRegionManager - -> localToGlobalMap : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> globalToLocalMap : geos::dataRepository::Wrapper > > - -> isExternal : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> ghostRank : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> domainBoundaryIndicator : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - - sets : geos::dataRepository::Group - -> externalSet : geos::dataRepository::Wrapper > - - neighborData : geos::dataRepository::Group - - elementRegionsGroup : geos::dataRepository::Group - - reservoir : geos::CellElementRegion - -> localToGlobalMap : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> globalToLocalMap : geos::dataRepository::Wrapper > > - -> isExternal : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> ghostRank : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> domainBoundaryIndicator : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> materialList : geos::dataRepository::Wrapper, std::allocator >, 1, camp::int_seq, int, LvArray::ChaiBuffer> > - -> meshBody : geos::dataRepository::Wrapper, std::allocator > > - -> cellBlocks : geos::dataRepository::Wrapper, std::allocator >, 1, camp::int_seq, int, LvArray::ChaiBuffer> > - -> coarseningRatio : geos::dataRepository::Wrapper - -> sourceFlux_region_stats_for_timestepsStats : geos::dataRepository::Wrapper - -> sinkFlux_region_stats_for_timestepsStats : geos::dataRepository::Wrapper - -> sourceFlux_region_stats_for_wholeSimStats : geos::dataRepository::Wrapper - -> sinkFlux_region_stats_for_wholeSimStats : geos::dataRepository::Wrapper - - sets : geos::dataRepository::Group - -> externalSet : geos::dataRepository::Wrapper > - - neighborData : geos::dataRepository::Group - - elementSubRegions : geos::dataRepository::Group - - cellBlock : geos::CellElementSubRegion - -> localToGlobalMap : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> globalToLocalMap : geos::dataRepository::Wrapper > > - -> isExternal : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> ghostRank : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> domainBoundaryIndicator : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> numNodesPerElement : geos::dataRepository::Wrapper - -> numEdgesPerElement : geos::dataRepository::Wrapper - -> numFacesPerElement : geos::dataRepository::Wrapper - -> elementCenter : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> elementVolume : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> nodeList : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > > - -> edgeList : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > > - -> faceList : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > > - -> ConstitutiveGrouping : geos::dataRepository::Wrapper, std::allocator >, LvArray::Array, int, LvArray::ChaiBuffer>, std::integral_constant > > - -> ConstitutivePointVolumeFraction : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> dNdX : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> detJ : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> ToEmbeddedSurfaces : geos::dataRepository::Wrapper > > - -> fracturedCells : geos::dataRepository::Wrapper > - -> water_density : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> water_dDensity_dPressure : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> water_dDensity_dTemperature : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> water_density_n : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> water_viscosity : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> water_dViscosity_dPressure : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> water_dViscosity_dTemperature : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> water_internalEnergy : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> water_internalEnergy_n : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> water_dInternalEnergy_dPressure : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> water_dInternalEnergy_dTemperature : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> water_enthalpy : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> water_dEnthalpy_dPressure : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> water_dEnthalpy_dTemperature : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> rockPorosity_porosity : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> rockPorosity_porosity_n : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> rockPorosity_dPorosity_dPressure : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> rockPorosity_dPorosity_dTemperature : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> rockPorosity_initialPorosity : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> rockPorosity_referencePorosity : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> rockPerm_permeability : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> rockPerm_dPerm_dPressure : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> fluidNames : geos::dataRepository::Wrapper, std::allocator > > - -> solidNames : geos::dataRepository::Wrapper, std::allocator > > - -> permeabilityNames : geos::dataRepository::Wrapper, std::allocator > > - -> gravityCoefficient : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> netToGross : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> pressure : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> pressure_n : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> initialPressure : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> deltaPressure : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> bcPressure : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> deltaVolume : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> temperature : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> temperature_n : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> initialTemperature : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> bcTemperature : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> mobility : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> dMobility_dPressure : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> sourceFlux_region_stats_for_timestepsStats : geos::dataRepository::Wrapper - -> sinkFlux_region_stats_for_timestepsStats : geos::dataRepository::Wrapper - -> sourceFlux_region_stats_for_wholeSimStats : geos::dataRepository::Wrapper - -> sinkFlux_region_stats_for_wholeSimStats : geos::dataRepository::Wrapper - - sets : geos::dataRepository::Group - -> externalSet : geos::dataRepository::Wrapper > - -> all : geos::dataRepository::Wrapper > - -> xneg : geos::dataRepository::Wrapper > - -> xpos : geos::dataRepository::Wrapper > - -> yneg : geos::dataRepository::Wrapper > - -> ypos : geos::dataRepository::Wrapper > - -> zneg : geos::dataRepository::Wrapper > - -> zpos : geos::dataRepository::Wrapper > - -> sourceBox : geos::dataRepository::Wrapper > - -> sinkBox : geos::dataRepository::Wrapper > - - neighborData : geos::dataRepository::Group - - ConstitutiveModels : geos::dataRepository::Group - - water : geos::constitutive::CompressibleSinglePhaseFluid - -> density : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> dDensity_dPressure : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> dDensity_dTemperature : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> density_n : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> viscosity : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> dViscosity_dPressure : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> dViscosity_dTemperature : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> internalEnergy : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> internalEnergy_n : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> dInternalEnergy_dPressure : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> dInternalEnergy_dTemperature : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> enthalpy : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> dEnthalpy_dPressure : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> dEnthalpy_dTemperature : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> defaultDensity : geos::dataRepository::Wrapper - -> defaultViscosity : geos::dataRepository::Wrapper - -> compressibility : geos::dataRepository::Wrapper - -> viscosibility : geos::dataRepository::Wrapper - -> referencePressure : geos::dataRepository::Wrapper - -> referenceDensity : geos::dataRepository::Wrapper - -> referenceViscosity : geos::dataRepository::Wrapper - -> densityModelType : geos::dataRepository::Wrapper - -> viscosityModelType : geos::dataRepository::Wrapper - - rock : geos::constitutive::CompressibleSolid - -> solidModelName : geos::dataRepository::Wrapper, std::allocator > > - -> porosityModelName : geos::dataRepository::Wrapper, std::allocator > > - -> permeabilityModelName : geos::dataRepository::Wrapper, std::allocator > > - -> solidInternalEnergyModelName : geos::dataRepository::Wrapper, std::allocator > > - - nullSolid : geos::constitutive::NullModel - - rockPorosity : geos::constitutive::PressurePorosity - -> defaultReferencePorosity : geos::dataRepository::Wrapper - -> porosity : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> porosity_n : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> dPorosity_dPressure : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> dPorosity_dTemperature : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> initialPorosity : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> referencePorosity : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> referencePressure : geos::dataRepository::Wrapper - -> compressibility : geos::dataRepository::Wrapper - - rockPerm : geos::constitutive::ConstantPermeability - -> permeability : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> dPerm_dPressure : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> permeabilityComponents : geos::dataRepository::Wrapper > - - embeddedSurfacesEdgeManager : geos::EdgeManager - -> localToGlobalMap : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> globalToLocalMap : geos::dataRepository::Wrapper > > - -> isExternal : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> ghostRank : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> domainBoundaryIndicator : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> nodeList : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > > - -> faceList : geos::dataRepository::Wrapper > > - - sets : geos::dataRepository::Group - -> externalSet : geos::dataRepository::Wrapper > - - neighborData : geos::dataRepository::Group - - embeddedSurfacesNodeManager : geos::EmbeddedSurfaceNodeManager - -> localToGlobalMap : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> globalToLocalMap : geos::dataRepository::Wrapper > > - -> isExternal : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> ghostRank : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> domainBoundaryIndicator : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> referencePosition : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> edgeList : geos::dataRepository::Wrapper > > - -> elemRegionList : geos::dataRepository::Wrapper > - -> elemSubRegionList : geos::dataRepository::Wrapper > - -> elemList : geos::dataRepository::Wrapper > - -> parentEdgeGlobalIndex : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - - sets : geos::dataRepository::Group - -> externalSet : geos::dataRepository::Wrapper > - - neighborData : geos::dataRepository::Group - - finiteVolumeStencils : geos::dataRepository::Group - - singlePhaseTPFA : geos::dataRepository::Group - -> cellStencil : geos::dataRepository::Wrapper - -> fractureStencil : geos::dataRepository::Wrapper - -> edfmStencil : geos::dataRepository::Wrapper - -> faceElementToCellStencil : geos::dataRepository::Wrapper - - Constitutive : geos::constitutive::ConstitutiveManager - - water : geos::constitutive::CompressibleSinglePhaseFluid - -> density : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> dDensity_dPressure : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> dDensity_dTemperature : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> density_n : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> viscosity : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> dViscosity_dPressure : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> dViscosity_dTemperature : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> internalEnergy : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> internalEnergy_n : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> dInternalEnergy_dPressure : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> dInternalEnergy_dTemperature : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> enthalpy : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> dEnthalpy_dPressure : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> dEnthalpy_dTemperature : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> defaultDensity : geos::dataRepository::Wrapper - -> defaultViscosity : geos::dataRepository::Wrapper - -> compressibility : geos::dataRepository::Wrapper - -> viscosibility : geos::dataRepository::Wrapper - -> referencePressure : geos::dataRepository::Wrapper - -> referenceDensity : geos::dataRepository::Wrapper - -> referenceViscosity : geos::dataRepository::Wrapper - -> densityModelType : geos::dataRepository::Wrapper - -> viscosityModelType : geos::dataRepository::Wrapper - - rock : geos::constitutive::CompressibleSolid - -> solidModelName : geos::dataRepository::Wrapper, std::allocator > > - -> porosityModelName : geos::dataRepository::Wrapper, std::allocator > > - -> permeabilityModelName : geos::dataRepository::Wrapper, std::allocator > > - -> solidInternalEnergyModelName : geos::dataRepository::Wrapper, std::allocator > > - - nullSolid : geos::constitutive::NullModel - - rockPorosity : geos::constitutive::PressurePorosity - -> defaultReferencePorosity : geos::dataRepository::Wrapper - -> porosity : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> porosity_n : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> dPorosity_dPressure : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> dPorosity_dTemperature : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> initialPorosity : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> referencePorosity : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> referencePressure : geos::dataRepository::Wrapper - -> compressibility : geos::dataRepository::Wrapper - - rockPerm : geos::constitutive::ConstantPermeability - -> permeability : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> dPerm_dPressure : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> permeabilityComponents : geos::dataRepository::Wrapper > - - commandLine : geos::dataRepository::Group - -> inputFileName : geos::dataRepository::Wrapper, std::allocator > > - -> restartFileName : geos::dataRepository::Wrapper, std::allocator > > - -> beginFromRestart : geos::dataRepository::Wrapper - -> problemName : geos::dataRepository::Wrapper, std::allocator > > - -> outputDirectory : geos::dataRepository::Wrapper, std::allocator > > - -> xPartitionsOverride : geos::dataRepository::Wrapper - -> yPartitionsOverride : geos::dataRepository::Wrapper - -> zPartitionsOverride : geos::dataRepository::Wrapper - -> overridePartitionNumbers : geos::dataRepository::Wrapper - -> schemaFileName : geos::dataRepository::Wrapper, std::allocator > > - -> useNonblockingMPI : geos::dataRepository::Wrapper - -> suppressPinned : geos::dataRepository::Wrapper - - FieldSpecifications : geos::FieldSpecificationManager - - initialPressure : geos::FieldSpecificationBase - -> setNames : geos::dataRepository::Wrapper, std::allocator >, 1, camp::int_seq, int, LvArray::ChaiBuffer> > - -> objectPath : geos::dataRepository::Wrapper, std::allocator > > - -> fieldName : geos::dataRepository::Wrapper, std::allocator > > - -> component : geos::dataRepository::Wrapper - -> direction : geos::dataRepository::Wrapper > - -> functionName : geos::dataRepository::Wrapper, std::allocator > > - -> bcApplicationTableName : geos::dataRepository::Wrapper, std::allocator > > - -> scale : geos::dataRepository::Wrapper - -> initialCondition : geos::dataRepository::Wrapper - -> beginTime : geos::dataRepository::Wrapper - -> endTime : geos::dataRepository::Wrapper - -> logLevel : geos::dataRepository::Wrapper - - sourceFlux : geos::SourceFluxBoundaryCondition - -> setNames : geos::dataRepository::Wrapper, std::allocator >, 1, camp::int_seq, int, LvArray::ChaiBuffer> > - -> objectPath : geos::dataRepository::Wrapper, std::allocator > > - -> fieldName : geos::dataRepository::Wrapper, std::allocator > > - -> component : geos::dataRepository::Wrapper - -> direction : geos::dataRepository::Wrapper > - -> functionName : geos::dataRepository::Wrapper, std::allocator > > - -> bcApplicationTableName : geos::dataRepository::Wrapper, std::allocator > > - -> scale : geos::dataRepository::Wrapper - -> initialCondition : geos::dataRepository::Wrapper - -> beginTime : geos::dataRepository::Wrapper - -> endTime : geos::dataRepository::Wrapper - -> logLevel : geos::dataRepository::Wrapper - - sinkFlux : geos::SourceFluxBoundaryCondition - -> setNames : geos::dataRepository::Wrapper, std::allocator >, 1, camp::int_seq, int, LvArray::ChaiBuffer> > - -> objectPath : geos::dataRepository::Wrapper, std::allocator > > - -> fieldName : geos::dataRepository::Wrapper, std::allocator > > - -> component : geos::dataRepository::Wrapper - -> direction : geos::dataRepository::Wrapper > - -> functionName : geos::dataRepository::Wrapper, std::allocator > > - -> bcApplicationTableName : geos::dataRepository::Wrapper, std::allocator > > - -> scale : geos::dataRepository::Wrapper - -> initialCondition : geos::dataRepository::Wrapper - -> beginTime : geos::dataRepository::Wrapper - -> endTime : geos::dataRepository::Wrapper - -> logLevel : geos::dataRepository::Wrapper - - Events : geos::EventManager - -> logLevel : geos::dataRepository::Wrapper - -> minTime : geos::dataRepository::Wrapper - -> maxTime : geos::dataRepository::Wrapper - -> maxCycle : geos::dataRepository::Wrapper - -> time : geos::dataRepository::Wrapper - -> dt : geos::dataRepository::Wrapper - -> cycle : geos::dataRepository::Wrapper - -> currentSubEvent : geos::dataRepository::Wrapper - -> timeOutputFormat : geos::dataRepository::Wrapper - - solverApplications : geos::PeriodicEvent - -> logLevel : geos::dataRepository::Wrapper - -> target : geos::dataRepository::Wrapper, std::allocator > > - -> beginTime : geos::dataRepository::Wrapper - -> endTime : geos::dataRepository::Wrapper - -> forceDt : geos::dataRepository::Wrapper - -> maxEventDt : geos::dataRepository::Wrapper - -> finalDtStretch : geos::dataRepository::Wrapper - -> targetExactStartStop : geos::dataRepository::Wrapper - -> lastTime : geos::dataRepository::Wrapper - -> lastCycle : geos::dataRepository::Wrapper - -> eventForecast : geos::dataRepository::Wrapper - -> currentSubEvent : geos::dataRepository::Wrapper - -> isTargetExecuting : geos::dataRepository::Wrapper - -> timeFrequency : geos::dataRepository::Wrapper - -> cycleFrequency : geos::dataRepository::Wrapper - -> targetExactTimestep : geos::dataRepository::Wrapper - -> function : geos::dataRepository::Wrapper, std::allocator > > - -> object : geos::dataRepository::Wrapper, std::allocator > > - -> set : geos::dataRepository::Wrapper, std::allocator > > - -> stat : geos::dataRepository::Wrapper - -> threshold : geos::dataRepository::Wrapper - - timestepsStatsEvent : geos::PeriodicEvent - -> logLevel : geos::dataRepository::Wrapper - -> target : geos::dataRepository::Wrapper, std::allocator > > - -> beginTime : geos::dataRepository::Wrapper - -> endTime : geos::dataRepository::Wrapper - -> forceDt : geos::dataRepository::Wrapper - -> maxEventDt : geos::dataRepository::Wrapper - -> finalDtStretch : geos::dataRepository::Wrapper - -> targetExactStartStop : geos::dataRepository::Wrapper - -> lastTime : geos::dataRepository::Wrapper - -> lastCycle : geos::dataRepository::Wrapper - -> eventForecast : geos::dataRepository::Wrapper - -> currentSubEvent : geos::dataRepository::Wrapper - -> isTargetExecuting : geos::dataRepository::Wrapper - -> timeFrequency : geos::dataRepository::Wrapper - -> cycleFrequency : geos::dataRepository::Wrapper - -> targetExactTimestep : geos::dataRepository::Wrapper - -> function : geos::dataRepository::Wrapper, std::allocator > > - -> object : geos::dataRepository::Wrapper, std::allocator > > - -> set : geos::dataRepository::Wrapper, std::allocator > > - -> stat : geos::dataRepository::Wrapper - -> threshold : geos::dataRepository::Wrapper - - wholeSimStatsEvent : geos::PeriodicEvent - -> logLevel : geos::dataRepository::Wrapper - -> target : geos::dataRepository::Wrapper, std::allocator > > - -> beginTime : geos::dataRepository::Wrapper - -> endTime : geos::dataRepository::Wrapper - -> forceDt : geos::dataRepository::Wrapper - -> maxEventDt : geos::dataRepository::Wrapper - -> finalDtStretch : geos::dataRepository::Wrapper - -> targetExactStartStop : geos::dataRepository::Wrapper - -> lastTime : geos::dataRepository::Wrapper - -> lastCycle : geos::dataRepository::Wrapper - -> eventForecast : geos::dataRepository::Wrapper - -> currentSubEvent : geos::dataRepository::Wrapper - -> isTargetExecuting : geos::dataRepository::Wrapper - -> timeFrequency : geos::dataRepository::Wrapper - -> cycleFrequency : geos::dataRepository::Wrapper - -> targetExactTimestep : geos::dataRepository::Wrapper - -> function : geos::dataRepository::Wrapper, std::allocator > > - -> object : geos::dataRepository::Wrapper, std::allocator > > - -> set : geos::dataRepository::Wrapper, std::allocator > > - -> stat : geos::dataRepository::Wrapper - -> threshold : geos::dataRepository::Wrapper - - NumericalMethods : geos::NumericalMethodsManager - - FiniteElements : geos::FiniteElementDiscretizationManager - - FiniteVolume : geos::FiniteVolumeManager - - singlePhaseTPFA : geos::TwoPointFluxApproximation - -> fieldName : geos::dataRepository::Wrapper, std::allocator >, 1, camp::int_seq, int, LvArray::ChaiBuffer> > - -> coefficientName : geos::dataRepository::Wrapper, std::allocator > > - -> targetRegions : geos::dataRepository::Wrapper, std::allocator >, LvArray::Array, std::allocator >, 1, camp::int_seq, int, LvArray::ChaiBuffer>, std::integral_constant > > - -> areaRelTol : geos::dataRepository::Wrapper - -> upwindingScheme : geos::dataRepository::Wrapper - -> meanPermCoefficient : geos::dataRepository::Wrapper - -> cellStencil : geos::dataRepository::Wrapper - -> fractureStencil : geos::dataRepository::Wrapper - -> edfmStencil : geos::dataRepository::Wrapper - -> faceElementToCellStencil : geos::dataRepository::Wrapper - -> usePEDFM : geos::dataRepository::Wrapper - - Geometry : geos::GeometricObjectManager - - sourceBox : geos::Box - -> xMin : geos::dataRepository::Wrapper > - -> xMax : geos::dataRepository::Wrapper > - -> strike : geos::dataRepository::Wrapper - -> center : geos::dataRepository::Wrapper > - -> cosStrike : geos::dataRepository::Wrapper - -> sinStrike : geos::dataRepository::Wrapper - - sinkBox : geos::Box - -> xMin : geos::dataRepository::Wrapper > - -> xMax : geos::dataRepository::Wrapper > - -> strike : geos::dataRepository::Wrapper - -> center : geos::dataRepository::Wrapper > - -> cosStrike : geos::dataRepository::Wrapper - -> sinStrike : geos::dataRepository::Wrapper - - Mesh : geos::MeshManager - - mesh : geos::InternalMeshGenerator - -> xCoords : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> yCoords : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> zCoords : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> nx : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> ny : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> nz : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> xBias : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> yBias : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> zBias : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> cellBlockNames : geos::dataRepository::Wrapper, std::allocator >, 1, camp::int_seq, int, LvArray::ChaiBuffer> > - -> elementTypes : geos::dataRepository::Wrapper, std::allocator >, 1, camp::int_seq, int, LvArray::ChaiBuffer> > - -> trianglePattern : geos::dataRepository::Wrapper - -> positionTolerance : geos::dataRepository::Wrapper - - Outputs : geos::OutputManager - - Solvers : geos::PhysicsSolverManager - -> gravityVector : geos::dataRepository::Wrapper > - - testSolver : geos::SinglePhaseFVM - -> logLevel : geos::dataRepository::Wrapper - -> cflFactor : geos::dataRepository::Wrapper - -> maxStableDt : geos::dataRepository::Wrapper - -> discretization : geos::dataRepository::Wrapper, std::allocator > > - -> targetRegions : geos::dataRepository::Wrapper, std::allocator >, 1, camp::int_seq, int, LvArray::ChaiBuffer> > - -> meshTargets : geos::dataRepository::Wrapper, std::allocator >, std::__cxx11::basic_string, std::allocator > >, LvArray::Array, std::allocator >, 1, camp::int_seq, int, LvArray::ChaiBuffer>, std::integral_constant > > - -> initialDt : geos::dataRepository::Wrapper - -> isThermal : geos::dataRepository::Wrapper - -> maxAbsolutePressureChange : geos::dataRepository::Wrapper - -> allowNegativePressure : geos::dataRepository::Wrapper - -> temperature : geos::dataRepository::Wrapper - - LinearSolverParameters : geos::LinearSolverParametersInput - -> logLevel : geos::dataRepository::Wrapper - -> solverType : geos::dataRepository::Wrapper - -> preconditionerType : geos::dataRepository::Wrapper - -> stopIfError : geos::dataRepository::Wrapper - -> directCheckResidual : geos::dataRepository::Wrapper - -> directEquil : geos::dataRepository::Wrapper - -> directColPerm : geos::dataRepository::Wrapper - -> directRowPerm : geos::dataRepository::Wrapper - -> directReplTinyPivot : geos::dataRepository::Wrapper - -> directIterRef : geos::dataRepository::Wrapper - -> directParallel : geos::dataRepository::Wrapper - -> krylovMaxIter : geos::dataRepository::Wrapper - -> krylovMaxRestart : geos::dataRepository::Wrapper - -> krylovTol : geos::dataRepository::Wrapper - -> krylovAdaptiveTol : geos::dataRepository::Wrapper - -> krylovWeakestTol : geos::dataRepository::Wrapper - -> amgNumSweeps : geos::dataRepository::Wrapper - -> amgSmootherType : geos::dataRepository::Wrapper - -> amgRelaxWeight : geos::dataRepository::Wrapper - -> amgCoarseSolver : geos::dataRepository::Wrapper - -> amgCoarseningType : geos::dataRepository::Wrapper - -> amgInterpolationType : geos::dataRepository::Wrapper - -> amgInterpolationMaxNonZeros : geos::dataRepository::Wrapper - -> amgNumFunctions : geos::dataRepository::Wrapper - -> amgAggressiveCoarseningPaths : geos::dataRepository::Wrapper - -> amgAggressiveCoarseningLevels : geos::dataRepository::Wrapper - -> amgAggressiveInterpType : geos::dataRepository::Wrapper - -> amgThreshold : geos::dataRepository::Wrapper - -> amgSeparateComponents : geos::dataRepository::Wrapper - -> amgNullSpaceType : geos::dataRepository::Wrapper - -> iluFill : geos::dataRepository::Wrapper - -> iluThreshold : geos::dataRepository::Wrapper - - NonlinearSolverParameters : geos::NonlinearSolverParameters - -> logLevel : geos::dataRepository::Wrapper - -> lineSearchAction : geos::dataRepository::Wrapper - -> lineSearchInterpolationType : geos::dataRepository::Wrapper - -> lineSearchMaxCuts : geos::dataRepository::Wrapper - -> lineSearchCutFactor : geos::dataRepository::Wrapper - -> normType : geos::dataRepository::Wrapper - -> minNormalizer : geos::dataRepository::Wrapper - -> newtonTol : geos::dataRepository::Wrapper - -> newtonMaxIter : geos::dataRepository::Wrapper - -> newtonMinIter : geos::dataRepository::Wrapper - -> newtonNumberOfIterations : geos::dataRepository::Wrapper - -> maxAllowedResidualNorm : geos::dataRepository::Wrapper - -> allowNonConverged : geos::dataRepository::Wrapper - -> timeStepDecreaseIterLimit : geos::dataRepository::Wrapper - -> timeStepIncreaseIterLimit : geos::dataRepository::Wrapper - -> timeStepDecreaseFactor : geos::dataRepository::Wrapper - -> timeStepIncreaseFactor : geos::dataRepository::Wrapper - -> timeStepCutFactor : geos::dataRepository::Wrapper - -> maxTimeStepCuts : geos::dataRepository::Wrapper - -> maxSubSteps : geos::dataRepository::Wrapper - -> maxNumConfigurationAttempts : geos::dataRepository::Wrapper - -> couplingType : geos::dataRepository::Wrapper - -> sequentialConvergenceCriterion : geos::dataRepository::Wrapper - -> subcycling : geos::dataRepository::Wrapper - -> nonlinearAccelerationType : geos::dataRepository::Wrapper - - SolverStatistics : geos::SolverStatistics - -> numTimeSteps : geos::dataRepository::Wrapper - -> numTimeStepCuts : geos::dataRepository::Wrapper - -> numSuccessfulOuterLoopIterations : geos::dataRepository::Wrapper - -> numSuccessfulNonlinearIterations : geos::dataRepository::Wrapper - -> numSuccessfulLinearIterations : geos::dataRepository::Wrapper - -> numDiscardedOuterLoopIterations : geos::dataRepository::Wrapper - -> numDiscardedNonlinearIterations : geos::dataRepository::Wrapper - -> numDiscardedLinearIterations : geos::dataRepository::Wrapper - - Tasks : geos::TasksManager - - timestepsStats : geos::SourceFluxStatsAggregator - -> logLevel : geos::dataRepository::Wrapper - -> flowSolverName : geos::dataRepository::Wrapper, std::allocator > > - -> fluxNames : geos::dataRepository::Wrapper, std::allocator >, 1, camp::int_seq, int, LvArray::ChaiBuffer> > - - wholeSimStats : geos::SourceFluxStatsAggregator - -> logLevel : geos::dataRepository::Wrapper - -> flowSolverName : geos::dataRepository::Wrapper, std::allocator > > - -> fluxNames : geos::dataRepository::Wrapper, std::allocator >, 1, camp::int_seq, int, LvArray::ChaiBuffer> > - - Functions : geos::FunctionManager - - FluxRate : geos::TableFunction - -> inputVarNames : geos::dataRepository::Wrapper, std::allocator >, 1, camp::int_seq, int, LvArray::ChaiBuffer> > - -> coordinates : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> values : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> coordinateFiles : geos::dataRepository::Wrapper, int, LvArray::ChaiBuffer> > - -> voxelFile : geos::dataRepository::Wrapper - -> interpolation : geos::dataRepository::Wrapper \ No newline at end of file From f163aedcd989daff4a4e39dfdc33f655b8b27c4a Mon Sep 17 00:00:00 2001 From: MelReyCG Date: Fri, 9 Feb 2024 15:12:32 +0100 Subject: [PATCH 39/98] Finished the multiphase test --- .../fluidFlowTests/testFluidStatistics.cpp | 178 ++++++++++-------- 1 file changed, 101 insertions(+), 77 deletions(-) diff --git a/src/coreComponents/unitTests/fluidFlowTests/testFluidStatistics.cpp b/src/coreComponents/unitTests/fluidFlowTests/testFluidStatistics.cpp index 83b44773cce..4705580cd85 100644 --- a/src/coreComponents/unitTests/fluidFlowTests/testFluidStatistics.cpp +++ b/src/coreComponents/unitTests/fluidFlowTests/testFluidStatistics.cpp @@ -45,28 +45,14 @@ struct TestInputs string wholeSimFluxStatsPath; // rates for each timesteps, for each phases - array2d< real64 > fluxRates; + array2d< real64 > sourceRates; + array2d< real64 > sinkRates; real64 dt; real64 sourceRateFactor; real64 sinkRateFactor; integer sourceElementsCount; integer sinkElementsCount; - - void setFluxRates( std::initializer_list< std::initializer_list< real64 > > timestepPhaseValues ) - { - fluxRates.resize( timestepPhaseValues.size(), timestepPhaseValues.begin()->size() ); - integer timestepId = 0; - for( auto const & phaseValues : timestepPhaseValues ) - { - integer ip = 0; - for( auto const & phaseValue : phaseValues ) - { - fluxRates[timestepId][ip++] = phaseValue; - } - ++timestepId; - } - } }; /** @@ -102,8 +88,12 @@ struct TestSet TestSet( TestInputs const & inputParams ): inputs( inputParams ) { - timestepCount = inputs.fluxRates.size( 0 ); - phaseCount = inputs.fluxRates.size( 1 ); + // tables must provide the same timestep & phase rates + EXPECT_EQ( inputs.sourceRates.size( 0 ), inputs.sinkRates.size( 0 )); + EXPECT_EQ( inputs.sourceRates.size( 1 ), inputs.sinkRates.size( 1 )); + + timestepCount = inputs.sourceRates.size( 0 ); + phaseCount = inputs.sourceRates.size( 1 ); totalElementsCount = inputs.sourceElementsCount + inputs.sinkElementsCount; sourceRates.resize( timestepCount, phaseCount ); @@ -117,21 +107,22 @@ struct TestSet totalSinkMassProd.resize( phaseCount ); totalMassProd.resize( phaseCount ); totalMeanRate.resize( phaseCount ); + for( integer ip = 0; ip < phaseCount; ++ip ) { for( integer timestepId = 0; timestepId < timestepCount; ++timestepId ) { // mass production / injection calculation - sourceRates[timestepId][ip] = inputs.fluxRates[timestepId][ip] * inputs.sourceRateFactor; - sourceMassProd[timestepId][ip] = inputs.fluxRates[timestepId][ip] * inputs.dt * inputs.sourceRateFactor; + sourceRates[timestepId][ip] = inputs.sourceRates[timestepId][ip] * inputs.sourceRateFactor; + sourceMassProd[timestepId][ip] = inputs.sourceRates[timestepId][ip] * inputs.dt * inputs.sourceRateFactor; totalSourceMassProd[ip] += sourceMassProd[timestepId][ip]; - sinkRates[timestepId][ip] = inputs.fluxRates[timestepId][ip] * inputs.sinkRateFactor; - sinkMassProd[timestepId][ip] = inputs.fluxRates[timestepId][ip] * inputs.dt * inputs.sinkRateFactor; + sinkRates[timestepId][ip] = inputs.sinkRates[timestepId][ip] * inputs.sinkRateFactor; + sinkMassProd[timestepId][ip] = inputs.sinkRates[timestepId][ip] * inputs.dt * inputs.sinkRateFactor; massDeltas[timestepId][ip] = -( sourceMassProd[timestepId][ip] + sinkMassProd[timestepId][ip] ); totalSinkMassProd[ip] += sinkMassProd[timestepId][ip]; // rates accumulations - sourceMeanRate[ip] += inputs.fluxRates[timestepId][ip] * inputs.sourceRateFactor; - sinkMeanRate[ip] += inputs.fluxRates[timestepId][ip] * inputs.sinkRateFactor; + sourceMeanRate[ip] += inputs.sourceRates[timestepId][ip] * inputs.sourceRateFactor; + sinkMeanRate[ip] += inputs.sinkRates[timestepId][ip] * inputs.sinkRateFactor; } // mean rates calculation real64 const ratesMeanDivisor = 1.0 / double( timestepCount - 1 ); @@ -241,6 +232,7 @@ class TimeStepChecker : public TaskBase real64 const GEOS_UNUSED_PARAM( eventProgress ), DomainPartition & domain ) { + EXPECT_NE( m_testSet, nullptr ); EXPECT_LT( m_timestepId, m_testSet->timestepCount ) << "The tested time-step count were higher than expected."; SourceFluxStatsAggregator & timestepStats = getGroupByPath< SourceFluxStatsAggregator >( m_testSet->inputs.timeStepFluxStatsPath ); timestepStats.forMeshLevelStatsWrapper( domain, @@ -315,6 +307,22 @@ class FluidStatisticsTest : public ::testing::Test }; +void setRateTable( array2d< real64 > & rateTable, std::initializer_list< std::initializer_list< real64 > > timestepPhaseValues ) +{ + rateTable.resize( timestepPhaseValues.size(), timestepPhaseValues.begin()->size() ); + integer timestepId = 0; + for( auto const & phaseValues : timestepPhaseValues ) + { + integer ip = 0; + for( auto const & phaseValue : phaseValues ) + { + rateTable[timestepId][ip++] = phaseValue; + } + ++timestepId; + } +} + + //////////////////////////////// SinglePhase Flux Statistics Test //////////////////////////////// namespace SinglePhaseFluxStatisticsTest { @@ -351,9 +359,9 @@ TestSet getTestSet() + xMin="{ -0.01, -0.01, -10.01 }" + xMax="{ 2.01, 1.01, -8.99 }" /> + xMin="{ 4.99, 8.99, -1.01 }" + xMax="{ 10.01, 10.01, 0.01 }" /> @@ -426,6 +434,7 @@ TestSet getTestSet() + + wettingNonWettingRelPermTableNames="{ gasRelativePermeabilityTable, waterRelativePermeabilityTable }" /> @@ -605,16 +616,16 @@ TestSet getTestSet() objectPath="ElementRegions/reservoir" component="0" scale="-1" - functionName="FluxRate" + functionName="FluxInjectionRate" setNames="{ sourceBox }" /> - + + xMin="{ -0.01, -0.01, -10.01 }" + xMax="{ 1.01, 1.01, -8.99 }" /> + xMin="{ 8.99, 8.99, -1.01 }" + xMax="{ 10.01, 10.01, 0.01 }" /> @@ -642,6 +653,7 @@ TestSet getTestSet() + + logLevel="2" /> + logLevel="2" /> @@ -682,7 +694,7 @@ TestSet getTestSet() inputVarNames="{ time }" interpolation="lower" coordinates="{ 0.0, 500.0, 1000.0, 1500.0, 2000.0, 2500.0, 3000.0, 3500.0, 4000.0, 4500.0, 5000.0, 5500.0 }" - values="{ 0.000, 0.000, 0.767, 0.561, 0.194, 0.102, 0.059, 0.000, 0.000, 0.000, 0.000, 0.000 }" + values="{ 0.000, 0.000, 0.267, 0.561, 0.194, 0.102, 0.059, 0.000, 0.000, 0.000, 0.000, 0.000 }" /> + values="{ 395.15, 389.15, 382.15, 378.15 }" /> @@ -713,13 +725,13 @@ TestSet getTestSet() )xml"; - testInputs.tableFiles["pvtgas.txt"] = "DensityFun SpanWagnerCO2Density 1.0e5 5.0e7 1e5 285.15 395.15 2\n" - "ViscosityFun FenghourCO2Viscosity 1.0e5 5.0e7 1e5 285.15 395.15 2\n"; + testInputs.tableFiles["pvtgas.txt"] = "DensityFun SpanWagnerCO2Density 1.0e6 5.0e7 1e5 285.15 395.15 2\n" + "ViscosityFun FenghourCO2Viscosity 1.0e6 5.0e7 1e5 285.15 395.15 2\n"; testInputs.tableFiles["pvtliquid.txt"] = "DensityFun EzrokhiBrineDensity 0.1033 -2.2991e-5 -2.3658e-6\n" "ViscosityFun EzrokhiBrineViscosity 0 0 0\n"; - testInputs.tableFiles["co2flash.txt"] = "FlashModel CO2Solubility 1.0e5 4e7 1e5 285.15 395.15 2 0\n"; + testInputs.tableFiles["co2flash.txt"] = "FlashModel CO2Solubility 1.0e6 5.0e7 1e5 285.15 395.15 2 0\n"; testInputs.sourceFluxName = "sourceFlux"; @@ -731,20 +743,31 @@ TestSet getTestSet() testInputs.dt = 500.0; testInputs.sourceElementsCount = 1; testInputs.sinkElementsCount = 1; - // FluxRate table from 0.0s to 5000.0s - testInputs.setFluxRates( { - { 0.000, 0.000 }, - { 0.000, 0.000 }, - { 0.767, 0.000 }, - { 0.561, 0.000 }, - { 0.194, 0.121 }, - { 0.102, 0.427 }, - { 0.059, 0.502 }, - { 0.000, 0.199 }, - { 0.000, 0.117 }, - { 0.000, 0.088 }, - { 0.000, 0.059 }, - { 0.000, 0.000 } } ); + // FluxInjectionRate & FluxProductionRate table from 0.0s to 5000.0s + setRateTable( testInputs.sourceRates, + { { 0.000, 0.0 }, + { 0.000, 0.0 }, + { 0.267, 0.0 }, + { 0.561, 0.0 }, + { 0.194, 0.0 }, + { 0.102, 0.0 }, + { 0.059, 0.0 }, + { 0.000, 0.0 }, + { 0.000, 0.0 }, + { 0.000, 0.0 }, + { 0.000, 0.0 } } ); + setRateTable( testInputs.sinkRates, + { { 0.0, 0.000 }, + { 0.0, 0.000 }, + { 0.0, 0.003 }, + { 0.0, 0.062 }, + { 0.0, 0.121 }, + { 0.0, 0.427 }, + { 0.0, 0.502 }, + { 0.0, 0.199 }, + { 0.0, 0.083 }, + { 0.0, 0.027 }, + { 0.0, 0.000 } } ); testInputs.sourceRateFactor = -1.0; testInputs.sinkRateFactor = 1.0; @@ -763,12 +786,13 @@ TEST_F( FluidStatisticsTest, checkMultiPhaseFluxStatistics ) setupProblemFromXML( problem, testSet.inputs.xmlInput.data() ); - //!\\ TODO : récupération du timestepChecker (à ajouter dans le xml) + TimeStepChecker & timeStepChecker = problem.getGroupByPath< TimeStepChecker >( testSet.inputs.timeStepCheckerPath ); + timeStepChecker.setTestSet( testSet ); // run simulation EXPECT_FALSE( problem.runSimulation() ) << "Simulation exited early."; - // EXPECT_EQ( timeStepChecker.getTestedTimeStepCount(), testSet.timestepCount ) << "The tested time-step were different than expected."; + EXPECT_EQ( timeStepChecker.getTestedTimeStepCount(), testSet.timestepCount ) << "The tested time-step were different than expected."; checkWholeSimFluxStatistics( problem, testSet ); } From 1781ac9cb4851c7333b30dd74adaa95efee90820 Mon Sep 17 00:00:00 2001 From: MelReyCG Date: Fri, 9 Feb 2024 15:15:32 +0100 Subject: [PATCH 40/98] Unexpected result debugging -> bug was due to not taking into account a timestep could "restart" as it can be cut when reaching maxNewtonIter. --- .../SourceFluxStatistics.cpp | 44 ++++++++++++++----- .../SourceFluxStatistics.hpp | 4 +- .../fluidFlow/CompositionalMultiphaseBase.cpp | 5 +-- .../fluidFlow/SinglePhaseBase.cpp | 3 +- 4 files changed, 39 insertions(+), 17 deletions(-) diff --git a/src/coreComponents/fieldSpecification/SourceFluxStatistics.cpp b/src/coreComponents/fieldSpecification/SourceFluxStatistics.cpp index 9faf1b6a76c..1fecc9d8f1b 100644 --- a/src/coreComponents/fieldSpecification/SourceFluxStatistics.cpp +++ b/src/coreComponents/fieldSpecification/SourceFluxStatistics.cpp @@ -262,33 +262,52 @@ void SourceFluxStatsAggregator::WrappedStats::setTarget( string_view aggregatorN m_aggregatorName = aggregatorName; m_fluxName = fluxName; } -void SourceFluxStatsAggregator::WrappedStats::gatherTimeStepStats( real64 const dt, - real64 producedMass, - integer const elementCount, - bool const overwriteTimeStepStats ) +void SourceFluxStatsAggregator::WrappedStats::gatherTimeStepStats( real64 const currentTime, real64 const dt, + real64 const producedMass, + integer const elementCount ) { array1d< real64 > phaseProducedMass{ 1 }; phaseProducedMass[0] = producedMass; - gatherTimeStepStats( dt, phaseProducedMass, elementCount, overwriteTimeStepStats ); + gatherTimeStepStats( currentTime, dt, phaseProducedMass, elementCount ); } -void SourceFluxStatsAggregator::WrappedStats::gatherTimeStepStats( real64 dt, +string formatLvArray( array1d< real64 > const & arr ) +{ + int id=0; + std::ostringstream oss; + oss<<"["; + oss< const & producedMass, - integer elementCount, - bool overwriteTimeStepStats ) + integer const elementCount ) { m_periodStats.allocate( producedMass.size() ); // if beginning a new timestep, we must aggregate the stats from previous timesteps (mass & dt) before collecting the new ones - if( !overwriteTimeStepStats ) + bool isBeginingNewTS = currentTime >= ( m_periodStats.m_lastGatherTime + m_periodStats.m_lastGatherDT ); + if( isBeginingNewTS ) { for( int ip = 0; ip < m_periodStats.getPhaseCount(); ++ip ) { m_periodStats.m_periodPendingMass[ip] += m_periodStats.m_timeStepMass[ip]; m_periodStats.m_timeStepMass[ip] = 0; } - m_periodStats.m_periodDeltaTime += dt; m_periodStats.m_elementCount = elementCount; + m_periodStats.m_periodDeltaTime += m_periodStats.m_lastGatherDT; } + GEOS_LOG( GEOS_FMT( "{}, {} @{:.3f} +{:.3f} [ {} ] : pendMass + tsMass = {}kg + {}kg pending time = {:.3f} + {:.3f} lastTime = @{:.3f} ", + m_fluxName, m_aggregatorName, + currentTime, dt, + isBeginingNewTS ? (m_periodStats.m_periodDeltaTime>0.0 ? "New TS" : "New Period") : "TS OVERRIDE", + formatLvArray( m_periodStats.m_periodPendingMass ), formatLvArray( producedMass ), + m_periodStats.m_periodDeltaTime, m_periodStats.m_lastGatherDT, + m_periodStats.m_lastGatherTime ) ); + m_periodStats.m_lastGatherTime = currentTime;//m_lastGatherTime -> m_timeStepStart + m_periodStats.m_lastGatherDT = dt;//m_lastGatherDT -> m_timeStepDeltaTime for( int ip = 0; ip < m_periodStats.getPhaseCount(); ++ip ) { @@ -303,7 +322,8 @@ void SourceFluxStatsAggregator::WrappedStats::finalizePeriod() // produce timestep stats of this ranks m_stats.m_elementCount = m_periodStats.m_elementCount; - real64 timeDivisor = m_periodStats.m_periodDeltaTime > 0.0 ? 1.0 / m_periodStats.m_periodDeltaTime : 0.0; + real64 const dt = m_periodStats.m_lastGatherDT + m_periodStats.m_periodDeltaTime; + real64 const timeDivisor = dt > 0.0 ? 1.0 / dt : 0.0; for( int ip = 0; ip < m_periodStats.getPhaseCount(); ++ip ) { real64 periodMass = m_periodStats.m_timeStepMass[ip] + m_periodStats.m_periodPendingMass[ip]; @@ -334,6 +354,8 @@ void SourceFluxStatsAggregator::WrappedStats::PeriodStats::reset() } m_periodDeltaTime = 0.0; m_elementCount = 0; + m_lastGatherTime = 0.0; + m_lastGatherDT = 0.0; } diff --git a/src/coreComponents/fieldSpecification/SourceFluxStatistics.hpp b/src/coreComponents/fieldSpecification/SourceFluxStatistics.hpp index 19fe4d0cbb3..f1ce3a3d2ae 100644 --- a/src/coreComponents/fieldSpecification/SourceFluxStatistics.hpp +++ b/src/coreComponents/fieldSpecification/SourceFluxStatistics.hpp @@ -149,7 +149,9 @@ class SourceFluxStatsAggregator : public FieldStatisticsBase< FlowSolverBase > array1d< real64 > m_periodPendingMass; /// delta time the current period real64 m_periodDeltaTime = 0.0; - /// number of cell elements concerned by this instance + real64 m_lastGatherTime = 0.0; + real64 m_lastGatherDT = 0.0; + /// number of cell elements targeted by this instance integer m_elementCount = 0; /** diff --git a/src/coreComponents/physicsSolvers/fluidFlow/CompositionalMultiphaseBase.cpp b/src/coreComponents/physicsSolvers/fluidFlow/CompositionalMultiphaseBase.cpp index ebfde4148e2..d92317d0ebf 100644 --- a/src/coreComponents/physicsSolvers/fluidFlow/CompositionalMultiphaseBase.cpp +++ b/src/coreComponents/physicsSolvers/fluidFlow/CompositionalMultiphaseBase.cpp @@ -1561,13 +1561,12 @@ void CompositionalMultiphaseBase::applySourceFluxBC( real64 const time, localRhs[compMassBalanceRow] += rhsValue; } } ); - + GEOS_LOG(fs.getName()<<": Collect for phase="<( [&]( dataRepository::Wrapper< WrappedStats > & statsWrapper ) -// { -// WrappedStats & statsWrapperView = statsWrapper.referenceAsView(); -// if( statsWrapperView.getFluxName() == fluxName && statsWrapperView.getAggregatorName() == getName() ) -// { -// r = &statsWrapperView; -// } -// } ); -// // Error if SourceFluxStatsAggregator::registerDataOnMesh() did not work as expected -// GEOS_ERROR_IF( r == nullptr, GEOS_FMT( "{}: {} data wrongly registered on mesh (no flux stats wrapper was found for {} named {}).", -// getName(), catalogName(), -// SourceFluxBoundaryCondition::catalogName(), fluxName ) ); -// return *r; -// } - void SourceFluxStatsAggregator::writeStatData( integer minLogLevel, string_view elementSetName, WrappedStats const & wrappedStats ) @@ -270,17 +246,6 @@ void SourceFluxStatsAggregator::WrappedStats::gatherTimeStepStats( real64 const phaseProducedMass[0] = producedMass; gatherTimeStepStats( currentTime, dt, phaseProducedMass, elementCount ); } -string formatLvArray( array1d< real64 > const & arr ) -{ - int id=0; - std::ostringstream oss; - oss<<"["; - oss< const & producedMass, integer const elementCount ) @@ -288,27 +253,20 @@ void SourceFluxStatsAggregator::WrappedStats::gatherTimeStepStats( real64 const m_periodStats.allocate( producedMass.size() ); // if beginning a new timestep, we must aggregate the stats from previous timesteps (mass & dt) before collecting the new ones - bool isBeginingNewTS = currentTime >= ( m_periodStats.m_lastGatherTime + m_periodStats.m_lastGatherDT ); + bool isBeginingNewTS = currentTime >= ( m_periodStats.m_timeStepStart + m_periodStats.m_timeStepDeltaTime ); if( isBeginingNewTS ) { for( int ip = 0; ip < m_periodStats.getPhaseCount(); ++ip ) { m_periodStats.m_periodPendingMass[ip] += m_periodStats.m_timeStepMass[ip]; - m_periodStats.m_timeStepMass[ip] = 0; } m_periodStats.m_elementCount = elementCount; - m_periodStats.m_periodDeltaTime += m_periodStats.m_lastGatherDT; + m_periodStats.m_periodPendingDeltaTime += m_periodStats.m_timeStepDeltaTime; } - GEOS_LOG( GEOS_FMT( "{}, {} @{:.3f} +{:.3f} [ {} ] : pendMass + tsMass = {}kg + {}kg pending time = {:.3f} + {:.3f} lastTime = @{:.3f} ", - m_fluxName, m_aggregatorName, - currentTime, dt, - isBeginingNewTS ? (m_periodStats.m_periodDeltaTime>0.0 ? "New TS" : "New Period") : "TS OVERRIDE", - formatLvArray( m_periodStats.m_periodPendingMass ), formatLvArray( producedMass ), - m_periodStats.m_periodDeltaTime, m_periodStats.m_lastGatherDT, - m_periodStats.m_lastGatherTime ) ); - m_periodStats.m_lastGatherTime = currentTime;//m_lastGatherTime -> m_timeStepStart - m_periodStats.m_lastGatherDT = dt;//m_lastGatherDT -> m_timeStepDeltaTime + // new timestep stats to take into account + m_periodStats.m_timeStepStart = currentTime; + m_periodStats.m_timeStepDeltaTime = dt; for( int ip = 0; ip < m_periodStats.getPhaseCount(); ++ip ) { m_periodStats.m_timeStepMass = producedMass; @@ -322,7 +280,7 @@ void SourceFluxStatsAggregator::WrappedStats::finalizePeriod() // produce timestep stats of this ranks m_stats.m_elementCount = m_periodStats.m_elementCount; - real64 const dt = m_periodStats.m_lastGatherDT + m_periodStats.m_periodDeltaTime; + real64 const dt = m_periodStats.m_timeStepDeltaTime + m_periodStats.m_periodPendingDeltaTime; real64 const timeDivisor = dt > 0.0 ? 1.0 / dt : 0.0; for( int ip = 0; ip < m_periodStats.getPhaseCount(); ++ip ) { @@ -352,10 +310,10 @@ void SourceFluxStatsAggregator::WrappedStats::PeriodStats::reset() m_timeStepMass[ip] = 0.0; m_periodPendingMass[ip] = 0.0; } - m_periodDeltaTime = 0.0; + m_periodPendingDeltaTime = 0.0; m_elementCount = 0; - m_lastGatherTime = 0.0; - m_lastGatherDT = 0.0; + m_timeStepStart = 0.0; + m_timeStepDeltaTime = 0.0; } diff --git a/src/coreComponents/fieldSpecification/SourceFluxStatistics.hpp b/src/coreComponents/fieldSpecification/SourceFluxStatistics.hpp index 294a06b7074..730d875bf96 100644 --- a/src/coreComponents/fieldSpecification/SourceFluxStatistics.hpp +++ b/src/coreComponents/fieldSpecification/SourceFluxStatistics.hpp @@ -89,10 +89,20 @@ class SourceFluxStatsAggregator : public FieldStatisticsBase< FlowSolverBase > /** * @brief Set the current time step stats. Single-phase version + * @param currentTime time of the timestep start since simulation starting + * @param dt time delta of the current timestep + * @param producedMass time-step producted mass (see StatData::m_producedMass). + * @param elementCount number of cell elements concerned by this instance + */ void gatherTimeStepStats( real64 currentTime, real64 dt, real64 producedMass, integer elementCount ); /** * @brief Set the current time step stats. Multi-phase version + * @param currentTime time of the timestep start since simulation starting + * @param dt time delta of the current timestep + * @param producedMass time-step producted mass (see StatData::m_producedMass). + * @param elementCount number of cell elements concerned by this instance + */ void gatherTimeStepStats( real64 currentTime, real64 dt, array1d< real64 > const & producedMass, integer elementCount ); @@ -135,10 +145,12 @@ class SourceFluxStatsAggregator : public FieldStatisticsBase< FlowSolverBase > array1d< real64 > m_timeStepMass; /// producted mass sum from all previous time-step of the current period. array1d< real64 > m_periodPendingMass; - /// delta time the current period - real64 m_periodDeltaTime = 0.0; - real64 m_lastGatherTime = 0.0; - real64 m_lastGatherDT = 0.0; + /// time of when the timestep starts (since the simulation start) + real64 m_timeStepStart = 0.0; + /// time that the current timestep is simulating + real64 m_timeStepDeltaTime = 0.0; + /// delta time from all previous time-step of the current period. + real64 m_periodPendingDeltaTime = 0.0; /// number of cell elements targeted by this instance integer m_elementCount = 0; @@ -177,12 +189,8 @@ class SourceFluxStatsAggregator : public FieldStatisticsBase< FlowSolverBase > static string catalogName() { return "SourceFluxStatistics"; } /** - * @defgroup Tasks Interface Functions - * - * This function implements the interface defined by the abstract TaskBase class + * @copydoc ExecutableGroup::execute() */ - /**@{*/ - virtual bool execute( real64 const time_n, real64 const dt, integer const cycleNumber, @@ -190,19 +198,6 @@ class SourceFluxStatsAggregator : public FieldStatisticsBase< FlowSolverBase > real64 const eventProgress, DomainPartition & domain ) override; - /**@}*/ - - // /** - // * @return a WrappedStats struct that contains the statistics of the flux for the - // * SourceFluxStatsAggregator instance in the container. - // * @param container the container from which we want the statistics. - // * @param fluxName the name of the flux from which we want the statistics. - // * @throw a GEOS_ERROR if the flux was not found. - // * @note To be retrieved, the WrappedStats struct must be registered on the container during the - // * registerDataOnMesh() call. - // */ - // WrappedStats & getFluxStatData( Group & container, string_view fluxName ); - /** * @brief Apply a functor to all WrappedStats of the given group that target a given flux (and * potentially multiple SourceFluxStatsAggregator). @@ -302,11 +297,11 @@ class SourceFluxStatsAggregator : public FieldStatisticsBase< FlowSolverBase > /** * @brief Output in the log the given statistics. - * @param regionName the name of the element group (a region, a sub-region...) from which we want to output the data. - * @param minLogLevel the min log level to output any line. + * @param regionName the name of the element group (a region, a sub-region...) from which we want to output the data. + * @param minLogLevel the min log level to output any line. * @param elementSetName the region / sub-subregion name concerned by the statistics. - * @param fluxName the flux name concerned by the statistics. - * @param stats the statistics that must be output in the log. + * @param fluxName the flux name concerned by the statistics. + * @param stats the statistics that must be output in the log. */ void writeStatData( integer minLogLevel, string_view elementSetName, WrappedStats const & stats ); @@ -385,11 +380,6 @@ inline string SourceFluxStatsAggregator::getStatWrapperName( string_view fluxNam { return GEOS_FMT( "{}_region_stats_for_{}", fluxName, getName() ); } -/******************************** SourceFluxStatisticsKernel ********************************/ -struct SourceFluxStatisticsKernel -{}; - - } /* namespace geos */ #endif /* SRC_CORECOMPONENTS_PHYSICSSOLVERS_FLUIDFLOW_SOURCEFLUXSTATISTICS_HPP_ */ diff --git a/src/coreComponents/physicsSolvers/fluidFlow/CompositionalMultiphaseBase.cpp b/src/coreComponents/physicsSolvers/fluidFlow/CompositionalMultiphaseBase.cpp index d92317d0ebf..c67677f2bfb 100644 --- a/src/coreComponents/physicsSolvers/fluidFlow/CompositionalMultiphaseBase.cpp +++ b/src/coreComponents/physicsSolvers/fluidFlow/CompositionalMultiphaseBase.cpp @@ -1561,7 +1561,7 @@ void CompositionalMultiphaseBase::applySourceFluxBC( real64 const time, localRhs[compMassBalanceRow] += rhsValue; } } ); - GEOS_LOG(fs.getName()<<": Collect for phase="< rhsContributionArrayView = rhsContributionArray.toView(); localIndex const rankOffset = dofManager.rankOffset(); + array1d< real64 > producedMass{ m_numComponents }; + arrayView1d< real64 > producedMassView = producedMass.toView(); + // note that the dofArray will not be used after this step (simpler to use dofNumber instead) fs.computeRhsContribution< FieldSpecificationAdd, parallelDevicePolicy<> >( targetSet.toViewConst(), @@ -891,7 +895,8 @@ void ReactiveCompositionalMultiphaseOBL::applySourceFluxBC( real64 const time, fluidComponentId, dofNumber, rhsContributionArrayView, - localRhs] GEOS_HOST_DEVICE ( localIndex const a ) + localRhs, + producedMassView] GEOS_HOST_DEVICE ( localIndex const a ) { // we need to filter out ghosts here, because targetSet may contain them localIndex const ei = targetSet[a]; @@ -902,7 +907,16 @@ void ReactiveCompositionalMultiphaseOBL::applySourceFluxBC( real64 const time, // for all "fluid components", we add the value to the component mass balance equation globalIndex const compMassBalanceRow = dofNumber[ei] - rankOffset + fluidComponentId; - localRhs[compMassBalanceRow] += rhsContributionArrayView[a] / sizeScalingFactor; + real64 const rhsValue = rhsContributionArrayView[a] / sizeScalingFactor; + localRhs[compMassBalanceRow] += rhsValue; + producedMassView[fluidComponentId] += rhsValue; + } ); + + SourceFluxStatsAggregator::forAllFluxStatWrappers( subRegion, fs.getName(), + [&]( SourceFluxStatsAggregator::WrappedStats & wrapper ) + { + // set the new sub-region statistics for this timestep + wrapper.gatherTimeStepStats( time, dt, producedMass, targetSet.size() ); } ); } ); } ); diff --git a/src/coreComponents/physicsSolvers/fluidFlow/SinglePhaseBase.cpp b/src/coreComponents/physicsSolvers/fluidFlow/SinglePhaseBase.cpp index 033d1fc949b..5b3a6471c7b 100644 --- a/src/coreComponents/physicsSolvers/fluidFlow/SinglePhaseBase.cpp +++ b/src/coreComponents/physicsSolvers/fluidFlow/SinglePhaseBase.cpp @@ -1011,9 +1011,6 @@ void SinglePhaseBase::applySourceFluxBC( real64 const time_n, return; } - // production stats for this SourceFluxBoundaryCondition in this subRegion - real64 producedMass = 0.0; - arrayView1d< globalIndex const > const dofNumber = subRegion.getReference< array1d< globalIndex > >( dofKey ); arrayView1d< integer const > const ghostRank = subRegion.ghostRank(); @@ -1024,6 +1021,9 @@ void SinglePhaseBase::applySourceFluxBC( real64 const time_n, arrayView1d< real64 > rhsContributionArrayView = rhsContributionArray.toView(); localIndex const rankOffset = dofManager.rankOffset(); + array1d< real64 > producedMass{ 1 }; + arrayView1d< real64 > producedMassView = producedMass.toView(); + // note that the dofArray will not be used after this step (simpler to use dofNumber instead) fs.computeRhsContribution< FieldSpecificationAdd, parallelDevicePolicy<> >( targetSet.toViewConst(), @@ -1064,7 +1064,7 @@ void SinglePhaseBase::applySourceFluxBC( real64 const time_n, rhsContributionArrayView, localRhs, localMatrix, - &producedMass] GEOS_HOST_DEVICE ( localIndex const a ) + producedMassView] GEOS_HOST_DEVICE ( localIndex const a ) { // we need to filter out ghosts here, because targetSet may contain them localIndex const ei = targetSet[a]; @@ -1078,7 +1078,7 @@ void SinglePhaseBase::applySourceFluxBC( real64 const time_n, globalIndex const energyRowIndex = massRowIndex + 1; real64 const rhsValue = rhsContributionArrayView[a] / sizeScalingFactor; // scale the contribution by the sizeScalingFactor here! localRhs[massRowIndex] += rhsValue; - producedMass += rhsValue; + producedMassView[0] += rhsValue; //add the value to the energey balance equation if the flux is positive (i.e., it's a producer) if( rhsContributionArrayView[a] > 0.0 ) { @@ -1119,7 +1119,7 @@ void SinglePhaseBase::applySourceFluxBC( real64 const time_n, globalIndex const rowIndex = dofNumber[ei] - rankOffset; real64 const rhsValue = rhsContributionArrayView[a] / sizeScalingFactor; localRhs[rowIndex] += rhsValue; - producedMass += rhsValue; + producedMass[0] += rhsValue; } ); } From cdebcffa5a4937c375995de3d588f03f86a8f037 Mon Sep 17 00:00:00 2001 From: MelReyCG Date: Mon, 12 Feb 2024 14:14:51 +0100 Subject: [PATCH 44/98] fixed sum operations (=> reduceSum) --- .../fieldSpecification/SourceFluxStatistics.cpp | 2 +- .../fieldSpecification/SourceFluxStatistics.hpp | 3 ++- .../fluidFlow/CompositionalMultiphaseBase.cpp | 11 ++++++----- .../ReactiveCompositionalMultiphaseOBL.cpp | 11 ++++++----- .../physicsSolvers/fluidFlow/SinglePhaseBase.cpp | 15 ++++++++------- 5 files changed, 23 insertions(+), 19 deletions(-) diff --git a/src/coreComponents/fieldSpecification/SourceFluxStatistics.cpp b/src/coreComponents/fieldSpecification/SourceFluxStatistics.cpp index 536e92acede..e80cccbdd16 100644 --- a/src/coreComponents/fieldSpecification/SourceFluxStatistics.cpp +++ b/src/coreComponents/fieldSpecification/SourceFluxStatistics.cpp @@ -239,7 +239,7 @@ void SourceFluxStatsAggregator::WrappedStats::setTarget( string_view aggregatorN m_fluxName = fluxName; } void SourceFluxStatsAggregator::WrappedStats::gatherTimeStepStats( real64 const currentTime, real64 const dt, - array1d< real64 > const & producedMass, + arrayView1d< real64 const > const & producedMass, integer const elementCount ) { m_periodStats.allocate( producedMass.size() ); diff --git a/src/coreComponents/fieldSpecification/SourceFluxStatistics.hpp b/src/coreComponents/fieldSpecification/SourceFluxStatistics.hpp index 12f5f5ba630..4180f0e7dd3 100644 --- a/src/coreComponents/fieldSpecification/SourceFluxStatistics.hpp +++ b/src/coreComponents/fieldSpecification/SourceFluxStatistics.hpp @@ -95,7 +95,8 @@ class SourceFluxStatsAggregator : public FieldStatisticsBase< FlowSolverBase > * @param elementCount number of cell elements concerned by this instance */ void gatherTimeStepStats( real64 currentTime, real64 dt, - array1d< real64 > const & producedMass, integer elementCount ); + arrayView1d< real64 const > const & producedMass, + integer elementCount ); /** * @brief Finalize the period statistics of each timestep gathering and render data over all mpi ranks. diff --git a/src/coreComponents/physicsSolvers/fluidFlow/CompositionalMultiphaseBase.cpp b/src/coreComponents/physicsSolvers/fluidFlow/CompositionalMultiphaseBase.cpp index 594fc629223..3333fab0b88 100644 --- a/src/coreComponents/physicsSolvers/fluidFlow/CompositionalMultiphaseBase.cpp +++ b/src/coreComponents/physicsSolvers/fluidFlow/CompositionalMultiphaseBase.cpp @@ -1496,8 +1496,7 @@ void CompositionalMultiphaseBase::applySourceFluxBC( real64 const time, arrayView1d< real64 > rhsContributionArrayView = rhsContributionArray.toView(); localIndex const rankOffset = dofManager.rankOffset(); - array1d< real64 > producedMass{ m_numComponents }; - arrayView1d< real64 > producedMassView = producedMass.toView(); + RAJA::ReduceSum< parallelDeviceReduce, real64 > massProd( 0.0 ); // note that the dofArray will not be used after this step (simpler to use dofNumber instead) fs.computeRhsContribution< FieldSpecificationAdd, @@ -1533,7 +1532,7 @@ void CompositionalMultiphaseBase::applySourceFluxBC( real64 const time, dofNumber, rhsContributionArrayView, localRhs, - producedMassView] GEOS_HOST_DEVICE ( localIndex const a ) + massProd] GEOS_HOST_DEVICE ( localIndex const a ) { // we need to filter out ghosts here, because targetSet may contain them localIndex const ei = targetSet[a]; @@ -1543,7 +1542,7 @@ void CompositionalMultiphaseBase::applySourceFluxBC( real64 const time, } real64 const rhsValue = rhsContributionArrayView[a] / sizeScalingFactor; // scale the contribution by the sizeScalingFactor here! - producedMassView[fluidComponentId] += rhsValue; + massProd += rhsValue; if( useTotalMassEquation > 0 ) { // for all "fluid components", we add the value to the total mass balance equation @@ -1566,7 +1565,9 @@ void CompositionalMultiphaseBase::applySourceFluxBC( real64 const time, [&]( SourceFluxStatsAggregator::WrappedStats & wrapper ) { // set the new sub-region statistics for this timestep - wrapper.gatherTimeStepStats( time, dt, producedMass, targetSet.size() ); + array1d< real64 > massProdArr{ m_numComponents }; + massProdArr[fluidComponentId] = massProd.get(); + wrapper.gatherTimeStepStats( time, dt, massProdArr.toViewConst(), targetSet.size() ); } ); } ); } ); diff --git a/src/coreComponents/physicsSolvers/fluidFlow/ReactiveCompositionalMultiphaseOBL.cpp b/src/coreComponents/physicsSolvers/fluidFlow/ReactiveCompositionalMultiphaseOBL.cpp index f88517e4f7c..b6fff7e6576 100644 --- a/src/coreComponents/physicsSolvers/fluidFlow/ReactiveCompositionalMultiphaseOBL.cpp +++ b/src/coreComponents/physicsSolvers/fluidFlow/ReactiveCompositionalMultiphaseOBL.cpp @@ -863,8 +863,7 @@ void ReactiveCompositionalMultiphaseOBL::applySourceFluxBC( real64 const time, arrayView1d< real64 > rhsContributionArrayView = rhsContributionArray.toView(); localIndex const rankOffset = dofManager.rankOffset(); - array1d< real64 > producedMass{ m_numComponents }; - arrayView1d< real64 > producedMassView = producedMass.toView(); + RAJA::ReduceSum< parallelDeviceReduce, real64 > massProd( 0.0 ); // note that the dofArray will not be used after this step (simpler to use dofNumber instead) fs.computeRhsContribution< FieldSpecificationAdd, @@ -896,7 +895,7 @@ void ReactiveCompositionalMultiphaseOBL::applySourceFluxBC( real64 const time, dofNumber, rhsContributionArrayView, localRhs, - producedMassView] GEOS_HOST_DEVICE ( localIndex const a ) + massProd] GEOS_HOST_DEVICE ( localIndex const a ) { // we need to filter out ghosts here, because targetSet may contain them localIndex const ei = targetSet[a]; @@ -909,14 +908,16 @@ void ReactiveCompositionalMultiphaseOBL::applySourceFluxBC( real64 const time, globalIndex const compMassBalanceRow = dofNumber[ei] - rankOffset + fluidComponentId; real64 const rhsValue = rhsContributionArrayView[a] / sizeScalingFactor; localRhs[compMassBalanceRow] += rhsValue; - producedMassView[fluidComponentId] += rhsValue; + massProd += rhsValue; } ); SourceFluxStatsAggregator::forAllFluxStatWrappers( subRegion, fs.getName(), [&]( SourceFluxStatsAggregator::WrappedStats & wrapper ) { // set the new sub-region statistics for this timestep - wrapper.gatherTimeStepStats( time, dt, producedMass, targetSet.size() ); + array1d< real64 > massProdArr{ m_numComponents }; + massProdArr[fluidComponentId] = massProd.get(); + wrapper.gatherTimeStepStats( time, dt, massProdArr.toViewConst(), targetSet.size() ); } ); } ); } ); diff --git a/src/coreComponents/physicsSolvers/fluidFlow/SinglePhaseBase.cpp b/src/coreComponents/physicsSolvers/fluidFlow/SinglePhaseBase.cpp index 5b3a6471c7b..659052ab242 100644 --- a/src/coreComponents/physicsSolvers/fluidFlow/SinglePhaseBase.cpp +++ b/src/coreComponents/physicsSolvers/fluidFlow/SinglePhaseBase.cpp @@ -1021,8 +1021,7 @@ void SinglePhaseBase::applySourceFluxBC( real64 const time_n, arrayView1d< real64 > rhsContributionArrayView = rhsContributionArray.toView(); localIndex const rankOffset = dofManager.rankOffset(); - array1d< real64 > producedMass{ 1 }; - arrayView1d< real64 > producedMassView = producedMass.toView(); + RAJA::ReduceSum< parallelDeviceReduce, real64 > massProd( 0.0 ); // note that the dofArray will not be used after this step (simpler to use dofNumber instead) fs.computeRhsContribution< FieldSpecificationAdd, @@ -1064,7 +1063,7 @@ void SinglePhaseBase::applySourceFluxBC( real64 const time_n, rhsContributionArrayView, localRhs, localMatrix, - producedMassView] GEOS_HOST_DEVICE ( localIndex const a ) + massProd] GEOS_HOST_DEVICE ( localIndex const a ) { // we need to filter out ghosts here, because targetSet may contain them localIndex const ei = targetSet[a]; @@ -1078,7 +1077,7 @@ void SinglePhaseBase::applySourceFluxBC( real64 const time_n, globalIndex const energyRowIndex = massRowIndex + 1; real64 const rhsValue = rhsContributionArrayView[a] / sizeScalingFactor; // scale the contribution by the sizeScalingFactor here! localRhs[massRowIndex] += rhsValue; - producedMassView[0] += rhsValue; + massProd += rhsValue; //add the value to the energey balance equation if the flux is positive (i.e., it's a producer) if( rhsContributionArrayView[a] > 0.0 ) { @@ -1106,7 +1105,7 @@ void SinglePhaseBase::applySourceFluxBC( real64 const time_n, dofNumber, rhsContributionArrayView, localRhs, - &producedMass] GEOS_HOST_DEVICE ( localIndex const a ) + massProd] GEOS_HOST_DEVICE ( localIndex const a ) { // we need to filter out ghosts here, because targetSet may contain them localIndex const ei = targetSet[a]; @@ -1119,7 +1118,7 @@ void SinglePhaseBase::applySourceFluxBC( real64 const time_n, globalIndex const rowIndex = dofNumber[ei] - rankOffset; real64 const rhsValue = rhsContributionArrayView[a] / sizeScalingFactor; localRhs[rowIndex] += rhsValue; - producedMass[0] += rhsValue; + massProd += rhsValue; } ); } @@ -1127,7 +1126,9 @@ void SinglePhaseBase::applySourceFluxBC( real64 const time_n, [&]( SourceFluxStatsAggregator::WrappedStats & wrapper ) { // set the new sub-region statistics for this timestep - wrapper.gatherTimeStepStats( time_n, dt, producedMass, targetSet.size() ); + array1d< real64 > massProdArr{ 1 }; + massProdArr[0] = massProd.get(); + wrapper.gatherTimeStepStats( time_n, dt, massProdArr.toViewConst(), targetSet.size() ); } ); } ); } ); From ffcf39bf88776935751a6a44b10f39d4601822a5 Mon Sep 17 00:00:00 2001 From: MelReyCG Date: Mon, 12 Feb 2024 14:14:58 +0100 Subject: [PATCH 45/98] uncrustify --- .../fluidFlow/CompositionalMultiphaseStatistics.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/coreComponents/physicsSolvers/fluidFlow/CompositionalMultiphaseStatistics.cpp b/src/coreComponents/physicsSolvers/fluidFlow/CompositionalMultiphaseStatistics.cpp index 6579c64a780..0f52e0b0456 100644 --- a/src/coreComponents/physicsSolvers/fluidFlow/CompositionalMultiphaseStatistics.cpp +++ b/src/coreComponents/physicsSolvers/fluidFlow/CompositionalMultiphaseStatistics.cpp @@ -318,7 +318,7 @@ void CompositionalMultiphaseStatistics::computeRegionStatistics( real64 const ti subRegionImmobilePhaseMass.toView(), subRegionComponentMass.toView() ); - ElementRegionBase & region = elemManager.getRegion( ElementRegionBase::getParentRegion(subRegion).getName() ); + ElementRegionBase & region = elemManager.getRegion( ElementRegionBase::getParentRegion( subRegion ).getName() ); RegionStatistics & regionStatistics = region.getReference< RegionStatistics >( viewKeyStruct::regionStatisticsString() ); regionStatistics.averagePressure += subRegionAvgPresNumerator; From 7a96ee2a46791dc0f08dcf0367fe4a5c96f316ab Mon Sep 17 00:00:00 2001 From: MelReyCG Date: Mon, 12 Feb 2024 15:09:43 +0100 Subject: [PATCH 46/98] test pvt tables optimisation (13.4s -> 3.0s) --- .../fluidFlowTests/testFluidStatistics.cpp | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/src/coreComponents/unitTests/fluidFlowTests/testFluidStatistics.cpp b/src/coreComponents/unitTests/fluidFlowTests/testFluidStatistics.cpp index 4705580cd85..8ad9e58596b 100644 --- a/src/coreComponents/unitTests/fluidFlowTests/testFluidStatistics.cpp +++ b/src/coreComponents/unitTests/fluidFlowTests/testFluidStatistics.cpp @@ -656,20 +656,15 @@ TestSet getTestSet() + @@ -725,13 +720,13 @@ TestSet getTestSet() )xml"; - testInputs.tableFiles["pvtgas.txt"] = "DensityFun SpanWagnerCO2Density 1.0e6 5.0e7 1e5 285.15 395.15 2\n" - "ViscosityFun FenghourCO2Viscosity 1.0e6 5.0e7 1e5 285.15 395.15 2\n"; + testInputs.tableFiles["pvtgas.txt"] = "DensityFun SpanWagnerCO2Density 1.5e7 2.5e7 1e5 370.15 400.15 2\n" + "ViscosityFun FenghourCO2Viscosity 1.5e7 2.5e7 1e5 370.15 400.15 2\n"; testInputs.tableFiles["pvtliquid.txt"] = "DensityFun EzrokhiBrineDensity 0.1033 -2.2991e-5 -2.3658e-6\n" "ViscosityFun EzrokhiBrineViscosity 0 0 0\n"; - testInputs.tableFiles["co2flash.txt"] = "FlashModel CO2Solubility 1.0e6 5.0e7 1e5 285.15 395.15 2 0\n"; + testInputs.tableFiles["co2flash.txt"] = "FlashModel CO2Solubility 1.5e7 2.5e7 1e5 370.15 400.15 2 0\n"; testInputs.sourceFluxName = "sourceFlux"; From 2446436d5ed7dabd2ddfdad52d20836e86e0d139 Mon Sep 17 00:00:00 2001 From: MelReyCG Date: Tue, 13 Feb 2024 15:53:35 +0100 Subject: [PATCH 47/98] exposed SinglePhaseStatistics::RegionStatistics --- .../physicsSolvers/fluidFlow/SinglePhaseStatistics.hpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/coreComponents/physicsSolvers/fluidFlow/SinglePhaseStatistics.hpp b/src/coreComponents/physicsSolvers/fluidFlow/SinglePhaseStatistics.hpp index 8d826c5034e..4bde4d7e1a7 100644 --- a/src/coreComponents/physicsSolvers/fluidFlow/SinglePhaseStatistics.hpp +++ b/src/coreComponents/physicsSolvers/fluidFlow/SinglePhaseStatistics.hpp @@ -62,9 +62,6 @@ class SinglePhaseStatistics : public FieldStatisticsBase< SinglePhaseBase > /**@}*/ -private: - - using Base = FieldStatisticsBase< SinglePhaseBase >; /** * @struct viewKeyStruct holds char strings and viewKeys for fast lookup @@ -105,6 +102,10 @@ class SinglePhaseStatistics : public FieldStatisticsBase< SinglePhaseBase > real64 totalUncompactedPoreVolume; }; +private: + + using Base = FieldStatisticsBase< SinglePhaseBase >; + /** * @brief Compute some statistics on the reservoir (average field pressure, etc) * @param[in] mesh the mesh level object From a0d085ae7427f8c1d54e755c3b840e6d94ffb30b Mon Sep 17 00:00:00 2001 From: MelReyCG Date: Tue, 13 Feb 2024 15:59:47 +0100 Subject: [PATCH 48/98] compared mass difference from SinglePhaseStatistics and SourceFluxStatistics --- .../fluidFlowTests/testFluidStatistics.cpp | 164 +++++++++++++----- 1 file changed, 120 insertions(+), 44 deletions(-) diff --git a/src/coreComponents/unitTests/fluidFlowTests/testFluidStatistics.cpp b/src/coreComponents/unitTests/fluidFlowTests/testFluidStatistics.cpp index 8ad9e58596b..8adcf502bc0 100644 --- a/src/coreComponents/unitTests/fluidFlowTests/testFluidStatistics.cpp +++ b/src/coreComponents/unitTests/fluidFlowTests/testFluidStatistics.cpp @@ -16,6 +16,7 @@ #include "mainInterface/initialization.hpp" #include "mainInterface/GeosxState.hpp" #include "fieldSpecification/SourceFluxStatistics.hpp" +#include "physicsSolvers/fluidFlow/SinglePhaseStatistics.hpp" #include @@ -43,6 +44,7 @@ struct TestInputs string timeStepCheckerPath; string timeStepFluxStatsPath; string wholeSimFluxStatsPath; + string flowSolverPath; // rates for each timesteps, for each phases array2d< real64 > sourceRates; @@ -169,7 +171,9 @@ void checkFluxStats( arraySlice1d< real64 > const & expectedMasses, void checkWholeSimFluxStatistics( ProblemManager & problem, TestSet const & testSet ) { DomainPartition & domain = problem.getDomainPartition(); - SourceFluxStatsAggregator & wholeSimStats = problem.getGroupByPath< SourceFluxStatsAggregator >( testSet.inputs.wholeSimFluxStatsPath ); + SourceFluxStatsAggregator & wholeSimStats = + problem.getGroupByPath< SourceFluxStatsAggregator >( testSet.inputs.wholeSimFluxStatsPath ); + wholeSimStats.forMeshLevelStatsWrapper( domain, [&] ( MeshLevel & meshLevel, SourceFluxStatsAggregator::WrappedStats & meshLevelStats ) @@ -206,6 +210,44 @@ void checkWholeSimFluxStatistics( ProblemManager & problem, TestSet const & test } ); } +void checkTimeStepFluxStats( ProblemManager & problem, TestSet const & testSet, + real64 const time_n, integer const timestepId ) +{ + DomainPartition & domain = problem.getDomainPartition(); + SourceFluxStatsAggregator & timestepStats = + problem.getGroupByPath< SourceFluxStatsAggregator >( testSet.inputs.timeStepFluxStatsPath ); + + timestepStats.forMeshLevelStatsWrapper( domain, + [&] ( MeshLevel & meshLevel, + SourceFluxStatsAggregator::WrappedStats & ) + { + timestepStats.forAllFluxStatsWrappers( meshLevel, + [&] ( MeshLevel &, + SourceFluxStatsAggregator::WrappedStats & fluxStats ) + { + if( fluxStats.getFluxName() == testSet.inputs.sourceFluxName ) + { + checkFluxStats( testSet.sourceMassProd[timestepId], + testSet.sourceRates[timestepId], + testSet.inputs.sourceElementsCount, + fluxStats, GEOS_FMT( "for timestep at t = {} s", time_n ) ); + } + else if( fluxStats.getFluxName() == testSet.inputs.sinkFluxName ) + { + checkFluxStats( testSet.sinkMassProd[timestepId], + testSet.sinkRates[timestepId], + testSet.inputs.sinkElementsCount, + fluxStats, GEOS_FMT( "for timestep at t = {} s", time_n ) ); + } + else + { + FAIL() << "Unexpected SourceFlux found!"; + } + } ); + } ); +} + + /** * @brief This Task allows to extract and check each timestep stats during the simulation. @@ -220,8 +262,11 @@ class TimeStepChecker : public TaskBase void postProcessInput() override {} - void setTestSet( TestSet const & testSet ) { m_testSet = &testSet; } - integer getTestedTimeStepCount() { return m_timestepId; } + void setCheckTimeStepFunction( std::function< void(real64) > func ) + { m_checkTimeStepFunction = std::function< void(real64) >( func ); } + + integer getTestedTimeStepCount() + { return m_timestepId; } static string catalogName() { return "SinglePhaseStatsTimeStepChecker"; } @@ -230,46 +275,18 @@ class TimeStepChecker : public TaskBase integer const GEOS_UNUSED_PARAM( cycleNumber ), integer const GEOS_UNUSED_PARAM( eventCounter ), real64 const GEOS_UNUSED_PARAM( eventProgress ), - DomainPartition & domain ) + DomainPartition & GEOS_UNUSED_PARAM( domain ) ) { - EXPECT_NE( m_testSet, nullptr ); - EXPECT_LT( m_timestepId, m_testSet->timestepCount ) << "The tested time-step count were higher than expected."; - SourceFluxStatsAggregator & timestepStats = getGroupByPath< SourceFluxStatsAggregator >( m_testSet->inputs.timeStepFluxStatsPath ); - timestepStats.forMeshLevelStatsWrapper( domain, - [&] ( MeshLevel & meshLevel, - SourceFluxStatsAggregator::WrappedStats & ) - { - timestepStats.forAllFluxStatsWrappers( meshLevel, - [&] ( MeshLevel &, - SourceFluxStatsAggregator::WrappedStats & fluxStats ) - { - if( fluxStats.getFluxName() == m_testSet->inputs.sourceFluxName ) - { - checkFluxStats( m_testSet->sourceMassProd[m_timestepId], - m_testSet->sourceRates[m_timestepId], - m_testSet->inputs.sourceElementsCount, - fluxStats, GEOS_FMT( "for timestep at t = {} s", time_n ) ); - } - else if( fluxStats.getFluxName() == m_testSet->inputs.sinkFluxName ) - { - checkFluxStats( m_testSet->sinkMassProd[m_timestepId], - m_testSet->sinkRates[m_timestepId], - m_testSet->inputs.sinkElementsCount, - fluxStats, GEOS_FMT( "for timestep at t = {} s", time_n ) ); - } - else - { - FAIL() << "Unexpected SourceFlux found!"; - } - } ); - } ); + EXPECT_TRUE( m_checkTimeStepFunction ); + m_checkTimeStepFunction( time_n ); ++m_timestepId; - return false; } + + private: - TestSet const * m_testSet = nullptr; + std::function< void(real64) > m_checkTimeStepFunction; int m_timestepId = 0; }; REGISTER_CATALOG_ENTRY( TaskBase, TimeStepChecker, string const &, Group * const ) @@ -322,6 +339,26 @@ void setRateTable( array2d< real64 > & rateTable, std::initializer_list< std::in } } +real64 getTotalFluidMass( ProblemManager & problem, string_view flowSolverPath ) +{ + real64 totalMass = 0.0; + SolverBase const & solver = problem.getGroupByPath< SolverBase >( string( flowSolverPath ) ); + solver.forDiscretizationOnMeshTargets( problem.getDomainPartition().getMeshBodies(), + [&] ( string const &, + MeshLevel & mesh, + arrayView1d< string const > const & ) + { + mesh.getElemManager().forElementRegions( [&]( ElementRegionBase & region ) + { + SinglePhaseStatistics::RegionStatistics & regionStats = region.getReference< SinglePhaseStatistics::RegionStatistics >( + SinglePhaseStatistics::viewKeyStruct::regionStatisticsString() ); + + totalMass += regionStats.totalMass; + } ); + } ); + return totalMass; +} + //////////////////////////////// SinglePhase Flux Statistics Test //////////////////////////////// namespace SinglePhaseFluxStatisticsTest @@ -441,12 +478,17 @@ TestSet getTestSet() targetExactStartStop="1" beginTime="0" target="/Tasks/timeStepFluxStats" /> + + + flowSolverName="testSolver" + logLevel="2" /> + flowSolverName="testSolver" + logLevel="2" /> + + @@ -485,6 +533,7 @@ TestSet getTestSet() testInputs.timeStepCheckerPath = "/Tasks/timeStepChecker"; testInputs.timeStepFluxStatsPath = "/Tasks/timeStepFluxStats"; testInputs.wholeSimFluxStatsPath = "/Tasks/wholeSimFluxStats"; + testInputs.flowSolverPath = "/Solvers/testSolver"; testInputs.dt = 500.0; testInputs.sourceElementsCount = 2; @@ -521,8 +570,22 @@ TEST_F( FluidStatisticsTest, checkSinglePhaseFluxStatistics ) setupProblemFromXML( problem, testSet.inputs.xmlInput.data() ); + real64 firstMass; + TimeStepChecker & timeStepChecker = problem.getGroupByPath< TimeStepChecker >( testSet.inputs.timeStepCheckerPath ); - timeStepChecker.setTestSet( testSet ); + timeStepChecker.setCheckTimeStepFunction( [&]( real64 const time_n ) + { + integer const timestepId = timeStepChecker.getTestedTimeStepCount(); + EXPECT_LT( timestepId, testSet.timestepCount ) << "The tested time-step count were higher than expected."; + checkTimeStepFluxStats( problem, testSet, time_n, timestepId ); + + static bool passedFirstTimeStep = false; + if( !passedFirstTimeStep ) + { + passedFirstTimeStep = true; + firstMass = getTotalFluidMass( problem, testSet.inputs.flowSolverPath ); + } + } ); // run simulation EXPECT_FALSE( problem.runSimulation() ) << "Simulation exited early."; @@ -530,6 +593,14 @@ TEST_F( FluidStatisticsTest, checkSinglePhaseFluxStatistics ) EXPECT_EQ( timeStepChecker.getTestedTimeStepCount(), testSet.timestepCount ) << "The tested time-step were different than expected."; checkWholeSimFluxStatistics( problem, testSet ); + + // check singlephasestatistics results + real64 const lastMass = getTotalFluidMass( problem, testSet.inputs.flowSolverPath ); + real64 const massDiffTol = 1e-7; + EXPECT_NEAR( lastMass - firstMass, + -testSet.totalMassProd[0], + massDiffTol * std::abs( testSet.totalMassProd[0] ) ) << GEOS_FMT( "{} total mass difference from start to end is not consistent with fluxes production.", + SinglePhaseStatistics::catalogName() ); } @@ -654,7 +725,7 @@ TestSet getTestSet() forceDt="500.0" target="/Solvers/testSolver" /> - @@ -673,11 +744,11 @@ TestSet getTestSet() + logLevel="0" /> + logLevel="0" /> @@ -782,7 +853,12 @@ TEST_F( FluidStatisticsTest, checkMultiPhaseFluxStatistics ) setupProblemFromXML( problem, testSet.inputs.xmlInput.data() ); TimeStepChecker & timeStepChecker = problem.getGroupByPath< TimeStepChecker >( testSet.inputs.timeStepCheckerPath ); - timeStepChecker.setTestSet( testSet ); + timeStepChecker.setCheckTimeStepFunction( [&]( real64 const time_n ) + { + integer const timestepId = timeStepChecker.getTestedTimeStepCount(); + EXPECT_LT( timestepId, testSet.timestepCount ) << "The tested time-step count were higher than expected."; + checkTimeStepFluxStats( problem, testSet, time_n, timestepId ); + } ); // run simulation EXPECT_FALSE( problem.runSimulation() ) << "Simulation exited early."; From e1e79cf4ff9d31c71b567aecc1e3a3cf1b070a15 Mon Sep 17 00:00:00 2001 From: MelReyCG Date: Wed, 14 Feb 2024 12:01:48 +0100 Subject: [PATCH 49/98] fixed typo --- src/coreComponents/fieldSpecification/SourceFluxStatistics.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/coreComponents/fieldSpecification/SourceFluxStatistics.cpp b/src/coreComponents/fieldSpecification/SourceFluxStatistics.cpp index e80cccbdd16..2e0e1171717 100644 --- a/src/coreComponents/fieldSpecification/SourceFluxStatistics.cpp +++ b/src/coreComponents/fieldSpecification/SourceFluxStatistics.cpp @@ -121,7 +121,7 @@ void SourceFluxStatsAggregator::writeStatData( integer minLogLevel, { if( getLogLevel() >= minLogLevel && logger::internal::rank == 0 ) { - GEOS_LOG_RANK( GEOS_FMT( "{} {} (of {}, in {}): Producting on {} elements", + GEOS_LOG_RANK( GEOS_FMT( "{} {} (of {}, in {}): Producing on {} elements", catalogName(), getName(), wrappedStats.getFluxName(), elementSetName, wrappedStats.stats().m_elementCount ) ); From e9f7f4abd9113f465f55f427c9087cff150b07f1 Mon Sep 17 00:00:00 2001 From: MelReyCG Date: Thu, 15 Feb 2024 17:22:51 +0100 Subject: [PATCH 50/98] Added guard to test sub-timesteps --- .../physicsSolvers/SolverBase.hpp | 1 + .../physicsSolvers/SolverStatistics.hpp | 48 +++++++++++++++++++ .../fluidFlowTests/testFluidStatistics.cpp | 48 ++++++++++++------- 3 files changed, 80 insertions(+), 17 deletions(-) diff --git a/src/coreComponents/physicsSolvers/SolverBase.hpp b/src/coreComponents/physicsSolvers/SolverBase.hpp index f6174cd9b57..9a2762ac639 100644 --- a/src/coreComponents/physicsSolvers/SolverBase.hpp +++ b/src/coreComponents/physicsSolvers/SolverBase.hpp @@ -730,6 +730,7 @@ class SolverBase : public ExecutableGroup virtual bool registerCallback( void * func, const std::type_info & funcType ) final override; SolverStatistics & getSolverStatistics() { return m_solverStatistics; } + SolverStatistics const & getSolverStatistics() const { return m_solverStatistics; } /** * @brief Return PySolver type. diff --git a/src/coreComponents/physicsSolvers/SolverStatistics.hpp b/src/coreComponents/physicsSolvers/SolverStatistics.hpp index 7ec3b7cc532..12396eb8e21 100644 --- a/src/coreComponents/physicsSolvers/SolverStatistics.hpp +++ b/src/coreComponents/physicsSolvers/SolverStatistics.hpp @@ -79,6 +79,54 @@ class SolverStatistics : public dataRepository::Group */ void outputStatistics() const; + /** + * @return Number of time steps + */ + integer getNumTimeSteps() const + { return m_numTimeSteps; } + + /** + * @return Number of time step cuts + */ + integer getNumTimeStepCuts() const + { return m_numTimeStepCuts; } + + /** + * @return Cumulative number of successful outer loop iterations + */ + integer getNumSuccessfulOuterLoopIterations() const + { return m_numSuccessfulOuterLoopIterations; } + + /** + * @return Cumulative number of successful nonlinear iterations + */ + integer getNumSuccessfulNonlinearIterations() const + { return m_numSuccessfulNonlinearIterations; } + + /** + * @return Cumulative number of successful linear iterations + */ + integer getNumSuccessfulLinearIterations() const + { return m_numSuccessfulLinearIterations; } + + /** + * @return Cumulative number of discarded outer loop iterations + */ + integer getNumDiscardedOuterLoopIterations() const + { return m_numDiscardedOuterLoopIterations; } + + /** + * @return Cumulative number of discarded nonlinear iterations + */ + integer getNumDiscardedNonlinearIterations() const + { return m_numDiscardedNonlinearIterations; } + + /** + * @return Cumulative number of discarded linear iterations + */ + integer getNumDiscardedLinearIterations() const + { return m_numDiscardedLinearIterations; } + private: /** diff --git a/src/coreComponents/unitTests/fluidFlowTests/testFluidStatistics.cpp b/src/coreComponents/unitTests/fluidFlowTests/testFluidStatistics.cpp index 8adcf502bc0..28d99efe309 100644 --- a/src/coreComponents/unitTests/fluidFlowTests/testFluidStatistics.cpp +++ b/src/coreComponents/unitTests/fluidFlowTests/testFluidStatistics.cpp @@ -50,11 +50,15 @@ struct TestInputs array2d< real64 > sourceRates; array2d< real64 > sinkRates; + // parameters for precomputing results real64 dt; real64 sourceRateFactor; real64 sinkRateFactor; integer sourceElementsCount; integer sinkElementsCount; + + /// To be sure sub-timestepping is supported, require the test to have at least one sub-timestep (at least one test should test that). + bool requireSubTimeStep; }; /** @@ -247,6 +251,21 @@ void checkTimeStepFluxStats( ProblemManager & problem, TestSet const & testSet, } ); } +void checkTimeStepStats( ProblemManager & problem, TestSet const & testSet, + real64 const time_n, integer const timestepId ) +{ + EXPECT_LT( timestepId, testSet.timestepCount ) << GEOS_FMT( "The tested time-step count were higher than expected (t = {} s).", + time_n ); + + // simulation end sub-timestep check + if( testSet.inputs.requireSubTimeStep && timestepId == testSet.timestepCount-1 ) + { + SolverBase const & solver = problem.getGroupByPath< SolverBase >( testSet.inputs.flowSolverPath ); + SolverStatistics const & solverStats = solver.getSolverStatistics(); + EXPECT_GT( solverStats.getNumTimeStepCuts(), 0 ) << "The test did not encountered any timestep cut, but were expected to. " + "Consider adapting the simulation so a timestep cut occurs to check they work as expected."; + } +} /** @@ -474,26 +493,17 @@ TestSet getTestSet() + @@ -501,11 +511,11 @@ TestSet getTestSet() + logLevel="0" /> + logLevel="0" /> + @@ -805,10 +815,12 @@ TestSet getTestSet() testInputs.timeStepCheckerPath = "/Tasks/timeStepChecker"; testInputs.timeStepFluxStatsPath = "/Tasks/timeStepFluxStats"; testInputs.wholeSimFluxStatsPath = "/Tasks/wholeSimFluxStats"; + testInputs.flowSolverPath = "/Solvers/testSolver"; testInputs.dt = 500.0; testInputs.sourceElementsCount = 1; testInputs.sinkElementsCount = 1; + // FluxInjectionRate & FluxProductionRate table from 0.0s to 5000.0s setRateTable( testInputs.sourceRates, { { 0.000, 0.0 }, @@ -838,6 +850,8 @@ TestSet getTestSet() testInputs.sourceRateFactor = -1.0; testInputs.sinkRateFactor = 1.0; + testInputs.requireSubTimeStep = true; + return TestSet( testInputs ); } @@ -856,7 +870,7 @@ TEST_F( FluidStatisticsTest, checkMultiPhaseFluxStatistics ) timeStepChecker.setCheckTimeStepFunction( [&]( real64 const time_n ) { integer const timestepId = timeStepChecker.getTestedTimeStepCount(); - EXPECT_LT( timestepId, testSet.timestepCount ) << "The tested time-step count were higher than expected."; + checkTimeStepStats( problem, testSet, time_n, timestepId ); checkTimeStepFluxStats( problem, testSet, time_n, timestepId ); } ); From 6af8726d2ee970eb509655588e026f300090318f Mon Sep 17 00:00:00 2001 From: MelReyCG Date: Fri, 16 Feb 2024 17:53:40 +0100 Subject: [PATCH 51/98] Added CSV export & more docs --- .../SourceFluxStatistics.cpp | 85 ++++++++++++++----- .../SourceFluxStatistics.hpp | 43 ++++++++-- .../schema/docs/SourceFluxStatistics.rst | 1 + src/coreComponents/schema/schema.xsd | 2 + 4 files changed, 105 insertions(+), 26 deletions(-) diff --git a/src/coreComponents/fieldSpecification/SourceFluxStatistics.cpp b/src/coreComponents/fieldSpecification/SourceFluxStatistics.cpp index 2e0e1171717..105c78f9ae2 100644 --- a/src/coreComponents/fieldSpecification/SourceFluxStatistics.cpp +++ b/src/coreComponents/fieldSpecification/SourceFluxStatistics.cpp @@ -76,12 +76,17 @@ void SourceFluxStatsAggregator::postProcessInput() } Wrapper< SourceFluxStatsAggregator::WrappedStats > & -SourceFluxStatsAggregator::registerWrappedStats( Group & group, string_view fluxName ) +SourceFluxStatsAggregator::registerWrappedStats( Group & group, + string_view fluxName, + string_view elementSetName ) { string const wrapperName = getStatWrapperName( fluxName ); Wrapper< WrappedStats > & statsWrapper = group.registerWrapper< WrappedStats >( wrapperName ); statsWrapper.setRestartFlags( RestartFlags::NO_WRITE ); statsWrapper.reference().setTarget( getName(), fluxName ); + + writeStatsToCSV( elementSetName, statsWrapper.reference(), true ); + return statsWrapper; } void SourceFluxStatsAggregator::registerDataOnMesh( Group & meshBodies ) @@ -95,19 +100,22 @@ void SourceFluxStatsAggregator::registerDataOnMesh( Group & meshBodies ) MeshLevel & mesh, arrayView1d< string const > const & ) { - registerWrappedStats( mesh, viewKeyStruct::fluxSetWrapperString() ); + registerWrappedStats( mesh, viewKeyStruct::fluxSetWrapperString(), viewKeyStruct::allRegionWrapperString() ); + for( string const & fluxName : m_fluxNames ) { - registerWrappedStats( mesh, fluxName ); + registerWrappedStats( mesh, fluxName, viewKeyStruct::allRegionWrapperString() ); mesh.getElemManager().forElementRegions( [&]( ElementRegionBase & region ) { - Wrapper< WrappedStats > & regionStatsWrapper = registerWrappedStats( region, fluxName ); + Wrapper< WrappedStats > & regionStatsWrapper = + registerWrappedStats( region, fluxName, region.getName() ); region.excludeWrappersFromPacking( { regionStatsWrapper.getName() } ); region.forElementSubRegions( [&]( ElementSubRegionBase & subRegion ) { - Wrapper< WrappedStats > & subRegionStatsWrapper = registerWrappedStats( subRegion, fluxName ); + Wrapper< WrappedStats > & subRegionStatsWrapper = + registerWrappedStats( subRegion, fluxName, subRegion.getName() ); subRegion.excludeWrappersFromPacking( { subRegionStatsWrapper.getName() } ); } ); } ); @@ -115,9 +123,9 @@ void SourceFluxStatsAggregator::registerDataOnMesh( Group & meshBodies ) } ); } -void SourceFluxStatsAggregator::writeStatData( integer minLogLevel, - string_view elementSetName, - WrappedStats const & wrappedStats ) +void SourceFluxStatsAggregator::writeStatsToLog( integer minLogLevel, + string_view elementSetName, + WrappedStats const & wrappedStats ) { if( getLogLevel() >= minLogLevel && logger::internal::rank == 0 ) { @@ -147,6 +155,30 @@ void SourceFluxStatsAggregator::writeStatData( integer minLogLevel, } } +void SourceFluxStatsAggregator::writeStatsToCSV( string_view elementSetName, WrappedStats const & stats, + bool writeHeader ) +{ + if( m_writeCSV > 0 && MpiWrapper::commRank() == 0 ) + { + string const fileName = GEOS_FMT( "{}/{}_{}_{}.csv", + m_outputDir, + stats.getAggregatorName(), stats.getFluxName(), elementSetName ); + std::ofstream outputFile( fileName, + writeHeader ? std::ios_base::out : std::ios_base::app ); + if( writeHeader ) + { + outputFile << "Time [s],Element Count,Producted Mass [kg],Production Rate [kg/s]" << std::endl; + } + else + { + outputFile << GEOS_FMT( "{},{},{},{}", + stats.getStatsPeriodStart(), stats.stats().m_elementCount, + stats.stats().m_producedMass, stats.stats().m_productionRate ) << std::endl; + } + outputFile.close(); + } +} + bool SourceFluxStatsAggregator::execute( real64 const GEOS_UNUSED_PARAM( time_n ), real64 const GEOS_UNUSED_PARAM( dt ), integer const GEOS_UNUSED_PARAM( cycleNumber ), @@ -175,18 +207,21 @@ bool SourceFluxStatsAggregator::execute( real64 const GEOS_UNUSED_PARAM( time_n subRegionStats.finalizePeriod(); regionStats.stats().combine( subRegionStats.stats() ); - writeStatData( 4, subRegion.getName(), subRegionStats ); + writeStatsToLog( 4, subRegion.getName(), subRegionStats ); } ); fluxStats.stats().combine( regionStats.stats() ); - writeStatData( 3, region.getName(), regionStats ); + writeStatsToLog( 3, region.getName(), regionStats ); + writeStatsToCSV( region.getName(), regionStats, false ); } ); meshLevelStats.stats().combine( fluxStats.stats() ); - writeStatData( 2, viewKeyStruct::allRegionWrapperString(), fluxStats ); + writeStatsToLog( 2, viewKeyStruct::allRegionWrapperString(), fluxStats ); + writeStatsToCSV( viewKeyStruct::allRegionWrapperString(), fluxStats, false ); } ); - writeStatData( 1, viewKeyStruct::allRegionWrapperString(), meshLevelStats ); + writeStatsToLog( 1, viewKeyStruct::allRegionWrapperString(), meshLevelStats ); + writeStatsToCSV( viewKeyStruct::allRegionWrapperString(), meshLevelStats, false ); } ); return false; @@ -244,19 +279,27 @@ void SourceFluxStatsAggregator::WrappedStats::gatherTimeStepStats( real64 const { m_periodStats.allocate( producedMass.size() ); - // if beginning a new timestep, we must aggregate the stats from previous timesteps (mass & dt) before collecting the new ones - bool isBeginingNewTS = currentTime >= ( m_periodStats.m_timeStepStart + m_periodStats.m_timeStepDeltaTime ); - if( isBeginingNewTS ) + // if beginning a new period, we must initialize constant values over the period + bool isBeginingNewPeriod = !m_periodStats.m_isGathering; + if( isBeginingNewPeriod ) + { + m_periodStats.m_periodStart = currentTime; + m_periodStats.m_elementCount = elementCount; + m_periodStats.m_isGathering = true; + } + + // if beginning a new timestep, we must accumulate the stats from previous timesteps (mass & dt) before collecting the new ones + if( isBeginingNewPeriod || + currentTime >= ( m_periodStats.m_timeStepStart + m_periodStats.m_timeStepDeltaTime ) ) { for( int ip = 0; ip < m_periodStats.getPhaseCount(); ++ip ) { m_periodStats.m_periodPendingMass[ip] += m_periodStats.m_timeStepMass[ip]; } - m_periodStats.m_elementCount = elementCount; m_periodStats.m_periodPendingDeltaTime += m_periodStats.m_timeStepDeltaTime; } - // new timestep stats to take into account + // new timestep stats to take into account (overriding if not begining a new timestep) m_periodStats.m_timeStepStart = currentTime; m_periodStats.m_timeStepDeltaTime = dt; for( int ip = 0; ip < m_periodStats.getPhaseCount(); ++ip ) @@ -269,11 +312,12 @@ void SourceFluxStatsAggregator::WrappedStats::finalizePeriod() // init phase data memory allocation if needed m_stats.allocate( m_periodStats.getPhaseCount() ); - // produce timestep stats of this ranks + // produce the period stats of this rank m_stats.m_elementCount = m_periodStats.m_elementCount; + m_statsPeriodStart = m_periodStats.m_periodStart; + m_statsPeriodDT = m_periodStats.m_timeStepDeltaTime + m_periodStats.m_periodPendingDeltaTime; - real64 const dt = m_periodStats.m_timeStepDeltaTime + m_periodStats.m_periodPendingDeltaTime; - real64 const timeDivisor = dt > 0.0 ? 1.0 / dt : 0.0; + real64 const timeDivisor = m_statsPeriodDT > 0.0 ? 1.0 / m_statsPeriodDT : 0.0; for( int ip = 0; ip < m_periodStats.getPhaseCount(); ++ip ) { real64 periodMass = m_periodStats.m_timeStepMass[ip] + m_periodStats.m_periodPendingMass[ip]; @@ -306,6 +350,7 @@ void SourceFluxStatsAggregator::WrappedStats::PeriodStats::reset() m_elementCount = 0; m_timeStepStart = 0.0; m_timeStepDeltaTime = 0.0; + m_isGathering = false; } diff --git a/src/coreComponents/fieldSpecification/SourceFluxStatistics.hpp b/src/coreComponents/fieldSpecification/SourceFluxStatistics.hpp index 4180f0e7dd3..db131c8247b 100644 --- a/src/coreComponents/fieldSpecification/SourceFluxStatistics.hpp +++ b/src/coreComponents/fieldSpecification/SourceFluxStatistics.hpp @@ -88,7 +88,8 @@ class SourceFluxStatsAggregator : public FieldStatisticsBase< FlowSolverBase > void setTarget( string_view aggregatorName, string_view fluxName ); /** - * @brief Set the current time step stats. Multi-phase version + * @brief Set the current time step stats. Accumulate the statistics only if the time is strictly + * after the previous time + dt (override the statistics if the current timestep is cut). * @param currentTime time of the timestep start since simulation starting * @param dt time delta of the current timestep * @param producedMass time-step producted mass (see StatData::m_producedMass). @@ -116,6 +117,18 @@ class SourceFluxStatsAggregator : public FieldStatisticsBase< FlowSolverBase > StatData const & stats() const { return m_stats; } + /** + * @return the start time of the wrapped stats period (in s) + */ + real64 getStatsPeriodStart() const + { return m_statsPeriodStart; } + + /** + * @return the duration of the wrapped stats period (in s) + */ + real64 getStatsPeriodDuration() const + { return m_statsPeriodDT; } + /** * @return the name of the SourceFluxStatsAggregator that want to collect data on this instance. */ @@ -130,7 +143,14 @@ class SourceFluxStatsAggregator : public FieldStatisticsBase< FlowSolverBase > private: /// stats data collected over the last period (one timestep or more), computed by finalizePeriod() StatData m_stats; + /// the start time of the wrapped stats period (in s) + real64 m_statsPeriodStart; + /// the duration of the wrapped stats period (in s) + real64 m_statsPeriodDT; + /** + * @brief This struct is used to accumulate statistics along one or more timesteps. + */ struct PeriodStats { /// producted mass of the current time-step. @@ -141,10 +161,14 @@ class SourceFluxStatsAggregator : public FieldStatisticsBase< FlowSolverBase > real64 m_timeStepStart = 0.0; /// time that the current timestep is simulating real64 m_timeStepDeltaTime = 0.0; + /// start time of the current period. + real64 m_periodStart = 0.0; /// delta time from all previous time-step of the current period. real64 m_periodPendingDeltaTime = 0.0; /// number of cell elements targeted by this instance integer m_elementCount = 0; + /// Did the period statistics gathering started ? + bool m_isGathering = false; /** * @brief resize the phase data arrays if needed @@ -285,17 +309,24 @@ class SourceFluxStatsAggregator : public FieldStatisticsBase< FlowSolverBase > */ void registerDataOnMesh( Group & meshBodies ) override; - dataRepository::Wrapper< WrappedStats > & registerWrappedStats( Group & group, string_view fluxName ); + dataRepository::Wrapper< WrappedStats > & registerWrappedStats( Group & group, + string_view fluxName, + string_view elementSetName ); /** - * @brief Output in the log the given statistics. - * @param regionName the name of the element group (a region, a sub-region...) from which we want to output the data. + * @brief If requested, output in the log and CSV the given statistics. * @param minLogLevel the min log level to output any line. * @param elementSetName the region / sub-subregion name concerned by the statistics. - * @param fluxName the flux name concerned by the statistics. * @param stats the statistics that must be output in the log. */ - void writeStatData( integer minLogLevel, string_view elementSetName, WrappedStats const & stats ); + void writeStatsToLog( integer minLogLevel, string_view elementSetName, WrappedStats const & stats ); + /** + * @brief If CSV is enabled, create or append a new CSV file. + * @param elementSetName the region / sub-subregion name concerned by the statistics. + * @param stats the statistics that must be output in the log. + * @param writeHeader If true, create the CSV with the header. If false, append it with the statistics. + */ + void writeStatsToCSV( string_view elementSetName, WrappedStats const & stats, bool writeHeader ); }; diff --git a/src/coreComponents/schema/docs/SourceFluxStatistics.rst b/src/coreComponents/schema/docs/SourceFluxStatistics.rst index 0bf817efde4..b38241ba777 100644 --- a/src/coreComponents/schema/docs/SourceFluxStatistics.rst +++ b/src/coreComponents/schema/docs/SourceFluxStatistics.rst @@ -11,6 +11,7 @@ logLevel integer 0 | Log level | - Log Level 3 details values for each region, | - Log Level 4 details values for each sub-region. name groupName required A name is required for any non-unique nodes +writeCSV integer 0 Write statistics into a CSV file ============== ================== ======== ======================================================================================================================================================================================================================================== diff --git a/src/coreComponents/schema/schema.xsd b/src/coreComponents/schema/schema.xsd index 71eb44d233e..ea8ae7e44bf 100644 --- a/src/coreComponents/schema/schema.xsd +++ b/src/coreComponents/schema/schema.xsd @@ -3678,6 +3678,8 @@ For the energy balance equation, the mass flux is multipied by the enthalpy in t - Log Level 3 details values for each region, - Log Level 4 details values for each sub-region.--> + + From 3d19803c6ab5ba544c63c7bf2a7c09a593320013 Mon Sep 17 00:00:00 2001 From: MelReyCG Date: Wed, 21 Feb 2024 10:54:57 +0100 Subject: [PATCH 52/98] Removing the MultifluidBase::useMass wrapper as it is set by the solver anyway (by setMassFlag() ). --- .../constitutive/fluid/multifluid/MultiFluidBase.cpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/coreComponents/constitutive/fluid/multifluid/MultiFluidBase.cpp b/src/coreComponents/constitutive/fluid/multifluid/MultiFluidBase.cpp index 139e8507a01..132a3ae9eef 100644 --- a/src/coreComponents/constitutive/fluid/multifluid/MultiFluidBase.cpp +++ b/src/coreComponents/constitutive/fluid/multifluid/MultiFluidBase.cpp @@ -49,9 +49,6 @@ MultiFluidBase::MultiFluidBase( string const & name, Group * const parent ) setInputFlag( InputFlags::OPTIONAL ). setDescription( "List of fluid phases" ); - registerWrapper( viewKeyStruct::useMassString(), &m_useMass ). - setRestartFlags( RestartFlags::NO_WRITE ); - registerField( fields::multifluid::phaseFraction{}, &m_phaseFraction.value ); registerField( fields::multifluid::dPhaseFraction{}, &m_phaseFraction.derivs ); From a2d618a5b72e4132484b72d765bcd1992c4781de Mon Sep 17 00:00:00 2001 From: MelReyCG Date: Wed, 21 Feb 2024 11:49:25 +0100 Subject: [PATCH 53/98] fixed catalog name of TimeStepChecker --- .../unitTests/fluidFlowTests/testFluidStatistics.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/coreComponents/unitTests/fluidFlowTests/testFluidStatistics.cpp b/src/coreComponents/unitTests/fluidFlowTests/testFluidStatistics.cpp index 28d99efe309..fe660906d78 100644 --- a/src/coreComponents/unitTests/fluidFlowTests/testFluidStatistics.cpp +++ b/src/coreComponents/unitTests/fluidFlowTests/testFluidStatistics.cpp @@ -287,7 +287,7 @@ class TimeStepChecker : public TaskBase integer getTestedTimeStepCount() { return m_timestepId; } - static string catalogName() { return "SinglePhaseStatsTimeStepChecker"; } + static string catalogName() { return "TimeStepChecker"; } virtual bool execute( real64 const time_n, real64 const GEOS_UNUSED_PARAM( dt ), @@ -521,7 +521,7 @@ TestSet getTestSet() flowSolverName="testSolver" logLevel="1" /> - + @@ -760,7 +760,7 @@ TestSet getTestSet() flowSolverName="testSolver" logLevel="0" /> - + From 7ee9b4d6ad8818c0274adbafda492ce8fda404d5 Mon Sep 17 00:00:00 2001 From: MelReyCG Date: Thu, 22 Feb 2024 10:41:53 +0100 Subject: [PATCH 54/98] Fixed solver "amount of fluid" units (kg or mol), and added documentation to clarify its usage. --- src/coreComponents/common/Units.hpp | 32 ++ .../SourceFluxBoundaryCondition.cpp | 13 + .../SourceFluxStatistics.cpp | 20 +- .../SourceFluxStatistics.hpp | 16 +- .../fluidFlow/CompositionalMultiphaseBase.cpp | 5 +- .../fluidFlow/CompositionalMultiphaseBase.hpp | 6 + .../CompositionalMultiphaseStatistics.cpp | 6 +- .../fluidFlow/FlowSolverBase.hpp | 7 + .../docs/CompositionalMultiphaseFVM.rst | 2 +- .../docs/CompositionalMultiphaseHybridFVM.rst | 2 +- src/coreComponents/schema/docs/SourceFlux.rst | 32 +- src/coreComponents/schema/schema.xsd | 8 +- .../fluidFlowTests/testFluidStatistics.cpp | 304 +++++++++++++++++- 13 files changed, 401 insertions(+), 52 deletions(-) diff --git a/src/coreComponents/common/Units.hpp b/src/coreComponents/common/Units.hpp index 43e8fc680e3..32d1958dd75 100644 --- a/src/coreComponents/common/Units.hpp +++ b/src/coreComponents/common/Units.hpp @@ -82,6 +82,18 @@ enum Unit : integer /// Solubility in g/L Solubility, + + /// Mass in kg + Mass, + + /// Mole in mol + Mole, + + /// Mass rate in kg/s + MassRate, + + /// Mole rate in mol/s + MoleRate, }; @@ -104,6 +116,10 @@ constexpr inline std::string_view getDescription( Unit unit ) case Enthalpy: return "enthalpy [J/kg]"; case Density: return "density [kg/m3]"; case Solubility: return "solubility [g/L]"; + case Mass: return "mass [kg]"; + case Mole: return "mole [mol]"; + case MassRate: return "mass rate [kg/s]"; + case MoleRate: return "mole rate [mol/s]"; } } @@ -122,6 +138,14 @@ constexpr inline std::string_view getSymbol( Unit unit ) case TemperatureInC: return "C"; case Distance: return "m"; case Time: return "s"; + case Viscosity: return "Pa*s"; + case Enthalpy: return "J/kg"; + case Density: return "kg/m3"; + case Solubility: return "g/L"; + case Mass: return "kg"; + case Mole: return "mol"; + case MassRate: return "kg/s"; + case MoleRate: return "mol/s"; } } @@ -143,6 +167,14 @@ inline string formatValue( real64 value, Unit unit ) case TemperatureInC: return GEOS_FMT( "temperature of {} [K]", convertCToK( value ) ); case Distance: return GEOS_FMT( "distance of {} [s]", value ); case Time: return GEOS_FMT( "time of {} [s]", value ); + case Viscosity: return GEOS_FMT( "viscosity of {} [Pa*s]", value ); + case Enthalpy: return GEOS_FMT( "enthalpy of {} [J/kg]", value ); + case Density: return GEOS_FMT( "density of {} [kg/m3]", value ); + case Solubility: return GEOS_FMT( "solubility of {} [g/L]", value ); + case Mass: return GEOS_FMT( "mass of {} [kg]", value ); + case Mole: return GEOS_FMT( "mole of {} [mol]", value ); + case MassRate: return GEOS_FMT( "mass rate of {} [kg/s]", value ); + case MoleRate: return GEOS_FMT( "mole rate of {} [mol/s]", value ); } } diff --git a/src/coreComponents/fieldSpecification/SourceFluxBoundaryCondition.cpp b/src/coreComponents/fieldSpecification/SourceFluxBoundaryCondition.cpp index acc3cc39981..53007480a30 100644 --- a/src/coreComponents/fieldSpecification/SourceFluxBoundaryCondition.cpp +++ b/src/coreComponents/fieldSpecification/SourceFluxBoundaryCondition.cpp @@ -18,6 +18,7 @@ */ #include "SourceFluxBoundaryCondition.hpp" +#include "physicsSolvers/fluidFlow/CompositionalMultiphaseBase.hpp" namespace geos { @@ -29,6 +30,18 @@ SourceFluxBoundaryCondition::SourceFluxBoundaryCondition( string const & name, G getWrapper< string >( FieldSpecificationBase::viewKeyStruct::fieldNameString() ). setInputFlag( InputFlags::FALSE ); setFieldName( catalogName() ); + + getWrapper< string >( FieldSpecificationBase::viewKeyStruct::functionNameString() ). + setDescription( GEOS_FMT( "Name of a function that specifies the variation of the production rate variations of this {}." + "Multiplied by {}. If no function is provided, a constant value of 1 is used." + "The producted fluid rate unit is in kg by default, or in mole if the flow solver has a {} of 0.", + catalogName(), + FieldSpecificationBase::viewKeyStruct::scaleString(), + CompositionalMultiphaseBase::viewKeyStruct::useMassFlagString() ) ); + + getWrapper< real64 >( FieldSpecificationBase::viewKeyStruct::scaleString() ). + setDescription( GEOS_FMT( "Multiplier of the {0} value. If no {0} is provided, this value is used directly.", + FieldSpecificationBase::viewKeyStruct::functionNameString() ) ); } REGISTER_CATALOG_ENTRY( FieldSpecificationBase, SourceFluxBoundaryCondition, string const &, Group * const ) diff --git a/src/coreComponents/fieldSpecification/SourceFluxStatistics.cpp b/src/coreComponents/fieldSpecification/SourceFluxStatistics.cpp index 105c78f9ae2..454d9f7f5fb 100644 --- a/src/coreComponents/fieldSpecification/SourceFluxStatistics.cpp +++ b/src/coreComponents/fieldSpecification/SourceFluxStatistics.cpp @@ -134,23 +134,24 @@ void SourceFluxStatsAggregator::writeStatsToLog( integer minLogLevel, wrappedStats.stats().m_elementCount ) ); // we want to format differently if we have got multiple phases or not + string_view massUnit = units::getSymbol( m_solver->getMassUnit() ); if( wrappedStats.stats().m_producedMass.size() == 1 ) { - GEOS_LOG_RANK( GEOS_FMT( "{} {} (of {}, in {}): Produced mass = {} kg", + GEOS_LOG_RANK( GEOS_FMT( "{} {} (of {}, in {}): Produced mass = {} {}", catalogName(), getName(), wrappedStats.getFluxName(), elementSetName, - wrappedStats.stats().m_producedMass[0] ) ); - GEOS_LOG_RANK( GEOS_FMT( "{} {} (of {}, in {}): Production rate = {} kg/s", + wrappedStats.stats().m_producedMass[0], massUnit ) ); + GEOS_LOG_RANK( GEOS_FMT( "{} {} (of {}, in {}): Production rate = {} {}/s", catalogName(), getName(), wrappedStats.getFluxName(), elementSetName, - wrappedStats.stats().m_productionRate[0] ) ); + wrappedStats.stats().m_productionRate[0], massUnit ) ); } else { - GEOS_LOG_RANK( GEOS_FMT( "{} {} (of {}, in {}): Produced mass = {} kg", + GEOS_LOG_RANK( GEOS_FMT( "{} {} (of {}, in {}): Produced mass = {} {}", catalogName(), getName(), wrappedStats.getFluxName(), elementSetName, - wrappedStats.stats().m_producedMass ) ); - GEOS_LOG_RANK( GEOS_FMT( "{} {} (of {}, in {}): Production rate = {} kg/s", + wrappedStats.stats().m_producedMass, massUnit ) ); + GEOS_LOG_RANK( GEOS_FMT( "{} {} (of {}, in {}): Production rate = {} {}/s", catalogName(), getName(), wrappedStats.getFluxName(), elementSetName, - wrappedStats.stats().m_productionRate ) ); + wrappedStats.stats().m_productionRate, massUnit ) ); } } } @@ -167,7 +168,8 @@ void SourceFluxStatsAggregator::writeStatsToCSV( string_view elementSetName, Wra writeHeader ? std::ios_base::out : std::ios_base::app ); if( writeHeader ) { - outputFile << "Time [s],Element Count,Producted Mass [kg],Production Rate [kg/s]" << std::endl; + outputFile << GEOS_FMT( "Time [s],Element Count,Producted Mass [{0}],Production Rate [{0}/s]", + units::getSymbol( m_solver->getMassUnit() ) ) << std::endl; } else { diff --git a/src/coreComponents/fieldSpecification/SourceFluxStatistics.hpp b/src/coreComponents/fieldSpecification/SourceFluxStatistics.hpp index db131c8247b..4768e37028c 100644 --- a/src/coreComponents/fieldSpecification/SourceFluxStatistics.hpp +++ b/src/coreComponents/fieldSpecification/SourceFluxStatistics.hpp @@ -41,9 +41,11 @@ class SourceFluxStatsAggregator : public FieldStatisticsBase< FlowSolverBase > */ struct StatData { - /// fluid mass produced by the flux(es) (kg). Negative if injecting. One value for each fluid phase. + /// Amount of fluid produced by the flux(es). Negative if injecting. One value for each fluid phase. + /// In kg by default, or in mol if useMass = 0 on the solver. array1d< real64 > m_producedMass; - /// flux(es) production rate (kg/s). Negative if injecting. One value for each fluid phase. + /// Flux(es) production rate. Negative if injecting. One value for each fluid phase. + /// In kg/s by default, or in mol/s if useMass = 0 on the solver. array1d< real64 > m_productionRate; /// Number of elements in which we are producing / injecting integer m_elementCount = 0; @@ -92,7 +94,7 @@ class SourceFluxStatsAggregator : public FieldStatisticsBase< FlowSolverBase > * after the previous time + dt (override the statistics if the current timestep is cut). * @param currentTime time of the timestep start since simulation starting * @param dt time delta of the current timestep - * @param producedMass time-step producted mass (see StatData::m_producedMass). + * @param producedMass Amount of produced fluid (see StatData::m_producedMass). * @param elementCount number of cell elements concerned by this instance */ void gatherTimeStepStats( real64 currentTime, real64 dt, @@ -153,13 +155,13 @@ class SourceFluxStatsAggregator : public FieldStatisticsBase< FlowSolverBase > */ struct PeriodStats { - /// producted mass of the current time-step. + /// Fluid production during current time-step. Same unit as StatData::productedMass. array1d< real64 > m_timeStepMass; - /// producted mass sum from all previous time-step of the current period. + /// Fluid production during all previous time-step of the current period. Same unit as StatData::productedMass. array1d< real64 > m_periodPendingMass; - /// time of when the timestep starts (since the simulation start) + /// time of when the timestep starts (since the simulation start). real64 m_timeStepStart = 0.0; - /// time that the current timestep is simulating + /// time that the current timestep is simulating. real64 m_timeStepDeltaTime = 0.0; /// start time of the current period. real64 m_periodStart = 0.0; diff --git a/src/coreComponents/physicsSolvers/fluidFlow/CompositionalMultiphaseBase.cpp b/src/coreComponents/physicsSolvers/fluidFlow/CompositionalMultiphaseBase.cpp index 5c368dbec6e..23b1981100a 100644 --- a/src/coreComponents/physicsSolvers/fluidFlow/CompositionalMultiphaseBase.cpp +++ b/src/coreComponents/physicsSolvers/fluidFlow/CompositionalMultiphaseBase.cpp @@ -79,10 +79,13 @@ CompositionalMultiphaseBase::CompositionalMultiphaseBase( const string & name, setInputFlag( InputFlags::REQUIRED ). setDescription( "Temperature" ); //END_SPHINX_INCLUDE_00 + + // TODO: add more description on how useMass can alter the simulation (convergence issues?). How does it interact with wells useMass? this->registerWrapper( viewKeyStruct::useMassFlagString(), &m_useMass ). setApplyDefaultValue( 0 ). setInputFlag( InputFlags::OPTIONAL ). - setDescription( "Use mass formulation instead of molar" ); + setDescription( GEOS_FMT( "Use mass formulation instead of molar. Warning : Affects {} rates units.", + SourceFluxBoundaryCondition::catalogName() ) ); this->registerWrapper( viewKeyStruct::solutionChangeScalingFactorString(), &m_solutionChangeScalingFactor ). setSizedFromParent( 0 ). diff --git a/src/coreComponents/physicsSolvers/fluidFlow/CompositionalMultiphaseBase.hpp b/src/coreComponents/physicsSolvers/fluidFlow/CompositionalMultiphaseBase.hpp index 3c9c383aee6..46b961e38db 100644 --- a/src/coreComponents/physicsSolvers/fluidFlow/CompositionalMultiphaseBase.hpp +++ b/src/coreComponents/physicsSolvers/fluidFlow/CompositionalMultiphaseBase.hpp @@ -177,6 +177,12 @@ class CompositionalMultiphaseBase : public FlowSolverBase */ string referenceFluidModelName() const { return m_referenceFluidModelName; } + /** + * @return The unit in which we evaluate the amount of fluid per element (Mass or Mole, depending on useMass). + */ + virtual units::Unit getMassUnit() const override + { return m_useMass ? units::Unit::Mass : units::Unit::Mole; } + /** * @brief assembles the accumulation and volume balance terms for all cells * @param time_n previous time value diff --git a/src/coreComponents/physicsSolvers/fluidFlow/CompositionalMultiphaseStatistics.cpp b/src/coreComponents/physicsSolvers/fluidFlow/CompositionalMultiphaseStatistics.cpp index c12a2947e9c..078dd93285f 100644 --- a/src/coreComponents/physicsSolvers/fluidFlow/CompositionalMultiphaseStatistics.cpp +++ b/src/coreComponents/physicsSolvers/fluidFlow/CompositionalMultiphaseStatistics.cpp @@ -115,8 +115,7 @@ void CompositionalMultiphaseStatistics::registerDataOnMesh( Group & meshBodies ) if( m_writeCSV > 0 && MpiWrapper::commRank() == 0 ) { std::ofstream outputFile( m_outputDir + "/" + regionNames[i] + ".csv" ); - integer const useMass = m_solver->getReference< integer >( CompositionalMultiphaseBase::viewKeyStruct::useMassFlagString() ); - string const massUnit = useMass ? "kg" : "mol"; + string_view massUnit = units::getSymbol( m_solver->getMassUnit() ); outputFile << "Time [s],Min pressure [Pa],Average pressure [Pa],Max pressure [Pa],Min delta pressure [Pa],Max delta pressure [Pa]," << "Min temperature [Pa],Average temperature [Pa],Max temperature [Pa],Total dynamic pore volume [rm^3]"; @@ -405,8 +404,7 @@ void CompositionalMultiphaseStatistics::computeRegionStatistics( real64 const ti mobilePhaseMass[ip] = regionStatistics.phaseMass[ip] - regionStatistics.immobilePhaseMass[ip]; } - integer const useMass = m_solver->getReference< integer >( CompositionalMultiphaseBase::viewKeyStruct::useMassFlagString() ); - string const massUnit = useMass ? "kg" : "mol"; + string_view massUnit = units::getSymbol( m_solver->getMassUnit() ); GEOS_LOG_LEVEL_RANK_0( 1, GEOS_FMT( "{}, {} (time {} s): Pressure (min, average, max): {}, {}, {} Pa", getName(), regionNames[i], time, regionStatistics.minPressure, regionStatistics.averagePressure, regionStatistics.maxPressure ) ); diff --git a/src/coreComponents/physicsSolvers/fluidFlow/FlowSolverBase.hpp b/src/coreComponents/physicsSolvers/fluidFlow/FlowSolverBase.hpp index 8fcb9d89522..b707d6ff035 100644 --- a/src/coreComponents/physicsSolvers/fluidFlow/FlowSolverBase.hpp +++ b/src/coreComponents/physicsSolvers/fluidFlow/FlowSolverBase.hpp @@ -20,6 +20,7 @@ #define GEOS_PHYSICSSOLVERS_FINITEVOLUME_FLOWSOLVERBASE_HPP_ #include "physicsSolvers/SolverBase.hpp" +#include "common/Units.hpp" namespace geos { @@ -129,6 +130,12 @@ class FlowSolverBase : public SolverBase integer & isThermal() { return m_isThermal; } + /** + * @return The unit in which we evaluate the amount of fluid per element (Mass or Mole). + */ + virtual units::Unit getMassUnit() const + { return units::Unit::Mass; } + /** * @brief Function to activate the flag allowing negative pressure */ diff --git a/src/coreComponents/schema/docs/CompositionalMultiphaseFVM.rst b/src/coreComponents/schema/docs/CompositionalMultiphaseFVM.rst index beeff3f3b0a..3ddb480e4f7 100644 --- a/src/coreComponents/schema/docs/CompositionalMultiphaseFVM.rst +++ b/src/coreComponents/schema/docs/CompositionalMultiphaseFVM.rst @@ -32,7 +32,7 @@ targetRelativePressureChangeInTimeStep real64 targetRelativeTemperatureChangeInTimeStep real64 0.2 Target (relative) change in temperature in a time step (expected value between 0 and 1) temperature real64 required Temperature useDBC integer 0 Enable Dissipation-based continuation flux -useMass integer 0 Use mass formulation instead of molar +useMass integer 0 Use mass formulation instead of molar. Warning : Affects SourceFlux rates units. useSimpleAccumulation integer 1 Flag indicating whether simple accumulation form is used useTotalMassEquation integer 1 Flag indicating whether total mass equation is used LinearSolverParameters node unique :ref:`XML_LinearSolverParameters` diff --git a/src/coreComponents/schema/docs/CompositionalMultiphaseHybridFVM.rst b/src/coreComponents/schema/docs/CompositionalMultiphaseHybridFVM.rst index 88c616ae31f..b976953a70f 100644 --- a/src/coreComponents/schema/docs/CompositionalMultiphaseHybridFVM.rst +++ b/src/coreComponents/schema/docs/CompositionalMultiphaseHybridFVM.rst @@ -23,7 +23,7 @@ targetRegions groupNameRef_array required Allowable targetRelativePressureChangeInTimeStep real64 0.2 Target (relative) change in pressure in a time step (expected value between 0 and 1) targetRelativeTemperatureChangeInTimeStep real64 0.2 Target (relative) change in temperature in a time step (expected value between 0 and 1) temperature real64 required Temperature -useMass integer 0 Use mass formulation instead of molar +useMass integer 0 Use mass formulation instead of molar. Warning : Affects SourceFlux rates units. useSimpleAccumulation integer 1 Flag indicating whether simple accumulation form is used useTotalMassEquation integer 1 Flag indicating whether total mass equation is used LinearSolverParameters node unique :ref:`XML_LinearSolverParameters` diff --git a/src/coreComponents/schema/docs/SourceFlux.rst b/src/coreComponents/schema/docs/SourceFlux.rst index c227dcbd7d8..660880a3b49 100644 --- a/src/coreComponents/schema/docs/SourceFlux.rst +++ b/src/coreComponents/schema/docs/SourceFlux.rst @@ -1,20 +1,20 @@ -====================== ================== ======== ============================================================================== -Name Type Default Description -====================== ================== ======== ============================================================================== -bcApplicationTableName groupNameRef Name of table that specifies the on/off application of the boundary condition. -beginTime real64 -1e+99 Time at which the boundary condition will start being applied. -component integer -1 Component of field (if tensor) to apply boundary condition to. -direction R1Tensor {0,0,0} Direction to apply boundary condition to. -endTime real64 1e+99 Time at which the boundary condition will stop being applied. -functionName groupNameRef Name of function that specifies variation of the boundary condition. -initialCondition integer 0 Boundary condition is applied as an initial condition. -logLevel integer 0 Log level -name groupName required A name is required for any non-unique nodes -objectPath groupNameRef Path to the target field -scale real64 0 Scale factor for value of the boundary condition. -setNames groupNameRef_array required Name of sets that boundary condition is applied to. -====================== ================== ======== ============================================================================== +====================== ================== ======== ======================================================================================================================================================================================================================================================================================== +Name Type Default Description +====================== ================== ======== ======================================================================================================================================================================================================================================================================================== +bcApplicationTableName groupNameRef Name of table that specifies the on/off application of the boundary condition. +beginTime real64 -1e+99 Time at which the boundary condition will start being applied. +component integer -1 Component of field (if tensor) to apply boundary condition to. +direction R1Tensor {0,0,0} Direction to apply boundary condition to. +endTime real64 1e+99 Time at which the boundary condition will stop being applied. +functionName groupNameRef Name of a function that specifies the variation of the production rate variations of this SourceFlux.Multiplied by scale. If no function is provided, a constant value of 1 is used.The producted fluid rate unit is in kg by default, or in mole if the flow solver has a useMass of 0. +initialCondition integer 0 Boundary condition is applied as an initial condition. +logLevel integer 0 Log level +name groupName required A name is required for any non-unique nodes +objectPath groupNameRef Path to the target field +scale real64 0 Multiplier of the functionName value. If no functionName is provided, this value is used directly. +setNames groupNameRef_array required Name of sets that boundary condition is applied to. +====================== ================== ======== ======================================================================================================================================================================================================================================================================================== diff --git a/src/coreComponents/schema/schema.xsd b/src/coreComponents/schema/schema.xsd index ea8ae7e44bf..290f59ba290 100644 --- a/src/coreComponents/schema/schema.xsd +++ b/src/coreComponents/schema/schema.xsd @@ -1233,7 +1233,7 @@ This keyword is ignored for single-phase flow simulations--> - + @@ -1241,7 +1241,7 @@ This keyword is ignored for single-phase flow simulations--> - + @@ -2397,7 +2397,7 @@ the relative residual norm satisfies: - + @@ -2459,7 +2459,7 @@ the relative residual norm satisfies: - + diff --git a/src/coreComponents/unitTests/fluidFlowTests/testFluidStatistics.cpp b/src/coreComponents/unitTests/fluidFlowTests/testFluidStatistics.cpp index fe660906d78..957aed7253d 100644 --- a/src/coreComponents/unitTests/fluidFlowTests/testFluidStatistics.cpp +++ b/src/coreComponents/unitTests/fluidFlowTests/testFluidStatistics.cpp @@ -518,13 +518,14 @@ TestSet getTestSet() logLevel="0" /> + flowSolverName="testSolver" + logLevel="1" /> + + temperature="366.483" + useMass="0" + logLevel="0" > + + logLevel="2" /> + logLevel="2" /> + + - + - + ( g_commandLineOptions ) ); + ProblemManager & problem = state.getProblemManager(); + + setupProblemFromXML( problem, testSet.inputs.xmlInput.data() ); + + TimeStepChecker & timeStepChecker = problem.getGroupByPath< TimeStepChecker >( testSet.inputs.timeStepCheckerPath ); + timeStepChecker.setCheckTimeStepFunction( [&]( real64 const time_n ) + { + integer const timestepId = timeStepChecker.getTestedTimeStepCount(); + checkTimeStepStats( problem, testSet, time_n, timestepId ); + checkTimeStepFluxStats( problem, testSet, time_n, timestepId ); + } ); + + // run simulation + EXPECT_FALSE( problem.runSimulation() ) << "Simulation exited early."; + + EXPECT_EQ( timeStepChecker.getTestedTimeStepCount(), testSet.timestepCount ) << "The tested time-step were different than expected."; + + checkWholeSimFluxStatistics( problem, testSet ); +} + + +} /* namespace MultiPhaseFluxStatisticsTest */ + + +//////////////////////////////// Multiphase Flux Statistics Test //////////////////////////////// +namespace MultiPhaseFluxStatisticsTestMass +{ + + +TestSet getTestSet() +{ + TestInputs testInputs; + + testInputs.xmlInput = + R"xml( + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +)xml"; + + testInputs.tableFiles["pvtgas.txt"] = "DensityFun SpanWagnerCO2Density 1.5e7 2.5e7 1e5 370.15 400.15 2\n" + "ViscosityFun FenghourCO2Viscosity 1.5e7 2.5e7 1e5 370.15 400.15 2\n"; + + testInputs.tableFiles["pvtliquid.txt"] = "DensityFun EzrokhiBrineDensity 0.1033 -2.2991e-5 -2.3658e-6\n" + "ViscosityFun EzrokhiBrineViscosity 0 0 0\n"; + + testInputs.tableFiles["co2flash.txt"] = "FlashModel CO2Solubility 1.5e7 2.5e7 1e5 370.15 400.15 2 0\n"; + + + testInputs.sourceFluxName = "sourceFlux"; + testInputs.sinkFluxName = "sinkFlux"; + testInputs.timeStepCheckerPath = "/Tasks/timeStepChecker"; + testInputs.timeStepFluxStatsPath = "/Tasks/timeStepFluxStats"; + testInputs.wholeSimFluxStatsPath = "/Tasks/wholeSimFluxStats"; + testInputs.flowSolverPath = "/Solvers/testSolver"; + + testInputs.dt = 500.0; + testInputs.sourceElementsCount = 1; + testInputs.sinkElementsCount = 1; + + // FluxInjectionRate & FluxProductionRate table from 0.0s to 5000.0s + setRateTable( testInputs.sourceRates, + { { 0.000, 0.0 }, + { 0.000, 0.0 }, + { 0.267, 0.0 }, + { 0.561, 0.0 }, + { 0.194, 0.0 }, + { 0.102, 0.0 }, + { 0.059, 0.0 }, + { 0.000, 0.0 }, + { 0.000, 0.0 }, + { 0.000, 0.0 }, + { 0.000, 0.0 } } ); + setRateTable( testInputs.sinkRates, + { { 0.0, 0.000 }, + { 0.0, 0.000 }, + { 0.0, 0.003 }, + { 0.0, 0.062 }, + { 0.0, 0.121 }, + { 0.0, 0.427 }, + { 0.0, 0.502 }, + { 0.0, 0.199 }, + { 0.0, 0.083 }, + { 0.0, 0.027 }, + { 0.0, 0.000 } } ); + + testInputs.sourceRateFactor = -44e-3; + testInputs.sinkRateFactor = 18e-3; + + testInputs.requireSubTimeStep = true; + + return TestSet( testInputs ); +} + + +TEST_F( FluidStatisticsTest, checkMultiPhaseFluxStatisticsMass ) { TestSet const testSet = getTestSet(); writeTableFiles( testSet.inputs.tableFiles ); From 7378ec20663d89781b628baebf51856567900fcc Mon Sep 17 00:00:00 2001 From: MelReyCG Date: Thu, 22 Feb 2024 11:46:58 +0100 Subject: [PATCH 55/98] better timestep cut checking + refactored a bit --- .../fluidFlowTests/testFluidStatistics.cpp | 289 +++++++++--------- 1 file changed, 147 insertions(+), 142 deletions(-) diff --git a/src/coreComponents/unitTests/fluidFlowTests/testFluidStatistics.cpp b/src/coreComponents/unitTests/fluidFlowTests/testFluidStatistics.cpp index 957aed7253d..1c42832090e 100644 --- a/src/coreComponents/unitTests/fluidFlowTests/testFluidStatistics.cpp +++ b/src/coreComponents/unitTests/fluidFlowTests/testFluidStatistics.cpp @@ -57,8 +57,9 @@ struct TestInputs integer sourceElementsCount; integer sinkElementsCount; - /// To be sure sub-timestepping is supported, require the test to have at least one sub-timestep (at least one test should test that). - bool requireSubTimeStep; + /// In order to be sure that sub-timestepping is supported, requires the test to have at least one sub-timestep. + /// At least one simulation should test the timestep cuts ! + integer requiredSubTimeStep; }; /** @@ -167,106 +168,6 @@ void checkFluxStats( arraySlice1d< real64 > const & expectedMasses, stats.getFluxName(), context ); } -/** - * @brief Verification that the source flux statistics are correct over the whole simulation - * @param problem the simulation ProblemManager - * @param testSet the simulation TestSet - */ -void checkWholeSimFluxStatistics( ProblemManager & problem, TestSet const & testSet ) -{ - DomainPartition & domain = problem.getDomainPartition(); - SourceFluxStatsAggregator & wholeSimStats = - problem.getGroupByPath< SourceFluxStatsAggregator >( testSet.inputs.wholeSimFluxStatsPath ); - - wholeSimStats.forMeshLevelStatsWrapper( domain, - [&] ( MeshLevel & meshLevel, - SourceFluxStatsAggregator::WrappedStats & meshLevelStats ) - { - wholeSimStats.forAllFluxStatsWrappers( meshLevel, - [&] ( MeshLevel &, - SourceFluxStatsAggregator::WrappedStats & fluxStats ) - { - if( fluxStats.getFluxName() == testSet.inputs.sourceFluxName ) - { - checkFluxStats( testSet.totalSourceMassProd, - testSet.sourceMeanRate, - testSet.inputs.sourceElementsCount, - fluxStats, "over whole simulation" ); - } - else if( fluxStats.getFluxName() == testSet.inputs.sinkFluxName ) - { - checkFluxStats( testSet.totalSinkMassProd, - testSet.sinkMeanRate, - testSet.inputs.sinkElementsCount, - fluxStats, "over whole simulation" ); - } - else - { - FAIL() << "Unexpected SourceFlux found!"; - } - } ); - - for( int ip = 0; ip < meshLevelStats.stats().getPhaseCount(); ++ip ) - { - EXPECT_DOUBLE_EQ( meshLevelStats.stats().m_producedMass[ip], testSet.totalMassProd[ip] ) << "The fluxes did not produce the expected total mass (over whole simulation, phase = " << ip << ")."; - EXPECT_DOUBLE_EQ( meshLevelStats.stats().m_productionRate[ip], testSet.totalMeanRate[ip] ) << "The fluxes did not produce at the expected rate (over whole simulation, phase = " << ip << ")."; - } - } ); -} - -void checkTimeStepFluxStats( ProblemManager & problem, TestSet const & testSet, - real64 const time_n, integer const timestepId ) -{ - DomainPartition & domain = problem.getDomainPartition(); - SourceFluxStatsAggregator & timestepStats = - problem.getGroupByPath< SourceFluxStatsAggregator >( testSet.inputs.timeStepFluxStatsPath ); - - timestepStats.forMeshLevelStatsWrapper( domain, - [&] ( MeshLevel & meshLevel, - SourceFluxStatsAggregator::WrappedStats & ) - { - timestepStats.forAllFluxStatsWrappers( meshLevel, - [&] ( MeshLevel &, - SourceFluxStatsAggregator::WrappedStats & fluxStats ) - { - if( fluxStats.getFluxName() == testSet.inputs.sourceFluxName ) - { - checkFluxStats( testSet.sourceMassProd[timestepId], - testSet.sourceRates[timestepId], - testSet.inputs.sourceElementsCount, - fluxStats, GEOS_FMT( "for timestep at t = {} s", time_n ) ); - } - else if( fluxStats.getFluxName() == testSet.inputs.sinkFluxName ) - { - checkFluxStats( testSet.sinkMassProd[timestepId], - testSet.sinkRates[timestepId], - testSet.inputs.sinkElementsCount, - fluxStats, GEOS_FMT( "for timestep at t = {} s", time_n ) ); - } - else - { - FAIL() << "Unexpected SourceFlux found!"; - } - } ); - } ); -} - -void checkTimeStepStats( ProblemManager & problem, TestSet const & testSet, - real64 const time_n, integer const timestepId ) -{ - EXPECT_LT( timestepId, testSet.timestepCount ) << GEOS_FMT( "The tested time-step count were higher than expected (t = {} s).", - time_n ); - - // simulation end sub-timestep check - if( testSet.inputs.requireSubTimeStep && timestepId == testSet.timestepCount-1 ) - { - SolverBase const & solver = problem.getGroupByPath< SolverBase >( testSet.inputs.flowSolverPath ); - SolverStatistics const & solverStats = solver.getSolverStatistics(); - EXPECT_GT( solverStats.getNumTimeStepCuts(), 0 ) << "The test did not encountered any timestep cut, but were expected to. " - "Consider adapting the simulation so a timestep cut occurs to check they work as expected."; - } -} - /** * @brief This Task allows to extract and check each timestep stats during the simulation. @@ -284,7 +185,7 @@ class TimeStepChecker : public TaskBase void setCheckTimeStepFunction( std::function< void(real64) > func ) { m_checkTimeStepFunction = std::function< void(real64) >( func ); } - integer getTestedTimeStepCount() + integer getTestedTimeStepCount() const { return m_timestepId; } static string catalogName() { return "TimeStepChecker"; } @@ -379,6 +280,111 @@ real64 getTotalFluidMass( ProblemManager & problem, string_view flowSolverPath ) } +/** + * @brief Verification that the source flux statistics are correct over the whole simulation + * @param problem the simulation ProblemManager + * @param testSet the simulation TestSet + */ +void checkWholeSimFluxStats( ProblemManager & problem, TestSet const & testSet ) +{ + DomainPartition & domain = problem.getDomainPartition(); + SourceFluxStatsAggregator & wholeSimStats = + problem.getGroupByPath< SourceFluxStatsAggregator >( testSet.inputs.wholeSimFluxStatsPath ); + + wholeSimStats.forMeshLevelStatsWrapper( domain, + [&] ( MeshLevel & meshLevel, + SourceFluxStatsAggregator::WrappedStats & meshLevelStats ) + { + wholeSimStats.forAllFluxStatsWrappers( meshLevel, + [&] ( MeshLevel &, + SourceFluxStatsAggregator::WrappedStats & fluxStats ) + { + if( fluxStats.getFluxName() == testSet.inputs.sourceFluxName ) + { + checkFluxStats( testSet.totalSourceMassProd, + testSet.sourceMeanRate, + testSet.inputs.sourceElementsCount, + fluxStats, "over whole simulation" ); + } + else if( fluxStats.getFluxName() == testSet.inputs.sinkFluxName ) + { + checkFluxStats( testSet.totalSinkMassProd, + testSet.sinkMeanRate, + testSet.inputs.sinkElementsCount, + fluxStats, "over whole simulation" ); + } + else + { + FAIL() << "Unexpected SourceFlux found!"; + } + } ); + + for( int ip = 0; ip < meshLevelStats.stats().getPhaseCount(); ++ip ) + { + EXPECT_DOUBLE_EQ( meshLevelStats.stats().m_producedMass[ip], testSet.totalMassProd[ip] ) << "The fluxes did not produce the expected total mass (over whole simulation, phase = " << ip << ")."; + EXPECT_DOUBLE_EQ( meshLevelStats.stats().m_productionRate[ip], testSet.totalMeanRate[ip] ) << "The fluxes did not produce at the expected rate (over whole simulation, phase = " << ip << ")."; + } + } ); +} + +void checkTimeStepFluxStats( ProblemManager & problem, TestSet const & testSet, + real64 const time_n, integer const timestepId ) +{ + DomainPartition & domain = problem.getDomainPartition(); + SourceFluxStatsAggregator & timestepStats = + problem.getGroupByPath< SourceFluxStatsAggregator >( testSet.inputs.timeStepFluxStatsPath ); + + timestepStats.forMeshLevelStatsWrapper( domain, + [&] ( MeshLevel & meshLevel, + SourceFluxStatsAggregator::WrappedStats & ) + { + timestepStats.forAllFluxStatsWrappers( meshLevel, + [&] ( MeshLevel &, + SourceFluxStatsAggregator::WrappedStats & fluxStats ) + { + if( fluxStats.getFluxName() == testSet.inputs.sourceFluxName ) + { + checkFluxStats( testSet.sourceMassProd[timestepId], + testSet.sourceRates[timestepId], + testSet.inputs.sourceElementsCount, + fluxStats, GEOS_FMT( "for timestep at t = {} s", time_n ) ); + } + else if( fluxStats.getFluxName() == testSet.inputs.sinkFluxName ) + { + checkFluxStats( testSet.sinkMassProd[timestepId], + testSet.sinkRates[timestepId], + testSet.inputs.sinkElementsCount, + fluxStats, GEOS_FMT( "for timestep at t = {} s", time_n ) ); + } + else + { + FAIL() << "Unexpected SourceFlux found!"; + } + } ); + } ); +} + +void checkTimeStepStats( TestSet const & testSet, + real64 const time_n, + integer const timestepId ) +{ + EXPECT_LT( timestepId, testSet.timestepCount ) << GEOS_FMT( "The tested time-step count were higher than expected (t = {} s).", + time_n ); +} + +void checkWholeSimTimeStepStats( ProblemManager & problem, + TestSet const & testSet, + TimeStepChecker const & timeStepChecker ) +{ + EXPECT_EQ( timeStepChecker.getTestedTimeStepCount(), testSet.timestepCount ) << "The tested time-step were different than expected."; + + SolverBase const & solver = problem.getGroupByPath< SolverBase >( testSet.inputs.flowSolverPath ); + SolverStatistics const & solverStats = solver.getSolverStatistics(); + EXPECT_GE( solverStats.getNumTimeStepCuts(), testSet.inputs.requiredSubTimeStep ) << "The test did not encountered any timestep cut, but were expected to. " + "Consider adapting the simulation so a timestep cut occurs to check they work as expected."; +} + + //////////////////////////////// SinglePhase Flux Statistics Test //////////////////////////////// namespace SinglePhaseFluxStatisticsTest { @@ -569,7 +575,7 @@ TestSet getTestSet() testInputs.sourceRateFactor = -1.0; testInputs.sinkRateFactor = 3.0; - testInputs.requireSubTimeStep = false; + testInputs.requiredSubTimeStep = 0; return TestSet( testInputs ); } @@ -589,7 +595,7 @@ TEST_F( FluidStatisticsTest, checkSinglePhaseFluxStatistics ) timeStepChecker.setCheckTimeStepFunction( [&]( real64 const time_n ) { integer const timestepId = timeStepChecker.getTestedTimeStepCount(); - checkTimeStepStats( problem, testSet, time_n, timestepId ); + checkTimeStepStats( testSet, time_n, timestepId ); checkTimeStepFluxStats( problem, testSet, time_n, timestepId ); static bool passedFirstTimeStep = false; @@ -603,9 +609,8 @@ TEST_F( FluidStatisticsTest, checkSinglePhaseFluxStatistics ) // run simulation EXPECT_FALSE( problem.runSimulation() ) << "Simulation exited early."; - EXPECT_EQ( timeStepChecker.getTestedTimeStepCount(), testSet.timestepCount ) << "The tested time-step were different than expected."; - - checkWholeSimFluxStatistics( problem, testSet ); + checkWholeSimFluxStats( problem, testSet ); + checkWholeSimTimeStepStats( problem, testSet, timeStepChecker ); // check singlephasestatistics results real64 const lastMass = getTotalFluidMass( problem, testSet.inputs.flowSolverPath ); @@ -621,7 +626,7 @@ TEST_F( FluidStatisticsTest, checkSinglePhaseFluxStatistics ) //////////////////////////////// Multiphase Flux Statistics Test //////////////////////////////// -namespace MultiPhaseFluxStatisticsTestMol +namespace MultiPhaseFluxStatisticsTestMass { @@ -638,13 +643,13 @@ TestSet getTestSet() discretization="fluidTPFA" targetRegions="{ reservoir }" temperature="366.483" - useMass="0" + useMass="1" logLevel="0" > + preconditionerType="amg" + krylovTol="1.0e-10" /> @@ -697,18 +702,18 @@ TestSet getTestSet() - + - + @@ -857,16 +862,16 @@ TestSet getTestSet() { 0.0, 0.027 }, { 0.0, 0.000 } } ); - testInputs.sourceRateFactor = -1.0; - testInputs.sinkRateFactor = 1.0; + testInputs.sourceRateFactor = -44e-3; + testInputs.sinkRateFactor = 18e-3; - testInputs.requireSubTimeStep = true; + testInputs.requiredSubTimeStep = 0; return TestSet( testInputs ); } -TEST_F( FluidStatisticsTest, checkMultiPhaseFluxStatisticsMol ) +TEST_F( FluidStatisticsTest, checkMultiPhaseFluxStatisticsMass ) { TestSet const testSet = getTestSet(); writeTableFiles( testSet.inputs.tableFiles ); @@ -880,16 +885,15 @@ TEST_F( FluidStatisticsTest, checkMultiPhaseFluxStatisticsMol ) timeStepChecker.setCheckTimeStepFunction( [&]( real64 const time_n ) { integer const timestepId = timeStepChecker.getTestedTimeStepCount(); - checkTimeStepStats( problem, testSet, time_n, timestepId ); + checkTimeStepStats( testSet, time_n, timestepId ); checkTimeStepFluxStats( problem, testSet, time_n, timestepId ); } ); // run simulation EXPECT_FALSE( problem.runSimulation() ) << "Simulation exited early."; - EXPECT_EQ( timeStepChecker.getTestedTimeStepCount(), testSet.timestepCount ) << "The tested time-step were different than expected."; - - checkWholeSimFluxStatistics( problem, testSet ); + checkWholeSimFluxStats( problem, testSet ); + checkWholeSimTimeStepStats( problem, testSet, timeStepChecker ); } @@ -897,7 +901,7 @@ TEST_F( FluidStatisticsTest, checkMultiPhaseFluxStatisticsMol ) //////////////////////////////// Multiphase Flux Statistics Test //////////////////////////////// -namespace MultiPhaseFluxStatisticsTestMass +namespace MultiPhaseFluxStatisticsTestMol { @@ -914,13 +918,14 @@ TestSet getTestSet() discretization="fluidTPFA" targetRegions="{ reservoir }" temperature="366.483" - useMass="1" + useMass="0" logLevel="0" > + newtonMaxIter="8" + maxTimeStepCuts="4" /> + preconditionerType="amg" + krylovTol="1.0e-10" /> @@ -973,18 +978,18 @@ TestSet getTestSet() - + - + @@ -1133,16 +1138,17 @@ TestSet getTestSet() { 0.0, 0.027 }, { 0.0, 0.000 } } ); - testInputs.sourceRateFactor = -44e-3; - testInputs.sinkRateFactor = 18e-3; - - testInputs.requireSubTimeStep = true; + // This simulation is set-up to have at least one timestep cut. + testInputs.requiredSubTimeStep = 2; + // scale is set to high values to make the solver generate timestep cuts + testInputs.sourceRateFactor = -10.0; + testInputs.sinkRateFactor = 10.0; return TestSet( testInputs ); } -TEST_F( FluidStatisticsTest, checkMultiPhaseFluxStatisticsMass ) +TEST_F( FluidStatisticsTest, checkMultiPhaseFluxStatisticsMol ) { TestSet const testSet = getTestSet(); writeTableFiles( testSet.inputs.tableFiles ); @@ -1156,16 +1162,15 @@ TEST_F( FluidStatisticsTest, checkMultiPhaseFluxStatisticsMass ) timeStepChecker.setCheckTimeStepFunction( [&]( real64 const time_n ) { integer const timestepId = timeStepChecker.getTestedTimeStepCount(); - checkTimeStepStats( problem, testSet, time_n, timestepId ); + checkTimeStepStats( testSet, time_n, timestepId ); checkTimeStepFluxStats( problem, testSet, time_n, timestepId ); } ); // run simulation EXPECT_FALSE( problem.runSimulation() ) << "Simulation exited early."; - EXPECT_EQ( timeStepChecker.getTestedTimeStepCount(), testSet.timestepCount ) << "The tested time-step were different than expected."; - - checkWholeSimFluxStatistics( problem, testSet ); + checkWholeSimFluxStats( problem, testSet ); + checkWholeSimTimeStepStats( problem, testSet, timeStepChecker ); } From 0161b19fab2ab8290cf6ae7410b693e9c9437770 Mon Sep 17 00:00:00 2001 From: MelReyCG Date: Thu, 22 Feb 2024 13:26:54 +0100 Subject: [PATCH 56/98] generated docs --- .../schema/docs/BlackOilFluid_other.rst | 1 - .../docs/CO2BrineEzrokhiFluid_other.rst | 1 - .../CO2BrineEzrokhiThermalFluid_other.rst | 1 - .../docs/CO2BrinePhillipsFluid_other.rst | 1 - .../CO2BrinePhillipsThermalFluid_other.rst | 1 - .../CompositionalMultiphaseFluid_other.rst | 1 - ...sitonalTwoPhaseFluidPengRobinson_other.rst | 1 - ...alTwoPhaseFluidSoaveRedlichKwong_other.rst | 1 - .../schema/docs/DeadOilFluid_other.rst | 1 - .../docs/ReactiveBrineThermal_other.rst | 1 - .../schema/docs/ReactiveBrine_other.rst | 1 - .../schema/docs/SinglePhaseFVM.rst | 40 ++++++++++--------- .../schema/docs/SinglePhaseHybridFVM.rst | 40 ++++++++++--------- .../schema/docs/SinglePhaseProppantFVM.rst | 40 ++++++++++--------- src/coreComponents/schema/schema.xsd.other | 22 ---------- 15 files changed, 66 insertions(+), 87 deletions(-) diff --git a/src/coreComponents/schema/docs/BlackOilFluid_other.rst b/src/coreComponents/schema/docs/BlackOilFluid_other.rst index 60b6325d615..299d8138707 100644 --- a/src/coreComponents/schema/docs/BlackOilFluid_other.rst +++ b/src/coreComponents/schema/docs/BlackOilFluid_other.rst @@ -29,7 +29,6 @@ phaseTypes integer_array phaseViscosity real64_array3d Phase viscosity totalDensity real64_array2d Total density totalDensity_n real64_array2d Total density at the previous converged time step -useMass integer (no description available) viscosityTableWrappers LvArray_Array< geos_TableFunction_KernelWrapper, 1, camp_int_seq< long, 0l >, int, LvArray_ChaiBuffer > (no description available) =============================== ======================================================================================================= ============================================================================================================ diff --git a/src/coreComponents/schema/docs/CO2BrineEzrokhiFluid_other.rst b/src/coreComponents/schema/docs/CO2BrineEzrokhiFluid_other.rst index 476b50195e5..bd6cd054da1 100644 --- a/src/coreComponents/schema/docs/CO2BrineEzrokhiFluid_other.rst +++ b/src/coreComponents/schema/docs/CO2BrineEzrokhiFluid_other.rst @@ -24,7 +24,6 @@ phaseMassDensity real64_array3d phaseViscosity real64_array3d Phase viscosity totalDensity real64_array2d Total density totalDensity_n real64_array2d Total density at the previous converged time step -useMass integer (no description available) ===================== ============================================================================================= ============================================================================================================ diff --git a/src/coreComponents/schema/docs/CO2BrineEzrokhiThermalFluid_other.rst b/src/coreComponents/schema/docs/CO2BrineEzrokhiThermalFluid_other.rst index 476b50195e5..bd6cd054da1 100644 --- a/src/coreComponents/schema/docs/CO2BrineEzrokhiThermalFluid_other.rst +++ b/src/coreComponents/schema/docs/CO2BrineEzrokhiThermalFluid_other.rst @@ -24,7 +24,6 @@ phaseMassDensity real64_array3d phaseViscosity real64_array3d Phase viscosity totalDensity real64_array2d Total density totalDensity_n real64_array2d Total density at the previous converged time step -useMass integer (no description available) ===================== ============================================================================================= ============================================================================================================ diff --git a/src/coreComponents/schema/docs/CO2BrinePhillipsFluid_other.rst b/src/coreComponents/schema/docs/CO2BrinePhillipsFluid_other.rst index 476b50195e5..bd6cd054da1 100644 --- a/src/coreComponents/schema/docs/CO2BrinePhillipsFluid_other.rst +++ b/src/coreComponents/schema/docs/CO2BrinePhillipsFluid_other.rst @@ -24,7 +24,6 @@ phaseMassDensity real64_array3d phaseViscosity real64_array3d Phase viscosity totalDensity real64_array2d Total density totalDensity_n real64_array2d Total density at the previous converged time step -useMass integer (no description available) ===================== ============================================================================================= ============================================================================================================ diff --git a/src/coreComponents/schema/docs/CO2BrinePhillipsThermalFluid_other.rst b/src/coreComponents/schema/docs/CO2BrinePhillipsThermalFluid_other.rst index 476b50195e5..bd6cd054da1 100644 --- a/src/coreComponents/schema/docs/CO2BrinePhillipsThermalFluid_other.rst +++ b/src/coreComponents/schema/docs/CO2BrinePhillipsThermalFluid_other.rst @@ -24,7 +24,6 @@ phaseMassDensity real64_array3d phaseViscosity real64_array3d Phase viscosity totalDensity real64_array2d Total density totalDensity_n real64_array2d Total density at the previous converged time step -useMass integer (no description available) ===================== ============================================================================================= ============================================================================================================ diff --git a/src/coreComponents/schema/docs/CompositionalMultiphaseFluid_other.rst b/src/coreComponents/schema/docs/CompositionalMultiphaseFluid_other.rst index 476b50195e5..bd6cd054da1 100644 --- a/src/coreComponents/schema/docs/CompositionalMultiphaseFluid_other.rst +++ b/src/coreComponents/schema/docs/CompositionalMultiphaseFluid_other.rst @@ -24,7 +24,6 @@ phaseMassDensity real64_array3d phaseViscosity real64_array3d Phase viscosity totalDensity real64_array2d Total density totalDensity_n real64_array2d Total density at the previous converged time step -useMass integer (no description available) ===================== ============================================================================================= ============================================================================================================ diff --git a/src/coreComponents/schema/docs/CompositonalTwoPhaseFluidPengRobinson_other.rst b/src/coreComponents/schema/docs/CompositonalTwoPhaseFluidPengRobinson_other.rst index 476b50195e5..bd6cd054da1 100644 --- a/src/coreComponents/schema/docs/CompositonalTwoPhaseFluidPengRobinson_other.rst +++ b/src/coreComponents/schema/docs/CompositonalTwoPhaseFluidPengRobinson_other.rst @@ -24,7 +24,6 @@ phaseMassDensity real64_array3d phaseViscosity real64_array3d Phase viscosity totalDensity real64_array2d Total density totalDensity_n real64_array2d Total density at the previous converged time step -useMass integer (no description available) ===================== ============================================================================================= ============================================================================================================ diff --git a/src/coreComponents/schema/docs/CompositonalTwoPhaseFluidSoaveRedlichKwong_other.rst b/src/coreComponents/schema/docs/CompositonalTwoPhaseFluidSoaveRedlichKwong_other.rst index 476b50195e5..bd6cd054da1 100644 --- a/src/coreComponents/schema/docs/CompositonalTwoPhaseFluidSoaveRedlichKwong_other.rst +++ b/src/coreComponents/schema/docs/CompositonalTwoPhaseFluidSoaveRedlichKwong_other.rst @@ -24,7 +24,6 @@ phaseMassDensity real64_array3d phaseViscosity real64_array3d Phase viscosity totalDensity real64_array2d Total density totalDensity_n real64_array2d Total density at the previous converged time step -useMass integer (no description available) ===================== ============================================================================================= ============================================================================================================ diff --git a/src/coreComponents/schema/docs/DeadOilFluid_other.rst b/src/coreComponents/schema/docs/DeadOilFluid_other.rst index 139d0708316..15d6ed3128c 100644 --- a/src/coreComponents/schema/docs/DeadOilFluid_other.rst +++ b/src/coreComponents/schema/docs/DeadOilFluid_other.rst @@ -28,7 +28,6 @@ phaseTypes integer_array phaseViscosity real64_array3d Phase viscosity totalDensity real64_array2d Total density totalDensity_n real64_array2d Total density at the previous converged time step -useMass integer (no description available) viscosityTableWrappers LvArray_Array< geos_TableFunction_KernelWrapper, 1, camp_int_seq< long, 0l >, int, LvArray_ChaiBuffer > (no description available) =============================== ======================================================================================================= ============================================================================================================ diff --git a/src/coreComponents/schema/docs/ReactiveBrineThermal_other.rst b/src/coreComponents/schema/docs/ReactiveBrineThermal_other.rst index 74f30d53b77..5b7827a58f9 100644 --- a/src/coreComponents/schema/docs/ReactiveBrineThermal_other.rst +++ b/src/coreComponents/schema/docs/ReactiveBrineThermal_other.rst @@ -28,7 +28,6 @@ primarySpeciesTotalConcentration real64_array2d secondarySpeciesConcentration real64_array2d secondarySpeciesConcentration totalDensity real64_array2d Total density totalDensity_n real64_array2d Total density at the previous converged time step -useMass integer (no description available) ================================ ============================================================================================= ============================================================================================================ diff --git a/src/coreComponents/schema/docs/ReactiveBrine_other.rst b/src/coreComponents/schema/docs/ReactiveBrine_other.rst index 74f30d53b77..5b7827a58f9 100644 --- a/src/coreComponents/schema/docs/ReactiveBrine_other.rst +++ b/src/coreComponents/schema/docs/ReactiveBrine_other.rst @@ -28,7 +28,6 @@ primarySpeciesTotalConcentration real64_array2d secondarySpeciesConcentration real64_array2d secondarySpeciesConcentration totalDensity real64_array2d Total density totalDensity_n real64_array2d Total density at the previous converged time step -useMass integer (no description available) ================================ ============================================================================================= ============================================================================================================ diff --git a/src/coreComponents/schema/docs/SinglePhaseFVM.rst b/src/coreComponents/schema/docs/SinglePhaseFVM.rst index 6000056c728..f6ffdc9cbfb 100644 --- a/src/coreComponents/schema/docs/SinglePhaseFVM.rst +++ b/src/coreComponents/schema/docs/SinglePhaseFVM.rst @@ -1,22 +1,26 @@ -============================== ================== ======== ======================================================================================================================================================================================================================================================================================================================== -Name Type Default Description -============================== ================== ======== ======================================================================================================================================================================================================================================================================================================================== -allowNegativePressure integer 1 Flag indicating if negative pressure is allowed -cflFactor real64 0.5 Factor to apply to the `CFL condition `_ when calculating the maximum allowable time step. Values should be in the interval (0,1] -discretization groupNameRef required Name of discretization object (defined in the :ref:`NumericalMethodsManager`) to use for this solver. For instance, if this is a Finite Element Solver, the name of a :ref:`FiniteElement` should be specified. If this is a Finite Volume Method, the name of a :ref:`FiniteVolume` discretization should be specified. -initialDt real64 1e+99 Initial time-step value required by the solver to the event manager. -isThermal integer 0 Flag indicating whether the problem is thermal or not. -logLevel integer 0 Log level -maxAbsolutePressureChange real64 -1 Maximum (absolute) pressure change in a Newton iteration -maxSequentialPressureChange real64 100000 Maximum (absolute) pressure change in a sequential iteration, used for outer loop convergence check -maxSequentialTemperatureChange real64 0.1 Maximum (absolute) temperature change in a sequential iteration, used for outer loop convergence check -name groupName required A name is required for any non-unique nodes -targetRegions groupNameRef_array required Allowable regions that the solver may be applied to. Note that this does not indicate that the solver will be applied to these regions, only that allocation will occur such that the solver may be applied to these regions. The decision about what regions this solver will beapplied to rests in the EventManager. -temperature real64 0 Temperature -LinearSolverParameters node unique :ref:`XML_LinearSolverParameters` -NonlinearSolverParameters node unique :ref:`XML_NonlinearSolverParameters` -============================== ================== ======== ======================================================================================================================================================================================================================================================================================================================== +============================== ================== ======== ======================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================== +Name Type Default Description +============================== ================== ======== ======================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================== +allowNegativePressure integer 1 Flag indicating if negative pressure is allowed +cflFactor real64 0.5 Factor to apply to the `CFL condition `_ when calculating the maximum allowable time step. Values should be in the interval (0,1] +discretization groupNameRef required Name of discretization object (defined in the :ref:`NumericalMethodsManager`) to use for this solver. For instance, if this is a Finite Element Solver, the name of a :ref:`FiniteElement` should be specified. If this is a Finite Volume Method, the name of a :ref:`FiniteVolume` discretization should be specified. +initialDt real64 1e+99 Initial time-step value required by the solver to the event manager. +isThermal integer 0 | Flag indicating whether the problem is thermal or not. + | SourceFluxes application if isThermal is enabled : + | - negative value (injection): the mass balance equation is modified to considered the additional source term, + | - positive value (production): both the mass balance and the energy balance equations are modified to considered the additional source term. + | For the energy balance equation, the mass flux is multipied by the enthalpy in the cell from which the fluid is being produced. +logLevel integer 0 Log level +maxAbsolutePressureChange real64 -1 Maximum (absolute) pressure change in a Newton iteration +maxSequentialPressureChange real64 100000 Maximum (absolute) pressure change in a sequential iteration, used for outer loop convergence check +maxSequentialTemperatureChange real64 0.1 Maximum (absolute) temperature change in a sequential iteration, used for outer loop convergence check +name groupName required A name is required for any non-unique nodes +targetRegions groupNameRef_array required Allowable regions that the solver may be applied to. Note that this does not indicate that the solver will be applied to these regions, only that allocation will occur such that the solver may be applied to these regions. The decision about what regions this solver will beapplied to rests in the EventManager. +temperature real64 0 Temperature +LinearSolverParameters node unique :ref:`XML_LinearSolverParameters` +NonlinearSolverParameters node unique :ref:`XML_NonlinearSolverParameters` +============================== ================== ======== ======================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================== diff --git a/src/coreComponents/schema/docs/SinglePhaseHybridFVM.rst b/src/coreComponents/schema/docs/SinglePhaseHybridFVM.rst index 6000056c728..f6ffdc9cbfb 100644 --- a/src/coreComponents/schema/docs/SinglePhaseHybridFVM.rst +++ b/src/coreComponents/schema/docs/SinglePhaseHybridFVM.rst @@ -1,22 +1,26 @@ -============================== ================== ======== ======================================================================================================================================================================================================================================================================================================================== -Name Type Default Description -============================== ================== ======== ======================================================================================================================================================================================================================================================================================================================== -allowNegativePressure integer 1 Flag indicating if negative pressure is allowed -cflFactor real64 0.5 Factor to apply to the `CFL condition `_ when calculating the maximum allowable time step. Values should be in the interval (0,1] -discretization groupNameRef required Name of discretization object (defined in the :ref:`NumericalMethodsManager`) to use for this solver. For instance, if this is a Finite Element Solver, the name of a :ref:`FiniteElement` should be specified. If this is a Finite Volume Method, the name of a :ref:`FiniteVolume` discretization should be specified. -initialDt real64 1e+99 Initial time-step value required by the solver to the event manager. -isThermal integer 0 Flag indicating whether the problem is thermal or not. -logLevel integer 0 Log level -maxAbsolutePressureChange real64 -1 Maximum (absolute) pressure change in a Newton iteration -maxSequentialPressureChange real64 100000 Maximum (absolute) pressure change in a sequential iteration, used for outer loop convergence check -maxSequentialTemperatureChange real64 0.1 Maximum (absolute) temperature change in a sequential iteration, used for outer loop convergence check -name groupName required A name is required for any non-unique nodes -targetRegions groupNameRef_array required Allowable regions that the solver may be applied to. Note that this does not indicate that the solver will be applied to these regions, only that allocation will occur such that the solver may be applied to these regions. The decision about what regions this solver will beapplied to rests in the EventManager. -temperature real64 0 Temperature -LinearSolverParameters node unique :ref:`XML_LinearSolverParameters` -NonlinearSolverParameters node unique :ref:`XML_NonlinearSolverParameters` -============================== ================== ======== ======================================================================================================================================================================================================================================================================================================================== +============================== ================== ======== ======================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================== +Name Type Default Description +============================== ================== ======== ======================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================== +allowNegativePressure integer 1 Flag indicating if negative pressure is allowed +cflFactor real64 0.5 Factor to apply to the `CFL condition `_ when calculating the maximum allowable time step. Values should be in the interval (0,1] +discretization groupNameRef required Name of discretization object (defined in the :ref:`NumericalMethodsManager`) to use for this solver. For instance, if this is a Finite Element Solver, the name of a :ref:`FiniteElement` should be specified. If this is a Finite Volume Method, the name of a :ref:`FiniteVolume` discretization should be specified. +initialDt real64 1e+99 Initial time-step value required by the solver to the event manager. +isThermal integer 0 | Flag indicating whether the problem is thermal or not. + | SourceFluxes application if isThermal is enabled : + | - negative value (injection): the mass balance equation is modified to considered the additional source term, + | - positive value (production): both the mass balance and the energy balance equations are modified to considered the additional source term. + | For the energy balance equation, the mass flux is multipied by the enthalpy in the cell from which the fluid is being produced. +logLevel integer 0 Log level +maxAbsolutePressureChange real64 -1 Maximum (absolute) pressure change in a Newton iteration +maxSequentialPressureChange real64 100000 Maximum (absolute) pressure change in a sequential iteration, used for outer loop convergence check +maxSequentialTemperatureChange real64 0.1 Maximum (absolute) temperature change in a sequential iteration, used for outer loop convergence check +name groupName required A name is required for any non-unique nodes +targetRegions groupNameRef_array required Allowable regions that the solver may be applied to. Note that this does not indicate that the solver will be applied to these regions, only that allocation will occur such that the solver may be applied to these regions. The decision about what regions this solver will beapplied to rests in the EventManager. +temperature real64 0 Temperature +LinearSolverParameters node unique :ref:`XML_LinearSolverParameters` +NonlinearSolverParameters node unique :ref:`XML_NonlinearSolverParameters` +============================== ================== ======== ======================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================== diff --git a/src/coreComponents/schema/docs/SinglePhaseProppantFVM.rst b/src/coreComponents/schema/docs/SinglePhaseProppantFVM.rst index 6000056c728..f6ffdc9cbfb 100644 --- a/src/coreComponents/schema/docs/SinglePhaseProppantFVM.rst +++ b/src/coreComponents/schema/docs/SinglePhaseProppantFVM.rst @@ -1,22 +1,26 @@ -============================== ================== ======== ======================================================================================================================================================================================================================================================================================================================== -Name Type Default Description -============================== ================== ======== ======================================================================================================================================================================================================================================================================================================================== -allowNegativePressure integer 1 Flag indicating if negative pressure is allowed -cflFactor real64 0.5 Factor to apply to the `CFL condition `_ when calculating the maximum allowable time step. Values should be in the interval (0,1] -discretization groupNameRef required Name of discretization object (defined in the :ref:`NumericalMethodsManager`) to use for this solver. For instance, if this is a Finite Element Solver, the name of a :ref:`FiniteElement` should be specified. If this is a Finite Volume Method, the name of a :ref:`FiniteVolume` discretization should be specified. -initialDt real64 1e+99 Initial time-step value required by the solver to the event manager. -isThermal integer 0 Flag indicating whether the problem is thermal or not. -logLevel integer 0 Log level -maxAbsolutePressureChange real64 -1 Maximum (absolute) pressure change in a Newton iteration -maxSequentialPressureChange real64 100000 Maximum (absolute) pressure change in a sequential iteration, used for outer loop convergence check -maxSequentialTemperatureChange real64 0.1 Maximum (absolute) temperature change in a sequential iteration, used for outer loop convergence check -name groupName required A name is required for any non-unique nodes -targetRegions groupNameRef_array required Allowable regions that the solver may be applied to. Note that this does not indicate that the solver will be applied to these regions, only that allocation will occur such that the solver may be applied to these regions. The decision about what regions this solver will beapplied to rests in the EventManager. -temperature real64 0 Temperature -LinearSolverParameters node unique :ref:`XML_LinearSolverParameters` -NonlinearSolverParameters node unique :ref:`XML_NonlinearSolverParameters` -============================== ================== ======== ======================================================================================================================================================================================================================================================================================================================== +============================== ================== ======== ======================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================== +Name Type Default Description +============================== ================== ======== ======================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================== +allowNegativePressure integer 1 Flag indicating if negative pressure is allowed +cflFactor real64 0.5 Factor to apply to the `CFL condition `_ when calculating the maximum allowable time step. Values should be in the interval (0,1] +discretization groupNameRef required Name of discretization object (defined in the :ref:`NumericalMethodsManager`) to use for this solver. For instance, if this is a Finite Element Solver, the name of a :ref:`FiniteElement` should be specified. If this is a Finite Volume Method, the name of a :ref:`FiniteVolume` discretization should be specified. +initialDt real64 1e+99 Initial time-step value required by the solver to the event manager. +isThermal integer 0 | Flag indicating whether the problem is thermal or not. + | SourceFluxes application if isThermal is enabled : + | - negative value (injection): the mass balance equation is modified to considered the additional source term, + | - positive value (production): both the mass balance and the energy balance equations are modified to considered the additional source term. + | For the energy balance equation, the mass flux is multipied by the enthalpy in the cell from which the fluid is being produced. +logLevel integer 0 Log level +maxAbsolutePressureChange real64 -1 Maximum (absolute) pressure change in a Newton iteration +maxSequentialPressureChange real64 100000 Maximum (absolute) pressure change in a sequential iteration, used for outer loop convergence check +maxSequentialTemperatureChange real64 0.1 Maximum (absolute) temperature change in a sequential iteration, used for outer loop convergence check +name groupName required A name is required for any non-unique nodes +targetRegions groupNameRef_array required Allowable regions that the solver may be applied to. Note that this does not indicate that the solver will be applied to these regions, only that allocation will occur such that the solver may be applied to these regions. The decision about what regions this solver will beapplied to rests in the EventManager. +temperature real64 0 Temperature +LinearSolverParameters node unique :ref:`XML_LinearSolverParameters` +NonlinearSolverParameters node unique :ref:`XML_NonlinearSolverParameters` +============================== ================== ======== ======================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================== diff --git a/src/coreComponents/schema/schema.xsd.other b/src/coreComponents/schema/schema.xsd.other index 7d4ea647465..aab5565c1e3 100644 --- a/src/coreComponents/schema/schema.xsd.other +++ b/src/coreComponents/schema/schema.xsd.other @@ -1496,8 +1496,6 @@ - - @@ -1604,8 +1602,6 @@ - - @@ -1650,8 +1646,6 @@ - - @@ -1696,8 +1690,6 @@ - - @@ -1742,8 +1734,6 @@ - - @@ -1816,8 +1806,6 @@ - - @@ -1862,8 +1850,6 @@ - - @@ -1908,8 +1894,6 @@ - - @@ -2076,8 +2060,6 @@ - - @@ -2516,8 +2498,6 @@ - - @@ -2570,8 +2550,6 @@ - - From d6a47d81ab7d418c770ecea289d6ffb89569d139 Mon Sep 17 00:00:00 2001 From: MelReyCG Date: Thu, 22 Feb 2024 13:30:41 +0100 Subject: [PATCH 57/98] uncrustify --- .../fieldSpecification/SourceFluxStatistics.hpp | 4 ++-- .../physicsSolvers/SolverStatistics.hpp | 14 +++++++------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/coreComponents/fieldSpecification/SourceFluxStatistics.hpp b/src/coreComponents/fieldSpecification/SourceFluxStatistics.hpp index 4768e37028c..78f27dd54c0 100644 --- a/src/coreComponents/fieldSpecification/SourceFluxStatistics.hpp +++ b/src/coreComponents/fieldSpecification/SourceFluxStatistics.hpp @@ -90,7 +90,7 @@ class SourceFluxStatsAggregator : public FieldStatisticsBase< FlowSolverBase > void setTarget( string_view aggregatorName, string_view fluxName ); /** - * @brief Set the current time step stats. Accumulate the statistics only if the time is strictly + * @brief Set the current time step stats. Accumulate the statistics only if the time is strictly * after the previous time + dt (override the statistics if the current timestep is cut). * @param currentTime time of the timestep start since simulation starting * @param dt time delta of the current timestep @@ -161,7 +161,7 @@ class SourceFluxStatsAggregator : public FieldStatisticsBase< FlowSolverBase > array1d< real64 > m_periodPendingMass; /// time of when the timestep starts (since the simulation start). real64 m_timeStepStart = 0.0; - /// time that the current timestep is simulating. + /// time that the current timestep is simulating. real64 m_timeStepDeltaTime = 0.0; /// start time of the current period. real64 m_periodStart = 0.0; diff --git a/src/coreComponents/physicsSolvers/SolverStatistics.hpp b/src/coreComponents/physicsSolvers/SolverStatistics.hpp index 12396eb8e21..964cbc078ca 100644 --- a/src/coreComponents/physicsSolvers/SolverStatistics.hpp +++ b/src/coreComponents/physicsSolvers/SolverStatistics.hpp @@ -84,43 +84,43 @@ class SolverStatistics : public dataRepository::Group */ integer getNumTimeSteps() const { return m_numTimeSteps; } - + /** * @return Number of time step cuts */ integer getNumTimeStepCuts() const { return m_numTimeStepCuts; } - + /** * @return Cumulative number of successful outer loop iterations */ integer getNumSuccessfulOuterLoopIterations() const { return m_numSuccessfulOuterLoopIterations; } - + /** * @return Cumulative number of successful nonlinear iterations */ integer getNumSuccessfulNonlinearIterations() const { return m_numSuccessfulNonlinearIterations; } - + /** * @return Cumulative number of successful linear iterations */ integer getNumSuccessfulLinearIterations() const { return m_numSuccessfulLinearIterations; } - + /** * @return Cumulative number of discarded outer loop iterations */ integer getNumDiscardedOuterLoopIterations() const { return m_numDiscardedOuterLoopIterations; } - + /** * @return Cumulative number of discarded nonlinear iterations */ integer getNumDiscardedNonlinearIterations() const { return m_numDiscardedNonlinearIterations; } - + /** * @return Cumulative number of discarded linear iterations */ From c528da8d488655cc87723d8f911656b8bc725d1e Mon Sep 17 00:00:00 2001 From: MelReyCG Date: Thu, 22 Feb 2024 14:12:26 +0100 Subject: [PATCH 58/98] typo --- src/coreComponents/codingUtilities/UnitTestUtilities.hpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/coreComponents/codingUtilities/UnitTestUtilities.hpp b/src/coreComponents/codingUtilities/UnitTestUtilities.hpp index 3755134d630..9536797504a 100644 --- a/src/coreComponents/codingUtilities/UnitTestUtilities.hpp +++ b/src/coreComponents/codingUtilities/UnitTestUtilities.hpp @@ -93,7 +93,7 @@ ::testing::AssertionResult checkRelativeErrorFormat( const char *, const char *, << " error norm: " << delta / (value + 1.0) << " (" << v1 << " vs " << v2 << ")," << " exceeds " << relTol << ". " - << " absolute error: " << delta << " exeeds " + << " absolute error: " << delta << " exceeds " << absTol << std::endl; } return ::testing::AssertionSuccess(); @@ -119,6 +119,7 @@ void checkRelativeError( real64 const v1, real64 const v2, real64 const relTol, { SCOPED_TRACE( name ); EXPECT_PRED_FORMAT4( checkRelativeErrorFormat, v1, v2, relTol, absTol ); + GEOS_ERROR(); } template< typename ROW_INDEX, typename COL_INDEX, typename VALUE > From 5907f9c0f8b0e90729d6760ac8451f6534254f72 Mon Sep 17 00:00:00 2001 From: MelReyCG Date: Thu, 22 Feb 2024 14:34:07 +0100 Subject: [PATCH 59/98] reverting undesired paste --- src/coreComponents/codingUtilities/UnitTestUtilities.hpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/coreComponents/codingUtilities/UnitTestUtilities.hpp b/src/coreComponents/codingUtilities/UnitTestUtilities.hpp index 9536797504a..f55021522eb 100644 --- a/src/coreComponents/codingUtilities/UnitTestUtilities.hpp +++ b/src/coreComponents/codingUtilities/UnitTestUtilities.hpp @@ -119,7 +119,6 @@ void checkRelativeError( real64 const v1, real64 const v2, real64 const relTol, { SCOPED_TRACE( name ); EXPECT_PRED_FORMAT4( checkRelativeErrorFormat, v1, v2, relTol, absTol ); - GEOS_ERROR(); } template< typename ROW_INDEX, typename COL_INDEX, typename VALUE > From 720c493729c5ddcf283ad25a6844cb152230b186 Mon Sep 17 00:00:00 2001 From: MelReyCG Date: Thu, 22 Feb 2024 15:17:03 +0100 Subject: [PATCH 60/98] wrappers like this one is required to be able to "deliverClone()" --- .../constitutive/fluid/multifluid/MultiFluidBase.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/coreComponents/constitutive/fluid/multifluid/MultiFluidBase.cpp b/src/coreComponents/constitutive/fluid/multifluid/MultiFluidBase.cpp index 132a3ae9eef..139e8507a01 100644 --- a/src/coreComponents/constitutive/fluid/multifluid/MultiFluidBase.cpp +++ b/src/coreComponents/constitutive/fluid/multifluid/MultiFluidBase.cpp @@ -49,6 +49,9 @@ MultiFluidBase::MultiFluidBase( string const & name, Group * const parent ) setInputFlag( InputFlags::OPTIONAL ). setDescription( "List of fluid phases" ); + registerWrapper( viewKeyStruct::useMassString(), &m_useMass ). + setRestartFlags( RestartFlags::NO_WRITE ); + registerField( fields::multifluid::phaseFraction{}, &m_phaseFraction.value ); registerField( fields::multifluid::dPhaseFraction{}, &m_phaseFraction.derivs ); From afab7c78fe4099eb5acd0f7649712d49f27892a7 Mon Sep 17 00:00:00 2001 From: MelReyCG Date: Thu, 22 Feb 2024 15:19:23 +0100 Subject: [PATCH 61/98] generated documentations --- .../schema/docs/BlackOilFluid_other.rst | 1 + .../docs/CO2BrineEzrokhiFluid_other.rst | 1 + .../CO2BrineEzrokhiThermalFluid_other.rst | 1 + .../docs/CO2BrinePhillipsFluid_other.rst | 1 + .../CO2BrinePhillipsThermalFluid_other.rst | 1 + .../CompositionalMultiphaseFluid_other.rst | 1 + ...sitonalTwoPhaseFluidPengRobinson_other.rst | 1 + ...alTwoPhaseFluidSoaveRedlichKwong_other.rst | 1 + .../schema/docs/DeadOilFluid_other.rst | 1 + .../docs/ReactiveBrineThermal_other.rst | 1 + .../schema/docs/ReactiveBrine_other.rst | 1 + src/coreComponents/schema/schema.xsd.other | 22 +++++++++++++++++++ 12 files changed, 33 insertions(+) diff --git a/src/coreComponents/schema/docs/BlackOilFluid_other.rst b/src/coreComponents/schema/docs/BlackOilFluid_other.rst index 299d8138707..60b6325d615 100644 --- a/src/coreComponents/schema/docs/BlackOilFluid_other.rst +++ b/src/coreComponents/schema/docs/BlackOilFluid_other.rst @@ -29,6 +29,7 @@ phaseTypes integer_array phaseViscosity real64_array3d Phase viscosity totalDensity real64_array2d Total density totalDensity_n real64_array2d Total density at the previous converged time step +useMass integer (no description available) viscosityTableWrappers LvArray_Array< geos_TableFunction_KernelWrapper, 1, camp_int_seq< long, 0l >, int, LvArray_ChaiBuffer > (no description available) =============================== ======================================================================================================= ============================================================================================================ diff --git a/src/coreComponents/schema/docs/CO2BrineEzrokhiFluid_other.rst b/src/coreComponents/schema/docs/CO2BrineEzrokhiFluid_other.rst index bd6cd054da1..476b50195e5 100644 --- a/src/coreComponents/schema/docs/CO2BrineEzrokhiFluid_other.rst +++ b/src/coreComponents/schema/docs/CO2BrineEzrokhiFluid_other.rst @@ -24,6 +24,7 @@ phaseMassDensity real64_array3d phaseViscosity real64_array3d Phase viscosity totalDensity real64_array2d Total density totalDensity_n real64_array2d Total density at the previous converged time step +useMass integer (no description available) ===================== ============================================================================================= ============================================================================================================ diff --git a/src/coreComponents/schema/docs/CO2BrineEzrokhiThermalFluid_other.rst b/src/coreComponents/schema/docs/CO2BrineEzrokhiThermalFluid_other.rst index bd6cd054da1..476b50195e5 100644 --- a/src/coreComponents/schema/docs/CO2BrineEzrokhiThermalFluid_other.rst +++ b/src/coreComponents/schema/docs/CO2BrineEzrokhiThermalFluid_other.rst @@ -24,6 +24,7 @@ phaseMassDensity real64_array3d phaseViscosity real64_array3d Phase viscosity totalDensity real64_array2d Total density totalDensity_n real64_array2d Total density at the previous converged time step +useMass integer (no description available) ===================== ============================================================================================= ============================================================================================================ diff --git a/src/coreComponents/schema/docs/CO2BrinePhillipsFluid_other.rst b/src/coreComponents/schema/docs/CO2BrinePhillipsFluid_other.rst index bd6cd054da1..476b50195e5 100644 --- a/src/coreComponents/schema/docs/CO2BrinePhillipsFluid_other.rst +++ b/src/coreComponents/schema/docs/CO2BrinePhillipsFluid_other.rst @@ -24,6 +24,7 @@ phaseMassDensity real64_array3d phaseViscosity real64_array3d Phase viscosity totalDensity real64_array2d Total density totalDensity_n real64_array2d Total density at the previous converged time step +useMass integer (no description available) ===================== ============================================================================================= ============================================================================================================ diff --git a/src/coreComponents/schema/docs/CO2BrinePhillipsThermalFluid_other.rst b/src/coreComponents/schema/docs/CO2BrinePhillipsThermalFluid_other.rst index bd6cd054da1..476b50195e5 100644 --- a/src/coreComponents/schema/docs/CO2BrinePhillipsThermalFluid_other.rst +++ b/src/coreComponents/schema/docs/CO2BrinePhillipsThermalFluid_other.rst @@ -24,6 +24,7 @@ phaseMassDensity real64_array3d phaseViscosity real64_array3d Phase viscosity totalDensity real64_array2d Total density totalDensity_n real64_array2d Total density at the previous converged time step +useMass integer (no description available) ===================== ============================================================================================= ============================================================================================================ diff --git a/src/coreComponents/schema/docs/CompositionalMultiphaseFluid_other.rst b/src/coreComponents/schema/docs/CompositionalMultiphaseFluid_other.rst index bd6cd054da1..476b50195e5 100644 --- a/src/coreComponents/schema/docs/CompositionalMultiphaseFluid_other.rst +++ b/src/coreComponents/schema/docs/CompositionalMultiphaseFluid_other.rst @@ -24,6 +24,7 @@ phaseMassDensity real64_array3d phaseViscosity real64_array3d Phase viscosity totalDensity real64_array2d Total density totalDensity_n real64_array2d Total density at the previous converged time step +useMass integer (no description available) ===================== ============================================================================================= ============================================================================================================ diff --git a/src/coreComponents/schema/docs/CompositonalTwoPhaseFluidPengRobinson_other.rst b/src/coreComponents/schema/docs/CompositonalTwoPhaseFluidPengRobinson_other.rst index bd6cd054da1..476b50195e5 100644 --- a/src/coreComponents/schema/docs/CompositonalTwoPhaseFluidPengRobinson_other.rst +++ b/src/coreComponents/schema/docs/CompositonalTwoPhaseFluidPengRobinson_other.rst @@ -24,6 +24,7 @@ phaseMassDensity real64_array3d phaseViscosity real64_array3d Phase viscosity totalDensity real64_array2d Total density totalDensity_n real64_array2d Total density at the previous converged time step +useMass integer (no description available) ===================== ============================================================================================= ============================================================================================================ diff --git a/src/coreComponents/schema/docs/CompositonalTwoPhaseFluidSoaveRedlichKwong_other.rst b/src/coreComponents/schema/docs/CompositonalTwoPhaseFluidSoaveRedlichKwong_other.rst index bd6cd054da1..476b50195e5 100644 --- a/src/coreComponents/schema/docs/CompositonalTwoPhaseFluidSoaveRedlichKwong_other.rst +++ b/src/coreComponents/schema/docs/CompositonalTwoPhaseFluidSoaveRedlichKwong_other.rst @@ -24,6 +24,7 @@ phaseMassDensity real64_array3d phaseViscosity real64_array3d Phase viscosity totalDensity real64_array2d Total density totalDensity_n real64_array2d Total density at the previous converged time step +useMass integer (no description available) ===================== ============================================================================================= ============================================================================================================ diff --git a/src/coreComponents/schema/docs/DeadOilFluid_other.rst b/src/coreComponents/schema/docs/DeadOilFluid_other.rst index 15d6ed3128c..139d0708316 100644 --- a/src/coreComponents/schema/docs/DeadOilFluid_other.rst +++ b/src/coreComponents/schema/docs/DeadOilFluid_other.rst @@ -28,6 +28,7 @@ phaseTypes integer_array phaseViscosity real64_array3d Phase viscosity totalDensity real64_array2d Total density totalDensity_n real64_array2d Total density at the previous converged time step +useMass integer (no description available) viscosityTableWrappers LvArray_Array< geos_TableFunction_KernelWrapper, 1, camp_int_seq< long, 0l >, int, LvArray_ChaiBuffer > (no description available) =============================== ======================================================================================================= ============================================================================================================ diff --git a/src/coreComponents/schema/docs/ReactiveBrineThermal_other.rst b/src/coreComponents/schema/docs/ReactiveBrineThermal_other.rst index 5b7827a58f9..74f30d53b77 100644 --- a/src/coreComponents/schema/docs/ReactiveBrineThermal_other.rst +++ b/src/coreComponents/schema/docs/ReactiveBrineThermal_other.rst @@ -28,6 +28,7 @@ primarySpeciesTotalConcentration real64_array2d secondarySpeciesConcentration real64_array2d secondarySpeciesConcentration totalDensity real64_array2d Total density totalDensity_n real64_array2d Total density at the previous converged time step +useMass integer (no description available) ================================ ============================================================================================= ============================================================================================================ diff --git a/src/coreComponents/schema/docs/ReactiveBrine_other.rst b/src/coreComponents/schema/docs/ReactiveBrine_other.rst index 5b7827a58f9..74f30d53b77 100644 --- a/src/coreComponents/schema/docs/ReactiveBrine_other.rst +++ b/src/coreComponents/schema/docs/ReactiveBrine_other.rst @@ -28,6 +28,7 @@ primarySpeciesTotalConcentration real64_array2d secondarySpeciesConcentration real64_array2d secondarySpeciesConcentration totalDensity real64_array2d Total density totalDensity_n real64_array2d Total density at the previous converged time step +useMass integer (no description available) ================================ ============================================================================================= ============================================================================================================ diff --git a/src/coreComponents/schema/schema.xsd.other b/src/coreComponents/schema/schema.xsd.other index aab5565c1e3..7d4ea647465 100644 --- a/src/coreComponents/schema/schema.xsd.other +++ b/src/coreComponents/schema/schema.xsd.other @@ -1496,6 +1496,8 @@ + + @@ -1602,6 +1604,8 @@ + + @@ -1646,6 +1650,8 @@ + + @@ -1690,6 +1696,8 @@ + + @@ -1734,6 +1742,8 @@ + + @@ -1806,6 +1816,8 @@ + + @@ -1850,6 +1862,8 @@ + + @@ -1894,6 +1908,8 @@ + + @@ -2060,6 +2076,8 @@ + + @@ -2498,6 +2516,8 @@ + + @@ -2550,6 +2570,8 @@ + + From 1e33b3d34271c0db8f88696d8194ef8cc7040d31 Mon Sep 17 00:00:00 2001 From: MelReyCG Date: Thu, 22 Feb 2024 15:52:01 +0100 Subject: [PATCH 62/98] docs --- .../SourceFluxStatistics.hpp | 58 +++++++++++-------- src/coreComponents/mesh/ElementRegionBase.hpp | 6 +- 2 files changed, 38 insertions(+), 26 deletions(-) diff --git a/src/coreComponents/fieldSpecification/SourceFluxStatistics.hpp b/src/coreComponents/fieldSpecification/SourceFluxStatistics.hpp index 78f27dd54c0..6f0a0fca173 100644 --- a/src/coreComponents/fieldSpecification/SourceFluxStatistics.hpp +++ b/src/coreComponents/fieldSpecification/SourceFluxStatistics.hpp @@ -203,7 +203,9 @@ class SourceFluxStatsAggregator : public FieldStatisticsBase< FlowSolverBase > SourceFluxStatsAggregator( const string & name, Group * const parent ); - /// Accessor for the catalog name + /** + * @return The catalog name + */ static string catalogName() { return "SourceFluxStatistics"; } /** @@ -217,25 +219,11 @@ class SourceFluxStatsAggregator : public FieldStatisticsBase< FlowSolverBase > DomainPartition & domain ) override; /** - * @brief Apply a functor to all WrappedStats of the given group that target a given flux (and - * potentially multiple SourceFluxStatsAggregator). - * The functor takes in parameter the reference to the currently processed WrappedStats. - * @note To be retrieved, the WrappedStats structs must be registered on the container during the - * registerDataOnMesh() call. - * @tparam LAMBDA the type of lambda function to call in the function - * @param container the container from which we want the statistics. - * @param fluxName the name of the flux from which we want the statistics. - * @param lambda the functor that will be called for each WrappedStats. Takes in parameter the - * reference to the currently processed WrappedStats. - */ - template< typename LAMBDA > - static void forAllFluxStatWrappers( Group & container, string_view fluxName, LAMBDA && lambda ); - - /** - * @brief Loop over the target solver discretization on all mesh targets and ???????????? - * @param fluxName the name of the flux from which we want the statistics. - * @param lambda the functor that will be called for each WrappedStats. Takes in parameter the MeshLevel reference - * and the reference to the WrappedStats that combines all stats for the instance. + * @brief Apply a functor to WrappedStats that combines all stats for each target solver + * discretization mesh levels. + * @param domain the domain for which we want the statistics + * @param lambda the functor that will be called for each WrappedStats. Takes in parameter the MeshLevel + * reference and the reference to the WrappedStats that combines all stats for the instance. * @tparam LAMBDA the type of lambda function to call in the function * @note To be retrieved, the WrappedStats structs must be registered on the container during the * registerDataOnMesh() call. @@ -243,8 +231,10 @@ class SourceFluxStatsAggregator : public FieldStatisticsBase< FlowSolverBase > template< typename LAMBDA > void forMeshLevelStatsWrapper( DomainPartition & domain, LAMBDA && lambda ); /** - * @param fluxName the name of the flux from which we want the statistics. - * @param lambda the functor that will be called for each WrappedStats. Takes in parameter ??????????? + * @brief Apply a functor to each WrappedStats that combines the stats over all region for a flux. + * @param meshLevel the mesh level for which we want the statistics. + * @param lambda the functor that will be called for each WrappedStats. Takes in parameter the MeshLevel + * reference and the reference to one of the flux WrappedStats. * @tparam LAMBDA the type of lambda function to call in the function * @note To be retrieved, the WrappedStats structs must be registered on the container during the * registerDataOnMesh() call. @@ -252,8 +242,12 @@ class SourceFluxStatsAggregator : public FieldStatisticsBase< FlowSolverBase > template< typename LAMBDA > void forAllFluxStatsWrappers( MeshLevel & meshLevel, LAMBDA && lambda ); /** + * @brief Apply a functor to all simulated region WrappedStats (of the given MeshLevel) that target a + * given flux. + * @param meshLevel the mesh level we want to loop over all its regions. * @param fluxName the name of the flux from which we want the statistics. - * @param lambda the functor that will be called for each WrappedStats. Takes in parameter ??????????? + * @param lambda the functor that will be called for each WrappedStats. Takes in parameter the + * ElementRegionBase reference and the reference of its WrappedStats. * @tparam LAMBDA the type of lambda function to call in the function * @note To be retrieved, the WrappedStats structs must be registered on the container during the * registerDataOnMesh() call. @@ -264,7 +258,8 @@ class SourceFluxStatsAggregator : public FieldStatisticsBase< FlowSolverBase > * @brief Apply a functor to all subregion WrappedStats (of the given region) that target a given flux. * @param region the region from which we want to execute the lambda for each of its sub-region. * @param fluxName the name of the flux from which we want the statistics. - * @param lambda the functor that will be called for each WrappedStats. Takes in parameter ??????????? + * @param lambda the functor that will be called for each WrappedStats. Takes in parameter the + * ElementSubRegionBase reference and the reference of its WrappedStats. * @tparam LAMBDA the type of lambda function to call in the function * @note To be retrieved, the WrappedStats structs must be registered on the container during the * registerDataOnMesh() call. @@ -272,6 +267,21 @@ class SourceFluxStatsAggregator : public FieldStatisticsBase< FlowSolverBase > template< typename LAMBDA > void forAllSubRegionStatsWrappers( ElementRegionBase & region, string_view fluxName, LAMBDA && lambda ); + /** + * @brief Apply a functor to all WrappedStats of the given group that target a given flux (and + * potentially multiple SourceFluxStatsAggregator). + * The functor takes in parameter the reference to the currently processed WrappedStats. + * @note To be retrieved, the WrappedStats structs must be registered on the container during the + * registerDataOnMesh() call. + * @tparam LAMBDA the type of lambda function to call in the function + * @param container the container from which we want the statistics. + * @param fluxName the name of the flux from which we want the statistics. + * @param lambda the functor that will be called for each WrappedStats. Takes in parameter the + * reference to the currently processed WrappedStats. + */ + template< typename LAMBDA > + static void forAllFluxStatWrappers( Group & container, string_view fluxName, LAMBDA && lambda ); + /** * @return a string used to name the wrapper that is added to each region that is simulated by the solver. * The string is unique within the region for the SourceFluxBoundaryCondition and the SourceFluxStatsAggregator. diff --git a/src/coreComponents/mesh/ElementRegionBase.hpp b/src/coreComponents/mesh/ElementRegionBase.hpp index dff8529804e..15a46e407b9 100644 --- a/src/coreComponents/mesh/ElementRegionBase.hpp +++ b/src/coreComponents/mesh/ElementRegionBase.hpp @@ -215,13 +215,15 @@ class ElementRegionBase : public ObjectManagerBase string_array getConstitutiveNames() const; /** - * @brief Get the parent region of a given sub-region + * @return the parent region of the given sub-region. + * @param subRegion the sub-region that we want the parent. */ static ElementRegionBase & getParentRegion( ElementSubRegionBase & subRegion ) { return dynamicCast< ElementRegionBase & >( subRegion.getParent().getParent() ); } /** - * @brief Get the parent region of a given sub-region + * @return the parent region of the given sub-region. + * @param subRegion the sub-region that we want the parent. */ static ElementRegionBase const & getParentRegion( ElementSubRegionBase const & subRegion ) { return dynamicCast< ElementRegionBase const & >( subRegion.getParent().getParent() ); } From f911df38434fe09666606c8dc659c6874230fc94 Mon Sep 17 00:00:00 2001 From: MelReyCG Date: Thu, 22 Feb 2024 17:10:52 +0100 Subject: [PATCH 63/98] wrong doxygen keyword --- src/coreComponents/dataRepository/Group.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/coreComponents/dataRepository/Group.hpp b/src/coreComponents/dataRepository/Group.hpp index 84a26c1af6b..0341207abe1 100644 --- a/src/coreComponents/dataRepository/Group.hpp +++ b/src/coreComponents/dataRepository/Group.hpp @@ -1415,7 +1415,7 @@ class Group void setInputFlags( InputFlags flags ) { m_input_flags = flags; } /** - * @struct viewKeyStruct holds char strings and viewKeys for fast lookup + * @brief viewKeyStruct holds char strings and viewKeys for fast lookup */ struct viewKeyStruct { From 8dfe5dba42069df20fff8b840dd068a3785d69c5 Mon Sep 17 00:00:00 2001 From: MelReyCG Date: Thu, 22 Feb 2024 17:17:37 +0100 Subject: [PATCH 64/98] doxygen test --- src/coreComponents/dataRepository/Group.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/coreComponents/dataRepository/Group.hpp b/src/coreComponents/dataRepository/Group.hpp index 0341207abe1..b5ea5c2b8e0 100644 --- a/src/coreComponents/dataRepository/Group.hpp +++ b/src/coreComponents/dataRepository/Group.hpp @@ -1415,7 +1415,7 @@ class Group void setInputFlags( InputFlags flags ) { m_input_flags = flags; } /** - * @brief viewKeyStruct holds char strings and viewKeys for fast lookup + * @struct Holds char strings and viewKeys for fast lookup */ struct viewKeyStruct { From 2662637ea641e1bb0b227d15db854c08c1517b00 Mon Sep 17 00:00:00 2001 From: MelReyCG Date: Thu, 22 Feb 2024 17:27:04 +0100 Subject: [PATCH 65/98] test2 --- src/coreComponents/dataRepository/Group.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/coreComponents/dataRepository/Group.hpp b/src/coreComponents/dataRepository/Group.hpp index b5ea5c2b8e0..d4fa742f16e 100644 --- a/src/coreComponents/dataRepository/Group.hpp +++ b/src/coreComponents/dataRepository/Group.hpp @@ -1415,12 +1415,12 @@ class Group void setInputFlags( InputFlags flags ) { m_input_flags = flags; } /** - * @struct Holds char strings and viewKeys for fast lookup + * @struct Structure to hold scoped key names */ struct viewKeyStruct { /// String for the logLevel wrapper - constexpr static char const * logLevelString() { return "logLevel"; } + static constexpr char const * logLevelString() { return "logLevel"; } }; ///@} From 7fcf887bb6419f5b15477d6de640e09520ae1885 Mon Sep 17 00:00:00 2001 From: MelReyCG Date: Thu, 22 Feb 2024 17:53:27 +0100 Subject: [PATCH 66/98] fixed doxygen --- src/coreComponents/dataRepository/Group.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/coreComponents/dataRepository/Group.hpp b/src/coreComponents/dataRepository/Group.hpp index d4fa742f16e..84ad45f1fbe 100644 --- a/src/coreComponents/dataRepository/Group.hpp +++ b/src/coreComponents/dataRepository/Group.hpp @@ -1415,11 +1415,11 @@ class Group void setInputFlags( InputFlags flags ) { m_input_flags = flags; } /** - * @struct Structure to hold scoped key names + * @brief Structure to hold scoped key names */ struct viewKeyStruct { - /// String for the logLevel wrapper + /// @return String for the logLevel wrapper static constexpr char const * logLevelString() { return "logLevel"; } }; From ffaf9d47e6a350ef81dedf987c46d7e130296b34 Mon Sep 17 00:00:00 2001 From: MelReyCG Date: Fri, 23 Feb 2024 11:58:20 +0100 Subject: [PATCH 67/98] ajusting test value to facilitate convergence --- .../unitTests/fluidFlowTests/testFluidStatistics.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/coreComponents/unitTests/fluidFlowTests/testFluidStatistics.cpp b/src/coreComponents/unitTests/fluidFlowTests/testFluidStatistics.cpp index 1c42832090e..5da60735d10 100644 --- a/src/coreComponents/unitTests/fluidFlowTests/testFluidStatistics.cpp +++ b/src/coreComponents/unitTests/fluidFlowTests/testFluidStatistics.cpp @@ -922,7 +922,7 @@ TestSet getTestSet() logLevel="0" > + maxTimeStepCuts="8" /> @@ -982,14 +982,14 @@ TestSet getTestSet() From e9ee4ea5be68905d24ca0fc0495c1b1b69bbc63c Mon Sep 17 00:00:00 2001 From: MelReyCG Date: Fri, 23 Feb 2024 15:19:27 +0100 Subject: [PATCH 68/98] code reordering + docs --- .../fluidFlowTests/testFluidStatistics.cpp | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/src/coreComponents/unitTests/fluidFlowTests/testFluidStatistics.cpp b/src/coreComponents/unitTests/fluidFlowTests/testFluidStatistics.cpp index 5da60735d10..e09b62c7da1 100644 --- a/src/coreComponents/unitTests/fluidFlowTests/testFluidStatistics.cpp +++ b/src/coreComponents/unitTests/fluidFlowTests/testFluidStatistics.cpp @@ -280,6 +280,31 @@ real64 getTotalFluidMass( ProblemManager & problem, string_view flowSolverPath ) } +/** + * @brief Verification that the source flux statistics are correct for the current timestep + * @param expectedMasses the expected mass values per phase + * @param expectedRates the expected rate values per phase + * @param expectedElementCount the number of expected targeted elements + * @param stats the timestep stats + * @param context a context string to provide in any error message. + */ +void checkFluxStats( arraySlice1d< real64 > const & expectedMasses, + arraySlice1d< real64 > const & expectedRates, + integer const expectedElementCount, + SourceFluxStatsAggregator::WrappedStats const & stats, + string_view context ) +{ + for( int ip = 0; ip < stats.stats().getPhaseCount(); ++ip ) + { + EXPECT_DOUBLE_EQ( stats.stats().m_producedMass[ip], expectedMasses[ip] ) << GEOS_FMT( "The flux named '{}' did not produce the expected mass ({}, phase = {}).", + stats.getFluxName(), context, ip ); + EXPECT_DOUBLE_EQ( stats.stats().m_productionRate[ip], expectedRates[ip] ) << GEOS_FMT( "The flux named '{}' did not produce at the expected rate ({}, phase = {}).", + stats.getFluxName(), context, ip ); + } + EXPECT_DOUBLE_EQ( stats.stats().m_elementCount, expectedElementCount ) << GEOS_FMT( "The flux named '{}' did not produce in the expected elements ({}).", + stats.getFluxName(), context ); +} + /** * @brief Verification that the source flux statistics are correct over the whole simulation * @param problem the simulation ProblemManager @@ -327,6 +352,13 @@ void checkWholeSimFluxStats( ProblemManager & problem, TestSet const & testSet ) } ); } +/** + * @brief Verification that the source flux statistics are correct for a given timestep + * @param problem the simulation ProblemManager + * @param testSet the simulation TestSet + * @param time_n the current timestep start + * @param timestepId the current timestep id (= cycle) + */ void checkTimeStepFluxStats( ProblemManager & problem, TestSet const & testSet, real64 const time_n, integer const timestepId ) { From a9d17d44c54f57da5d9b7e4845058c04457ee731 Mon Sep 17 00:00:00 2001 From: MelReyCG Date: Fri, 23 Feb 2024 16:14:38 +0100 Subject: [PATCH 69/98] debugging sub-sub-timestep behaviour --- .../SourceFluxStatistics.cpp | 46 ++++++++++++++++--- 1 file changed, 39 insertions(+), 7 deletions(-) diff --git a/src/coreComponents/fieldSpecification/SourceFluxStatistics.cpp b/src/coreComponents/fieldSpecification/SourceFluxStatistics.cpp index 454d9f7f5fb..e0cdbf963ae 100644 --- a/src/coreComponents/fieldSpecification/SourceFluxStatistics.cpp +++ b/src/coreComponents/fieldSpecification/SourceFluxStatistics.cpp @@ -275,31 +275,63 @@ void SourceFluxStatsAggregator::WrappedStats::setTarget( string_view aggregatorN m_aggregatorName = aggregatorName; m_fluxName = fluxName; } +string formatLvArray( arrayView1d< real64 const > const & arr ) +{ + int id=0; + std::ostringstream oss; + oss<<"["; + oss< const & producedMass, integer const elementCount ) { m_periodStats.allocate( producedMass.size() ); + bool isBeginingNewPeriod=false,isNewTS=false; + + if( !m_periodStats.m_isGathering ) + { + // if beginning a new period, we must initialize constant values over the period // if beginning a new period, we must initialize constant values over the period bool isBeginingNewPeriod = !m_periodStats.m_isGathering; if( isBeginingNewPeriod ) + { + // if beginning a new period, we must initialize constant values over the period + bool isBeginingNewPeriod = !m_periodStats.m_isGathering; + if( isBeginingNewPeriod ) { m_periodStats.m_periodStart = currentTime; m_periodStats.m_elementCount = elementCount; m_periodStats.m_isGathering = true; + isBeginingNewPeriod=true; } - - // if beginning a new timestep, we must accumulate the stats from previous timesteps (mass & dt) before collecting the new ones - if( isBeginingNewPeriod || - currentTime >= ( m_periodStats.m_timeStepStart + m_periodStats.m_timeStepDeltaTime ) ) + else { - for( int ip = 0; ip < m_periodStats.getPhaseCount(); ++ip ) + GEOS_WARNING_IF( currentTime< m_periodStats.m_timeStepStart, GEOS_FMT( "{}: Time seems to have rollback, stats will be wrong.", m_aggregatorName ) ); + if( currentTime > ( m_periodStats.m_timeStepStart + m_periodStats.m_timeStepDeltaTime ) ) { - m_periodStats.m_periodPendingMass[ip] += m_periodStats.m_timeStepMass[ip]; + // if beginning a new timestep, we must accumulate the stats from previous timesteps (mass & dt) before collecting the new ones + for( int ip = 0; ip < m_periodStats.getPhaseCount(); ++ip ) + { + m_periodStats.m_periodPendingMass[ip] += m_periodStats.m_timeStepMass[ip]; + } + m_periodStats.m_periodPendingDeltaTime += m_periodStats.m_timeStepDeltaTime; + isNewTS=true; } - m_periodStats.m_periodPendingDeltaTime += m_periodStats.m_timeStepDeltaTime; } + GEOS_LOG( GEOS_FMT( "{}, {} @{:.3f} +{:.3f} [ {} ] : pendMass + tsMass = {}kg + {}kg pending time = {:.3f} + {:.3f} periodStart = @{:.3f} ", + m_fluxName, m_aggregatorName, + currentTime, dt, + isBeginingNewPeriod ? "New Period" : + ( isNewTS ? "New TS" : "TS OVERRIDE"), + formatLvArray( m_periodStats.m_periodPendingMass ), formatLvArray( producedMass ), + m_periodStats.m_periodPendingDeltaTime, dt, + m_periodStats.m_periodStart ) ); // new timestep stats to take into account (overriding if not begining a new timestep) m_periodStats.m_timeStepStart = currentTime; From 2003fd2e1d5bdd92334dc1d4adce7e38e2ff69c9 Mon Sep 17 00:00:00 2001 From: MelReyCG Date: Fri, 23 Feb 2024 16:21:01 +0100 Subject: [PATCH 70/98] finally fixed numerical precision issue --- .../SourceFluxStatistics.cpp | 36 ++----------------- 1 file changed, 2 insertions(+), 34 deletions(-) diff --git a/src/coreComponents/fieldSpecification/SourceFluxStatistics.cpp b/src/coreComponents/fieldSpecification/SourceFluxStatistics.cpp index e0cdbf963ae..013defdb874 100644 --- a/src/coreComponents/fieldSpecification/SourceFluxStatistics.cpp +++ b/src/coreComponents/fieldSpecification/SourceFluxStatistics.cpp @@ -275,45 +275,23 @@ void SourceFluxStatsAggregator::WrappedStats::setTarget( string_view aggregatorN m_aggregatorName = aggregatorName; m_fluxName = fluxName; } -string formatLvArray( arrayView1d< real64 const > const & arr ) -{ - int id=0; - std::ostringstream oss; - oss<<"["; - oss< const & producedMass, integer const elementCount ) { m_periodStats.allocate( producedMass.size() ); - bool isBeginingNewPeriod=false,isNewTS=false; - if( !m_periodStats.m_isGathering ) - { - // if beginning a new period, we must initialize constant values over the period - // if beginning a new period, we must initialize constant values over the period - bool isBeginingNewPeriod = !m_periodStats.m_isGathering; - if( isBeginingNewPeriod ) { // if beginning a new period, we must initialize constant values over the period - bool isBeginingNewPeriod = !m_periodStats.m_isGathering; - if( isBeginingNewPeriod ) - { m_periodStats.m_periodStart = currentTime; m_periodStats.m_elementCount = elementCount; m_periodStats.m_isGathering = true; - isBeginingNewPeriod=true; } else { GEOS_WARNING_IF( currentTime< m_periodStats.m_timeStepStart, GEOS_FMT( "{}: Time seems to have rollback, stats will be wrong.", m_aggregatorName ) ); - if( currentTime > ( m_periodStats.m_timeStepStart + m_periodStats.m_timeStepDeltaTime ) ) + if( currentTime > m_periodStats.m_timeStepStart ) { // if beginning a new timestep, we must accumulate the stats from previous timesteps (mass & dt) before collecting the new ones for( int ip = 0; ip < m_periodStats.getPhaseCount(); ++ip ) @@ -321,19 +299,9 @@ void SourceFluxStatsAggregator::WrappedStats::gatherTimeStepStats( real64 const m_periodStats.m_periodPendingMass[ip] += m_periodStats.m_timeStepMass[ip]; } m_periodStats.m_periodPendingDeltaTime += m_periodStats.m_timeStepDeltaTime; - isNewTS=true; } } - GEOS_LOG( GEOS_FMT( "{}, {} @{:.3f} +{:.3f} [ {} ] : pendMass + tsMass = {}kg + {}kg pending time = {:.3f} + {:.3f} periodStart = @{:.3f} ", - m_fluxName, m_aggregatorName, - currentTime, dt, - isBeginingNewPeriod ? "New Period" : - ( isNewTS ? "New TS" : "TS OVERRIDE"), - formatLvArray( m_periodStats.m_periodPendingMass ), formatLvArray( producedMass ), - m_periodStats.m_periodPendingDeltaTime, dt, - m_periodStats.m_periodStart ) ); - - // new timestep stats to take into account (overriding if not begining a new timestep) + // current timestep stats to take into account (overriding if not begining a new timestep) m_periodStats.m_timeStepStart = currentTime; m_periodStats.m_timeStepDeltaTime = dt; for( int ip = 0; ip < m_periodStats.getPhaseCount(); ++ip ) From 45084b5644b4248a55b94f319826762a31eafdfd Mon Sep 17 00:00:00 2001 From: MelReyCG Date: Fri, 23 Feb 2024 16:21:16 +0100 Subject: [PATCH 71/98] removing double decl --- .../fluidFlowTests/testFluidStatistics.cpp | 30 ++----------------- 1 file changed, 2 insertions(+), 28 deletions(-) diff --git a/src/coreComponents/unitTests/fluidFlowTests/testFluidStatistics.cpp b/src/coreComponents/unitTests/fluidFlowTests/testFluidStatistics.cpp index e09b62c7da1..e7b28b88fcc 100644 --- a/src/coreComponents/unitTests/fluidFlowTests/testFluidStatistics.cpp +++ b/src/coreComponents/unitTests/fluidFlowTests/testFluidStatistics.cpp @@ -143,32 +143,6 @@ struct TestSet }; -/** - * @brief Verification that the source flux statistics are correct for the current timestep - * @param expectedMasses the expected mass values per phase - * @param expectedRates the expected rate values per phase - * @param expectedElementCount the number of expected targeted elements - * @param stats the timestep stats - * @param context a context string to provide in any error message. - */ -void checkFluxStats( arraySlice1d< real64 > const & expectedMasses, - arraySlice1d< real64 > const & expectedRates, - integer const expectedElementCount, - SourceFluxStatsAggregator::WrappedStats const & stats, - string_view context ) -{ - for( int ip = 0; ip < stats.stats().getPhaseCount(); ++ip ) - { - EXPECT_DOUBLE_EQ( stats.stats().m_producedMass[ip], expectedMasses[ip] ) << GEOS_FMT( "The flux named '{}' did not produce the expected mass ({}, phase = {}).", - stats.getFluxName(), context, ip ); - EXPECT_DOUBLE_EQ( stats.stats().m_productionRate[ip], expectedRates[ip] ) << GEOS_FMT( "The flux named '{}' did not produce at the expected rate ({}, phase = {}).", - stats.getFluxName(), context, ip ); - } - EXPECT_DOUBLE_EQ( stats.stats().m_elementCount, expectedElementCount ) << GEOS_FMT( "The flux named '{}' did not produce in the expected elements ({}).", - stats.getFluxName(), context ); -} - - /** * @brief This Task allows to extract and check each timestep stats during the simulation. */ @@ -1173,8 +1147,8 @@ TestSet getTestSet() // This simulation is set-up to have at least one timestep cut. testInputs.requiredSubTimeStep = 2; // scale is set to high values to make the solver generate timestep cuts - testInputs.sourceRateFactor = -10.0; - testInputs.sinkRateFactor = 10.0; + testInputs.sourceRateFactor = -8.0; + testInputs.sinkRateFactor = 8.0; return TestSet( testInputs ); } From 000978ab3d21e43c98e9e7892d6ca9dd6f27b8d3 Mon Sep 17 00:00:00 2001 From: MelReyCG Date: Fri, 23 Feb 2024 16:25:49 +0100 Subject: [PATCH 72/98] removing unrelated code change --- src/coreComponents/codingUtilities/UnitTestUtilities.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/coreComponents/codingUtilities/UnitTestUtilities.hpp b/src/coreComponents/codingUtilities/UnitTestUtilities.hpp index f55021522eb..3755134d630 100644 --- a/src/coreComponents/codingUtilities/UnitTestUtilities.hpp +++ b/src/coreComponents/codingUtilities/UnitTestUtilities.hpp @@ -93,7 +93,7 @@ ::testing::AssertionResult checkRelativeErrorFormat( const char *, const char *, << " error norm: " << delta / (value + 1.0) << " (" << v1 << " vs " << v2 << ")," << " exceeds " << relTol << ". " - << " absolute error: " << delta << " exceeds " + << " absolute error: " << delta << " exeeds " << absTol << std::endl; } return ::testing::AssertionSuccess(); From 923b0d8ec1118eaa77547b2f70d2a75b0a4c3feb Mon Sep 17 00:00:00 2001 From: MelReyCG Date: Fri, 23 Feb 2024 17:05:55 +0100 Subject: [PATCH 73/98] ajusting test value to facilitate convergence --- .../unitTests/fluidFlowTests/testFluidStatistics.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/coreComponents/unitTests/fluidFlowTests/testFluidStatistics.cpp b/src/coreComponents/unitTests/fluidFlowTests/testFluidStatistics.cpp index e7b28b88fcc..5540291a48b 100644 --- a/src/coreComponents/unitTests/fluidFlowTests/testFluidStatistics.cpp +++ b/src/coreComponents/unitTests/fluidFlowTests/testFluidStatistics.cpp @@ -652,7 +652,8 @@ TestSet getTestSet() useMass="1" logLevel="0" > + newtonMaxIter="8" + maxTimeStepCuts="4" /> From 02d35fc65f47afb89209318985b544865fb66824 Mon Sep 17 00:00:00 2001 From: MelReyCG Date: Fri, 23 Feb 2024 17:16:35 +0100 Subject: [PATCH 74/98] test --- .../unitTests/fluidFlowTests/testFluidStatistics.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/coreComponents/unitTests/fluidFlowTests/testFluidStatistics.cpp b/src/coreComponents/unitTests/fluidFlowTests/testFluidStatistics.cpp index 5540291a48b..38cfc6d6827 100644 --- a/src/coreComponents/unitTests/fluidFlowTests/testFluidStatistics.cpp +++ b/src/coreComponents/unitTests/fluidFlowTests/testFluidStatistics.cpp @@ -650,10 +650,10 @@ TestSet getTestSet() targetRegions="{ reservoir }" temperature="366.483" useMass="1" - logLevel="0" > + logLevel="1" > + maxTimeStepCuts="8" /> From f53a8f5558cec44500a9d1a59b8564c307651fa5 Mon Sep 17 00:00:00 2001 From: MelReyCG Date: Tue, 27 Feb 2024 17:51:15 +0100 Subject: [PATCH 75/98] allow non converged solution is tests as trilinos struggles with the testFluidStatistics --- .../unitTests/fluidFlowTests/testFluidStatistics.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/coreComponents/unitTests/fluidFlowTests/testFluidStatistics.cpp b/src/coreComponents/unitTests/fluidFlowTests/testFluidStatistics.cpp index 38cfc6d6827..e256b754420 100644 --- a/src/coreComponents/unitTests/fluidFlowTests/testFluidStatistics.cpp +++ b/src/coreComponents/unitTests/fluidFlowTests/testFluidStatistics.cpp @@ -410,7 +410,8 @@ TestSet getTestSet() targetRegions="{ reservoir }" > + newtonMaxIter="40" + allowNonConverged="1" /> @@ -653,7 +654,7 @@ TestSet getTestSet() logLevel="1" > + allowNonConverged="1" /> @@ -929,7 +930,8 @@ TestSet getTestSet() logLevel="0" > + maxTimeStepCuts="8" + allowNonConverged="1" /> From d5b4a1481f21a93176de7b2d8a9effada3538b4a Mon Sep 17 00:00:00 2001 From: MelReyCG Date: Wed, 28 Feb 2024 11:12:37 +0100 Subject: [PATCH 76/98] Solver setting test --- .../unitTests/fluidFlowTests/testFluidStatistics.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/coreComponents/unitTests/fluidFlowTests/testFluidStatistics.cpp b/src/coreComponents/unitTests/fluidFlowTests/testFluidStatistics.cpp index e256b754420..e76f3e5ca3e 100644 --- a/src/coreComponents/unitTests/fluidFlowTests/testFluidStatistics.cpp +++ b/src/coreComponents/unitTests/fluidFlowTests/testFluidStatistics.cpp @@ -655,8 +655,8 @@ TestSet getTestSet() - From fad3edfcc1b03aa7cb5bafd0a9ff8bfc4e9710be Mon Sep 17 00:00:00 2001 From: MelReyCG Date: Wed, 28 Feb 2024 11:34:15 +0100 Subject: [PATCH 77/98] Solver setting test 2 (Mass test is passed with trilinos) --- .../unitTests/fluidFlowTests/testFluidStatistics.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/coreComponents/unitTests/fluidFlowTests/testFluidStatistics.cpp b/src/coreComponents/unitTests/fluidFlowTests/testFluidStatistics.cpp index e76f3e5ca3e..cabf43c411b 100644 --- a/src/coreComponents/unitTests/fluidFlowTests/testFluidStatistics.cpp +++ b/src/coreComponents/unitTests/fluidFlowTests/testFluidStatistics.cpp @@ -927,13 +927,13 @@ TestSet getTestSet() targetRegions="{ reservoir }" temperature="366.483" useMass="0" - logLevel="0" > + logLevel="1" > - From 68eb9914b17b5832c37c1ad3e08ef370b4343239 Mon Sep 17 00:00:00 2001 From: MelReyCG Date: Wed, 28 Feb 2024 16:22:22 +0100 Subject: [PATCH 78/98] Solver setting test --- .../unitTests/fluidFlowTests/testFluidStatistics.cpp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/coreComponents/unitTests/fluidFlowTests/testFluidStatistics.cpp b/src/coreComponents/unitTests/fluidFlowTests/testFluidStatistics.cpp index cabf43c411b..4141c1c211e 100644 --- a/src/coreComponents/unitTests/fluidFlowTests/testFluidStatistics.cpp +++ b/src/coreComponents/unitTests/fluidFlowTests/testFluidStatistics.cpp @@ -59,7 +59,7 @@ struct TestInputs /// In order to be sure that sub-timestepping is supported, requires the test to have at least one sub-timestep. /// At least one simulation should test the timestep cuts ! - integer requiredSubTimeStep; + integer requiredSubTimeStep = 0; }; /** @@ -582,8 +582,6 @@ TestSet getTestSet() testInputs.sourceRateFactor = -1.0; testInputs.sinkRateFactor = 3.0; - testInputs.requiredSubTimeStep = 0; - return TestSet( testInputs ); } @@ -655,8 +653,9 @@ TestSet getTestSet() - @@ -873,8 +872,6 @@ TestSet getTestSet() testInputs.sourceRateFactor = -44e-3; testInputs.sinkRateFactor = 18e-3; - testInputs.requiredSubTimeStep = 0; - return TestSet( testInputs ); } From 9b0628f198ca6a6833bf71a5f15e4a7e72e37578 Mon Sep 17 00:00:00 2001 From: MelReyCG Date: Thu, 29 Feb 2024 17:08:15 +0100 Subject: [PATCH 79/98] reverted to previous settings --- .../unitTests/fluidFlowTests/testFluidStatistics.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/coreComponents/unitTests/fluidFlowTests/testFluidStatistics.cpp b/src/coreComponents/unitTests/fluidFlowTests/testFluidStatistics.cpp index 4141c1c211e..0eb986520ab 100644 --- a/src/coreComponents/unitTests/fluidFlowTests/testFluidStatistics.cpp +++ b/src/coreComponents/unitTests/fluidFlowTests/testFluidStatistics.cpp @@ -653,8 +653,8 @@ TestSet getTestSet() - @@ -929,8 +929,8 @@ TestSet getTestSet() newtonMaxIter="8" maxTimeStepCuts="8" allowNonConverged="1" /> - From adab7a0f9462019ea78e6e3a7538daca05076185 Mon Sep 17 00:00:00 2001 From: MelReyCG Date: Thu, 29 Feb 2024 17:24:59 +0100 Subject: [PATCH 80/98] forgotten ILUK attribute --- .../unitTests/fluidFlowTests/testFluidStatistics.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/coreComponents/unitTests/fluidFlowTests/testFluidStatistics.cpp b/src/coreComponents/unitTests/fluidFlowTests/testFluidStatistics.cpp index 0eb986520ab..cb8c88a546e 100644 --- a/src/coreComponents/unitTests/fluidFlowTests/testFluidStatistics.cpp +++ b/src/coreComponents/unitTests/fluidFlowTests/testFluidStatistics.cpp @@ -655,7 +655,6 @@ TestSet getTestSet() allowNonConverged="1" /> From 32cdd5ea80dfb990a66869e6a00171d49daea799 Mon Sep 17 00:00:00 2001 From: MelReyCG Date: Tue, 5 Mar 2024 13:08:09 +0100 Subject: [PATCH 81/98] trying to test sub-timesteps only with hypre --- .../fluidFlowTests/testFluidStatistics.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/coreComponents/unitTests/fluidFlowTests/testFluidStatistics.cpp b/src/coreComponents/unitTests/fluidFlowTests/testFluidStatistics.cpp index cb8c88a546e..cdeae99a299 100644 --- a/src/coreComponents/unitTests/fluidFlowTests/testFluidStatistics.cpp +++ b/src/coreComponents/unitTests/fluidFlowTests/testFluidStatistics.cpp @@ -1143,12 +1143,21 @@ TestSet getTestSet() { 0.0, 0.027 }, { 0.0, 0.000 } } ); - // This simulation is set-up to have at least one timestep cut. - testInputs.requiredSubTimeStep = 2; // scale is set to high values to make the solver generate timestep cuts testInputs.sourceRateFactor = -8.0; testInputs.sinkRateFactor = 8.0; + if( std::is_same< LAInterface, HypreInterface >::value ) + { + // With Hypre, this simulation is set-up to have at least one timestep cut. + testInputs.requiredSubTimeStep = 2; + } + else + { + // With other LAIs, the simulation doesn't behave the same way + testInputs.requiredSubTimeStep = 0; + } + return TestSet( testInputs ); } From 42a57d85405c061006ee99107444bd2c04ff26c6 Mon Sep 17 00:00:00 2001 From: MelReyCG Date: Tue, 5 Mar 2024 13:15:37 +0100 Subject: [PATCH 82/98] trilinos & hyper work in stastifying time --- .../fluidFlowTests/testFluidStatistics.cpp | 23 ++++++++----------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/src/coreComponents/unitTests/fluidFlowTests/testFluidStatistics.cpp b/src/coreComponents/unitTests/fluidFlowTests/testFluidStatistics.cpp index cdeae99a299..429e48db387 100644 --- a/src/coreComponents/unitTests/fluidFlowTests/testFluidStatistics.cpp +++ b/src/coreComponents/unitTests/fluidFlowTests/testFluidStatistics.cpp @@ -17,6 +17,8 @@ #include "mainInterface/GeosxState.hpp" #include "fieldSpecification/SourceFluxStatistics.hpp" #include "physicsSolvers/fluidFlow/SinglePhaseStatistics.hpp" +#include "linearAlgebra/interfaces/InterfaceTypes.hpp" +#include "linearAlgebra/interfaces/hypre/HypreInterface.hpp" #include @@ -413,7 +415,7 @@ TestSet getTestSet() newtonMaxIter="40" allowNonConverged="1" /> @@ -652,9 +654,10 @@ TestSet getTestSet() logLevel="1" > @@ -929,8 +932,8 @@ TestSet getTestSet() maxTimeStepCuts="8" allowNonConverged="1" /> + preconditionerType="iluk" + krylovTol="1.0e-6" /> @@ -1147,16 +1150,8 @@ TestSet getTestSet() testInputs.sourceRateFactor = -8.0; testInputs.sinkRateFactor = 8.0; - if( std::is_same< LAInterface, HypreInterface >::value ) - { - // With Hypre, this simulation is set-up to have at least one timestep cut. - testInputs.requiredSubTimeStep = 2; - } - else - { - // With other LAIs, the simulation doesn't behave the same way - testInputs.requiredSubTimeStep = 0; - } + // this simulation is set-up to have at least one timestep cut. + testInputs.requiredSubTimeStep = 2; return TestSet( testInputs ); } From 7f2a9138bdfd77d6f3d1eb22bedbad6faac43c0d Mon Sep 17 00:00:00 2001 From: MelReyCG Date: Tue, 5 Mar 2024 16:51:58 +0100 Subject: [PATCH 83/98] removed unused headers --- .../unitTests/fluidFlowTests/testFluidStatistics.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/coreComponents/unitTests/fluidFlowTests/testFluidStatistics.cpp b/src/coreComponents/unitTests/fluidFlowTests/testFluidStatistics.cpp index 429e48db387..a39276e29ea 100644 --- a/src/coreComponents/unitTests/fluidFlowTests/testFluidStatistics.cpp +++ b/src/coreComponents/unitTests/fluidFlowTests/testFluidStatistics.cpp @@ -17,8 +17,6 @@ #include "mainInterface/GeosxState.hpp" #include "fieldSpecification/SourceFluxStatistics.hpp" #include "physicsSolvers/fluidFlow/SinglePhaseStatistics.hpp" -#include "linearAlgebra/interfaces/InterfaceTypes.hpp" -#include "linearAlgebra/interfaces/hypre/HypreInterface.hpp" #include From dc5b8273bd07b6eaf64ea7ab49b1d3481c853bf7 Mon Sep 17 00:00:00 2001 From: MelReyCG Date: Tue, 5 Mar 2024 17:26:44 +0100 Subject: [PATCH 84/98] solver precision --- .../unitTests/fluidFlowTests/testFluidStatistics.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/coreComponents/unitTests/fluidFlowTests/testFluidStatistics.cpp b/src/coreComponents/unitTests/fluidFlowTests/testFluidStatistics.cpp index a39276e29ea..97d2a951104 100644 --- a/src/coreComponents/unitTests/fluidFlowTests/testFluidStatistics.cpp +++ b/src/coreComponents/unitTests/fluidFlowTests/testFluidStatistics.cpp @@ -414,7 +414,7 @@ TestSet getTestSet() allowNonConverged="1" /> + krylovTol="1.0e-6" /> @@ -656,7 +656,7 @@ TestSet getTestSet() allowNonConverged="1" /> + krylovTol="1.0e-6" /> From 7f9097ce89376dceec4077a3317ab447edc32d33 Mon Sep 17 00:00:00 2001 From: MelReyCG Date: Fri, 8 Mar 2024 14:02:06 +0100 Subject: [PATCH 85/98] avoiding exact 0 / 1 values in test --- .../unitTests/fluidFlowTests/testFluidStatistics.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/coreComponents/unitTests/fluidFlowTests/testFluidStatistics.cpp b/src/coreComponents/unitTests/fluidFlowTests/testFluidStatistics.cpp index 97d2a951104..603ff97fa3a 100644 --- a/src/coreComponents/unitTests/fluidFlowTests/testFluidStatistics.cpp +++ b/src/coreComponents/unitTests/fluidFlowTests/testFluidStatistics.cpp @@ -805,10 +805,10 @@ TestSet getTestSet() + values="{ 0.001, 0.001, 0.001, 0.001 }" /> + values="{ 0.999, 0.999, 0.999, 0.999 }" /> @@ -1080,10 +1080,10 @@ TestSet getTestSet() + values="{ 0.001, 0.001, 0.001, 0.001 }" /> + values="{ 0.999, 0.999, 0.999, 0.999 }" /> From de20abab0714581d8cf241a86041bab70aa4ee2d Mon Sep 17 00:00:00 2001 From: MelReyCG Date: Fri, 8 Mar 2024 16:24:59 +0100 Subject: [PATCH 86/98] removed parameter as they are to defualt values --- .../unitTests/fluidFlowTests/testFluidStatistics.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/coreComponents/unitTests/fluidFlowTests/testFluidStatistics.cpp b/src/coreComponents/unitTests/fluidFlowTests/testFluidStatistics.cpp index 603ff97fa3a..897ea3e6c01 100644 --- a/src/coreComponents/unitTests/fluidFlowTests/testFluidStatistics.cpp +++ b/src/coreComponents/unitTests/fluidFlowTests/testFluidStatistics.cpp @@ -409,8 +409,7 @@ TestSet getTestSet() discretization="singlePhaseTPFA" targetRegions="{ reservoir }" > - - - Date: Fri, 8 Mar 2024 16:34:20 +0100 Subject: [PATCH 87/98] renaming testFluidStatistics to testFlowStatistics --- .../unitTests/fluidFlowTests/CMakeLists.txt | 2 +- ...{testFluidStatistics.cpp => testFlowStatistics.cpp} | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) rename src/coreComponents/unitTests/fluidFlowTests/{testFluidStatistics.cpp => testFlowStatistics.cpp} (99%) diff --git a/src/coreComponents/unitTests/fluidFlowTests/CMakeLists.txt b/src/coreComponents/unitTests/fluidFlowTests/CMakeLists.txt index 7aabfa8d418..81efba5d314 100644 --- a/src/coreComponents/unitTests/fluidFlowTests/CMakeLists.txt +++ b/src/coreComponents/unitTests/fluidFlowTests/CMakeLists.txt @@ -3,7 +3,7 @@ set( gtest_geosx_tests testSinglePhaseBaseKernels.cpp testThermalCompMultiphaseFlow.cpp testThermalSinglePhaseFlow.cpp - testFluidStatistics.cpp ) + testFlowStatistics.cpp ) set( dependencyList ${parallelDeps} gtest ) diff --git a/src/coreComponents/unitTests/fluidFlowTests/testFluidStatistics.cpp b/src/coreComponents/unitTests/fluidFlowTests/testFlowStatistics.cpp similarity index 99% rename from src/coreComponents/unitTests/fluidFlowTests/testFluidStatistics.cpp rename to src/coreComponents/unitTests/fluidFlowTests/testFlowStatistics.cpp index 897ea3e6c01..fdf1f3aed4a 100644 --- a/src/coreComponents/unitTests/fluidFlowTests/testFluidStatistics.cpp +++ b/src/coreComponents/unitTests/fluidFlowTests/testFlowStatistics.cpp @@ -32,7 +32,7 @@ CommandLineOptions g_commandLineOptions; /** - * @brief this struct is used to provide the input data of each fluid tests + * @brief this struct is used to provide the input data of each flow tests */ struct TestInputs { @@ -186,7 +186,7 @@ class TimeStepChecker : public TaskBase REGISTER_CATALOG_ENTRY( TaskBase, TimeStepChecker, string const &, Group * const ) -class FluidStatisticsTest : public ::testing::Test +class FlowStatisticsTest : public ::testing::Test { public: @@ -584,7 +584,7 @@ TestSet getTestSet() return TestSet( testInputs ); } -TEST_F( FluidStatisticsTest, checkSinglePhaseFluxStatistics ) +TEST_F( FlowStatisticsTest, checkSinglePhaseFluxStatistics ) { TestSet const testSet = getTestSet(); @@ -874,7 +874,7 @@ TestSet getTestSet() } -TEST_F( FluidStatisticsTest, checkMultiPhaseFluxStatisticsMass ) +TEST_F( FlowStatisticsTest, checkMultiPhaseFluxStatisticsMass ) { TestSet const testSet = getTestSet(); writeTableFiles( testSet.inputs.tableFiles ); @@ -1152,7 +1152,7 @@ TestSet getTestSet() } -TEST_F( FluidStatisticsTest, checkMultiPhaseFluxStatisticsMol ) +TEST_F( FlowStatisticsTest, checkMultiPhaseFluxStatisticsMol ) { TestSet const testSet = getTestSet(); writeTableFiles( testSet.inputs.tableFiles ); From 25bc30f4bde6af63acdee47b243686f1cd778080 Mon Sep 17 00:00:00 2001 From: MelReyCG Date: Wed, 3 Apr 2024 15:12:51 +0200 Subject: [PATCH 88/98] removing the 4th log level --- .../fieldSpecification/SourceFluxStatistics.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/coreComponents/fieldSpecification/SourceFluxStatistics.cpp b/src/coreComponents/fieldSpecification/SourceFluxStatistics.cpp index 013defdb874..a6ef615389e 100644 --- a/src/coreComponents/fieldSpecification/SourceFluxStatistics.cpp +++ b/src/coreComponents/fieldSpecification/SourceFluxStatistics.cpp @@ -33,8 +33,7 @@ SourceFluxStatsAggregator::SourceFluxStatsAggregator( const string & name, getWrapper< integer >( Group::viewKeyStruct::logLevelString() ). appendDescription( GEOS_FMT( "\n- Log Level 1 outputs the sum of all {0}(s) produced rate & mass,\n" "- Log Level 2 details values for each {0},\n" - "- Log Level 3 details values for each region,\n" - "- Log Level 4 details values for each sub-region.", + "- Log Level 3 details values for each region.", SourceFluxBoundaryCondition::catalogName() ) ); registerWrapper( viewKeyStruct::fluxNamesString().data(), &m_fluxNames ). @@ -204,12 +203,10 @@ bool SourceFluxStatsAggregator::execute( real64 const GEOS_UNUSED_PARAM( time_n regionStats.stats() = StatData(); forAllSubRegionStatsWrappers( region, regionStats.getFluxName(), - [&] ( ElementSubRegionBase & subRegion, WrappedStats & subRegionStats ) + [&] ( ElementSubRegionBase &, WrappedStats & subRegionStats ) { subRegionStats.finalizePeriod(); - regionStats.stats().combine( subRegionStats.stats() ); - writeStatsToLog( 4, subRegion.getName(), subRegionStats ); } ); fluxStats.stats().combine( regionStats.stats() ); From f56b2f626bec98980a6b8e374571c7100bd0d20a Mon Sep 17 00:00:00 2001 From: MelReyCG Date: Wed, 3 Apr 2024 16:24:36 +0200 Subject: [PATCH 89/98] missing inlines --- .../codingUtilities/UnitTestUtilities.hpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/coreComponents/codingUtilities/UnitTestUtilities.hpp b/src/coreComponents/codingUtilities/UnitTestUtilities.hpp index 3755134d630..ea7a2e4bf04 100644 --- a/src/coreComponents/codingUtilities/UnitTestUtilities.hpp +++ b/src/coreComponents/codingUtilities/UnitTestUtilities.hpp @@ -82,7 +82,7 @@ T expected( T expectedSerial, constexpr real64 DEFAULT_ABS_TOL = 1E-12; constexpr real64 DEFAULT_REL_TOL = std::numeric_limits< real64 >::epsilon(); -::testing::AssertionResult checkRelativeErrorFormat( const char *, const char *, const char *, const char *, +inline ::testing::AssertionResult checkRelativeErrorFormat( const char *, const char *, const char *, const char *, real64 const v1, real64 const v2, real64 const relTol, real64 const absTol ) { real64 const delta = std::abs( v1 - v2 ); @@ -99,23 +99,23 @@ ::testing::AssertionResult checkRelativeErrorFormat( const char *, const char *, return ::testing::AssertionSuccess(); } -::testing::AssertionResult checkRelativeErrorFormat( char const * a, char const * b, char const * c, +inline ::testing::AssertionResult checkRelativeErrorFormat( char const * a, char const * b, char const * c, real64 const v1, real64 const v2, real64 const relTol ) { return checkRelativeErrorFormat( a, b, c, "DEFAULT_ABS_TOL", v1, v2, relTol, DEFAULT_ABS_TOL ); } -void checkRelativeError( real64 const v1, real64 const v2, real64 const relTol ) +inline void checkRelativeError( real64 const v1, real64 const v2, real64 const relTol ) { EXPECT_PRED_FORMAT3( checkRelativeErrorFormat, v1, v2, relTol ); } -void checkRelativeError( real64 const v1, real64 const v2, real64 const relTol, real64 const absTol ) +inline void checkRelativeError( real64 const v1, real64 const v2, real64 const relTol, real64 const absTol ) { EXPECT_PRED_FORMAT4( checkRelativeErrorFormat, v1, v2, relTol, absTol ); } -void checkRelativeError( real64 const v1, real64 const v2, real64 const relTol, string const & name ) +inline void checkRelativeError( real64 const v1, real64 const v2, real64 const relTol, string const & name ) { SCOPED_TRACE( name ); EXPECT_PRED_FORMAT3( checkRelativeErrorFormat, v1, v2, relTol ); } -void checkRelativeError( real64 const v1, real64 const v2, real64 const relTol, real64 const absTol, string const & name ) +inline void checkRelativeError( real64 const v1, real64 const v2, real64 const relTol, real64 const absTol, string const & name ) { SCOPED_TRACE( name ); EXPECT_PRED_FORMAT4( checkRelativeErrorFormat, v1, v2, relTol, absTol ); From 37b3c97a97f2cff52b077f5fa422e3f51bc69ced Mon Sep 17 00:00:00 2001 From: MelReyCG Date: Wed, 3 Apr 2024 16:25:06 +0200 Subject: [PATCH 90/98] xsd / rst changes --- .../schema/docs/SourceFluxStatistics.rst | 25 +++++++++---------- src/coreComponents/schema/schema.xsd | 3 +-- 2 files changed, 13 insertions(+), 15 deletions(-) diff --git a/src/coreComponents/schema/docs/SourceFluxStatistics.rst b/src/coreComponents/schema/docs/SourceFluxStatistics.rst index b38241ba777..fce53adc4ed 100644 --- a/src/coreComponents/schema/docs/SourceFluxStatistics.rst +++ b/src/coreComponents/schema/docs/SourceFluxStatistics.rst @@ -1,17 +1,16 @@ -============== ================== ======== ======================================================================================================================================================================================================================================== -Name Type Default Description -============== ================== ======== ======================================================================================================================================================================================================================================== -flowSolverName groupNameRef required Name of the flow solver -fluxNames groupNameRef_array required Name(s) array of the SourceFlux(s) for which we want the statistics. Use "all" to target all SourceFlux. -logLevel integer 0 | Log level - | - Log Level 1 outputs the sum of all SourceFlux(s) produced rate & mass, - | - Log Level 2 details values for each SourceFlux, - | - Log Level 3 details values for each region, - | - Log Level 4 details values for each sub-region. -name groupName required A name is required for any non-unique nodes -writeCSV integer 0 Write statistics into a CSV file -============== ================== ======== ======================================================================================================================================================================================================================================== +============== ================== ======== ===================================================================================================================================================================================== +Name Type Default Description +============== ================== ======== ===================================================================================================================================================================================== +flowSolverName groupNameRef required Name of the flow solver +fluxNames groupNameRef_array required Name(s) array of the SourceFlux(s) for which we want the statistics. Use "all" to target all SourceFlux. +logLevel integer 0 | Log level + | - Log Level 1 outputs the sum of all SourceFlux(s) produced rate & mass, + | - Log Level 2 details values for each SourceFlux, + | - Log Level 3 details values for each region. +name groupName required A name is required for any non-unique nodes +writeCSV integer 0 Write statistics into a CSV file +============== ================== ======== ===================================================================================================================================================================================== diff --git a/src/coreComponents/schema/schema.xsd b/src/coreComponents/schema/schema.xsd index 3df971dca79..e75a731a3be 100644 --- a/src/coreComponents/schema/schema.xsd +++ b/src/coreComponents/schema/schema.xsd @@ -3738,8 +3738,7 @@ For the energy balance equation, the mass flux is multipied by the enthalpy in t +- Log Level 3 details values for each region.--> From 3165aef22a1be9298acf7cf24e50e8c146c3ce9e Mon Sep 17 00:00:00 2001 From: MelReyCG Date: Wed, 3 Apr 2024 16:26:45 +0200 Subject: [PATCH 91/98] moving the TimeStepChecker in its own file (& created a testingUtilities folder) --- src/coreComponents/unitTests/CMakeLists.txt | 1 + .../unitTests/fluidFlowTests/CMakeLists.txt | 1 + .../fluidFlowTests/testFlowStatistics.cpp | 50 +--------- .../unitTests/testingUtilities/CMakeLists.txt | 33 +++++++ .../testingUtilities/TestingTasks.cpp | 32 +++++++ .../testingUtilities/TestingTasks.hpp | 93 +++++++++++++++++++ 6 files changed, 164 insertions(+), 46 deletions(-) create mode 100644 src/coreComponents/unitTests/testingUtilities/CMakeLists.txt create mode 100644 src/coreComponents/unitTests/testingUtilities/TestingTasks.cpp create mode 100644 src/coreComponents/unitTests/testingUtilities/TestingTasks.hpp diff --git a/src/coreComponents/unitTests/CMakeLists.txt b/src/coreComponents/unitTests/CMakeLists.txt index 3d49c154263..a442583a3c8 100644 --- a/src/coreComponents/unitTests/CMakeLists.txt +++ b/src/coreComponents/unitTests/CMakeLists.txt @@ -12,3 +12,4 @@ add_subdirectory( fileIOTests ) add_subdirectory( fluidFlowTests ) add_subdirectory( wellsTests ) add_subdirectory( wavePropagationTests ) +add_subdirectory( testingUtilities ) diff --git a/src/coreComponents/unitTests/fluidFlowTests/CMakeLists.txt b/src/coreComponents/unitTests/fluidFlowTests/CMakeLists.txt index 81efba5d314..2abdc8e16cf 100644 --- a/src/coreComponents/unitTests/fluidFlowTests/CMakeLists.txt +++ b/src/coreComponents/unitTests/fluidFlowTests/CMakeLists.txt @@ -13,6 +13,7 @@ else() list( APPEND dependencyList ${geosx_core_libs} ) endif() +set( dependencyList testingUtilities ) if( ENABLE_PVTPackage ) list( APPEND gtest_geosx_tests diff --git a/src/coreComponents/unitTests/fluidFlowTests/testFlowStatistics.cpp b/src/coreComponents/unitTests/fluidFlowTests/testFlowStatistics.cpp index fdf1f3aed4a..02c06e269dc 100644 --- a/src/coreComponents/unitTests/fluidFlowTests/testFlowStatistics.cpp +++ b/src/coreComponents/unitTests/fluidFlowTests/testFlowStatistics.cpp @@ -13,6 +13,7 @@ */ #include "unitTests/fluidFlowTests/testCompFlowUtils.hpp" +#include "unitTests/testingUtilities/TestingTasks.hpp" #include "mainInterface/initialization.hpp" #include "mainInterface/GeosxState.hpp" #include "fieldSpecification/SourceFluxStatistics.hpp" @@ -143,49 +144,6 @@ struct TestSet }; -/** - * @brief This Task allows to extract and check each timestep stats during the simulation. - */ -class TimeStepChecker : public TaskBase -{ -public: - TimeStepChecker( string const & name, Group * const parent ): - TaskBase( name, parent ) - {} - - void postProcessInput() override - {} - - void setCheckTimeStepFunction( std::function< void(real64) > func ) - { m_checkTimeStepFunction = std::function< void(real64) >( func ); } - - integer getTestedTimeStepCount() const - { return m_timestepId; } - - static string catalogName() { return "TimeStepChecker"; } - - virtual bool execute( real64 const time_n, - real64 const GEOS_UNUSED_PARAM( dt ), - integer const GEOS_UNUSED_PARAM( cycleNumber ), - integer const GEOS_UNUSED_PARAM( eventCounter ), - real64 const GEOS_UNUSED_PARAM( eventProgress ), - DomainPartition & GEOS_UNUSED_PARAM( domain ) ) - { - EXPECT_TRUE( m_checkTimeStepFunction ); - m_checkTimeStepFunction( time_n ); - - ++m_timestepId; - return false; - } - - -private: - std::function< void(real64) > m_checkTimeStepFunction; - int m_timestepId = 0; -}; -REGISTER_CATALOG_ENTRY( TaskBase, TimeStepChecker, string const &, Group * const ) - - class FlowStatisticsTest : public ::testing::Test { public: @@ -596,7 +554,7 @@ TEST_F( FlowStatisticsTest, checkSinglePhaseFluxStatistics ) real64 firstMass; TimeStepChecker & timeStepChecker = problem.getGroupByPath< TimeStepChecker >( testSet.inputs.timeStepCheckerPath ); - timeStepChecker.setCheckTimeStepFunction( [&]( real64 const time_n ) + timeStepChecker.setTimeStepCheckingFunction( [&]( real64 const time_n ) { integer const timestepId = timeStepChecker.getTestedTimeStepCount(); checkTimeStepStats( testSet, time_n, timestepId ); @@ -885,7 +843,7 @@ TEST_F( FlowStatisticsTest, checkMultiPhaseFluxStatisticsMass ) setupProblemFromXML( problem, testSet.inputs.xmlInput.data() ); TimeStepChecker & timeStepChecker = problem.getGroupByPath< TimeStepChecker >( testSet.inputs.timeStepCheckerPath ); - timeStepChecker.setCheckTimeStepFunction( [&]( real64 const time_n ) + timeStepChecker.setTimeStepCheckingFunction( [&]( real64 const time_n ) { integer const timestepId = timeStepChecker.getTestedTimeStepCount(); checkTimeStepStats( testSet, time_n, timestepId ); @@ -1163,7 +1121,7 @@ TEST_F( FlowStatisticsTest, checkMultiPhaseFluxStatisticsMol ) setupProblemFromXML( problem, testSet.inputs.xmlInput.data() ); TimeStepChecker & timeStepChecker = problem.getGroupByPath< TimeStepChecker >( testSet.inputs.timeStepCheckerPath ); - timeStepChecker.setCheckTimeStepFunction( [&]( real64 const time_n ) + timeStepChecker.setTimeStepCheckingFunction( [&]( real64 const time_n ) { integer const timestepId = timeStepChecker.getTestedTimeStepCount(); checkTimeStepStats( testSet, time_n, timestepId ); diff --git a/src/coreComponents/unitTests/testingUtilities/CMakeLists.txt b/src/coreComponents/unitTests/testingUtilities/CMakeLists.txt new file mode 100644 index 00000000000..f6d8d8632b0 --- /dev/null +++ b/src/coreComponents/unitTests/testingUtilities/CMakeLists.txt @@ -0,0 +1,33 @@ +# +# Specify all headers +# +set( testingUtilities_headers + TestingTasks.hpp + ) + +# +# Specify all sources +# +set( testingUtilities_sources + TestingTasks.cpp + ) + +# +# Specify all dependencies +# +set( dependencyList ${parallelDeps} gtest ) + +if ( GEOSX_BUILD_SHARED_LIBS ) + list( APPEND dependencyList geosx_core ) +else() + list( APPEND dependencyList ${geosx_core_libs} ) +endif() + +blt_add_library( NAME testingUtilities + SOURCES ${testingUtilities_sources} + HEADERS ${testingUtilities_headers} + DEPENDS_ON ${dependencyList} + OBJECT ${GEOSX_BUILD_OBJ_LIBS} + ) + +target_include_directories( testingUtilities PUBLIC ${CMAKE_SOURCE_DIR}/coreComponents ) diff --git a/src/coreComponents/unitTests/testingUtilities/TestingTasks.cpp b/src/coreComponents/unitTests/testingUtilities/TestingTasks.cpp new file mode 100644 index 00000000000..25dbf64d7bb --- /dev/null +++ b/src/coreComponents/unitTests/testingUtilities/TestingTasks.cpp @@ -0,0 +1,32 @@ +/* + * ------------------------------------------------------------------------------------------------------------ + * SPDX-License-Identifier: LGPL-2.1-only + * + * Copyright (c) 2018-2020 Lawrence Livermore National Security LLC + * Copyright (c) 2018-2020 The Board of Trustees of the Leland Stanford Junior University + * Copyright (c) 2018-2020 TotalEnergies + * Copyright (c) 2019- GEOSX Contributors + * All rights reserved + * + * See top level LICENSE, COPYRIGHT, CONTRIBUTORS, NOTICE, and ACKNOWLEDGEMENTS files for details. + * ------------------------------------------------------------------------------------------------------------ + */ + +/** + * @file TestingTasks.cpp + */ + +#include "TestingTasks.hpp" + +namespace geos +{ +namespace testing +{ + + +REGISTER_CATALOG_ENTRY( TaskBase, TimeStepChecker, string const &, geos::dataRepository::Group * const ) + + +} // namespace testing + +} // namespace geos diff --git a/src/coreComponents/unitTests/testingUtilities/TestingTasks.hpp b/src/coreComponents/unitTests/testingUtilities/TestingTasks.hpp new file mode 100644 index 00000000000..a84a2db5988 --- /dev/null +++ b/src/coreComponents/unitTests/testingUtilities/TestingTasks.hpp @@ -0,0 +1,93 @@ +/* + * ------------------------------------------------------------------------------------------------------------ + * SPDX-License-Identifier: LGPL-2.1-only + * + * Copyright (c) 2018-2020 Lawrence Livermore National Security LLC + * Copyright (c) 2018-2020 The Board of Trustees of the Leland Stanford Junior University + * Copyright (c) 2018-2020 TotalEnergies + * Copyright (c) 2019- GEOSX Contributors + * All rights reserved + * + * See top level LICENSE, COPYRIGHT, CONTRIBUTORS, NOTICE, and ACKNOWLEDGEMENTS files for details. + * ------------------------------------------------------------------------------------------------------------ + */ + +/* + * @file TestingTasks.hpp + */ + +#ifndef GEOS_EVENTS_TASKS_TESTINGTASKS_HPP_ +#define GEOS_EVENTS_TASKS_TESTINGTASKS_HPP_ + +#include "events/tasks/TaskBase.hpp" +#include "codingUtilities/UnitTestUtilities.hpp" + +namespace geos +{ +namespace testing +{ + + +/** + * @brief This Task allows to do checks each timestep during the simulation by calling a provided functor. + * To be executed, it must be - as every task - declared in the provided xmlInput within the Tasks node and called by an even. + * As this Group is designed for developpers and not user oriented, it should not appear in the documentation nor in the xsd. + * Question: could this task be used in the integratedTests ? + */ +class TimeStepChecker : public TaskBase +{ +public: + /** + * @brief Construct a new TimeStepChecker Task + * @param name name in xsd + * @param parent parent group in hierarchy + */ + TimeStepChecker( string const & name, Group * const parent ): + TaskBase( name, parent ) + {} + + //TODO : remove ? + void postProcessInput() override + {} + + /** + * @brief Set the functor that must be called each time this Task is executed. + * @param func the functor to execute + */ + void setTimeStepCheckingFunction( std::function< void(real64) > func ) + { m_checkTimeStepFunction = std::function< void(real64) >( func ); } + + /** + * @return Get the tested time-step count + */ + integer getTestedTimeStepCount() const + { return m_timestepId; } + + static string catalogName() { return "TimeStepChecker"; } + + virtual bool execute( real64 const time_n, + real64 const GEOS_UNUSED_PARAM( dt ), + integer const GEOS_UNUSED_PARAM( cycleNumber ), + integer const GEOS_UNUSED_PARAM( eventCounter ), + real64 const GEOS_UNUSED_PARAM( eventProgress ), + DomainPartition & GEOS_UNUSED_PARAM( domain ) ) + { + EXPECT_TRUE( m_checkTimeStepFunction ); + m_checkTimeStepFunction( time_n ); + + ++m_timestepId; + return false; + } + + +private: + std::function< void(real64) > m_checkTimeStepFunction; + int m_timestepId = 0; +}; + + +} // namespace testing + +} // namespace geos + +#endif //GEOS_EVENTS_TASKS_TESTINGTASKS_HPP_ From 3883d394fdca20a1389b2b3818310f17cec560df Mon Sep 17 00:00:00 2001 From: MelReyCG Date: Wed, 3 Apr 2024 17:18:14 +0200 Subject: [PATCH 92/98] moving some definition to cpp --- .../testingUtilities/TestingTasks.cpp | 18 ++++++++++++ .../testingUtilities/TestingTasks.hpp | 29 +++++-------------- 2 files changed, 26 insertions(+), 21 deletions(-) diff --git a/src/coreComponents/unitTests/testingUtilities/TestingTasks.cpp b/src/coreComponents/unitTests/testingUtilities/TestingTasks.cpp index 25dbf64d7bb..b948a406071 100644 --- a/src/coreComponents/unitTests/testingUtilities/TestingTasks.cpp +++ b/src/coreComponents/unitTests/testingUtilities/TestingTasks.cpp @@ -24,6 +24,24 @@ namespace testing { +TimeStepChecker::TimeStepChecker( string const & name, Group * const parent ): + TaskBase( name, parent ) +{} + +bool TimeStepChecker::execute( real64 const time_n, + real64 const GEOS_UNUSED_PARAM( dt ), + integer const GEOS_UNUSED_PARAM( cycleNumber ), + integer const GEOS_UNUSED_PARAM( eventCounter ), + real64 const GEOS_UNUSED_PARAM( eventProgress ), + DomainPartition & GEOS_UNUSED_PARAM( domain ) ) +{ + EXPECT_TRUE( m_checkTimeStepFunction ); + m_checkTimeStepFunction( time_n ); + + ++m_timestepId; + return false; +} + REGISTER_CATALOG_ENTRY( TaskBase, TimeStepChecker, string const &, geos::dataRepository::Group * const ) diff --git a/src/coreComponents/unitTests/testingUtilities/TestingTasks.hpp b/src/coreComponents/unitTests/testingUtilities/TestingTasks.hpp index a84a2db5988..f52a9e54834 100644 --- a/src/coreComponents/unitTests/testingUtilities/TestingTasks.hpp +++ b/src/coreComponents/unitTests/testingUtilities/TestingTasks.hpp @@ -42,13 +42,7 @@ class TimeStepChecker : public TaskBase * @param name name in xsd * @param parent parent group in hierarchy */ - TimeStepChecker( string const & name, Group * const parent ): - TaskBase( name, parent ) - {} - - //TODO : remove ? - void postProcessInput() override - {} + TimeStepChecker( string const & name, Group * const parent ); /** * @brief Set the functor that must be called each time this Task is executed. @@ -63,22 +57,15 @@ class TimeStepChecker : public TaskBase integer getTestedTimeStepCount() const { return m_timestepId; } + /** + * @brief Catalog name interface + * @return This type's catalog name + */ static string catalogName() { return "TimeStepChecker"; } - virtual bool execute( real64 const time_n, - real64 const GEOS_UNUSED_PARAM( dt ), - integer const GEOS_UNUSED_PARAM( cycleNumber ), - integer const GEOS_UNUSED_PARAM( eventCounter ), - real64 const GEOS_UNUSED_PARAM( eventProgress ), - DomainPartition & GEOS_UNUSED_PARAM( domain ) ) - { - EXPECT_TRUE( m_checkTimeStepFunction ); - m_checkTimeStepFunction( time_n ); - - ++m_timestepId; - return false; - } - + virtual bool execute( real64 time_n, real64 dt, integer cycleNumber, + integer eventCounter, real64 eventProgress, + DomainPartition & domain ); private: std::function< void(real64) > m_checkTimeStepFunction; From 8f72e9f68cba7e9e2988b9e5e0ecebfdd9b1f269 Mon Sep 17 00:00:00 2001 From: MelReyCG Date: Wed, 3 Apr 2024 17:18:25 +0200 Subject: [PATCH 93/98] uncrustify :s --- src/coreComponents/codingUtilities/UnitTestUtilities.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/coreComponents/codingUtilities/UnitTestUtilities.hpp b/src/coreComponents/codingUtilities/UnitTestUtilities.hpp index ea7a2e4bf04..6eddbf6e1ce 100644 --- a/src/coreComponents/codingUtilities/UnitTestUtilities.hpp +++ b/src/coreComponents/codingUtilities/UnitTestUtilities.hpp @@ -83,7 +83,7 @@ constexpr real64 DEFAULT_ABS_TOL = 1E-12; constexpr real64 DEFAULT_REL_TOL = std::numeric_limits< real64 >::epsilon(); inline ::testing::AssertionResult checkRelativeErrorFormat( const char *, const char *, const char *, const char *, - real64 const v1, real64 const v2, real64 const relTol, real64 const absTol ) + real64 const v1, real64 const v2, real64 const relTol, real64 const absTol ) { real64 const delta = std::abs( v1 - v2 ); real64 const value = std::max( std::abs( v1 ), std::abs( v2 ) ); @@ -100,7 +100,7 @@ inline ::testing::AssertionResult checkRelativeErrorFormat( const char *, const } inline ::testing::AssertionResult checkRelativeErrorFormat( char const * a, char const * b, char const * c, - real64 const v1, real64 const v2, real64 const relTol ) + real64 const v1, real64 const v2, real64 const relTol ) { return checkRelativeErrorFormat( a, b, c, "DEFAULT_ABS_TOL", v1, v2, relTol, DEFAULT_ABS_TOL ); } inline void checkRelativeError( real64 const v1, real64 const v2, real64 const relTol ) From 43fe9f4190c605facc637b2725f051f64003900f Mon Sep 17 00:00:00 2001 From: MelReyCG Date: Tue, 4 Jun 2024 16:15:51 +0200 Subject: [PATCH 94/98] few adjustments --- .../fieldSpecification/SourceFluxStatistics.cpp | 4 ++-- .../fieldSpecification/SourceFluxStatistics.hpp | 15 +++++++-------- .../schema/docs/SourceFluxStatistics.rst | 2 +- src/coreComponents/schema/schema.xsd | 2 +- 4 files changed, 11 insertions(+), 12 deletions(-) diff --git a/src/coreComponents/fieldSpecification/SourceFluxStatistics.cpp b/src/coreComponents/fieldSpecification/SourceFluxStatistics.cpp index a6ef615389e..bdd5d02bc47 100644 --- a/src/coreComponents/fieldSpecification/SourceFluxStatistics.cpp +++ b/src/coreComponents/fieldSpecification/SourceFluxStatistics.cpp @@ -41,7 +41,7 @@ SourceFluxStatsAggregator::SourceFluxStatsAggregator( const string & name, setInputFlag( InputFlags::REQUIRED ). setSizedFromParent( 0 ). setDescription( GEOS_FMT( "Name(s) array of the {0}(s) for which we want the statistics. " - "Use \"all\" to target all {0}.", + "Use \"*\" to target all {0}.", SourceFluxBoundaryCondition::catalogName() ) ); } @@ -50,7 +50,7 @@ void SourceFluxStatsAggregator::postProcessInput() Base::postProcessInput(); FieldSpecificationManager & fsManager = FieldSpecificationManager::getInstance(); - if( m_fluxNames.size() == 1 && m_fluxNames[0] == "all" ) + if( m_fluxNames.size() == 1 && m_fluxNames[0] == "*" ) { m_fluxNames.clear(); fsManager.forSubGroups< SourceFluxBoundaryCondition >( [&]( SourceFluxBoundaryCondition & sourceFlux ) diff --git a/src/coreComponents/fieldSpecification/SourceFluxStatistics.hpp b/src/coreComponents/fieldSpecification/SourceFluxStatistics.hpp index 6f0a0fca173..7f4245d3f32 100644 --- a/src/coreComponents/fieldSpecification/SourceFluxStatistics.hpp +++ b/src/coreComponents/fieldSpecification/SourceFluxStatistics.hpp @@ -22,7 +22,6 @@ #include "physicsSolvers/FieldStatisticsBase.hpp" #include "physicsSolvers/fluidFlow/FlowSolverBase.hpp" -class SourceFluxBoundaryCondition; namespace geos { @@ -32,7 +31,7 @@ namespace geos * * Task class allowing for the computation of aggregate statistics of SourceFluxBoundaryCondition */ -class SourceFluxStatsAggregator : public FieldStatisticsBase< FlowSolverBase > +class SourceFluxStatsAggregator final : public FieldStatisticsBase< FlowSolverBase > { public: @@ -104,6 +103,7 @@ class SourceFluxStatsAggregator : public FieldStatisticsBase< FlowSolverBase > /** * @brief Finalize the period statistics of each timestep gathering and render data over all mpi ranks. * The result can be read by the data() assessor. + * @note This method must be synchronously called by all MPI ranks. */ void finalizePeriod(); @@ -303,12 +303,6 @@ class SourceFluxStatsAggregator : public FieldStatisticsBase< FlowSolverBase > constexpr inline static string_view fluxSetWrapperString() { return "flux_set"; } }; -protected: - - /** - * @copydoc Group::postProcessInput() - */ - void postProcessInput() override; private: using Base = FieldStatisticsBase< FlowSolverBase >; @@ -321,6 +315,11 @@ class SourceFluxStatsAggregator : public FieldStatisticsBase< FlowSolverBase > */ void registerDataOnMesh( Group & meshBodies ) override; + /** + * @copydoc Group::postProcessInput() + */ + void postProcessInput() override; + dataRepository::Wrapper< WrappedStats > & registerWrappedStats( Group & group, string_view fluxName, string_view elementSetName ); diff --git a/src/coreComponents/schema/docs/SourceFluxStatistics.rst b/src/coreComponents/schema/docs/SourceFluxStatistics.rst index fce53adc4ed..15ce96d6c08 100644 --- a/src/coreComponents/schema/docs/SourceFluxStatistics.rst +++ b/src/coreComponents/schema/docs/SourceFluxStatistics.rst @@ -4,7 +4,7 @@ Name Type Default Description ============== ================== ======== ===================================================================================================================================================================================== flowSolverName groupNameRef required Name of the flow solver -fluxNames groupNameRef_array required Name(s) array of the SourceFlux(s) for which we want the statistics. Use "all" to target all SourceFlux. +fluxNames groupNameRef_array required Name(s) array of the SourceFlux(s) for which we want the statistics. Use "*" to target all SourceFlux. logLevel integer 0 | Log level | - Log Level 1 outputs the sum of all SourceFlux(s) produced rate & mass, | - Log Level 2 details values for each SourceFlux, diff --git a/src/coreComponents/schema/schema.xsd b/src/coreComponents/schema/schema.xsd index 95b2eac471a..b507275e3aa 100644 --- a/src/coreComponents/schema/schema.xsd +++ b/src/coreComponents/schema/schema.xsd @@ -3741,7 +3741,7 @@ For the energy balance equation, the mass flux is multipied by the enthalpy in t - + - +