FlowLinearSolverParameters.hpp
Go to the documentation of this file.
1/*
2 Copyright 2015, 2020 SINTEF Digital, Mathematics and Cybernetics.
3 Copyright 2015 IRIS AS
4 Copyright 2015 Dr. Blatt - HPC-Simulation-Software & Services
5 Copyright 2015 NTNU
6 Copyright 2015 Statoil AS
7
8 This file is part of the Open Porous Media project (OPM).
9
10 OPM is free software: you can redistribute it and/or modify
11 it under the terms of the GNU General Public License as published by
12 the Free Software Foundation, either version 3 of the License, or
13 (at your option) any later version.
14
15 OPM is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 GNU General Public License for more details.
19
20 You should have received a copy of the GNU General Public License
21 along with OPM. If not, see <http://www.gnu.org/licenses/>.
22*/
23
24#ifndef OPM_FLOWLINEARSOLVERPARAMETERS_HEADER_INCLUDED
25#define OPM_FLOWLINEARSOLVERPARAMETERS_HEADER_INCLUDED
26
28
31
32namespace Opm {
33
34template <class TypeTag>
35class ISTLSolverBda;
36
37template <class TypeTag>
38class ISTLSolver;
39
40}
41
42namespace Opm::Properties {
43
44namespace TTag {
45
47
48}
49
50// Set the backend to be used.
51template<class TypeTag>
52struct LinearSolverBackend<TypeTag, TTag::FlowIstlSolverParams>
53{
54#if COMPILE_BDA_BRIDGE
56#else
58#endif
59};
60
61}
62
63namespace Opm::Parameters {
64
65struct LinearSolverReduction { static constexpr double value = 1e-2; };
66struct NlddLocalLinearSolverReduction { static constexpr double value = 1e-2; };
67struct RelaxedLinearSolverReduction { static constexpr double value = 1e-2; };
68struct IluRelaxation { static constexpr double value = 0.9; };
69struct LinearSolverMaxIter { static constexpr int value = 200; };
70struct NlddLocalLinearSolverMaxIter { static constexpr int value = 200; };
71struct LinearSolverRestart { static constexpr int value = 40; };
72struct IluFillinLevel { static constexpr int value = 0; };
73struct MiluVariant { static constexpr auto value = "ILU"; };
74struct IluRedblack { static constexpr bool value = false; };
75struct IluReorderSpheres { static constexpr bool value = false; };
76struct UseGmres { static constexpr bool value = false; };
77struct LinearSolverIgnoreConvergenceFailure { static constexpr bool value = false; };
78struct ScaleLinearSystem { static constexpr bool value = false; };
79struct LinearSolver { static constexpr auto value = "cprw"; };
80struct NlddLocalLinearSolver { static constexpr auto value = "ilu0"; };
81struct LinearSolverPrintJsonDefinition { static constexpr auto value = true; };
82struct CprReuseSetup { static constexpr int value = 4; };
83struct CprReuseInterval { static constexpr int value = 30; };
84struct AcceleratorMode { static constexpr auto value = "none"; };
85struct BdaDeviceId { static constexpr int value = 0; };
86struct OpenclPlatformId { static constexpr int value = 0; };
87struct OpenclIluParallel { static constexpr bool value = true; }; // note: false should only be used in debug
88
89} // namespace Opm::Parameters
90
91namespace Opm {
92
95{
110 std::string linsolver_;
114 std::string accelerator_mode_;
118
120
121 void init(bool cprRequestedInDataFile);
122
123 static void registerParameters();
124
125 // set default values
126 void reset();
127};
128
129} // namespace Opm
130
131#endif // OPM_FLOWLINEARSOLVERPARAMETERS_HEADER_INCLUDED
Definition: ISTLSolverBda.hpp:104
Definition: ISTLSolver.hpp:144
Declares the parameters for the black oil model.
Declares the properties required by the black oil model.
Definition: blackoilnewtonmethodparams.hpp:31
Definition: blackoilmodel.hh:72
Definition: blackoilboundaryratevector.hh:37
MILU_VARIANT
Definition: MILU.hpp:34
This class carries all parameters for the NewtonIterationBlackoilInterleaved class.
Definition: FlowLinearSolverParameters.hpp:95
bool ilu_redblack_
Definition: FlowLinearSolverParameters.hpp:104
int cpr_reuse_interval_
Definition: FlowLinearSolverParameters.hpp:113
int ilu_fillin_level_
Definition: FlowLinearSolverParameters.hpp:102
bool is_nldd_local_solver_
Definition: FlowLinearSolverParameters.hpp:109
bool scale_linear_system_
Definition: FlowLinearSolverParameters.hpp:108
double linear_solver_reduction_
Definition: FlowLinearSolverParameters.hpp:96
std::string accelerator_mode_
Definition: FlowLinearSolverParameters.hpp:114
bool newton_use_gmres_
Definition: FlowLinearSolverParameters.hpp:106
bool ignoreConvergenceFailure_
Definition: FlowLinearSolverParameters.hpp:107
void init(bool cprRequestedInDataFile)
int cpr_reuse_setup_
Definition: FlowLinearSolverParameters.hpp:112
int linear_solver_restart_
Definition: FlowLinearSolverParameters.hpp:99
double relaxed_linear_solver_reduction_
Definition: FlowLinearSolverParameters.hpp:97
int linear_solver_maxiter_
Definition: FlowLinearSolverParameters.hpp:98
int linear_solver_verbosity_
Definition: FlowLinearSolverParameters.hpp:100
int opencl_platform_id_
Definition: FlowLinearSolverParameters.hpp:116
FlowLinearSolverParameters()
Definition: FlowLinearSolverParameters.hpp:119
double ilu_relaxation_
Definition: FlowLinearSolverParameters.hpp:101
bool opencl_ilu_parallel_
Definition: FlowLinearSolverParameters.hpp:117
bool linear_solver_print_json_definition_
Definition: FlowLinearSolverParameters.hpp:111
bool ilu_reorder_sphere_
Definition: FlowLinearSolverParameters.hpp:105
int bda_device_id_
Definition: FlowLinearSolverParameters.hpp:115
MILU_VARIANT ilu_milu_
Definition: FlowLinearSolverParameters.hpp:103
std::string linsolver_
Definition: FlowLinearSolverParameters.hpp:110
Definition: FlowLinearSolverParameters.hpp:84
static constexpr auto value
Definition: FlowLinearSolverParameters.hpp:84
Definition: FlowLinearSolverParameters.hpp:85
static constexpr int value
Definition: FlowLinearSolverParameters.hpp:85
Definition: FlowLinearSolverParameters.hpp:83
static constexpr int value
Definition: FlowLinearSolverParameters.hpp:83
Definition: FlowLinearSolverParameters.hpp:82
static constexpr int value
Definition: FlowLinearSolverParameters.hpp:82
Definition: FlowLinearSolverParameters.hpp:72
static constexpr int value
Definition: FlowLinearSolverParameters.hpp:72
Definition: FlowLinearSolverParameters.hpp:74
static constexpr bool value
Definition: FlowLinearSolverParameters.hpp:74
Definition: FlowLinearSolverParameters.hpp:68
static constexpr double value
Definition: FlowLinearSolverParameters.hpp:68
Definition: FlowLinearSolverParameters.hpp:75
static constexpr bool value
Definition: FlowLinearSolverParameters.hpp:75
Definition: FlowLinearSolverParameters.hpp:77
static constexpr bool value
Definition: FlowLinearSolverParameters.hpp:77
Definition: FlowLinearSolverParameters.hpp:69
static constexpr int value
Definition: FlowLinearSolverParameters.hpp:69
Definition: FlowLinearSolverParameters.hpp:79
static constexpr auto value
Definition: FlowLinearSolverParameters.hpp:79
Definition: FlowLinearSolverParameters.hpp:81
static constexpr auto value
Definition: FlowLinearSolverParameters.hpp:81
Definition: FlowLinearSolverParameters.hpp:65
static constexpr double value
Definition: FlowLinearSolverParameters.hpp:65
Definition: FlowLinearSolverParameters.hpp:71
static constexpr int value
Definition: FlowLinearSolverParameters.hpp:71
Definition: FlowLinearSolverParameters.hpp:73
static constexpr auto value
Definition: FlowLinearSolverParameters.hpp:73
Definition: FlowLinearSolverParameters.hpp:70
static constexpr int value
Definition: FlowLinearSolverParameters.hpp:70
Definition: FlowLinearSolverParameters.hpp:80
static constexpr auto value
Definition: FlowLinearSolverParameters.hpp:80
Definition: FlowLinearSolverParameters.hpp:66
static constexpr double value
Definition: FlowLinearSolverParameters.hpp:66
Definition: FlowLinearSolverParameters.hpp:87
static constexpr bool value
Definition: FlowLinearSolverParameters.hpp:87
Definition: FlowLinearSolverParameters.hpp:86
static constexpr int value
Definition: FlowLinearSolverParameters.hpp:86
Definition: FlowLinearSolverParameters.hpp:67
static constexpr double value
Definition: FlowLinearSolverParameters.hpp:67
Definition: FlowLinearSolverParameters.hpp:78
static constexpr bool value
Definition: FlowLinearSolverParameters.hpp:78
Definition: FlowLinearSolverParameters.hpp:76
static constexpr bool value
Definition: FlowLinearSolverParameters.hpp:76
The type of the linear solver to be used.
Definition: linalgproperties.hh:38
Definition: FlowLinearSolverParameters.hpp:46