BUGFIX: GGI interpolation not updated when mesh moves
This commit is contained in:
parent
9454c3e2dd
commit
c156c308f2
5 changed files with 44 additions and 15 deletions
|
@ -203,8 +203,17 @@ GGIInterpolation<MasterPatch, SlavePatch>::uncoveredSlaveFaces() const
|
|||
|
||||
|
||||
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();
|
||||
|
||||
return true;
|
||||
|
|
|
@ -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
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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<vectorField> solidContactFvPatchVectorField::interpolateSlaveToMaster
|
|||
(
|
||||
masterFaceZonePatchPtr_->size(),
|
||||
vector::zero
|
||||
);
|
||||
);
|
||||
if (slaveToMasterPatchToPatchInterpolatorPtr_)
|
||||
{
|
||||
globalMasterInterpField =
|
||||
slaveToMasterPatchToPatchInterpolatorPtr_->faceInterpolate<vector>
|
||||
(
|
||||
globalSlaveField
|
||||
);
|
||||
);
|
||||
}
|
||||
else if (slaveToMasterGgiInterpolatorPtr_)
|
||||
{
|
||||
|
@ -913,7 +918,7 @@ tmp<vectorField> 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
|
||||
|
|
Reference in a new issue