From 1855266790d87f6a7d0a27eb721b22d42cdea7cc Mon Sep 17 00:00:00 2001 From: Matteo Cusini Date: Fri, 13 Dec 2024 16:43:05 -0800 Subject: [PATCH 1/6] feat: mgr strategy for lagrangeContactBubbleStabilization --- ...rangeContactBubbleStab_FixedSlip_smoke.xml | 5 +- .../linearAlgebra/CMakeLists.txt | 1 + .../interfaces/hypre/HypreMGR.cpp | 6 + .../interfaces/hypre/HypreMGR.hpp | 26 +++++ ...ianContactMechanicsBubbleStabilization.hpp | 106 ++++++++++++++++++ .../utilities/LinearSolverParameters.hpp | 2 + ...olidMechanicsLagrangeContactBubbleStab.cpp | 8 +- 7 files changed, 151 insertions(+), 3 deletions(-) create mode 100644 src/coreComponents/linearAlgebra/interfaces/hypre/mgrStrategies/LagrangianContactMechanicsBubbleStabilization.hpp diff --git a/inputFiles/lagrangianContactMechanics/LagrangeContactBubbleStab_FixedSlip_smoke.xml b/inputFiles/lagrangianContactMechanics/LagrangeContactBubbleStab_FixedSlip_smoke.xml index 8258d2cc4a3..02258b584d6 100644 --- a/inputFiles/lagrangianContactMechanics/LagrangeContactBubbleStab_FixedSlip_smoke.xml +++ b/inputFiles/lagrangianContactMechanics/LagrangeContactBubbleStab_FixedSlip_smoke.xml @@ -22,9 +22,10 @@ lineSearchMaxCuts="2" maxTimeStepCuts="1"/> + logLevel="1"/> ( params.mgr, numComponentsPerField, precond, mgrData ); break; + } + case LinearSolverParameters::MGR::StrategyType::lagrangianContactMechanicsBubbleStab: + { + setStrategy< LagrangianContactMechanicsBubbleStabilization >( params.mgr, numComponentsPerField, precond, mgrData ); + break; } case LinearSolverParameters::MGR::StrategyType::multiphasePoromechanics: { diff --git a/src/coreComponents/linearAlgebra/interfaces/hypre/HypreMGR.hpp b/src/coreComponents/linearAlgebra/interfaces/hypre/HypreMGR.hpp index 8bacdf8b978..1585c4b1d49 100644 --- a/src/coreComponents/linearAlgebra/interfaces/hypre/HypreMGR.hpp +++ b/src/coreComponents/linearAlgebra/interfaces/hypre/HypreMGR.hpp @@ -269,6 +269,32 @@ class MGRStrategyBase setDisplacementAMG( mgrData.mechSolver, separateComponents ); HYPRE_MGRSetFSolver( precond.ptr, mgrData.mechSolver.solve, mgrData.mechSolver.setup, mgrData.mechSolver.ptr ); } + /** + * @brief + * + * @param solver + */ + void setILUCoarseSolver( HyprePrecWrapper & solver ) + { + /* (Required) Create ILU solver */ + HYPRE_ILUCreate(&solver.ptr); + + /* (Recommended) General solver options */ + int const ilu_type = 0; /* 0, 1, 10, 11, 20, 21, 30, 31, 40, 41, 50 */ + int const max_iter = 1; + double const tol = 0.0; + int const reordering = 0; /* 0: none, 1: RCM */ + int const print_level = 0; + HYPRE_ILUSetType(solver.ptr, ilu_type); + HYPRE_ILUSetMaxIter(solver.ptr, max_iter); + HYPRE_ILUSetTol(solver.ptr, tol); + HYPRE_ILUSetLocalReordering(solver.ptr, reordering); + HYPRE_ILUSetPrintLevel(solver.ptr, print_level); + + solver.setup = HYPRE_ILUSetup; + solver.solve = HYPRE_ILUSolve; + solver.destroy = HYPRE_ILUDestroy; + } }; diff --git a/src/coreComponents/linearAlgebra/interfaces/hypre/mgrStrategies/LagrangianContactMechanicsBubbleStabilization.hpp b/src/coreComponents/linearAlgebra/interfaces/hypre/mgrStrategies/LagrangianContactMechanicsBubbleStabilization.hpp new file mode 100644 index 00000000000..42ff8111bf0 --- /dev/null +++ b/src/coreComponents/linearAlgebra/interfaces/hypre/mgrStrategies/LagrangianContactMechanicsBubbleStabilization.hpp @@ -0,0 +1,106 @@ +/* + * ------------------------------------------------------------------------------------------------------------ + * SPDX-License-Identifier: LGPL-2.1-only + * + * Copyright (c) 2016-2024 Lawrence Livermore National Security LLC + * Copyright (c) 2018-2024 TotalEnergies + * Copyright (c) 2018-2024 The Board of Trustees of the Leland Stanford Junior University + * Copyright (c) 2023-2024 Chevron + * Copyright (c) 2019- GEOS/GEOSX Contributors + * All rights reserved + * + * See top level LICENSE, COPYRIGHT, CONTRIBUTORS, NOTICE, and ACKNOWLEDGEMENTS files for details. + * ------------------------------------------------------------------------------------------------------------ + */ + +/** + * @file LagrangianContactMechanicsBubbleStabilization.hpp + */ + +#ifndef GEOS_LINEARALGEBRA_INTERFACES_HYPREMGRLAGRANGIACONTACTMECHANICSBUBBLESTAB_HPP_ +#define GEOS_LINEARALGEBRA_INTERFACES_HYPREMGRLAGRANGIACONTACTMECHANICSBUBBLESTAB_HPP_ + +#include "linearAlgebra/interfaces/hypre/HypreMGR.hpp" + +namespace geos +{ + +namespace hypre +{ + +namespace mgr +{ + +/** + * @brief LagrangianContactMechanicsBubbleStabilization strategy + * + * Contact mechanics with face-centered lagrangian multipliers + * + * dofLabel: 0 = displacement, x-component + * dofLabel: 1 = displacement, y-component + * dofLabel: 2 = displacement, z-component + * dofLabel: 3 = displacement bubble function, x-component + * dofLabel: 4 = displacement bubble function, y-component + * dofLabel: 5 = displacement bubble function, z-component + * dofLabel: 6 = face-centered lagrange multiplier (tn) + * dofLabel: 7 = face-centered lagrange multiplier (tt1) + * dofLabel: 8 = face-centered lagrange multiplier (tt2) + * + * Ingredients: + * 1. F-points displacement (0,1,2), C-points (3,4,5) + * 2. F-points smoother: AMG, single V-cycle, separate displacemente components + * 3. C-points coarse-grid/Schur complement solver: boomer AMG + * 4. Global smoother: none + * + */ +class LagrangianContactMechanicsBubbleStabilization : public MGRStrategyBase< 1 > +{ +public: + + /** + * @brief Constructor. + */ + explicit LagrangianContactMechanicsBubbleStabilization( arrayView1d< int const > const & ) + : MGRStrategyBase( 9 ) + { + // Level 0: we keep all three displacement + m_labels[0] = { 6, 7, 8 }; + + setupLabels(); + + // Level 0 + m_levelFRelaxType[0] = MGRFRelaxationType::amgVCycle; + m_levelFRelaxIters[0] = 1; + m_levelInterpType[0] = MGRInterpolationType::blockJacobi; + m_levelRestrictType[0] = MGRRestrictionType::injection; + m_levelCoarseGridMethod[0] = MGRCoarseGridMethod::galerkin; + m_levelGlobalSmootherType[0] = MGRGlobalSmootherType::none; + } + + /** + * @brief Setup the MGR strategy. + * @param mgrParams MGR configuration parameters + * @param precond preconditioner wrapper + * @param mgrData auxiliary MGR data + */ + void setup( LinearSolverParameters::MGR const & mgrParams, + HyprePrecWrapper & precond, + HypreMGRData & mgrData ) + { + setReduction( precond, mgrData ); + + // Configure the BoomerAMG solver used as F-relaxation for the first level + setMechanicsFSolver( precond, mgrData, mgrParams.separateComponents ); + + // Configure ILU) as a coarse solver + setILUCoarseSolver( mgrData.coarseSolver ); + } +}; + +} // namespace mgr + +} // namespace hypre + +} // namespace geos + +#endif /*GEOS_LINEARALGEBRA_INTERFACES_HYPREMGRLAGRANGIACONTACTMECHANICSBUBBLESTAB_HPP_*/ diff --git a/src/coreComponents/linearAlgebra/utilities/LinearSolverParameters.hpp b/src/coreComponents/linearAlgebra/utilities/LinearSolverParameters.hpp index 803946ac95c..4d43955a0e1 100644 --- a/src/coreComponents/linearAlgebra/utilities/LinearSolverParameters.hpp +++ b/src/coreComponents/linearAlgebra/utilities/LinearSolverParameters.hpp @@ -295,6 +295,7 @@ struct LinearSolverParameters thermalMultiphasePoromechanics, ///< thermal multiphase poromechanics with finite volume compositional multiphase flow hydrofracture, ///< hydrofracture lagrangianContactMechanics, ///< Lagrangian contact mechanics + lagrangianContactMechanicsBubbleStab, ///< Lagrangian contact mechanics with bubble stabilization solidMechanicsEmbeddedFractures ///< Embedded fractures mechanics }; @@ -387,6 +388,7 @@ ENUM_STRINGS( LinearSolverParameters::MGR::StrategyType, "thermalMultiphasePoromechanics", "hydrofracture", "lagrangianContactMechanics", + "lagrangianContactMechanicsBubbleStab", "solidMechanicsEmbeddedFractures" ); /// Declare strings associated with enumeration values. diff --git a/src/coreComponents/physicsSolvers/contact/SolidMechanicsLagrangeContactBubbleStab.cpp b/src/coreComponents/physicsSolvers/contact/SolidMechanicsLagrangeContactBubbleStab.cpp index 2d1f139362b..da13cba9179 100644 --- a/src/coreComponents/physicsSolvers/contact/SolidMechanicsLagrangeContactBubbleStab.cpp +++ b/src/coreComponents/physicsSolvers/contact/SolidMechanicsLagrangeContactBubbleStab.cpp @@ -45,7 +45,11 @@ SolidMechanicsLagrangeContactBubbleStab::SolidMechanicsLagrangeContactBubbleStab { m_faceTypeToFiniteElements["Quadrilateral"] = std::make_unique< finiteElement::H1_QuadrilateralFace_Lagrange1_GaussLegendre2 >(); m_faceTypeToFiniteElements["Triangle"] = std::make_unique< finiteElement::H1_TriangleFace_Lagrange1_Gauss1 >(); - + + LinearSolverParameters & linSolParams = m_linearSolverParameters.get(); + linSolParams.mgr.strategy = LinearSolverParameters::MGR::StrategyType::lagrangianContactMechanicsBubbleStab; + linSolParams.mgr.separateComponents = true; + linSolParams.dofsPerNode = 3; } SolidMechanicsLagrangeContactBubbleStab::~SolidMechanicsLagrangeContactBubbleStab() @@ -249,6 +253,8 @@ void SolidMechanicsLagrangeContactBubbleStab::setupSystem( DomainPartition & dom solution.create( dofManager.numLocalDofs(), MPI_COMM_GEOS ); computeRotationMatrices( domain ); + + dofManager.printFieldInfo(); } void SolidMechanicsLagrangeContactBubbleStab::computeRotationMatrices( DomainPartition & domain ) const From be532312f47855c641bc7eac5063f1437e602655 Mon Sep 17 00:00:00 2001 From: Matteo Cusini <49037133+CusiniM@users.noreply.github.com> Date: Sat, 14 Dec 2024 14:09:09 -0800 Subject: [PATCH 2/6] Update src/coreComponents/linearAlgebra/interfaces/hypre/mgrStrategies/LagrangianContactMechanicsBubbleStabilization.hpp Co-authored-by: Nicola Castelletto <38361926+castelletto1@users.noreply.github.com> --- .../LagrangianContactMechanicsBubbleStabilization.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/coreComponents/linearAlgebra/interfaces/hypre/mgrStrategies/LagrangianContactMechanicsBubbleStabilization.hpp b/src/coreComponents/linearAlgebra/interfaces/hypre/mgrStrategies/LagrangianContactMechanicsBubbleStabilization.hpp index 42ff8111bf0..863945749a0 100644 --- a/src/coreComponents/linearAlgebra/interfaces/hypre/mgrStrategies/LagrangianContactMechanicsBubbleStabilization.hpp +++ b/src/coreComponents/linearAlgebra/interfaces/hypre/mgrStrategies/LagrangianContactMechanicsBubbleStabilization.hpp @@ -47,7 +47,7 @@ namespace mgr * dofLabel: 8 = face-centered lagrange multiplier (tt2) * * Ingredients: - * 1. F-points displacement (0,1,2), C-points (3,4,5) + * 1. F-points displacement (0,1,2,3,4,5), C-points (6,7,8) * 2. F-points smoother: AMG, single V-cycle, separate displacemente components * 3. C-points coarse-grid/Schur complement solver: boomer AMG * 4. Global smoother: none From eb921f44c459b23df57ffbf4a4bd2f8b4ac1947c Mon Sep 17 00:00:00 2001 From: Matteo Date: Tue, 7 Jan 2025 14:53:33 +0100 Subject: [PATCH 3/6] new MGR strategy. --- ...ianContactMechanicsBubbleStabilization.hpp | 29 ++++++++++++++----- 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/src/coreComponents/linearAlgebra/interfaces/hypre/mgrStrategies/LagrangianContactMechanicsBubbleStabilization.hpp b/src/coreComponents/linearAlgebra/interfaces/hypre/mgrStrategies/LagrangianContactMechanicsBubbleStabilization.hpp index 863945749a0..48f65b8a39a 100644 --- a/src/coreComponents/linearAlgebra/interfaces/hypre/mgrStrategies/LagrangianContactMechanicsBubbleStabilization.hpp +++ b/src/coreComponents/linearAlgebra/interfaces/hypre/mgrStrategies/LagrangianContactMechanicsBubbleStabilization.hpp @@ -53,7 +53,7 @@ namespace mgr * 4. Global smoother: none * */ -class LagrangianContactMechanicsBubbleStabilization : public MGRStrategyBase< 1 > +class LagrangianContactMechanicsBubbleStabilization : public MGRStrategyBase< 2 > { public: @@ -63,18 +63,28 @@ class LagrangianContactMechanicsBubbleStabilization : public MGRStrategyBase< 1 explicit LagrangianContactMechanicsBubbleStabilization( arrayView1d< int const > const & ) : MGRStrategyBase( 9 ) { - // Level 0: we keep all three displacement - m_labels[0] = { 6, 7, 8 }; + // Level 0: we keep all three displacements and the Lagrange Multipliers + m_labels[0] = { 0, 1, 2, 6, 7, 8 }; + // Level 1: we keep all three displacements + m_labels[1] = { 0, 1, 2 }; setupLabels(); // Level 0 - m_levelFRelaxType[0] = MGRFRelaxationType::amgVCycle; + m_levelFRelaxType[0] = MGRFRelaxationType::gsElimWInverse; m_levelFRelaxIters[0] = 1; m_levelInterpType[0] = MGRInterpolationType::blockJacobi; m_levelRestrictType[0] = MGRRestrictionType::injection; m_levelCoarseGridMethod[0] = MGRCoarseGridMethod::galerkin; m_levelGlobalSmootherType[0] = MGRGlobalSmootherType::none; + + // Level 1 + m_levelFRelaxType[1] = MGRFRelaxationType::gsElimWInverse; + m_levelFRelaxIters[1] = 1; + m_levelInterpType[1] = MGRInterpolationType::blockJacobi; + m_levelRestrictType[1] = MGRRestrictionType::injection; + m_levelCoarseGridMethod[1] = MGRCoarseGridMethod::galerkin; + m_levelGlobalSmootherType[1] = MGRGlobalSmootherType::none; } /** @@ -89,11 +99,14 @@ class LagrangianContactMechanicsBubbleStabilization : public MGRStrategyBase< 1 { setReduction( precond, mgrData ); - // Configure the BoomerAMG solver used as F-relaxation for the first level - setMechanicsFSolver( precond, mgrData, mgrParams.separateComponents ); + // // Configure the BoomerAMG solver used as F-relaxation for the first level + // setMechanicsFSolver( precond, mgrData, mgrParams.separateComponents ); + + // // Configure ILU) as a coarse solver + // setILUCoarseSolver( mgrData.coarseSolver ); - // Configure ILU) as a coarse solver - setILUCoarseSolver( mgrData.coarseSolver ); + // Configure the BoomerAMG solver used as mgr coarse solver for the displacement reduced system + setDisplacementAMG( mgrData.coarseSolver, mgrParams.separateComponents ); } }; From 9297a7b9d9f1f1dec452bf0d64d7c5292164e669 Mon Sep 17 00:00:00 2001 From: Matteo Date: Tue, 7 Jan 2025 15:44:16 +0100 Subject: [PATCH 4/6] clean up strategy. --- ...ianContactMechanicsBubbleStabilization.hpp | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/src/coreComponents/linearAlgebra/interfaces/hypre/mgrStrategies/LagrangianContactMechanicsBubbleStabilization.hpp b/src/coreComponents/linearAlgebra/interfaces/hypre/mgrStrategies/LagrangianContactMechanicsBubbleStabilization.hpp index 48f65b8a39a..04a7fb41b05 100644 --- a/src/coreComponents/linearAlgebra/interfaces/hypre/mgrStrategies/LagrangianContactMechanicsBubbleStabilization.hpp +++ b/src/coreComponents/linearAlgebra/interfaces/hypre/mgrStrategies/LagrangianContactMechanicsBubbleStabilization.hpp @@ -46,12 +46,18 @@ namespace mgr * dofLabel: 7 = face-centered lagrange multiplier (tt1) * dofLabel: 8 = face-centered lagrange multiplier (tt2) * - * Ingredients: - * 1. F-points displacement (0,1,2,3,4,5), C-points (6,7,8) - * 2. F-points smoother: AMG, single V-cycle, separate displacemente components - * 3. C-points coarse-grid/Schur complement solver: boomer AMG - * 4. Global smoother: none - * + * 2-level MGR strategy: + * Level 0: + * 1. F-points: bubbles (3,4,5), C-points: displacements + multipliers (0,1,2,6,7,8) + * 2. F-points smoother: l1jacobi + * 3. Global smoother: none + * Level 1: + * 1. F-points: multipliers (6,7,8), C-points: displacements (0,1,2) + * 2. F-points smoother: l1jacobi + * 3. Global smoother: none + * + * C-points coarse-grid/Schur complement solver: boomer AMG + */ class LagrangianContactMechanicsBubbleStabilization : public MGRStrategyBase< 2 > { @@ -71,7 +77,7 @@ class LagrangianContactMechanicsBubbleStabilization : public MGRStrategyBase< 2 setupLabels(); // Level 0 - m_levelFRelaxType[0] = MGRFRelaxationType::gsElimWInverse; + m_levelFRelaxType[0] = MGRFRelaxationType::l1jacobi; m_levelFRelaxIters[0] = 1; m_levelInterpType[0] = MGRInterpolationType::blockJacobi; m_levelRestrictType[0] = MGRRestrictionType::injection; @@ -79,7 +85,7 @@ class LagrangianContactMechanicsBubbleStabilization : public MGRStrategyBase< 2 m_levelGlobalSmootherType[0] = MGRGlobalSmootherType::none; // Level 1 - m_levelFRelaxType[1] = MGRFRelaxationType::gsElimWInverse; + m_levelFRelaxType[1] = MGRFRelaxationType::l1jacobi; m_levelFRelaxIters[1] = 1; m_levelInterpType[1] = MGRInterpolationType::blockJacobi; m_levelRestrictType[1] = MGRRestrictionType::injection; @@ -99,12 +105,6 @@ class LagrangianContactMechanicsBubbleStabilization : public MGRStrategyBase< 2 { setReduction( precond, mgrData ); - // // Configure the BoomerAMG solver used as F-relaxation for the first level - // setMechanicsFSolver( precond, mgrData, mgrParams.separateComponents ); - - // // Configure ILU) as a coarse solver - // setILUCoarseSolver( mgrData.coarseSolver ); - // Configure the BoomerAMG solver used as mgr coarse solver for the displacement reduced system setDisplacementAMG( mgrData.coarseSolver, mgrParams.separateComponents ); } From 05b8df449c0ed6424f3949e413f4b3fb684871ef Mon Sep 17 00:00:00 2001 From: Matteo Cusini <49037133+CusiniM@users.noreply.github.com> Date: Fri, 17 Jan 2025 11:15:43 -0800 Subject: [PATCH 5/6] Apply suggestions from code review --- .../LagrangeContactBubbleStab_FixedSlip_smoke.xml | 5 ++--- .../contact/SolidMechanicsLagrangeContactBubbleStab.cpp | 1 - 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/inputFiles/lagrangianContactMechanics/LagrangeContactBubbleStab_FixedSlip_smoke.xml b/inputFiles/lagrangianContactMechanics/LagrangeContactBubbleStab_FixedSlip_smoke.xml index 02258b584d6..8258d2cc4a3 100644 --- a/inputFiles/lagrangianContactMechanics/LagrangeContactBubbleStab_FixedSlip_smoke.xml +++ b/inputFiles/lagrangianContactMechanics/LagrangeContactBubbleStab_FixedSlip_smoke.xml @@ -22,10 +22,9 @@ lineSearchMaxCuts="2" maxTimeStepCuts="1"/> + logLevel="0"/> Date: Tue, 21 Jan 2025 13:35:31 -0800 Subject: [PATCH 6/6] uncrustify. --- .../interfaces/hypre/HypreMGR.cpp | 2 +- .../interfaces/hypre/HypreMGR.hpp | 18 +++++++++--------- ...gianContactMechanicsBubbleStabilization.hpp | 4 ++-- ...SolidMechanicsLagrangeContactBubbleStab.cpp | 2 +- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/coreComponents/linearAlgebra/interfaces/hypre/HypreMGR.cpp b/src/coreComponents/linearAlgebra/interfaces/hypre/HypreMGR.cpp index 9dbda6da2c1..466fc6ff04d 100644 --- a/src/coreComponents/linearAlgebra/interfaces/hypre/HypreMGR.cpp +++ b/src/coreComponents/linearAlgebra/interfaces/hypre/HypreMGR.cpp @@ -139,7 +139,7 @@ void hypre::mgr::createMGR( LinearSolverParameters const & params, setStrategy< LagrangianContactMechanics >( params.mgr, numComponentsPerField, precond, mgrData ); break; } - case LinearSolverParameters::MGR::StrategyType::lagrangianContactMechanicsBubbleStab: + case LinearSolverParameters::MGR::StrategyType::lagrangianContactMechanicsBubbleStab: { setStrategy< LagrangianContactMechanicsBubbleStabilization >( params.mgr, numComponentsPerField, precond, mgrData ); break; diff --git a/src/coreComponents/linearAlgebra/interfaces/hypre/HypreMGR.hpp b/src/coreComponents/linearAlgebra/interfaces/hypre/HypreMGR.hpp index 1585c4b1d49..c45bc4fe873 100644 --- a/src/coreComponents/linearAlgebra/interfaces/hypre/HypreMGR.hpp +++ b/src/coreComponents/linearAlgebra/interfaces/hypre/HypreMGR.hpp @@ -270,14 +270,14 @@ class MGRStrategyBase HYPRE_MGRSetFSolver( precond.ptr, mgrData.mechSolver.solve, mgrData.mechSolver.setup, mgrData.mechSolver.ptr ); } /** - * @brief - * - * @param solver + * @brief + * + * @param solver */ void setILUCoarseSolver( HyprePrecWrapper & solver ) { /* (Required) Create ILU solver */ - HYPRE_ILUCreate(&solver.ptr); + HYPRE_ILUCreate( &solver.ptr ); /* (Recommended) General solver options */ int const ilu_type = 0; /* 0, 1, 10, 11, 20, 21, 30, 31, 40, 41, 50 */ @@ -285,11 +285,11 @@ class MGRStrategyBase double const tol = 0.0; int const reordering = 0; /* 0: none, 1: RCM */ int const print_level = 0; - HYPRE_ILUSetType(solver.ptr, ilu_type); - HYPRE_ILUSetMaxIter(solver.ptr, max_iter); - HYPRE_ILUSetTol(solver.ptr, tol); - HYPRE_ILUSetLocalReordering(solver.ptr, reordering); - HYPRE_ILUSetPrintLevel(solver.ptr, print_level); + HYPRE_ILUSetType( solver.ptr, ilu_type ); + HYPRE_ILUSetMaxIter( solver.ptr, max_iter ); + HYPRE_ILUSetTol( solver.ptr, tol ); + HYPRE_ILUSetLocalReordering( solver.ptr, reordering ); + HYPRE_ILUSetPrintLevel( solver.ptr, print_level ); solver.setup = HYPRE_ILUSetup; solver.solve = HYPRE_ILUSolve; diff --git a/src/coreComponents/linearAlgebra/interfaces/hypre/mgrStrategies/LagrangianContactMechanicsBubbleStabilization.hpp b/src/coreComponents/linearAlgebra/interfaces/hypre/mgrStrategies/LagrangianContactMechanicsBubbleStabilization.hpp index 04a7fb41b05..157137b8a8a 100644 --- a/src/coreComponents/linearAlgebra/interfaces/hypre/mgrStrategies/LagrangianContactMechanicsBubbleStabilization.hpp +++ b/src/coreComponents/linearAlgebra/interfaces/hypre/mgrStrategies/LagrangianContactMechanicsBubbleStabilization.hpp @@ -55,9 +55,9 @@ namespace mgr * 1. F-points: multipliers (6,7,8), C-points: displacements (0,1,2) * 2. F-points smoother: l1jacobi * 3. Global smoother: none - * + * * C-points coarse-grid/Schur complement solver: boomer AMG - + */ class LagrangianContactMechanicsBubbleStabilization : public MGRStrategyBase< 2 > { diff --git a/src/coreComponents/physicsSolvers/contact/SolidMechanicsLagrangeContactBubbleStab.cpp b/src/coreComponents/physicsSolvers/contact/SolidMechanicsLagrangeContactBubbleStab.cpp index ea6e55a33ef..bc8cfc7e79f 100644 --- a/src/coreComponents/physicsSolvers/contact/SolidMechanicsLagrangeContactBubbleStab.cpp +++ b/src/coreComponents/physicsSolvers/contact/SolidMechanicsLagrangeContactBubbleStab.cpp @@ -45,7 +45,7 @@ SolidMechanicsLagrangeContactBubbleStab::SolidMechanicsLagrangeContactBubbleStab { m_faceTypeToFiniteElements["Quadrilateral"] = std::make_unique< finiteElement::H1_QuadrilateralFace_Lagrange1_GaussLegendre2 >(); m_faceTypeToFiniteElements["Triangle"] = std::make_unique< finiteElement::H1_TriangleFace_Lagrange1_Gauss1 >(); - + LinearSolverParameters & linSolParams = m_linearSolverParameters.get(); linSolParams.mgr.strategy = LinearSolverParameters::MGR::StrategyType::lagrangianContactMechanicsBubbleStab; linSolParams.mgr.separateComponents = true;