mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
cyclicACMIPolyPatch: remove tolerance from the ACMI interpolation
Maybe resolves bug-report http://www.openfoam.org/mantisbt/view.php?id=1335 awaiting feedback from reporter.
This commit is contained in:
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -23,8 +23,6 @@ License
|
|||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
Foam::tmp<Foam::Field<Type> > Foam::cyclicACMIPolyPatch::interpolate
|
Foam::tmp<Foam::Field<Type> > Foam::cyclicACMIPolyPatch::interpolate
|
||||||
(
|
(
|
||||||
@ -32,27 +30,20 @@ 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
|
// Note: do not scale AMI field as face areas have already been taken into
|
||||||
// into account
|
// account
|
||||||
|
|
||||||
if (owner())
|
if (owner())
|
||||||
{
|
{
|
||||||
const scalarField& w = srcMask_;
|
return
|
||||||
|
AMI().interpolateToSource(fldCouple)
|
||||||
tmp<Field<Type> > interpField(AMI().interpolateToSource(fldCouple));
|
+ (1.0 - AMI().srcWeightsSum())*fldNonOverlap;
|
||||||
|
|
||||||
return interpField + (1.0 - w)*fldNonOverlap;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
const scalarField& w = neighbPatch().tgtMask();
|
return
|
||||||
|
|
||||||
tmp<Field<Type> > interpField
|
|
||||||
(
|
|
||||||
neighbPatch().AMI().interpolateToTarget(fldCouple)
|
neighbPatch().AMI().interpolateToTarget(fldCouple)
|
||||||
);
|
+ (1.0 - neighbPatch().AMI().tgtWeightsSum())*fldNonOverlap;
|
||||||
|
|
||||||
return interpField + (1.0 - w)*fldNonOverlap;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -77,22 +68,18 @@ 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
|
// Note: do not scale AMI field as face areas have already been taken into
|
||||||
// into account
|
// account
|
||||||
|
|
||||||
if (owner())
|
if (owner())
|
||||||
{
|
{
|
||||||
const scalarField& w = srcMask_;
|
|
||||||
|
|
||||||
AMI().interpolateToSource(fldCouple, cop, result);
|
AMI().interpolateToSource(fldCouple, cop, result);
|
||||||
result = result + (1.0 - w)*fldNonOverlap;
|
result += (1.0 - AMI().srcWeightsSum())*fldNonOverlap;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
const scalarField& w = neighbPatch().tgtMask();
|
|
||||||
|
|
||||||
neighbPatch().AMI().interpolateToTarget(fldCouple, cop, result);
|
neighbPatch().AMI().interpolateToTarget(fldCouple, cop, result);
|
||||||
result = result + (1.0 - w)*fldNonOverlap;
|
result += (1.0 - neighbPatch().AMI().tgtWeightsSum())*fldNonOverlap;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user