Bugfix: force recalculation of surfaceInterpolation data on mesh.readUpdate(). Needed for correct near-wall distance

This commit is contained in:
Hrvoje Jasak 2019-11-20 11:07:19 +00:00
parent 196399ef6a
commit 93fffffdb7
2 changed files with 7 additions and 6 deletions

View file

@ -61,6 +61,10 @@ void Foam::fvMesh::clearGeomNotOldVol()
deleteDemandDrivenData(magSfPtr_); deleteDemandDrivenData(magSfPtr_);
deleteDemandDrivenData(CPtr_); deleteDemandDrivenData(CPtr_);
deleteDemandDrivenData(CfPtr_); 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() void Foam::fvMesh::clearOut()
{ {
clearGeom(); clearGeom();
surfaceInterpolation::clearOut();
clearAddressing(); clearAddressing();

View file

@ -43,6 +43,8 @@ void Foam::surfaceInterpolation::clearOut()
{ {
deleteDemandDrivenData(weightingFactors_); deleteDemandDrivenData(weightingFactors_);
deleteDemandDrivenData(deltaCoeffs_); deleteDemandDrivenData(deltaCoeffs_);
orthogonal_ = false;
deleteDemandDrivenData(correctionVectors_); deleteDemandDrivenData(correctionVectors_);
} }
@ -120,11 +122,7 @@ Foam::surfaceInterpolation::correctionVectors() const
bool Foam::surfaceInterpolation::movePoints() bool Foam::surfaceInterpolation::movePoints()
{ {
deleteDemandDrivenData(weightingFactors_); clearOut();
deleteDemandDrivenData(deltaCoeffs_);
orthogonal_ = false;
deleteDemandDrivenData(correctionVectors_);
return true; return true;
} }