mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
BUG: mapped: make consistent with AMI. Fixes #2275
This commit is contained in:
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2017 OpenFOAM Foundation
|
Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
Copyright (C) 2015-2020 OpenCFD Ltd.
|
Copyright (C) 2015-2021 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -1244,6 +1244,11 @@ void Foam::AMIInterpolation::write(Ostream& os) const
|
|||||||
{
|
{
|
||||||
os.writeEntry("AMIMethod", type());
|
os.writeEntry("AMIMethod", type());
|
||||||
|
|
||||||
|
if (!requireMatch_)
|
||||||
|
{
|
||||||
|
os.writeEntry("requireMatch", requireMatch_);
|
||||||
|
}
|
||||||
|
|
||||||
if (reverseTarget_)
|
if (reverseTarget_)
|
||||||
{
|
{
|
||||||
os.writeEntry("reverseTarget", reverseTarget_);
|
os.writeEntry("reverseTarget", reverseTarget_);
|
||||||
|
|||||||
@ -102,7 +102,7 @@ protected:
|
|||||||
const bool reverseTarget_;
|
const bool reverseTarget_;
|
||||||
|
|
||||||
//- Threshold weight below which interpolation is deactivated
|
//- Threshold weight below which interpolation is deactivated
|
||||||
scalar lowWeightCorrection_;
|
const scalar lowWeightCorrection_;
|
||||||
|
|
||||||
//- Index of processor that holds all of both sides. -1 in all other
|
//- Index of processor that holds all of both sides. -1 in all other
|
||||||
//- cases
|
//- cases
|
||||||
|
|||||||
@ -1341,7 +1341,18 @@ Foam::mappedPatchBase::mappedPatchBase
|
|||||||
&& sampleRegion_ == patch_.boundaryMesh().mesh().name()
|
&& sampleRegion_ == patch_.boundaryMesh().mesh().name()
|
||||||
),
|
),
|
||||||
mapPtr_(nullptr),
|
mapPtr_(nullptr),
|
||||||
AMIReverse_(dict.getOrDefault("flipNormals", false)),
|
AMIReverse_
|
||||||
|
(
|
||||||
|
dict.getOrDefault
|
||||||
|
(
|
||||||
|
"reverseTarget", // AMIInterpolation uses this keyword
|
||||||
|
dict.getOrDefault
|
||||||
|
(
|
||||||
|
"flipNormals",
|
||||||
|
false
|
||||||
|
)
|
||||||
|
)
|
||||||
|
),
|
||||||
AMIPtr_
|
AMIPtr_
|
||||||
(
|
(
|
||||||
AMIInterpolation::New
|
AMIInterpolation::New
|
||||||
@ -1433,7 +1444,18 @@ Foam::mappedPatchBase::mappedPatchBase
|
|||||||
&& sampleRegion_ == patch_.boundaryMesh().mesh().name()
|
&& sampleRegion_ == patch_.boundaryMesh().mesh().name()
|
||||||
),
|
),
|
||||||
mapPtr_(nullptr),
|
mapPtr_(nullptr),
|
||||||
AMIReverse_(dict.getOrDefault("flipNormals", false)),
|
AMIReverse_
|
||||||
|
(
|
||||||
|
dict.getOrDefault
|
||||||
|
(
|
||||||
|
"reverseTarget", // AMIInterpolation uses this keyword
|
||||||
|
dict.getOrDefault
|
||||||
|
(
|
||||||
|
"flipNormals",
|
||||||
|
false
|
||||||
|
)
|
||||||
|
)
|
||||||
|
),
|
||||||
AMIPtr_
|
AMIPtr_
|
||||||
(
|
(
|
||||||
AMIInterpolation::New
|
AMIInterpolation::New
|
||||||
@ -1968,21 +1990,23 @@ void Foam::mappedPatchBase::write(Ostream& os) const
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (mode_ == NEARESTPATCHFACEAMI)
|
if (mode_ == NEARESTPATCHFACEAMI)
|
||||||
{
|
{
|
||||||
if (AMIReverse_)
|
if (AMIPtr_)
|
||||||
{
|
{
|
||||||
os.writeEntry("flipNormals", AMIReverse_);
|
// Use AMI to write itself. Problem: outputs:
|
||||||
|
// - restartUncoveredSourceFace
|
||||||
|
// - reverseTarget (instead of flipNormals)
|
||||||
|
AMIPtr_->write(os);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!surfDict_.empty())
|
if (!surfDict_.empty())
|
||||||
{
|
{
|
||||||
surfDict_.writeEntry(surfDict_.dictName(), os);
|
surfDict_.writeEntry(surfDict_.dictName(), os);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
Reference in New Issue
Block a user