From 95b0538a008fb6af1f0a8860e3454f539c0f22c9 Mon Sep 17 00:00:00 2001 From: DENEL Bertrand Date: Wed, 12 Aug 2026 22:31:55 -0500 Subject: [PATCH 1/3] Fixed test 240 --- .../wellsTests/testReservoirThermalSinglePhaseMSWells.cpp | 3 +++ .../testReservoirThermalSinglePhaseMSWells_RateInj.cpp | 3 +++ .../wellsTests/testThermalEstimatorInjWell.cpp | 3 +++ .../wellsTests/testThermalEstimatorProdWell.cpp | 3 +++ .../integrationTests/wellsTests/testThermalInjWell.cpp | 3 +++ .../integrationTests/wellsTests/testThermalProdWell.cpp | 3 +++ .../testThermalReservoirCompositionalMultiphaseMSWells.cpp | 3 +++ 7 files changed, 21 insertions(+) diff --git a/src/coreComponents/integrationTests/wellsTests/testReservoirThermalSinglePhaseMSWells.cpp b/src/coreComponents/integrationTests/wellsTests/testReservoirThermalSinglePhaseMSWells.cpp index d473b995dee..b38a92df1fd 100644 --- a/src/coreComponents/integrationTests/wellsTests/testReservoirThermalSinglePhaseMSWells.cpp +++ b/src/coreComponents/integrationTests/wellsTests/testReservoirThermalSinglePhaseMSWells.cpp @@ -185,6 +185,9 @@ template< typename T, typename COL_INDEX > void printCompareLocalMatrices( CRSMatrixView< T const, COL_INDEX const > const & matrix1, CRSMatrixView< T const, COL_INDEX const > const & matrix2, std::string const & testName ) { + matrix1.move( hostMemorySpace, false ); + matrix2.move( hostMemorySpace, false ); + std::ofstream omat1( testName+".csv" ); diff --git a/src/coreComponents/integrationTests/wellsTests/testReservoirThermalSinglePhaseMSWells_RateInj.cpp b/src/coreComponents/integrationTests/wellsTests/testReservoirThermalSinglePhaseMSWells_RateInj.cpp index 8e4776c9730..e6060275b8e 100644 --- a/src/coreComponents/integrationTests/wellsTests/testReservoirThermalSinglePhaseMSWells_RateInj.cpp +++ b/src/coreComponents/integrationTests/wellsTests/testReservoirThermalSinglePhaseMSWells_RateInj.cpp @@ -258,6 +258,9 @@ template< typename T, typename COL_INDEX > void printCompareLocalMatrices( CRSMatrixView< T const, COL_INDEX const > const & matrix1, CRSMatrixView< T const, COL_INDEX const > const & matrix2, std::string const & testName ) { + matrix1.move( hostMemorySpace, false ); + matrix2.move( hostMemorySpace, false ); + std::ofstream omat1( testName+".csv" ); diff --git a/src/coreComponents/integrationTests/wellsTests/testThermalEstimatorInjWell.cpp b/src/coreComponents/integrationTests/wellsTests/testThermalEstimatorInjWell.cpp index 7bd3df651c5..cc0c854fc47 100644 --- a/src/coreComponents/integrationTests/wellsTests/testThermalEstimatorInjWell.cpp +++ b/src/coreComponents/integrationTests/wellsTests/testThermalEstimatorInjWell.cpp @@ -300,6 +300,9 @@ template< typename T, typename COL_INDEX > void printCompareLocalMatrices( CRSMatrixView< T const, COL_INDEX const > const & matrix1, CRSMatrixView< T const, COL_INDEX const > const & matrix2, std::string const & testName ) { + matrix1.move( hostMemorySpace, false ); + matrix2.move( hostMemorySpace, false ); + std::ofstream omat1( testName+".csv" ); diff --git a/src/coreComponents/integrationTests/wellsTests/testThermalEstimatorProdWell.cpp b/src/coreComponents/integrationTests/wellsTests/testThermalEstimatorProdWell.cpp index ed45f48f4ed..b12bd580a72 100644 --- a/src/coreComponents/integrationTests/wellsTests/testThermalEstimatorProdWell.cpp +++ b/src/coreComponents/integrationTests/wellsTests/testThermalEstimatorProdWell.cpp @@ -302,6 +302,9 @@ template< typename T, typename COL_INDEX > void printCompareLocalMatrices( CRSMatrixView< T const, COL_INDEX const > const & matrix1, CRSMatrixView< T const, COL_INDEX const > const & matrix2, std::string const & testName ) { + matrix1.move( hostMemorySpace, false ); + matrix2.move( hostMemorySpace, false ); + std::ofstream omat1( testName+".csv" ); diff --git a/src/coreComponents/integrationTests/wellsTests/testThermalInjWell.cpp b/src/coreComponents/integrationTests/wellsTests/testThermalInjWell.cpp index 77b7b1d60ae..5298106ae6d 100644 --- a/src/coreComponents/integrationTests/wellsTests/testThermalInjWell.cpp +++ b/src/coreComponents/integrationTests/wellsTests/testThermalInjWell.cpp @@ -291,6 +291,9 @@ template< typename T, typename COL_INDEX > void printCompareLocalMatrices( CRSMatrixView< T const, COL_INDEX const > const & matrix1, CRSMatrixView< T const, COL_INDEX const > const & matrix2, std::string const & testName ) { + matrix1.move( hostMemorySpace, false ); + matrix2.move( hostMemorySpace, false ); + std::ofstream omat1( testName+".csv" ); diff --git a/src/coreComponents/integrationTests/wellsTests/testThermalProdWell.cpp b/src/coreComponents/integrationTests/wellsTests/testThermalProdWell.cpp index fda57774f2b..d4655547977 100644 --- a/src/coreComponents/integrationTests/wellsTests/testThermalProdWell.cpp +++ b/src/coreComponents/integrationTests/wellsTests/testThermalProdWell.cpp @@ -291,6 +291,9 @@ template< typename T, typename COL_INDEX > void printCompareLocalMatrices( CRSMatrixView< T const, COL_INDEX const > const & matrix1, CRSMatrixView< T const, COL_INDEX const > const & matrix2, std::string const & testName ) { + matrix1.move( hostMemorySpace, false ); + matrix2.move( hostMemorySpace, false ); + std::ofstream omat1( testName+".csv" ); diff --git a/src/coreComponents/integrationTests/wellsTests/testThermalReservoirCompositionalMultiphaseMSWells.cpp b/src/coreComponents/integrationTests/wellsTests/testThermalReservoirCompositionalMultiphaseMSWells.cpp index 1ee3ad577c3..e6d99c8b4a6 100644 --- a/src/coreComponents/integrationTests/wellsTests/testThermalReservoirCompositionalMultiphaseMSWells.cpp +++ b/src/coreComponents/integrationTests/wellsTests/testThermalReservoirCompositionalMultiphaseMSWells.cpp @@ -328,6 +328,9 @@ template< typename T, typename COL_INDEX > void printCompareLocalMatrices( CRSMatrixView< T const, COL_INDEX const > const & matrix1, CRSMatrixView< T const, COL_INDEX const > const & matrix2, std::string const & testName ) { + matrix1.move( hostMemorySpace, false ); + matrix2.move( hostMemorySpace, false ); + std::ofstream omat1( testName+".csv" ); From 03ab46dc61a4f32788aa52dc12eccdf415fe459b Mon Sep 17 00:00:00 2001 From: DENEL Bertrand Date: Wed, 12 Aug 2026 22:37:47 -0500 Subject: [PATCH 2/3] Fixed test 241 --- .../integrationTests/wellsTests/testThermalEstimatorInjWell.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/coreComponents/integrationTests/wellsTests/testThermalEstimatorInjWell.cpp b/src/coreComponents/integrationTests/wellsTests/testThermalEstimatorInjWell.cpp index cc0c854fc47..42f34967590 100644 --- a/src/coreComponents/integrationTests/wellsTests/testThermalEstimatorInjWell.cpp +++ b/src/coreComponents/integrationTests/wellsTests/testThermalEstimatorInjWell.cpp @@ -719,7 +719,6 @@ void testWellEstimatorNumericalJacobian( CompositionalMultiphaseReservoirAndWell residual.zero(); jacobian.zero(); assembleFunction( jacobian.toViewConstSizes(), residual.toView() ); - std::cout << "tjb dq iwelem " << iwelem << " " << (residual[25] - residualOrig[25])/dRate << std::endl; fillNumericalJacobian( residual.toViewConst(), residualOrig.toViewConst(), wellElemDofNumber[iwelem] + compositionalMultiphaseWellKernels::ColOffset::DCOMP + NC, From 8861799493361cb3486ed86ab0ca375260a9727b Mon Sep 17 00:00:00 2001 From: DENEL Bertrand Date: Thu, 13 Aug 2026 12:52:41 -0500 Subject: [PATCH 3/3] Fixed test 245 --- .../SinglePhaseWellConstraintKernels.hpp | 38 +++++++++++-------- 1 file changed, 23 insertions(+), 15 deletions(-) diff --git a/src/coreComponents/physicsSolvers/fluidFlow/wells/kernels/SinglePhaseWellConstraintKernels.hpp b/src/coreComponents/physicsSolvers/fluidFlow/wells/kernels/SinglePhaseWellConstraintKernels.hpp index 72d0e7878c5..7d4388d8b75 100644 --- a/src/coreComponents/physicsSolvers/fluidFlow/wells/kernels/SinglePhaseWellConstraintKernels.hpp +++ b/src/coreComponents/physicsSolvers/fluidFlow/wells/kernels/SinglePhaseWellConstraintKernels.hpp @@ -95,6 +95,11 @@ struct ConstraintHelper wellElemGravCoef, &dControlEqn, &iwelemRef, + localRhs, + localMatrix, + controlEqn, + eqnRowIndex, + dofColIndices, &refGravCoef] ( localIndex const ) { real64 const diffGravCoef = refGravCoef - wellElemGravCoef[iwelemRef]; @@ -103,14 +108,13 @@ struct ConstraintHelper { dControlEqn[COFFSET_WJ::dT] = dDensity[iwelemRef][0][Deriv::dT] * diffGravCoef; } + // add solver matrices + localRhs[eqnRowIndex] += controlEqn; + localMatrix.addToRowBinarySearchUnsorted< serialAtomic >( eqnRowIndex, + dofColIndices, + dControlEqn, + COFFSET_WJ::nDer ); } ); - - // add solver matrices - localRhs[eqnRowIndex] += controlEqn; - localMatrix.addToRowBinarySearchUnsorted< serialAtomic >( eqnRowIndex, - dofColIndices, - dControlEqn, - COFFSET_WJ::nDer ); } template< template< typename U > class T, typename U=VolumeRateConstraint > static void assembleConstraintEquation( real64 const & time_n, @@ -166,7 +170,12 @@ struct ConstraintHelper dDensity, &dControlEqn, &useSurfaceConditions, - &iwelemRef] ( localIndex const ) + &iwelemRef, + localRhs, + localMatrix, + controlEqn, + eqnRowIndex, + dofColIndices] ( localIndex const ) { // compute the inverse of the total density and derivatives real64 const densInv = 1.0 / density[iwelemRef][0]; @@ -178,14 +187,13 @@ struct ConstraintHelper dControlEqn[COFFSET_WJ::dT] = -( useSurfaceConditions == 0 ) * dDensity[iwelemRef][0][Deriv::dT] * currentVolRate * densInv; } + // add solver matrices + localRhs[eqnRowIndex] += controlEqn; + localMatrix.addToRowBinarySearchUnsorted< serialAtomic >( eqnRowIndex, + dofColIndices, + dControlEqn, + COFFSET_WJ::nDer ); } ); - - // add solver matrices - localRhs[eqnRowIndex] += controlEqn; - localMatrix.addToRowBinarySearchUnsorted< serialAtomic >( eqnRowIndex, - dofColIndices, - dControlEqn, - COFFSET_WJ::nDer ); } };