From 349db6c8a628345dc600511459c36f81c8f136a7 Mon Sep 17 00:00:00 2001 From: "Victor A. P. Magri" Date: Tue, 20 Jan 2026 20:48:28 -0800 Subject: [PATCH 1/4] Improve MGR recipes for thermal --- .../linearAlgebra/interfaces/hypre/HypreUtils.hpp | 3 ++- .../mgrStrategies/ThermalCompositionalMultiphaseFVM.hpp | 4 ++-- .../ThermalCompositionalMultiphaseReservoirFVM.hpp | 9 ++++----- .../mgrStrategies/ThermalMultiphasePoromechanics.hpp | 4 ++-- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/coreComponents/linearAlgebra/interfaces/hypre/HypreUtils.hpp b/src/coreComponents/linearAlgebra/interfaces/hypre/HypreUtils.hpp index f61c251a0e6..0b64f73f1de 100644 --- a/src/coreComponents/linearAlgebra/interfaces/hypre/HypreUtils.hpp +++ b/src/coreComponents/linearAlgebra/interfaces/hypre/HypreUtils.hpp @@ -552,7 +552,8 @@ enum class MGRRestrictionType : HYPRE_Int approximateInverse = 3, //!< Approximate inverse blockJacobi = 12, //!< Block-Jacobi cprLike = 13, //!< CPR-like restriction - blockColLumped = 14 //!< Block column-lumped approximation + blockColLumped = 14, //!< Block column-lumped approximation + partialColLumped = 15 //!< Partial column-lumped approximation }; /** diff --git a/src/coreComponents/linearAlgebra/interfaces/hypre/mgrStrategies/ThermalCompositionalMultiphaseFVM.hpp b/src/coreComponents/linearAlgebra/interfaces/hypre/mgrStrategies/ThermalCompositionalMultiphaseFVM.hpp index 08800ab2d64..628e6eb1753 100644 --- a/src/coreComponents/linearAlgebra/interfaces/hypre/mgrStrategies/ThermalCompositionalMultiphaseFVM.hpp +++ b/src/coreComponents/linearAlgebra/interfaces/hypre/mgrStrategies/ThermalCompositionalMultiphaseFVM.hpp @@ -77,8 +77,8 @@ class ThermalCompositionalMultiphaseFVM : public MGRStrategyBase< 2 > m_levelFRelaxType[1] = MGRFRelaxationType::none; m_levelInterpType[1] = MGRInterpolationType::injection; - m_levelRestrictType[1] = MGRRestrictionType::injection; - m_levelCoarseGridMethod[1] = MGRCoarseGridMethod::cprLikeBlockDiag; // Non-Galerkin Quasi-IMPES CPR + m_levelRestrictType[1] = MGRRestrictionType::partialColLumped; // True-IMPES for thermal + m_levelCoarseGridMethod[1] = MGRCoarseGridMethod::galerkin; m_levelGlobalSmootherType[1] = MGRGlobalSmootherType::ilu0; m_levelGlobalSmootherIters[1] = 1; } diff --git a/src/coreComponents/linearAlgebra/interfaces/hypre/mgrStrategies/ThermalCompositionalMultiphaseReservoirFVM.hpp b/src/coreComponents/linearAlgebra/interfaces/hypre/mgrStrategies/ThermalCompositionalMultiphaseReservoirFVM.hpp index 09b5b832035..848265a571b 100644 --- a/src/coreComponents/linearAlgebra/interfaces/hypre/mgrStrategies/ThermalCompositionalMultiphaseReservoirFVM.hpp +++ b/src/coreComponents/linearAlgebra/interfaces/hypre/mgrStrategies/ThermalCompositionalMultiphaseReservoirFVM.hpp @@ -98,11 +98,10 @@ class ThermalCompositionalMultiphaseReservoirFVM : public MGRStrategyBase< 3 > m_levelGlobalSmootherType[1] = MGRGlobalSmootherType::blockGaussSeidel; m_levelGlobalSmootherIters[1] = 1; - m_levelFRelaxType[2] = MGRFRelaxationType::jacobi; - m_levelFRelaxIters[2] = 1; - m_levelInterpType[2] = MGRInterpolationType::injection; // Injection - m_levelRestrictType[2] = MGRRestrictionType::injection; - m_levelCoarseGridMethod[2] = MGRCoarseGridMethod::cprLikeBlockDiag; // Non-Galerkin Quasi-IMPES CPR + m_levelFRelaxType[2] = MGRFRelaxationType::none; + m_levelInterpType[2] = MGRInterpolationType::injection; + m_levelRestrictType[2] = MGRRestrictionType::partialColLumped; // True-IMPES for thermal + m_levelCoarseGridMethod[2] = MGRCoarseGridMethod::galerkin; m_levelGlobalSmootherType[2] = MGRGlobalSmootherType::ilu0; m_levelGlobalSmootherIters[2] = 1; } diff --git a/src/coreComponents/linearAlgebra/interfaces/hypre/mgrStrategies/ThermalMultiphasePoromechanics.hpp b/src/coreComponents/linearAlgebra/interfaces/hypre/mgrStrategies/ThermalMultiphasePoromechanics.hpp index a276456ee32..ba58fad0c7a 100644 --- a/src/coreComponents/linearAlgebra/interfaces/hypre/mgrStrategies/ThermalMultiphasePoromechanics.hpp +++ b/src/coreComponents/linearAlgebra/interfaces/hypre/mgrStrategies/ThermalMultiphasePoromechanics.hpp @@ -93,8 +93,8 @@ class ThermalMultiphasePoromechanics : public MGRStrategyBase< 3 > // Level 2 m_levelFRelaxType[2] = MGRFRelaxationType::none; m_levelInterpType[2] = MGRInterpolationType::injection; - m_levelRestrictType[2] = MGRRestrictionType::injection; - m_levelCoarseGridMethod[2] = MGRCoarseGridMethod::cprLikeBlockDiag; + m_levelRestrictType[2] = MGRRestrictionType::partialColLumped; // True-IMPES for thermal + m_levelCoarseGridMethod[2] = MGRCoarseGridMethod::galerkin; m_levelGlobalSmootherType[2] = MGRGlobalSmootherType::ilu0; m_levelGlobalSmootherIters[2] = 1; } From 5bfd2e3160873d1fc09bb4d17f84fe3d495d71c0 Mon Sep 17 00:00:00 2001 From: "Victor A. P. Magri" Date: Wed, 21 Jan 2026 11:41:26 -0500 Subject: [PATCH 2/4] API fixes --- .../linearAlgebra/interfaces/hypre/HypreMatrix.cpp | 2 +- .../linearAlgebra/interfaces/hypre/HyprePreconditioner.cpp | 2 +- .../linearAlgebra/interfaces/hypre/HypreUtils.cpp | 2 +- .../linearAlgebra/interfaces/hypre/HypreVector.cpp | 6 +++--- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/coreComponents/linearAlgebra/interfaces/hypre/HypreMatrix.cpp b/src/coreComponents/linearAlgebra/interfaces/hypre/HypreMatrix.cpp index 09f90cfafbd..3457a82452f 100644 --- a/src/coreComponents/linearAlgebra/interfaces/hypre/HypreMatrix.cpp +++ b/src/coreComponents/linearAlgebra/interfaces/hypre/HypreMatrix.cpp @@ -704,7 +704,7 @@ void HypreMatrix::multiplyP1tAP2( HypreMatrix const & P1, HYPRE_ParCSRMatrix const dst_parcsr = hypre_ParCSRMatrixRAPKT( P1.unwrapped(), m_parcsr_mat, P2.unwrapped(), - 0 ); + 0, 1 ); dst.parCSRtoIJ( dst_parcsr ); } diff --git a/src/coreComponents/linearAlgebra/interfaces/hypre/HyprePreconditioner.cpp b/src/coreComponents/linearAlgebra/interfaces/hypre/HyprePreconditioner.cpp index cc16aaaf59b..fb59fffe9a7 100644 --- a/src/coreComponents/linearAlgebra/interfaces/hypre/HyprePreconditioner.cpp +++ b/src/coreComponents/linearAlgebra/interfaces/hypre/HyprePreconditioner.cpp @@ -410,7 +410,7 @@ void HyprePreconditioner::setup( Matrix const & mat ) m_precond->destroy( m_precond->ptr ); } #if defined(GEOS_USE_SUPERLU_DIST) - hypre_SLUDistSetup( &m_precond->ptr, precondMat.unwrapped(), 0 ); + hypre_SLUDistSetup( &m_precond->ptr, precondMat.unwrapped(), nullptr, nullptr ); #endif } } diff --git a/src/coreComponents/linearAlgebra/interfaces/hypre/HypreUtils.cpp b/src/coreComponents/linearAlgebra/interfaces/hypre/HypreUtils.cpp index f2dba640c9c..9fee0322379 100644 --- a/src/coreComponents/linearAlgebra/interfaces/hypre/HypreUtils.cpp +++ b/src/coreComponents/linearAlgebra/interfaces/hypre/HypreUtils.cpp @@ -125,7 +125,7 @@ HYPRE_Int SuperLUDistSolve( HYPRE_Solver solver, { GEOS_UNUSED_VAR( A ); #if defined(GEOS_USE_SUPERLU_DIST) - return hypre_SLUDistSolve( solver, b, x ); + return hypre_SLUDistSolve( solver, A, b, x ); #else GEOS_UNUSED_VAR( solver ); GEOS_UNUSED_VAR( b ); diff --git a/src/coreComponents/linearAlgebra/interfaces/hypre/HypreVector.cpp b/src/coreComponents/linearAlgebra/interfaces/hypre/HypreVector.cpp index 56b3009022c..fc01fd40996 100644 --- a/src/coreComponents/linearAlgebra/interfaces/hypre/HypreVector.cpp +++ b/src/coreComponents/linearAlgebra/interfaces/hypre/HypreVector.cpp @@ -161,7 +161,7 @@ void HypreVector::reciprocal() { GEOS_LAI_ASSERT( ready() ); - GEOS_LAI_CHECK_ERROR( HYPRE_ParVectorPointwiseInverse( m_vec, &m_vec ) ); + GEOS_LAI_CHECK_ERROR( hypre_ParVectorPointwiseInverse( m_vec, &m_vec ) ); touch(); } @@ -228,7 +228,7 @@ void HypreVector::pointwiseProduct( HypreVector const & x ) GEOS_LAI_ASSERT( x.ready() ); GEOS_LAI_ASSERT_EQ( localSize(), x.localSize() ); - GEOS_LAI_CHECK_ERROR( HYPRE_ParVectorPointwiseProduct( x.m_vec, m_vec, &m_vec ) ); + GEOS_LAI_CHECK_ERROR( hypre_ParVectorPointwiseProduct( x.m_vec, m_vec, &m_vec ) ); touch(); } @@ -238,7 +238,7 @@ void HypreVector::pointwiseDivide( HypreVector const & x ) GEOS_LAI_ASSERT( x.ready() ); GEOS_LAI_ASSERT_EQ( localSize(), x.localSize() ); - GEOS_LAI_CHECK_ERROR( HYPRE_ParVectorPointwiseDivision( x.m_vec, m_vec, &m_vec ) ); + GEOS_LAI_CHECK_ERROR( hypre_ParVectorPointwiseDivision( x.m_vec, m_vec, &m_vec ) ); touch(); } From 265f7825484ecea96f261dba1e0bd56fe961b590 Mon Sep 17 00:00:00 2001 From: "Victor A. P. Magri" <50467563+victorapm@users.noreply.github.com> Date: Thu, 22 Jan 2026 22:26:00 -0800 Subject: [PATCH 3/4] Update TPL tag --- .devcontainer/devcontainer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 45969163050..00b240b35f1 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -2,7 +2,7 @@ "build": { "dockerfile": "Dockerfile", "args": { - "GEOS_TPL_TAG": "324-875" + "GEOS_TPL_TAG": "332-903" } }, "runArgs": [ From 84a5149357e5392ea1964d4cfbf9fe4234ecad72 Mon Sep 17 00:00:00 2001 From: "Victor A. P. Magri" Date: Fri, 23 Jan 2026 02:32:35 -0500 Subject: [PATCH 4/4] Fix header --- .../linearAlgebra/interfaces/hypre/HypreSolver.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/coreComponents/linearAlgebra/interfaces/hypre/HypreSolver.cpp b/src/coreComponents/linearAlgebra/interfaces/hypre/HypreSolver.cpp index 8f6ff75b321..fbf6dc1a2bd 100644 --- a/src/coreComponents/linearAlgebra/interfaces/hypre/HypreSolver.cpp +++ b/src/coreComponents/linearAlgebra/interfaces/hypre/HypreSolver.cpp @@ -26,7 +26,7 @@ #include <_hypre_utilities.h> #include <_hypre_parcsr_ls.h> #include <_hypre_IJ_mv.h> -#include +#include namespace geos {