From cb7e9ddb3af5b00a5e51a410493efffbb91f7112 Mon Sep 17 00:00:00 2001 From: Andreas Lauser <and@poware.org> Date: Tue, 31 Jan 2012 14:53:27 +0000 Subject: [PATCH] box local jacobian: modify the base epsilon to 10^-10 and make sure that the base epsilon is still at least 4 orders of magnitude larger than the machine precision... git-svn-id: svn://svn.iws.uni-stuttgart.de/DUMUX/dumux/trunk@7583 2fb0f335-1f38-0410-981e-8018bf24f1b0 --- dumux/boxmodels/common/boxlocaljacobian.hh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dumux/boxmodels/common/boxlocaljacobian.hh b/dumux/boxmodels/common/boxlocaljacobian.hh index 666eae26ef..4656768523 100644 --- a/dumux/boxmodels/common/boxlocaljacobian.hh +++ b/dumux/boxmodels/common/boxlocaljacobian.hh @@ -267,9 +267,12 @@ public: // resolution of the scalar type. E.g. for standard 64 bit // floating point values, the resolution is about 10^-16 and // the base epsilon is thus approximately 10^-8. + /* static const Scalar baseEps = Dumux::geometricMean<Scalar>(std::numeric_limits<Scalar>::epsilon(), 1.0); - + */ + static const Scalar baseEps = 1e-10; + assert(std::numeric_limits<Scalar>::epsilon()*1e4 < baseEps); // the epsilon value used for the numeric differentiation is // now scaled by the absolute value of the primary variable... Scalar pv = this->curVolVars_[scvIdx].primaryVar(pvIdx); -- GitLab