Robustness: use hinv in fvcReconstruct to deal with cases of zero determinant

This commit is contained in:
Hrvoje Jasak 2019-03-22 13:26:21 +00:00
parent f75b75df7b
commit ec3b5f5574

View file

@ -88,11 +88,11 @@ reconstruct
surfaceSum((mesh.Sf()/mesh.magSf())*ssf);
// Note: hinv inverse must be used to stabilise the inverse on bad meshes
// but it gives strange failures
// but it gives strange failures. Fixed hinv. HJ, 22/Mar/2019
// HJ, 19/Aug/2015
reconField.internalField() =
(
inv
hinv
(
surfaceSum(sqr(mesh.Sf())/mesh.magSf())().internalField()
)