NewtonIterationBlackoilCPR: fix uninitialized parameter and make the parameters const.

This commit is contained in:
Robert Kloefkorn 2015-04-08 11:48:16 +02:00
parent 72ec98f94b
commit 1ccf74eb4e
2 changed files with 13 additions and 14 deletions

View File

@ -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.

View File

@ -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