GEOS
LinearSolverParameters.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_PHYSICSSOLVERS_LINEARSOLVERPARAMETERS_HPP_
21 #define GEOS_PHYSICSSOLVERS_LINEARSOLVERPARAMETERS_HPP_
22 
23 #include "dataRepository/Group.hpp"
25 
26 namespace geos
27 {
28 
43 {
44 public:
45 
46  LinearSolverParametersInput() = delete;
47 
49  LinearSolverParametersInput( string const & name, Group * const parent );
50 
53 
55  virtual ~LinearSolverParametersInput() override = default;
56 
58  static string catalogName() { return "LinearSolverParameters"; }
59 
61  virtual void postInputInitialization() override;
62 
63  void print();
64 
65  LinearSolverParameters const & get() const
66  { return m_parameters; }
67 
69  { return m_parameters; }
70 
73  {
75  static constexpr char const * solverTypeString() { return "solverType"; }
77  static constexpr char const * preconditionerTypeString() { return "preconditionerType"; }
79  static constexpr char const * stopIfErrorString() { return "stopIfError"; }
80 
82  static constexpr char const * directCheckResidualString() { return "directCheckResidual"; }
84  static constexpr char const * directEquilString() { return "directEquil"; }
86  static constexpr char const * directColPermString() { return "directColPerm"; }
88  static constexpr char const * directRowPermString() { return "directRowPerm"; }
90  static constexpr char const * directReplTinyPivotString() { return "directReplTinyPivot"; }
92  static constexpr char const * directIterRefString() { return "directIterRef"; }
94  static constexpr char const * directParallelString() { return "directParallel"; }
95 
97  static constexpr char const * krylovMaxIterString() { return "krylovMaxIter"; }
99  static constexpr char const * krylovMaxRestartString() { return "krylovMaxRestart"; }
101  static constexpr char const * krylovTolString() { return "krylovTol"; }
103  static constexpr char const * krylovAdaptiveTolString() { return "krylovAdaptiveTol"; }
105  static constexpr char const * krylovWeakTolString() { return "krylovWeakestTol"; }
107  static constexpr char const * krylovStrongTolString() { return "krylovStrongestTol"; }
109  static constexpr char const * adaptiveGammaString() { return "adaptiveGamma"; }
111  static constexpr char const * adaptiveExponentString() { return "adaptiveExponent"; }
112 
114  static constexpr char const * amgNumSweepsString() { return "amgNumSweeps"; }
116  static constexpr char const * amgSmootherString() { return "amgSmootherType"; }
118  static constexpr char const * amgRelaxWeight() { return "amgRelaxWeight"; }
120  static constexpr char const * amgCoarseString() { return "amgCoarseSolver"; }
122  static constexpr char const * amgThresholdString() { return "amgThreshold"; }
124  static constexpr char const * amgNullSpaceTypeString() { return "amgNullSpaceType"; }
126  static constexpr char const * amgCoarseningString() { return "amgCoarseningType"; }
128  static constexpr char const * amgInterpolationString() { return "amgInterpolationType"; }
130  static constexpr char const * amgInterpMaxNonZerosString() { return "amgInterpolationMaxNonZeros"; }
132  static constexpr char const * amgNumFunctionsString() { return "amgNumFunctions"; }
134  static constexpr char const * amgAggressiveNumPathsString() { return "amgAggressiveCoarseningPaths"; }
136  static constexpr char const * amgAggressiveNumLevelsString() { return "amgAggressiveCoarseningLevels"; }
138  static constexpr char const * amgAggressiveInterpTypeString() { return "amgAggressiveInterpType"; }
140  static constexpr char const * amgSeparateComponentsString() { return "amgSeparateComponents"; }
141 
143  static constexpr char const * iluFillString() { return "iluFill"; }
145  static constexpr char const * iluThresholdString() { return "iluThreshold"; }
146  };
147 
148 private:
149 
150  LinearSolverParameters m_parameters;
151 
152 };
153 
154 } // namespace geos
155 
156 #endif //GEOS_PHYSICSSOLVERS_LINEARSOLVERPARAMETERS_HPP_
Linear solver parameters with Group capabilities.
LinearSolverParametersInput(string const &name, Group *const parent)
Constructor.
LinearSolverParametersInput(LinearSolverParametersInput &&)=default
Copy constructor.
static string catalogName()
Catalog name.
virtual void postInputInitialization() override
Postprocessing of input.
virtual ~LinearSolverParametersInput() override=default
Destructor.
Set of parameters for a linear solver or preconditioner.
static constexpr char const * krylovMaxRestartString()
Krylov max iterations key.
static constexpr char const * iluFillString()
ILU fill key.
static constexpr char const * krylovTolString()
Krylov tolerance key.
static constexpr char const * amgRelaxWeight()
AMG smoother relax factor key.
static constexpr char const * krylovMaxIterString()
Krylov max iterations key.
static constexpr char const * directColPermString()
direct solver columns permutation key
static constexpr char const * directEquilString()
direct solver equilibrate key
static constexpr char const * solverTypeString()
Solver type key.
static constexpr char const * amgSeparateComponentsString()
AMG separate components flag.
static constexpr char const * iluThresholdString()
ILU threshold key.
static constexpr char const * amgSmootherString()
AMG smoother type key.
static constexpr char const * directIterRefString()
direct solver iterative refinement key
static constexpr char const * directParallelString()
direct solver parallelism key
static constexpr char const * amgInterpolationString()
AMG interpolation key.
static constexpr char const * amgCoarseString()
AMG coarse solver key.
static constexpr char const * amgInterpMaxNonZerosString()
AMG max. nonzero entries per row.
static constexpr char const * amgNumSweepsString()
AMG number of sweeps key.
static constexpr char const * directReplTinyPivotString()
direct solver replace tiny pivot key
static constexpr char const * amgNumFunctionsString()
AMG number of functions for unknown-based approach.
static constexpr char const * adaptiveExponentString()
Adaptive exponent parameter key.
static constexpr char const * amgThresholdString()
AMG threshold key.
static constexpr char const * directCheckResidualString()
direct solver check residual key
static constexpr char const * preconditionerTypeString()
Preconditioner type key.
static constexpr char const * adaptiveGammaString()
Adaptive gamma parameter key.
static constexpr char const * krylovStrongTolString()
Krylov strongest tolerance key.
static constexpr char const * amgCoarseningString()
AMG coarsening key.
static constexpr char const * krylovWeakTolString()
Krylov weakest tolerance key.
static constexpr char const * krylovAdaptiveTolString()
Krylov adaptive tolerance key.
static constexpr char const * stopIfErrorString()
stop if error key
static constexpr char const * amgAggressiveNumLevelsString()
AMG number of levels for aggressive coarsening.
static constexpr char const * amgAggressiveNumPathsString()
AMG number of paths for aggressive coarsening.
static constexpr char const * amgAggressiveInterpTypeString()
AMG interpolation type during aggressive coarsening.
static constexpr char const * directRowPermString()
direct solver rows permutation key
static constexpr char const * amgNullSpaceTypeString()
AMG near null space type key.