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
32#include <string>
33
34namespace Opm {
35
36template <class TypeTag>
37class ISTLSolverGpuBridge;
38
39template <class TypeTag>
40class ISTLSolver;
41
42template<class TypeTag>
43class ISTLSolverRuntimeOptionProxy;
44
45}
46
47namespace Opm::Properties {
48
49namespace TTag {
50
52
53}
54
55// Set the backend to be used.
56template<class TypeTag>
57struct LinearSolverBackend<TypeTag, TTag::FlowIstlSolverParams>
58{
60};
61
62}
63
64namespace Opm::Parameters {
65
66struct LinearSolverReduction { static constexpr double value = 1e-2; };
67struct NlddLocalLinearSolverReduction { static constexpr double value = 1e-2; };
68struct RelaxedLinearSolverReduction { static constexpr double value = 1e-2; };
69struct IluRelaxation { static constexpr double value = 0.9; };
70struct LinearSolverMaxIter { static constexpr int value = 200; };
71struct NlddLocalLinearSolverMaxIter { static constexpr int value = 200; };
72struct LinearSolverRestart { static constexpr int value = 40; };
73struct IluFillinLevel { static constexpr int value = 0; };
74struct MiluVariant { static constexpr auto value = "ILU"; };
75struct IluRedblack { static constexpr bool value = false; };
76struct IluReorderSpheres { static constexpr bool value = false; };
77struct UseGmres { static constexpr bool value = false; };
78struct LinearSolverIgnoreConvergenceFailure { static constexpr bool value = false; };
79struct ScaleLinearSystem { static constexpr bool value = false; };
80struct LinearSolver { static constexpr auto value = "cprw"; };
81struct NlddLocalLinearSolver { static constexpr auto value = "ilu0"; };
82struct LinearSolverPrintJsonDefinition { static constexpr auto value = true; };
83struct CprReuseSetup { static constexpr int value = 4; };
84struct CprReuseInterval { static constexpr int value = 30; };
85struct AcceleratorMode { static constexpr auto value = "none"; };
86struct GpuDeviceId { static constexpr int value = 0; };
87struct OpenclPlatformId { static constexpr int value = 0; };
88struct OpenclIluParallel { static constexpr bool value = true; }; // note: false should only be used in debug
89} // namespace Opm::Parameters
90
91namespace Opm {
92
95{
110 std::string linsolver_;
114 std::string accelerator_mode_;
119
121
122 void init(bool cprRequestedInDataFile);
123
124 static void registerParameters();
125
126 // set default values
127 void reset();
128};
129
130} // namespace Opm
131
132#endif // OPM_FLOWLINEARSOLVERPARAMETERS_HEADER_INCLUDED
ISTLSolverRuntimeOptionProxy selects the appropriate ISTLSolver runtime based on CLI options.
Definition: ISTLSolverRuntimeOptionProxy.hpp:40
Declares the parameters for the black oil model.
Declares the properties required by the black oil model.
Definition: blackoilnewtonmethodparams.hpp:31
LinearSolverAcceleratorType
Enum class representing the type of linear solver accelerator.
Definition: LinearSolverAcceleratorType.hpp:37
Definition: blackoilmodel.hh:79
Definition: blackoilboundaryratevector.hh:39
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:120
double ilu_relaxation_
Definition: FlowLinearSolverParameters.hpp:101
int gpu_device_id_
Definition: FlowLinearSolverParameters.hpp:115
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
Parameters::LinearSolverAcceleratorType linear_solver_accelerator_
Definition: FlowLinearSolverParameters.hpp:118
MILU_VARIANT ilu_milu_
Definition: FlowLinearSolverParameters.hpp:103
std::string linsolver_
Definition: FlowLinearSolverParameters.hpp:110
Definition: FlowLinearSolverParameters.hpp:85
static constexpr auto value
Definition: FlowLinearSolverParameters.hpp:85
Definition: FlowLinearSolverParameters.hpp:84
static constexpr int value
Definition: FlowLinearSolverParameters.hpp:84
Definition: FlowLinearSolverParameters.hpp:83
static constexpr int value
Definition: FlowLinearSolverParameters.hpp:83
Definition: FlowLinearSolverParameters.hpp:86
static constexpr int value
Definition: FlowLinearSolverParameters.hpp:86
Definition: FlowLinearSolverParameters.hpp:73
static constexpr int value
Definition: FlowLinearSolverParameters.hpp:73
Definition: FlowLinearSolverParameters.hpp:75
static constexpr bool value
Definition: FlowLinearSolverParameters.hpp:75
Definition: FlowLinearSolverParameters.hpp:69
static constexpr double value
Definition: FlowLinearSolverParameters.hpp:69
Definition: FlowLinearSolverParameters.hpp:76
static constexpr bool value
Definition: FlowLinearSolverParameters.hpp:76
Definition: FlowLinearSolverParameters.hpp:78
static constexpr bool value
Definition: FlowLinearSolverParameters.hpp:78
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:82
static constexpr auto value
Definition: FlowLinearSolverParameters.hpp:82
Definition: FlowLinearSolverParameters.hpp:66
static constexpr double value
Definition: FlowLinearSolverParameters.hpp:66
Definition: FlowLinearSolverParameters.hpp:72
static constexpr int value
Definition: FlowLinearSolverParameters.hpp:72
Definition: FlowLinearSolverParameters.hpp:74
static constexpr auto value
Definition: FlowLinearSolverParameters.hpp:74
Definition: FlowLinearSolverParameters.hpp:71
static constexpr int value
Definition: FlowLinearSolverParameters.hpp:71
Definition: FlowLinearSolverParameters.hpp:81
static constexpr auto value
Definition: FlowLinearSolverParameters.hpp:81
Definition: FlowLinearSolverParameters.hpp:67
static constexpr double value
Definition: FlowLinearSolverParameters.hpp:67
Definition: FlowLinearSolverParameters.hpp:88
static constexpr bool value
Definition: FlowLinearSolverParameters.hpp:88
Definition: FlowLinearSolverParameters.hpp:87
static constexpr int value
Definition: FlowLinearSolverParameters.hpp:87
Definition: FlowLinearSolverParameters.hpp:68
static constexpr double value
Definition: FlowLinearSolverParameters.hpp:68
Definition: FlowLinearSolverParameters.hpp:79
static constexpr bool value
Definition: FlowLinearSolverParameters.hpp:79
Definition: FlowLinearSolverParameters.hpp:77
static constexpr bool value
Definition: FlowLinearSolverParameters.hpp:77
The type of the linear solver to be used.
Definition: linalgproperties.hh:38
Definition: FlowLinearSolverParameters.hpp:51