Separation offset bug fix

This commit is contained in:
Hrvoje Jasak 2013-06-30 18:37:14 +01:00
parent e42b41bea9
commit 12d4084b24
2 changed files with 23 additions and 5 deletions

View file

@ -85,10 +85,10 @@ void Foam::cyclicGgiPolyPatch::checkDefinition() const
) )
{ {
FatalErrorIn("void cyclicGgiPolyPatch::check() const") FatalErrorIn("void cyclicGgiPolyPatch::check() const")
<< " The rotation angle for patch name : " << " Rotation angle for patch name : "
<< name() << " is: " << rotationAngle() << " axis: " << name() << " is: " << rotationAngle()
<< cyclicShadow().rotationAxis() << nl << " axis: " << rotationAxis() << nl
<< " The rotation angle for the shadow patch name: " << " Rotation angle for shadow patch name: "
<< shadowName() << " is: " << shadowName() << " is: "
<< cyclicShadow().rotationAngle() << " axis: " << cyclicShadow().rotationAngle() << " axis: "
<< cyclicShadow().rotationAxis() << nl << cyclicShadow().rotationAxis() << nl
@ -97,6 +97,22 @@ void Foam::cyclicGgiPolyPatch::checkDefinition() const
<< abort(FatalError); << abort(FatalError);
} }
if
(
(mag(separationOffset() + cyclicShadow().separationOffset())) > SMALL
)
{
FatalErrorIn("void cyclicGgiPolyPatch::check() const")
<< "Separation offset for patch name : "
<< name() << " is: " << separationOffset()
<< " Separation offset for shadow patch name: "
<< shadowName() << " is: "
<< cyclicShadow().separationOffset() << " axis: "
<< " Both values need to be opposite in "
<< "the boundary file. "
<< abort(FatalError);
}
if (debug > 1 && master()) if (debug > 1 && master())
{ {
Info<< "Writing transformed slave patch as VTK." << nl Info<< "Writing transformed slave patch as VTK." << nl

View file

@ -196,7 +196,9 @@ void Foam::ggiPolyPatch::calcPatchToPatch() const
shadow().zone()(), // Shadow zone reference shadow().zone()(), // Shadow zone reference
forwardT(), forwardT(),
reverseT(), reverseT(),
shadow().separation(), // Slave-to-master separation. Bug fix -separation(), // Slave-to-master separation: Use - localValue
// Bug fix, delayed slave evaluation causes error
// HJ, 30/Jun/2013
0, // Non-overlapping face tolerances 0, // Non-overlapping face tolerances
0, // HJ, 24/Oct/2008 0, // HJ, 24/Oct/2008
true, // Rescale weighting factors. Bug fix, MB. true, // Rescale weighting factors. Bug fix, MB.