GEOS
Hydrofracture.hpp
Go to the documentation of this file.
1 /*
2  * ------------------------------------------------------------------------------------------------------------
3  * SPDX-License-Identifier: LGPL-2.1-only
4  *
5  * Copyright (c) 2016-2024 Lawrence Livermore National Security LLC
6  * Copyright (c) 2018-2024 TotalEnergies
7  * Copyright (c) 2018-2024 The Board of Trustees of the Leland Stanford Junior University
8  * Copyright (c) 2023-2024 Chevron
9  * Copyright (c) 2019- GEOS/GEOSX Contributors
10  * All rights reserved
11  *
12  * See top level LICENSE, COPYRIGHT, CONTRIBUTORS, NOTICE, and ACKNOWLEDGEMENTS files for details.
13  * ------------------------------------------------------------------------------------------------------------
14  */
15 
20 #ifndef GEOS_LINEARALGEBRA_INTERFACES_HYPREMGRHYDROFRACTURE_HPP_
21 #define GEOS_LINEARALGEBRA_INTERFACES_HYPREMGRHYDROFRACTURE_HPP_
22 
24 
25 namespace geos
26 {
27 
28 namespace hypre
29 {
30 
31 namespace mgr
32 {
33 
48 class Hydrofracture : public MGRStrategyBase< 1 >
49 {
50 public:
51 
56  : MGRStrategyBase( 4 )
57  {
58  m_labels[0].push_back( 3 );
59 
60  setupLabels();
61 
62  // Level 0
64  m_levelFRelaxIters[0] = 1;
69  }
70 
77  void setup( LinearSolverParameters::MGR const & mgrParams,
78  HyprePrecWrapper & precond,
79  HypreMGRData & mgrData )
80  {
81  setReduction( precond, mgrData );
82 
83  // Configure the BoomerAMG solver used as F-relaxation for the first level
84  setMechanicsFSolver( precond, mgrData, mgrParams.separateComponents );
85 
86  // Configure the BoomerAMG solver used as mgr coarse solver for the pressure reduced system
87  setPressureAMG( mgrData.coarseSolver, hydrofractureMinCoarseSize );
88  }
89 };
90 
91 } // namespace mgr
92 
93 } // namespace hypre
94 
95 } // namespace geos
96 
97 #endif /*GEOS_LINEARALGEBRA_INTERFACES_HYPREMGRHYDROFRACTURE_HPP_*/
Hydrofracture strategy.
Hydrofracture(arrayView1d< int const > const &)
Constructor.
void setup(LinearSolverParameters::MGR const &mgrParams, HyprePrecWrapper &precond, HypreMGRData &mgrData)
Setup the MGR strategy.
Helper struct for strategies that provides some basic parameter arrays needed by MGR.
Definition: HypreMGR.hpp:344
MGRCoarseGridMethod m_levelCoarseGridMethod[numLevels]
Coarse grid method for each level.
Definition: HypreMGR.hpp:361
MGRInterpolationType m_levelInterpType[numLevels]
Interpolation type for each level.
Definition: HypreMGR.hpp:359
stdVector< HYPRE_Int > m_labels[numLevels]
Dof labels kept at each level.
Definition: HypreMGR.hpp:353
void setMechanicsFSolver(HyprePrecWrapper &precond, HypreMGRData &mgrData, integer const &separateComponents)
Set up BoomerAMG to perform the mechanics F-solve for the first F-relaxation.
Definition: HypreMGR.hpp:566
void setupLabels()
Call this after populating lv_cindexes.
Definition: HypreMGR.hpp:406
void setPressureAMG(HyprePrecWrapper &solver, HYPRE_Int const minCoarseSize=-1)
Set up BoomerAMG to perform the solve for the pressure system.
Definition: HypreMGR.hpp:534
HYPRE_Int m_levelFRelaxIters[numLevels]
Number of F-relaxation iterations for each level.
Definition: HypreMGR.hpp:358
void setReduction(HyprePrecWrapper &precond, HypreMGRData &mgrData)
Helper function that sets the reduction features common to all mgr strategies.
Definition: HypreMGR.hpp:420
MGRFRelaxationType m_levelFRelaxType[numLevels]
F-relaxation type for each level.
Definition: HypreMGR.hpp:357
MGRGlobalSmootherType m_levelGlobalSmootherType[numLevels]
Global smoother type for each level.
Definition: HypreMGR.hpp:362
MGRRestrictionType m_levelRestrictType[numLevels]
Restriction type for each level.
Definition: HypreMGR.hpp:360
@ galerkin
Galerkin coarse grid computation using RAP.
@ amgVCycle
Full AMG VCycle solver.
@ none
no global smoothing is performed (default)
ArrayView< T, 1 > arrayView1d
Alias for 1D array view.
Definition: DataTypes.hpp:179
Container for hypre preconditioner auxiliary data for MGR.
Definition: HypreMGR.hpp:38
HyprePrecWrapper coarseSolver
MGR coarse solver pointer and functions.
Definition: HypreMGR.hpp:40
Container for hypre preconditioner function pointers.
Definition: HypreUtils.hpp:52
Multigrid reduction parameters.
integer separateComponents
Apply a separate displacement component (SDC) filter before AMG construction.