Loading...
Searching...
No Matches
newtonmethodparams.hpp
// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
// vi: set et ts=4 sw=4 sts=4:
/*
This file is part of the Open Porous Media project (OPM).
OPM is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
OPM is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with OPM. If not, see <http://www.gnu.org/licenses/>.
Consult the COPYING file in the top-level source directory of this
module for the precise wording of the license and the list of
copyright holders.
*/
#ifndef OPM_NEWTON_METHOD_PARAMS_HPP
#define OPM_NEWTON_METHOD_PARAMS_HPP
namespace Opm::Parameters {
template<class Scalar>
struct NewtonMaxError { static constexpr Scalar value = 1e100; };
struct NewtonMaxIterations { static constexpr int value = 20; };
struct NewtonTargetIterations { static constexpr int value = 10; };
template<class Scalar>
struct NewtonTolerance { static constexpr Scalar value = 1e-8; };
struct NewtonVerbose { static constexpr bool value = true; };
struct NewtonWriteConvergence { static constexpr bool value = false; };
} // end namespace Opm::Parameters
namespace Opm {
template<class Scalar>
struct NewtonMethodParams
{
static void registerParameters();
void read();
bool verbose_;
bool writeConvergence_;
int targetIterations_;
int maxIterations_;
Scalar tolerance_;
Scalar maxError_;
};
} // namespace Opm
#endif // OPM_NEWTON_METHOD_PARAMS_HPP
Opm
This file contains a set of helper functions used by VFPProd / VFPInj.
Definition blackoilbioeffectsmodules.hh:43
Opm::NewtonMethodParams
Struct holding the parameters for NewtonMethod.
Definition newtonmethodparams.hpp:71
Opm::NewtonMethodParams::registerParameters
static void registerParameters()
Registers the parameters in parameter system.
Definition newtonmethodparams.cpp:36
Opm::NewtonMethodParams::read
void read()
Reads the parameter values from the parameter system.
Definition newtonmethodparams.cpp:57
Opm::NewtonMethodParams::targetIterations_
int targetIterations_
Optimal number of iterations we want to achieve.
Definition newtonmethodparams.hpp:80
Opm::NewtonMethodParams::maxIterations_
int maxIterations_
Maximum number of iterations we do before giving up.
Definition newtonmethodparams.hpp:81
Opm::Parameters::NewtonMaxError
The maximum error which may occur in a simulation before the Newton method for the time step is abort...
Definition newtonmethodparams.hpp:31
Opm::Parameters::NewtonMaxIterations
Number of maximum iterations for the Newton method.
Definition newtonmethodparams.hpp:34
Opm::Parameters::NewtonTargetIterations
The number of iterations at which the Newton method should aim at.
Definition newtonmethodparams.hpp:44
Opm::Parameters::NewtonTolerance
The value for the error below which convergence is declared.
Definition newtonmethodparams.hpp:53
Opm::Parameters::NewtonVerbose
Specifies whether the Newton method should print messages or not.
Definition newtonmethodparams.hpp:56
Opm::Parameters::NewtonWriteConvergence
Specifies whether the convergence rate and the global residual gets written out to disk for every New...
Definition newtonmethodparams.hpp:60