Fixed FPE for NVDTVD schemes; forced vanAlbada flux limiter to be possitive

This commit is contained in:
Oliver Borm (boroli) 2011-01-04 10:36:48 +01:00
parent e5a96484f3
commit ba01e50738
3 changed files with 3 additions and 3 deletions

View file

@ -113,7 +113,7 @@ public:
} }
// Stabilise for division // Stabilise for division
gradf = stabilise(gradf, VSMALL); gradf = stabilise(gradf, SMALL);
return 2*(gradcf/gradf) - 1; return 2*(gradcf/gradf) - 1;
} }

View file

@ -114,7 +114,7 @@ public:
} }
// Stabilise for division // Stabilise for division
gradf = stabilise(gradf, VSMALL); gradf = stabilise(gradf, SMALL);
return 2*(gradcf/gradf) - 1; return 2*(gradcf/gradf) - 1;
} }

View file

@ -78,7 +78,7 @@ public:
faceFlux, phiP, phiN, gradcP, gradcN, d faceFlux, phiP, phiN, gradcP, gradcN, d
); );
return r*(r + 1)/(sqr(r) + 1); return max(r*(r + 1)/(sqr(r) + 1),0);
} }
}; };