tpsanewtonmethodparams.hpp
Go to the documentation of this file.
1// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
2// vi: set et ts=4 sw=4 sts=4:
3/*
4 Copyright 2025 NORCE AS
5
6 This file is part of the Open Porous Media project (OPM).
7
8 OPM is free software: you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation, either version 2 of the License, or
11 (at your option) any later version.
12
13 OPM is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with OPM. If not, see <http://www.gnu.org/licenses/>.
20
21 Consult the COPYING file in the top-level source directory of this
22 module for the precise wording of the license and the list of
23 copyright holders.
24*/
25#ifndef TPSA_NEWTON_METHOD_PARAMS_HPP
26#define TPSA_NEWTON_METHOD_PARAMS_HPP
27
28
29namespace Opm::Parameters {
30
31// The maximum error which may occur in a simulation before the Newton method for the time step is aborted
32template<class Scalar>
33struct TpsaNewtonMaxError { static constexpr Scalar value = 1e100; };
34
35// Number of maximum iterations for the Newton method.
36struct TpsaNewtonMaxIterations { static constexpr int value = 1; };
37
38// Number of minimum iterations for the Newton method
39struct TpsaNewtonMinIterations { static constexpr int value = 1; };
40
41// Convergence tolerance
42template<class Scalar>
43struct TpsaNewtonTolerance { static constexpr Scalar value = 1e-3; };
44
45// Specifies verbosity of print messages
46struct TpsaNewtonVerbosity { static constexpr int value = 1; };
47
48} // namespace Opm::Parameters
49
50namespace Opm {
51
55template<class Scalar>
57{
58 static void registerParameters();
59 void read();
60
65 Scalar tolerance_;
66 Scalar maxError_;
67}; // struct TpsaNewtonMethodParams
68
69} // namespace Opm
70
71#endif
Definition: blackoilnewtonmethodparams.hpp:31
Definition: blackoilbioeffectsmodules.hh:45
Definition: tpsanewtonmethodparams.hpp:33
static constexpr Scalar value
Definition: tpsanewtonmethodparams.hpp:33
Definition: tpsanewtonmethodparams.hpp:36
static constexpr int value
Definition: tpsanewtonmethodparams.hpp:36
Definition: tpsanewtonmethodparams.hpp:39
static constexpr int value
Definition: tpsanewtonmethodparams.hpp:39
Definition: tpsanewtonmethodparams.hpp:43
static constexpr Scalar value
Definition: tpsanewtonmethodparams.hpp:43
Definition: tpsanewtonmethodparams.hpp:46
static constexpr int value
Definition: tpsanewtonmethodparams.hpp:46
Struct holding the parameters for TpsaNewtonMethod.
Definition: tpsanewtonmethodparams.hpp:57
bool writeConvergence_
Definition: tpsanewtonmethodparams.hpp:62
int maxIterations_
Definition: tpsanewtonmethodparams.hpp:64
int verbosity_
Definition: tpsanewtonmethodparams.hpp:61
Scalar maxError_
Definition: tpsanewtonmethodparams.hpp:66
int minIterations_
Definition: tpsanewtonmethodparams.hpp:63
static void registerParameters()
Scalar tolerance_
Definition: tpsanewtonmethodparams.hpp:65