Skip to content
Snippets Groups Projects
Commit b3e5fbb7 authored by Andreas Lauser's avatar Andreas Lauser
Browse files

box model: change the way how the relative defect is calculated

this should not introduce any regressions and will hopefully change
things for the better...

git-svn-id: svn://svn.iws.uni-stuttgart.de/DUMUX/dumux/trunk@5998 2fb0f335-1f38-0410-981e-8018bf24f1b0
parent 7fa138ae
No related branches found
No related tags found
No related merge requests found
...@@ -410,8 +410,10 @@ public: ...@@ -410,8 +410,10 @@ public:
{ {
Scalar result = 0.0; Scalar result = 0.0;
for (int j = 0; j < numEq; ++j) { for (int j = 0; j < numEq; ++j) {
Scalar weight = asImp_().primaryVarWeight(vertexIdx, j); //Scalar weight = asImp_().primaryVarWeight(vertexIdx, j);
Scalar eqErr = std::abs(pv1[j] - pv2[j])*weight; //Scalar eqErr = std::abs(pv1[j] - pv2[j])*weight;
Scalar eqErr = std::abs(pv1[j] - pv2[j]);
eqErr /= std::max(1.0, std::abs(pv1[j] + pv2[j])/2);
result = std::max(result, eqErr); result = std::max(result, eqErr);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment