mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-01-15 22:41:55 -06:00
Changing the default parameters for SolverParameter
To be more consistent with the OPM-autodiff. And also min_iter_ was added.
This commit is contained in:
parent
b73a0c43f9
commit
d5577f634d
@ -76,7 +76,8 @@ namespace Opm {
|
||||
double tolerance_mb_;
|
||||
double tolerance_cnv_;
|
||||
double tolerance_wells_;
|
||||
int max_iter_;
|
||||
int max_iter_; // max newton iterations
|
||||
int min_iter_; // min newton iterations
|
||||
|
||||
SolverParameter( const parameter::ParameterGroup& param );
|
||||
SolverParameter();
|
||||
@ -440,6 +441,7 @@ namespace Opm {
|
||||
double relaxIncrement() const { return param_.relax_increment_; };
|
||||
double relaxRelTol() const { return param_.relax_rel_tol_; };
|
||||
double maxIter() const { return param_.max_iter_; }
|
||||
double minIter() const { return param_.min_iter_; }
|
||||
double maxResidualAllowed() const { return param_.max_residual_allowed_; }
|
||||
|
||||
};
|
||||
|
@ -159,11 +159,13 @@ namespace detail {
|
||||
relax_max_ = 0.5;
|
||||
relax_increment_ = 0.1;
|
||||
relax_rel_tol_ = 0.2;
|
||||
max_iter_ = 15;
|
||||
max_residual_allowed_ = std::numeric_limits< double >::max();
|
||||
tolerance_mb_ = 1.0e-7;
|
||||
tolerance_cnv_ = 1.0e-3;
|
||||
tolerance_wells_ = 1./Opm::unit::day;
|
||||
max_iter_ = 15; // not more then 15 its by default
|
||||
min_iter_ = 1; // Default to always do at least one nonlinear iteration.
|
||||
max_residual_allowed_ = 1e7;
|
||||
tolerance_mb_ = 1.0e-5;
|
||||
tolerance_cnv_ = 1.0e-2;
|
||||
tolerance_wells_ = 5.0e-1;
|
||||
|
||||
}
|
||||
|
||||
template<class T>
|
||||
@ -187,6 +189,7 @@ namespace detail {
|
||||
dr_max_rel_ = param.getDefault("dr_max_rel", dr_max_rel_);
|
||||
relax_max_ = param.getDefault("relax_max", relax_max_);
|
||||
max_iter_ = param.getDefault("max_iter", max_iter_);
|
||||
min_iter_ = param.getDefault("min_iter", min_iter_);
|
||||
max_residual_allowed_ = param.getDefault("max_residual_allowed", max_residual_allowed_);
|
||||
|
||||
tolerance_mb_ = param.getDefault("tolerance_mb", tolerance_mb_);
|
||||
@ -328,7 +331,7 @@ namespace detail {
|
||||
const enum RelaxType relaxtype = relaxType();
|
||||
int linearIterations = 0;
|
||||
|
||||
while ((!converged) && (it < maxIter())) {
|
||||
while ((!converged && (it < maxIter())) || (minIter() > it)) {
|
||||
V dx = solveJacobianSystem();
|
||||
|
||||
// store number of linear iterations used
|
||||
|
Loading…
Reference in New Issue
Block a user