Using param.getDefault() instead of param.get().

And also remove the space in dsMax (), drsMaxRel (), dpMaxRel ().
This commit is contained in:
Kai Bao 2014-05-20 15:17:37 +02:00
parent 79916078f2
commit 63c53096cd
2 changed files with 6 additions and 6 deletions

View File

@ -272,9 +272,9 @@ namespace Opm {
/// residual mass balance (tol_cnv). /// residual mass balance (tol_cnv).
bool getConvergence(const double dt); bool getConvergence(const double dt);
const double dpMaxRel () const { return dp_max_rel_; } const double dpMaxRel() const { return dp_max_rel_; }
const double dsMax () const { return ds_max_; } const double dsMax() const { return ds_max_; }
const double drsMaxRel () const { return drs_max_rel_; } const double drsMaxRel() const { return drs_max_rel_; }
}; };
} // namespace Opm } // namespace Opm

View File

@ -242,13 +242,13 @@ namespace {
ADB::null() } ) ADB::null() } )
{ {
if (param.has("dp_max_rel")) { if (param.has("dp_max_rel")) {
dp_max_rel_ = param.get<double>(std::string("dp_max_rel")); dp_max_rel_ = param.getDefault("dp_max_rel", dp_max_rel_);
} }
if (param.has("ds_max")) { if (param.has("ds_max")) {
ds_max_ = param.get<double>("ds_max"); ds_max_ = param.getDefault("ds_max", ds_max_);
} }
if (param.has("drs_max_rel")) { if (param.has("drs_max_rel")) {
drs_max_rel_ = param.get<double>("drs_max_rel"); drs_max_rel_ = param.getDefault("drs_max_rel", drs_max_rel_);
} }
} }