mirror of
https://github.com/OPM/opm-simulators.git
synced 2024-12-27 09:40:59 -06:00
NewtonIterationBlackoilCPR: fix uninitialized parameter and make the parameters const.
This commit is contained in:
parent
72ec98f94b
commit
1ccf74eb4e
@ -99,20 +99,19 @@ namespace Opm
|
||||
/// Construct a system solver.
|
||||
NewtonIterationBlackoilCPR::NewtonIterationBlackoilCPR(const parameter::ParameterGroup& param,
|
||||
const boost::any& parallelInformation)
|
||||
: cpr_param_( param ),
|
||||
iterations_( 0 ),
|
||||
parallelInformation_(parallelInformation)
|
||||
: cpr_param_( param ),
|
||||
iterations_( 0 ),
|
||||
parallelInformation_(parallelInformation),
|
||||
newton_use_gmres_( param.getDefault("newton_use_gmres", true ) ),
|
||||
linear_solver_reduction_( param.getDefault("linear_solver_reduction", 1e-3 ) ),
|
||||
linear_solver_maxiter_( param.getDefault("linear_solver_maxiter", 150 ) ),
|
||||
linear_solver_restart_( param.getDefault("linear_solver_restart", 40 ) ),
|
||||
linear_solver_verbosity_( param.getDefault("linear_solver_verbosity", 0 ))
|
||||
{
|
||||
linear_solver_reduction_ = param.getDefault("linear_solver_reduction", 1e-3 );
|
||||
linear_solver_maxiter_ = param.getDefault("linear_solver_maxiter", 150 );
|
||||
linear_solver_restart_ = param.getDefault("linear_solver_restart", 40 );
|
||||
linear_solver_verbosity_ = param.getDefault("linear_solver_verbosity", 0 );
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/// Solve the linear system Ax = b, with A being the
|
||||
/// combined derivative matrix of the residual and b
|
||||
/// being the residual itself.
|
||||
|
@ -116,13 +116,13 @@ namespace Opm
|
||||
CPRParameter cpr_param_;
|
||||
|
||||
mutable int iterations_;
|
||||
bool newton_use_gmres_;
|
||||
boost::any parallelInformation_;
|
||||
|
||||
double linear_solver_reduction_;
|
||||
int linear_solver_maxiter_;
|
||||
int linear_solver_restart_;
|
||||
int linear_solver_verbosity_;
|
||||
const bool newton_use_gmres_;
|
||||
const double linear_solver_reduction_;
|
||||
const int linear_solver_maxiter_;
|
||||
const int linear_solver_restart_;
|
||||
const int linear_solver_verbosity_;
|
||||
};
|
||||
|
||||
} // namespace Opm
|
||||
|
Loading…
Reference in New Issue
Block a user