diff --git a/src/finiteVolume/fvMesh/fvMesh.C b/src/finiteVolume/fvMesh/fvMesh.C index c6c143d97..ff0cb6a35 100644 --- a/src/finiteVolume/fvMesh/fvMesh.C +++ b/src/finiteVolume/fvMesh/fvMesh.C @@ -61,6 +61,10 @@ void Foam::fvMesh::clearGeomNotOldVol() deleteDemandDrivenData(magSfPtr_); deleteDemandDrivenData(CPtr_); deleteDemandDrivenData(CfPtr_); + + // Mesh moved: force recalculation of surface interpolation data. + // HJ, 20/Nov/2019 + surfaceInterpolation::clearOut(); } @@ -107,7 +111,6 @@ void Foam::fvMesh::clearAddressing() void Foam::fvMesh::clearOut() { clearGeom(); - surfaceInterpolation::clearOut(); clearAddressing(); diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/surfaceInterpolation/surfaceInterpolation.C b/src/finiteVolume/interpolation/surfaceInterpolation/surfaceInterpolation/surfaceInterpolation.C index 6b80d44b0..d611af601 100644 --- a/src/finiteVolume/interpolation/surfaceInterpolation/surfaceInterpolation/surfaceInterpolation.C +++ b/src/finiteVolume/interpolation/surfaceInterpolation/surfaceInterpolation/surfaceInterpolation.C @@ -43,6 +43,8 @@ void Foam::surfaceInterpolation::clearOut() { deleteDemandDrivenData(weightingFactors_); deleteDemandDrivenData(deltaCoeffs_); + + orthogonal_ = false; deleteDemandDrivenData(correctionVectors_); } @@ -120,11 +122,7 @@ Foam::surfaceInterpolation::correctionVectors() const bool Foam::surfaceInterpolation::movePoints() { - deleteDemandDrivenData(weightingFactors_); - deleteDemandDrivenData(deltaCoeffs_); - - orthogonal_ = false; - deleteDemandDrivenData(correctionVectors_); + clearOut(); return true; }