BlackoilModelBase: use single precision for solver when dt < 20 days.

This commit is contained in:
Robert Kloefkorn 2016-02-09 16:39:30 +01:00
parent e3b578d685
commit 37e49a62c8

View File

@ -250,7 +250,8 @@ namespace detail {
const bool converged = asImpl().getConvergence(dt, iteration);
const bool must_solve = (iteration < nonlinear_solver.minIter()) || (!converged);
if (must_solve) {
residual_.singlePrecision = false ;
// enable single precision for solvers when dt is smaller then 20 days
residual_.singlePrecision = (unit::convert::to(dt, unit::day) < 20.) ;
// Compute the nonlinear update.
V dx = asImpl().solveJacobianSystem();