mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge branch 'feature-AMIMethod' into 'develop'
ENH: cyclicAMI: added 'method' specification See merge request !31
This commit is contained in:
@ -3,7 +3,7 @@
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -495,6 +495,7 @@ Foam::cyclicAMIPolyPatch::cyclicAMIPolyPatch
|
||||
rotationAngle_(0.0),
|
||||
separationVector_(vector::zero),
|
||||
AMIPtr_(NULL),
|
||||
AMIMethod_(AMIPatchToPatchInterpolation::imFaceAreaWeight),
|
||||
AMIReverse_(false),
|
||||
AMIRequireMatch_(true),
|
||||
AMILowWeightCorrection_(-1.0),
|
||||
@ -525,6 +526,20 @@ Foam::cyclicAMIPolyPatch::cyclicAMIPolyPatch
|
||||
rotationAngle_(0.0),
|
||||
separationVector_(vector::zero),
|
||||
AMIPtr_(NULL),
|
||||
AMIMethod_
|
||||
(
|
||||
AMIPatchToPatchInterpolation::wordTointerpolationMethod
|
||||
(
|
||||
dict.lookupOrDefault
|
||||
(
|
||||
"method",
|
||||
AMIPatchToPatchInterpolation::interpolationMethodToWord
|
||||
(
|
||||
AMIPatchToPatchInterpolation::imFaceAreaWeight
|
||||
)
|
||||
)
|
||||
)
|
||||
),
|
||||
AMIReverse_(dict.lookupOrDefault<bool>("flipNormals", false)),
|
||||
AMIRequireMatch_(true),
|
||||
AMILowWeightCorrection_(dict.lookupOrDefault("lowWeightCorrection", -1.0)),
|
||||
@ -614,6 +629,7 @@ Foam::cyclicAMIPolyPatch::cyclicAMIPolyPatch
|
||||
rotationAngle_(pp.rotationAngle_),
|
||||
separationVector_(pp.separationVector_),
|
||||
AMIPtr_(NULL),
|
||||
AMIMethod_(pp.AMIMethod_),
|
||||
AMIReverse_(pp.AMIReverse_),
|
||||
AMIRequireMatch_(pp.AMIRequireMatch_),
|
||||
AMILowWeightCorrection_(pp.AMILowWeightCorrection_),
|
||||
@ -645,6 +661,7 @@ Foam::cyclicAMIPolyPatch::cyclicAMIPolyPatch
|
||||
rotationAngle_(pp.rotationAngle_),
|
||||
separationVector_(pp.separationVector_),
|
||||
AMIPtr_(NULL),
|
||||
AMIMethod_(pp.AMIMethod_),
|
||||
AMIReverse_(pp.AMIReverse_),
|
||||
AMIRequireMatch_(pp.AMIRequireMatch_),
|
||||
AMILowWeightCorrection_(pp.AMILowWeightCorrection_),
|
||||
@ -683,6 +700,7 @@ Foam::cyclicAMIPolyPatch::cyclicAMIPolyPatch
|
||||
rotationAngle_(pp.rotationAngle_),
|
||||
separationVector_(pp.separationVector_),
|
||||
AMIPtr_(NULL),
|
||||
AMIMethod_(pp.AMIMethod_),
|
||||
AMIReverse_(pp.AMIReverse_),
|
||||
AMIRequireMatch_(pp.AMIRequireMatch_),
|
||||
AMILowWeightCorrection_(pp.AMILowWeightCorrection_),
|
||||
@ -791,7 +809,7 @@ const Foam::AMIPatchToPatchInterpolation& Foam::cyclicAMIPolyPatch::AMI() const
|
||||
|
||||
if (!AMIPtr_.valid())
|
||||
{
|
||||
resetAMI();
|
||||
resetAMI(AMIMethod_);
|
||||
}
|
||||
|
||||
return AMIPtr_();
|
||||
@ -1080,6 +1098,16 @@ void Foam::cyclicAMIPolyPatch::write(Ostream& os) const
|
||||
}
|
||||
}
|
||||
|
||||
if (AMIMethod_ != AMIPatchToPatchInterpolation::imFaceAreaWeight)
|
||||
{
|
||||
os.writeKeyword("method")
|
||||
<< AMIPatchToPatchInterpolation::interpolationMethodToWord
|
||||
(
|
||||
AMIMethod_
|
||||
)
|
||||
<< token::END_STATEMENT << nl;
|
||||
}
|
||||
|
||||
if (AMIReverse_)
|
||||
{
|
||||
os.writeKeyword("flipNormals") << AMIReverse_
|
||||
|
||||
@ -111,6 +111,9 @@ protected:
|
||||
//- AMI interpolation class
|
||||
mutable autoPtr<AMIPatchToPatchInterpolation> AMIPtr_;
|
||||
|
||||
//- AMI method
|
||||
const AMIPatchToPatchInterpolation::interpolationMethod AMIMethod_;
|
||||
|
||||
//- Flag to indicate that slave patch should be reversed for AMI
|
||||
const bool AMIReverse_;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user