diff --git a/src/OpenFOAM/interpolations/GGIInterpolation/GGIInterpolation.C b/src/OpenFOAM/interpolations/GGIInterpolation/GGIInterpolation.C index aa29c4016..439061404 100644 --- a/src/OpenFOAM/interpolations/GGIInterpolation/GGIInterpolation.C +++ b/src/OpenFOAM/interpolations/GGIInterpolation/GGIInterpolation.C @@ -203,8 +203,17 @@ GGIInterpolation::uncoveredSlaveFaces() const template -bool GGIInterpolation::movePoints() +bool GGIInterpolation::movePoints +( + const tensorField& forwardT, + const tensorField& reverseT, + const vectorField& forwardSep +) { + this->forwardT_ = forwardT; + this->reverseT_ = reverseT; + this->forwardSep_ = forwardSep; + clearOut(); return true; diff --git a/src/OpenFOAM/interpolations/GGIInterpolation/GGIInterpolation.H b/src/OpenFOAM/interpolations/GGIInterpolation/GGIInterpolation.H index 75e431b31..d36f2df5e 100644 --- a/src/OpenFOAM/interpolations/GGIInterpolation/GGIInterpolation.H +++ b/src/OpenFOAM/interpolations/GGIInterpolation/GGIInterpolation.H @@ -134,18 +134,18 @@ class GGIInterpolation // master plane. Size equals number of slave faces; zero length // indicates no transform. Size 1 indicates constant transform // HJ, 6/Jan/2009 - const tensorField forwardT_; + tensorField forwardT_; //- Master-to-slave transformation tensor. Transforms slave data to // master plane. Size equals number of master faces; zero length // indicates no transform. Size 1 indicates constant transform // HJ, 6/Jan/2009 - const tensorField reverseT_; + tensorField reverseT_; //- Slave-to-master separation vector. Translation of slave data to // master plane. Size equals number of slave faces; zero length // indicates no translation. MB, 28/Jan/2009 - const vectorField forwardSep_; + vectorField forwardSep_; //- Master non-overlap face tolerance factor const scalar masterNonOverlapFaceTol_; @@ -552,7 +552,12 @@ public: // Edit //- Correct weighting factors for moving mesh. - bool movePoints(); + bool movePoints + ( + const tensorField& forwardT, + const tensorField& reverseT, + const vectorField& forwardSep + ); }; diff --git a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/ggi/ggiPolyPatch.C b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/ggi/ggiPolyPatch.C index 6abf3e2d4..a0ca356cc 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/ggi/ggiPolyPatch.C +++ b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/ggi/ggiPolyPatch.C @@ -834,7 +834,12 @@ void Foam::ggiPolyPatch::initMovePoints(const pointField& p) // Update interpolation for new relative position of GGI interfaces if (patchToPatchPtr_) { - patchToPatchPtr_->movePoints(); + patchToPatchPtr_->movePoints + ( + forwardT(), + reverseT(), + -separation() + ); } // Recalculate send and receive maps diff --git a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/regionCouple/regionCouplePolyPatch.C b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/regionCouple/regionCouplePolyPatch.C index 3e701cf70..296444819 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/regionCouple/regionCouplePolyPatch.C +++ b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/regionCouple/regionCouplePolyPatch.C @@ -1002,7 +1002,12 @@ void Foam::regionCouplePolyPatch::initMovePoints(const pointField& p) // Update interpolation for new relative position of GGI interfaces if (patchToPatchPtr_) { - patchToPatchPtr_->movePoints(); + patchToPatchPtr_->movePoints + ( + forwardT(), + reverseT(), + shadow().separation() + ); } // Recalculate send and receive maps diff --git a/src/solidModels/fvPatchFields/solidContact/solidContactFvPatchVectorField.C b/src/solidModels/fvPatchFields/solidContact/solidContactFvPatchVectorField.C index 98fb527c6..987656c7a 100644 --- a/src/solidModels/fvPatchFields/solidContact/solidContactFvPatchVectorField.C +++ b/src/solidModels/fvPatchFields/solidContact/solidContactFvPatchVectorField.C @@ -414,7 +414,7 @@ solidContactFvPatchVectorField::solidContactFvPatchVectorField *masterFaceZonePatchPtr_, // to zone alg_, dir_ - ); + ); } else if (interpolationMethod_ == "ggi") { @@ -440,7 +440,7 @@ solidContactFvPatchVectorField::solidContactFvPatchVectorField 0.0, true, ggiInterpolation::AABB - ); + ); } else { @@ -707,7 +707,12 @@ void solidContactFvPatchVectorField::updateCoeffs() { if (slaveToMasterGgiInterpolatorPtr_) { - slaveToMasterGgiInterpolatorPtr_->movePoints(); + slaveToMasterGgiInterpolatorPtr_->movePoints + ( + tensorField(0), + tensorField(0), + vectorField(0) + ); } else if (slaveToMasterPatchToPatchInterpolatorPtr_) { @@ -898,14 +903,14 @@ tmp solidContactFvPatchVectorField::interpolateSlaveToMaster ( masterFaceZonePatchPtr_->size(), vector::zero - ); + ); if (slaveToMasterPatchToPatchInterpolatorPtr_) { globalMasterInterpField = slaveToMasterPatchToPatchInterpolatorPtr_->faceInterpolate ( globalSlaveField - ); + ); } else if (slaveToMasterGgiInterpolatorPtr_) { @@ -913,7 +918,7 @@ tmp solidContactFvPatchVectorField::interpolateSlaveToMaster slaveToMasterGgiInterpolatorPtr_->slaveToMaster ( globalSlaveField - ); + ); } else { @@ -1113,7 +1118,7 @@ void solidContactFvPatchVectorField::moveFaceZonePatches() *masterFaceZonePatchPtr_, // to zone alg_, dir_ - ); + ); } else if (slaveToMasterGgiInterpolatorPtr_) { @@ -1133,7 +1138,7 @@ void solidContactFvPatchVectorField::moveFaceZonePatches() 0.0, true, ggiInterpolation::AABB - ); + ); } // and primitive patch interpolators