BUGFIX: GGI interpolation not updated when mesh moves

This commit is contained in:
Henrik Rusche 2013-12-06 16:20:00 +01:00
parent 9454c3e2dd
commit c156c308f2
5 changed files with 44 additions and 15 deletions

View file

@ -203,8 +203,17 @@ GGIInterpolation<MasterPatch, SlavePatch>::uncoveredSlaveFaces() const
template<class MasterPatch, class SlavePatch> template<class MasterPatch, class SlavePatch>
bool GGIInterpolation<MasterPatch, SlavePatch>::movePoints() bool GGIInterpolation<MasterPatch, SlavePatch>::movePoints
(
const tensorField& forwardT,
const tensorField& reverseT,
const vectorField& forwardSep
)
{ {
this->forwardT_ = forwardT;
this->reverseT_ = reverseT;
this->forwardSep_ = forwardSep;
clearOut(); clearOut();
return true; return true;

View file

@ -134,18 +134,18 @@ class GGIInterpolation
// master plane. Size equals number of slave faces; zero length // master plane. Size equals number of slave faces; zero length
// indicates no transform. Size 1 indicates constant transform // indicates no transform. Size 1 indicates constant transform
// HJ, 6/Jan/2009 // HJ, 6/Jan/2009
const tensorField forwardT_; tensorField forwardT_;
//- Master-to-slave transformation tensor. Transforms slave data to //- Master-to-slave transformation tensor. Transforms slave data to
// master plane. Size equals number of master faces; zero length // master plane. Size equals number of master faces; zero length
// indicates no transform. Size 1 indicates constant transform // indicates no transform. Size 1 indicates constant transform
// HJ, 6/Jan/2009 // HJ, 6/Jan/2009
const tensorField reverseT_; tensorField reverseT_;
//- Slave-to-master separation vector. Translation of slave data to //- Slave-to-master separation vector. Translation of slave data to
// master plane. Size equals number of slave faces; zero length // master plane. Size equals number of slave faces; zero length
// indicates no translation. MB, 28/Jan/2009 // indicates no translation. MB, 28/Jan/2009
const vectorField forwardSep_; vectorField forwardSep_;
//- Master non-overlap face tolerance factor //- Master non-overlap face tolerance factor
const scalar masterNonOverlapFaceTol_; const scalar masterNonOverlapFaceTol_;
@ -552,7 +552,12 @@ public:
// Edit // Edit
//- Correct weighting factors for moving mesh. //- Correct weighting factors for moving mesh.
bool movePoints(); bool movePoints
(
const tensorField& forwardT,
const tensorField& reverseT,
const vectorField& forwardSep
);
}; };

View file

@ -834,7 +834,12 @@ void Foam::ggiPolyPatch::initMovePoints(const pointField& p)
// Update interpolation for new relative position of GGI interfaces // Update interpolation for new relative position of GGI interfaces
if (patchToPatchPtr_) if (patchToPatchPtr_)
{ {
patchToPatchPtr_->movePoints(); patchToPatchPtr_->movePoints
(
forwardT(),
reverseT(),
-separation()
);
} }
// Recalculate send and receive maps // Recalculate send and receive maps

View file

@ -1002,7 +1002,12 @@ void Foam::regionCouplePolyPatch::initMovePoints(const pointField& p)
// Update interpolation for new relative position of GGI interfaces // Update interpolation for new relative position of GGI interfaces
if (patchToPatchPtr_) if (patchToPatchPtr_)
{ {
patchToPatchPtr_->movePoints(); patchToPatchPtr_->movePoints
(
forwardT(),
reverseT(),
shadow().separation()
);
} }
// Recalculate send and receive maps // Recalculate send and receive maps

View file

@ -707,7 +707,12 @@ void solidContactFvPatchVectorField::updateCoeffs()
{ {
if (slaveToMasterGgiInterpolatorPtr_) if (slaveToMasterGgiInterpolatorPtr_)
{ {
slaveToMasterGgiInterpolatorPtr_->movePoints(); slaveToMasterGgiInterpolatorPtr_->movePoints
(
tensorField(0),
tensorField(0),
vectorField(0)
);
} }
else if (slaveToMasterPatchToPatchInterpolatorPtr_) else if (slaveToMasterPatchToPatchInterpolatorPtr_)
{ {