mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
BUG: ACMI - updated interpolation weights and construction order - mantis #1279
This commit is contained in:
@ -127,6 +127,10 @@ void Foam::cyclicACMIPolyPatch::setNeighbourFaceAreas() const
|
|||||||
|
|
||||||
void Foam::cyclicACMIPolyPatch::initGeometry(PstreamBuffers& pBufs)
|
void Foam::cyclicACMIPolyPatch::initGeometry(PstreamBuffers& pBufs)
|
||||||
{
|
{
|
||||||
|
// initialise the AMI so that base geometry (e.g. cell volumes) are
|
||||||
|
// correctly evaluated
|
||||||
|
resetAMI();
|
||||||
|
|
||||||
cyclicAMIPolyPatch::initGeometry(pBufs);
|
cyclicAMIPolyPatch::initGeometry(pBufs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -32,13 +32,16 @@ Foam::tmp<Foam::Field<Type> > Foam::cyclicACMIPolyPatch::interpolate
|
|||||||
const Field<Type>& fldNonOverlap
|
const Field<Type>& fldNonOverlap
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
|
// note: do not scale AMI field as face areas have already been taken
|
||||||
|
// into account
|
||||||
|
|
||||||
if (owner())
|
if (owner())
|
||||||
{
|
{
|
||||||
const scalarField& w = srcMask_;
|
const scalarField& w = srcMask_;
|
||||||
|
|
||||||
tmp<Field<Type> > interpField(AMI().interpolateToSource(fldCouple));
|
tmp<Field<Type> > interpField(AMI().interpolateToSource(fldCouple));
|
||||||
|
|
||||||
return w*interpField + (1.0 - w)*fldNonOverlap;
|
return interpField + (1.0 - w)*fldNonOverlap;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -49,7 +52,7 @@ Foam::tmp<Foam::Field<Type> > Foam::cyclicACMIPolyPatch::interpolate
|
|||||||
neighbPatch().AMI().interpolateToTarget(fldCouple)
|
neighbPatch().AMI().interpolateToTarget(fldCouple)
|
||||||
);
|
);
|
||||||
|
|
||||||
return w*interpField + (1.0 - w)*fldNonOverlap;
|
return interpField + (1.0 - w)*fldNonOverlap;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -74,19 +77,22 @@ void Foam::cyclicACMIPolyPatch::interpolate
|
|||||||
List<Type>& result
|
List<Type>& result
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
|
// note: do not scale AMI field as face areas have already been taken
|
||||||
|
// into account
|
||||||
|
|
||||||
if (owner())
|
if (owner())
|
||||||
{
|
{
|
||||||
const scalarField& w = srcMask_;
|
const scalarField& w = srcMask_;
|
||||||
|
|
||||||
AMI().interpolateToSource(fldCouple, cop, result);
|
AMI().interpolateToSource(fldCouple, cop, result);
|
||||||
result = w*result + (1.0 - w)*fldNonOverlap;
|
result = result + (1.0 - w)*fldNonOverlap;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
const scalarField& w = neighbPatch().tgtMask();
|
const scalarField& w = neighbPatch().tgtMask();
|
||||||
|
|
||||||
neighbPatch().AMI().interpolateToTarget(fldCouple, cop, result);
|
neighbPatch().AMI().interpolateToTarget(fldCouple, cop, result);
|
||||||
result = w*result + (1.0 - w)*fldNonOverlap;
|
result = result + (1.0 - w)*fldNonOverlap;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user