polyPatch: Removed unnecessary constructors and clone functions
Poly patches should not hold non-uniform physical data that needs mapping on mesh changes (decomposition, reconstruction, topology change, etc ...). They should only hold uniform data that can be user-specified, or non-uniform data that can be constructed on the fly from the poly mesh. With the recent changes to mappedPatchBase and extrudeToRegionMesh, this has now been consistenly enforced, and a number of incomplete implementations of poly patch mapping have therefore been removed.
This commit is contained in:
@ -1032,7 +1032,6 @@ labelList addRegionPatches
|
||||
// << " between regions " << e
|
||||
// << " trying to add patches " << names << endl;
|
||||
|
||||
|
||||
mappedWallPolyPatch patch1
|
||||
(
|
||||
names[0],
|
||||
@ -1042,7 +1041,6 @@ labelList addRegionPatches
|
||||
regionNames[e[1]], // sampleRegion
|
||||
mappedPatchBase::NEARESTPATCHFACE,
|
||||
names[1], // samplePatch
|
||||
point::zero, // offset
|
||||
mesh.boundaryMesh()
|
||||
);
|
||||
|
||||
@ -1064,7 +1062,6 @@ labelList addRegionPatches
|
||||
regionNames[e[0]], // sampleRegion
|
||||
mappedPatchBase::NEARESTPATCHFACE,
|
||||
names[0],
|
||||
point::zero, // offset
|
||||
mesh.boundaryMesh()
|
||||
);
|
||||
fvMeshTools::addPatch
|
||||
|
||||
@ -581,21 +581,6 @@ Foam::coupledPolyPatch::coupledPolyPatch
|
||||
{}
|
||||
|
||||
|
||||
Foam::coupledPolyPatch::coupledPolyPatch
|
||||
(
|
||||
const coupledPolyPatch& pp,
|
||||
const polyBoundaryMesh& bm,
|
||||
const label index,
|
||||
const labelUList& mapAddressing,
|
||||
const label newStart
|
||||
)
|
||||
:
|
||||
polyPatch(pp, bm, index, mapAddressing, newStart),
|
||||
matchTolerance_(pp.matchTolerance_),
|
||||
ownToOwnOrderDataPtr_(nullptr)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::coupledPolyPatch::~coupledPolyPatch()
|
||||
|
||||
@ -244,16 +244,6 @@ public:
|
||||
const label newStart
|
||||
);
|
||||
|
||||
//- Construct given the original patch and a map
|
||||
coupledPolyPatch
|
||||
(
|
||||
const coupledPolyPatch& pp,
|
||||
const polyBoundaryMesh& bm,
|
||||
const label index,
|
||||
const labelUList& mapAddressing,
|
||||
const label newStart
|
||||
);
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~coupledPolyPatch();
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -95,21 +95,6 @@ Foam::genericPolyPatch::genericPolyPatch
|
||||
{}
|
||||
|
||||
|
||||
Foam::genericPolyPatch::genericPolyPatch
|
||||
(
|
||||
const genericPolyPatch& pp,
|
||||
const polyBoundaryMesh& bm,
|
||||
const label index,
|
||||
const labelUList& mapAddressing,
|
||||
const label newStart
|
||||
)
|
||||
:
|
||||
polyPatch(pp, bm, index, mapAddressing, newStart),
|
||||
actualTypeName_(pp.actualTypeName_),
|
||||
dict_(pp.dict_)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::genericPolyPatch::~genericPolyPatch()
|
||||
|
||||
@ -107,16 +107,6 @@ public:
|
||||
const label newStart
|
||||
);
|
||||
|
||||
//- Construct given the original patch and a map
|
||||
genericPolyPatch
|
||||
(
|
||||
const genericPolyPatch& pp,
|
||||
const polyBoundaryMesh& bm,
|
||||
const label index,
|
||||
const labelUList& mapAddressing,
|
||||
const label newStart
|
||||
);
|
||||
|
||||
//- Construct and return a clone, resetting the boundary mesh
|
||||
virtual autoPtr<polyPatch> clone(const polyBoundaryMesh& bm) const
|
||||
{
|
||||
@ -139,22 +129,6 @@ public:
|
||||
);
|
||||
}
|
||||
|
||||
//- Construct and return a clone, resetting the face list
|
||||
// and boundary mesh
|
||||
virtual autoPtr<polyPatch> clone
|
||||
(
|
||||
const polyBoundaryMesh& bm,
|
||||
const label index,
|
||||
const labelUList& mapAddressing,
|
||||
const label newStart
|
||||
) const
|
||||
{
|
||||
return autoPtr<polyPatch>
|
||||
(
|
||||
new genericPolyPatch(*this, bm, index, mapAddressing, newStart)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
//- Destructor
|
||||
~genericPolyPatch();
|
||||
|
||||
@ -281,28 +281,6 @@ Foam::cyclicPolyPatch::cyclicPolyPatch
|
||||
}
|
||||
|
||||
|
||||
Foam::cyclicPolyPatch::cyclicPolyPatch
|
||||
(
|
||||
const cyclicPolyPatch& pp,
|
||||
const polyBoundaryMesh& bm,
|
||||
const label index,
|
||||
const labelUList& mapAddressing,
|
||||
const label newStart
|
||||
)
|
||||
:
|
||||
coupledPolyPatch(pp, bm, index, mapAddressing, newStart),
|
||||
cyclicTransform(pp),
|
||||
nbrPatchName_(pp.nbrPatchName_),
|
||||
coupleGroup_(pp.coupleGroup_),
|
||||
nbrPatchID_(-1),
|
||||
coupledPointsPtr_(nullptr),
|
||||
coupledEdgesPtr_(nullptr),
|
||||
ownToNbrOrderDataPtr_(nullptr),
|
||||
ownToNbrCyclicOrderDataPtr_(nullptr),
|
||||
ownToNbrDebugOrderDataPtr_(nullptr)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::cyclicPolyPatch::~cyclicPolyPatch()
|
||||
|
||||
@ -206,16 +206,6 @@ public:
|
||||
const word& nbrPatchName
|
||||
);
|
||||
|
||||
//- Construct given the original patch and a map
|
||||
cyclicPolyPatch
|
||||
(
|
||||
const cyclicPolyPatch& pp,
|
||||
const polyBoundaryMesh& bm,
|
||||
const label index,
|
||||
const labelUList& mapAddressing,
|
||||
const label newStart
|
||||
);
|
||||
|
||||
//- Construct and return a clone, resetting the boundary mesh
|
||||
virtual autoPtr<polyPatch> clone(const polyBoundaryMesh& bm) const
|
||||
{
|
||||
@ -246,22 +236,6 @@ public:
|
||||
);
|
||||
}
|
||||
|
||||
//- Construct and return a clone, resetting the face list
|
||||
// and boundary mesh
|
||||
virtual autoPtr<polyPatch> clone
|
||||
(
|
||||
const polyBoundaryMesh& bm,
|
||||
const label index,
|
||||
const labelUList& mapAddressing,
|
||||
const label newStart
|
||||
) const
|
||||
{
|
||||
return autoPtr<polyPatch>
|
||||
(
|
||||
new cyclicPolyPatch(*this, bm, index, mapAddressing, newStart)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~cyclicPolyPatch();
|
||||
|
||||
@ -112,19 +112,6 @@ public:
|
||||
cyclicPolyPatch(pp, bm, index, newSize, newStart, nbrPatchName)
|
||||
{}
|
||||
|
||||
//- Construct given the original patch and a map
|
||||
cyclicSlipPolyPatch
|
||||
(
|
||||
const cyclicPolyPatch& pp,
|
||||
const polyBoundaryMesh& bm,
|
||||
const label index,
|
||||
const labelUList& mapAddressing,
|
||||
const label newStart
|
||||
)
|
||||
:
|
||||
cyclicPolyPatch(pp, bm, index, mapAddressing, newStart)
|
||||
{}
|
||||
|
||||
//- Construct and return a clone, resetting the boundary mesh
|
||||
virtual autoPtr<polyPatch> clone(const polyBoundaryMesh& bm) const
|
||||
{
|
||||
@ -155,29 +142,6 @@ public:
|
||||
);
|
||||
}
|
||||
|
||||
//- Construct and return a clone, resetting the face list
|
||||
// and boundary mesh
|
||||
virtual autoPtr<polyPatch> clone
|
||||
(
|
||||
const polyBoundaryMesh& bm,
|
||||
const label index,
|
||||
const labelUList& mapAddressing,
|
||||
const label newStart
|
||||
) const
|
||||
{
|
||||
return autoPtr<polyPatch>
|
||||
(
|
||||
new cyclicSlipPolyPatch
|
||||
(
|
||||
*this,
|
||||
bm,
|
||||
index,
|
||||
mapAddressing,
|
||||
newStart
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~cyclicSlipPolyPatch()
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -88,17 +88,4 @@ Foam::emptyPolyPatch::emptyPolyPatch
|
||||
{}
|
||||
|
||||
|
||||
Foam::emptyPolyPatch::emptyPolyPatch
|
||||
(
|
||||
const emptyPolyPatch& pp,
|
||||
const polyBoundaryMesh& bm,
|
||||
const label index,
|
||||
const labelUList& mapAddressing,
|
||||
const label newStart
|
||||
)
|
||||
:
|
||||
polyPatch(pp, bm, index, mapAddressing, newStart)
|
||||
{}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -93,16 +93,6 @@ public:
|
||||
const label newStart
|
||||
);
|
||||
|
||||
//- Construct given the original patch and a map
|
||||
emptyPolyPatch
|
||||
(
|
||||
const emptyPolyPatch& pp,
|
||||
const polyBoundaryMesh& bm,
|
||||
const label index,
|
||||
const labelUList& mapAddressing,
|
||||
const label newStart
|
||||
);
|
||||
|
||||
//- Construct and return a clone, resetting the boundary mesh
|
||||
virtual autoPtr<polyPatch> clone(const polyBoundaryMesh& bm) const
|
||||
{
|
||||
@ -124,22 +114,6 @@ public:
|
||||
new emptyPolyPatch(*this, bm, index, newSize, newStart)
|
||||
);
|
||||
}
|
||||
|
||||
//- Construct and return a clone, resetting the face list
|
||||
// and boundary mesh
|
||||
virtual autoPtr<polyPatch> clone
|
||||
(
|
||||
const polyBoundaryMesh& bm,
|
||||
const label index,
|
||||
const labelUList& mapAddressing,
|
||||
const label newStart
|
||||
) const
|
||||
{
|
||||
return autoPtr<polyPatch>
|
||||
(
|
||||
new emptyPolyPatch(*this, bm, index, mapAddressing, newStart)
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2021 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2021-2022 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -88,17 +88,4 @@ Foam::internalPolyPatch::internalPolyPatch
|
||||
{}
|
||||
|
||||
|
||||
Foam::internalPolyPatch::internalPolyPatch
|
||||
(
|
||||
const internalPolyPatch& pp,
|
||||
const polyBoundaryMesh& bm,
|
||||
const label index,
|
||||
const labelUList& mapAddressing,
|
||||
const label newStart
|
||||
)
|
||||
:
|
||||
polyPatch(pp, bm, index, mapAddressing, newStart)
|
||||
{}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2021 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2021-2022 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -96,16 +96,6 @@ public:
|
||||
const label newStart
|
||||
);
|
||||
|
||||
//- Construct given the original patch and a map
|
||||
internalPolyPatch
|
||||
(
|
||||
const internalPolyPatch& pp,
|
||||
const polyBoundaryMesh& bm,
|
||||
const label index,
|
||||
const labelUList& mapAddressing,
|
||||
const label newStart
|
||||
);
|
||||
|
||||
//- Construct and return a clone, resetting the boundary mesh
|
||||
virtual autoPtr<polyPatch> clone(const polyBoundaryMesh& bm) const
|
||||
{
|
||||
@ -127,22 +117,6 @@ public:
|
||||
new internalPolyPatch(*this, bm, index, newSize, newStart)
|
||||
);
|
||||
}
|
||||
|
||||
//- Construct and return a clone, resetting the face list
|
||||
// and boundary mesh
|
||||
virtual autoPtr<polyPatch> clone
|
||||
(
|
||||
const polyBoundaryMesh& bm,
|
||||
const label index,
|
||||
const labelUList& mapAddressing,
|
||||
const label newStart
|
||||
) const
|
||||
{
|
||||
return autoPtr<polyPatch>
|
||||
(
|
||||
new internalPolyPatch(*this, bm, index, mapAddressing, newStart)
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -146,24 +146,6 @@ Foam::processorPolyPatch::processorPolyPatch
|
||||
{}
|
||||
|
||||
|
||||
Foam::processorPolyPatch::processorPolyPatch
|
||||
(
|
||||
const processorPolyPatch& pp,
|
||||
const polyBoundaryMesh& bm,
|
||||
const label index,
|
||||
const labelUList& mapAddressing,
|
||||
const label newStart
|
||||
)
|
||||
:
|
||||
coupledPolyPatch(pp, bm, index, mapAddressing, newStart),
|
||||
myProcNo_(pp.myProcNo_),
|
||||
neighbProcNo_(pp.neighbProcNo_),
|
||||
neighbFaceCentres_(),
|
||||
neighbFaceAreas_(),
|
||||
neighbFaceCellCentres_()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::processorPolyPatch::~processorPolyPatch()
|
||||
|
||||
@ -162,16 +162,6 @@ public:
|
||||
const label newStart
|
||||
);
|
||||
|
||||
//- Construct given the original patch and a map
|
||||
processorPolyPatch
|
||||
(
|
||||
const processorPolyPatch& pp,
|
||||
const polyBoundaryMesh& bm,
|
||||
const label index,
|
||||
const labelUList& mapAddressing,
|
||||
const label newStart
|
||||
);
|
||||
|
||||
//- Construct and return a clone, resetting the boundary mesh
|
||||
virtual autoPtr<polyPatch> clone(const polyBoundaryMesh& bm) const
|
||||
{
|
||||
@ -201,29 +191,6 @@ public:
|
||||
);
|
||||
}
|
||||
|
||||
//- Construct and return a clone, resetting the face list
|
||||
// and boundary mesh
|
||||
virtual autoPtr<polyPatch> clone
|
||||
(
|
||||
const polyBoundaryMesh& bm,
|
||||
const label index,
|
||||
const labelUList& mapAddressing,
|
||||
const label newStart
|
||||
) const
|
||||
{
|
||||
return autoPtr<polyPatch>
|
||||
(
|
||||
new processorPolyPatch
|
||||
(
|
||||
*this,
|
||||
bm,
|
||||
index,
|
||||
mapAddressing,
|
||||
newStart
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~processorPolyPatch();
|
||||
|
||||
@ -143,22 +143,6 @@ Foam::processorCyclicPolyPatch::processorCyclicPolyPatch
|
||||
{}
|
||||
|
||||
|
||||
Foam::processorCyclicPolyPatch::processorCyclicPolyPatch
|
||||
(
|
||||
const processorCyclicPolyPatch& pp,
|
||||
const polyBoundaryMesh& bm,
|
||||
const label index,
|
||||
const labelUList& mapAddressing,
|
||||
const label newStart
|
||||
)
|
||||
:
|
||||
processorPolyPatch(pp, bm, index, mapAddressing, newStart),
|
||||
referPatchName_(pp.referPatchName()),
|
||||
tag_(-1),
|
||||
referPatchID_(-1)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::processorCyclicPolyPatch::~processorCyclicPolyPatch()
|
||||
|
||||
@ -170,16 +170,6 @@ public:
|
||||
const label newStart
|
||||
);
|
||||
|
||||
//- Construct given the original patch and a map
|
||||
processorCyclicPolyPatch
|
||||
(
|
||||
const processorCyclicPolyPatch& pp,
|
||||
const polyBoundaryMesh& bm,
|
||||
const label index,
|
||||
const labelUList& mapAddressing,
|
||||
const label newStart
|
||||
);
|
||||
|
||||
//- Construct and return a clone, resetting the boundary mesh
|
||||
virtual autoPtr<polyPatch> clone(const polyBoundaryMesh& bm) const
|
||||
{
|
||||
@ -209,29 +199,6 @@ public:
|
||||
);
|
||||
}
|
||||
|
||||
//- Construct and return a clone, resetting the face list
|
||||
// and boundary mesh
|
||||
virtual autoPtr<polyPatch> clone
|
||||
(
|
||||
const polyBoundaryMesh& bm,
|
||||
const label index,
|
||||
const labelUList& mapAddressing,
|
||||
const label newStart
|
||||
) const
|
||||
{
|
||||
return autoPtr<polyPatch>
|
||||
(
|
||||
new processorCyclicPolyPatch
|
||||
(
|
||||
*this,
|
||||
bm,
|
||||
index,
|
||||
mapAddressing,
|
||||
newStart
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
// Destructor
|
||||
virtual ~processorCyclicPolyPatch();
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -88,17 +88,4 @@ Foam::symmetryPolyPatch::symmetryPolyPatch
|
||||
{}
|
||||
|
||||
|
||||
Foam::symmetryPolyPatch::symmetryPolyPatch
|
||||
(
|
||||
const symmetryPolyPatch& pp,
|
||||
const polyBoundaryMesh& bm,
|
||||
const label index,
|
||||
const labelUList& mapAddressing,
|
||||
const label newStart
|
||||
)
|
||||
:
|
||||
polyPatch(pp, bm, index, mapAddressing, newStart)
|
||||
{}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -96,16 +96,6 @@ public:
|
||||
const label newStart
|
||||
);
|
||||
|
||||
//- Construct given the original patch and a map
|
||||
symmetryPolyPatch
|
||||
(
|
||||
const symmetryPolyPatch& pp,
|
||||
const polyBoundaryMesh& bm,
|
||||
const label index,
|
||||
const labelUList& mapAddressing,
|
||||
const label newStart
|
||||
);
|
||||
|
||||
//- Construct and return a clone, resetting the boundary mesh
|
||||
virtual autoPtr<polyPatch> clone(const polyBoundaryMesh& bm) const
|
||||
{
|
||||
@ -127,22 +117,6 @@ public:
|
||||
new symmetryPolyPatch(*this, bm, index, newSize, newStart)
|
||||
);
|
||||
}
|
||||
|
||||
//- Construct and return a clone, resetting the face list
|
||||
// and boundary mesh
|
||||
virtual autoPtr<polyPatch> clone
|
||||
(
|
||||
const polyBoundaryMesh& bm,
|
||||
const label index,
|
||||
const labelUList& mapAddressing,
|
||||
const label newStart
|
||||
) const
|
||||
{
|
||||
return autoPtr<polyPatch>
|
||||
(
|
||||
new symmetryPolyPatch(*this, bm, index, mapAddressing, newStart)
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2013-2018 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2013-2022 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -136,18 +136,4 @@ Foam::symmetryPlanePolyPatch::symmetryPlanePolyPatch
|
||||
{}
|
||||
|
||||
|
||||
Foam::symmetryPlanePolyPatch::symmetryPlanePolyPatch
|
||||
(
|
||||
const symmetryPlanePolyPatch& pp,
|
||||
const polyBoundaryMesh& bm,
|
||||
const label index,
|
||||
const labelUList& mapAddressing,
|
||||
const label newStart
|
||||
)
|
||||
:
|
||||
polyPatch(pp, bm, index, mapAddressing, newStart),
|
||||
n_(pp.n_)
|
||||
{}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2013-2020 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2013-2022 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -111,16 +111,6 @@ public:
|
||||
const label newStart
|
||||
);
|
||||
|
||||
//- Construct given the original patch and a map
|
||||
symmetryPlanePolyPatch
|
||||
(
|
||||
const symmetryPlanePolyPatch& pp,
|
||||
const polyBoundaryMesh& bm,
|
||||
const label index,
|
||||
const labelUList& mapAddressing,
|
||||
const label newStart
|
||||
);
|
||||
|
||||
//- Construct and return a clone, resetting the boundary mesh
|
||||
virtual autoPtr<polyPatch> clone(const polyBoundaryMesh& bm) const
|
||||
{
|
||||
@ -143,29 +133,6 @@ public:
|
||||
);
|
||||
}
|
||||
|
||||
//- Construct and return a clone, resetting the face list
|
||||
// and boundary mesh
|
||||
virtual autoPtr<polyPatch> clone
|
||||
(
|
||||
const polyBoundaryMesh& bm,
|
||||
const label index,
|
||||
const labelUList& mapAddressing,
|
||||
const label newStart
|
||||
) const
|
||||
{
|
||||
return autoPtr<polyPatch>
|
||||
(
|
||||
new symmetryPlanePolyPatch
|
||||
(
|
||||
*this,
|
||||
bm,
|
||||
index,
|
||||
mapAddressing,
|
||||
newStart
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -203,23 +203,4 @@ Foam::wedgePolyPatch::wedgePolyPatch
|
||||
{}
|
||||
|
||||
|
||||
Foam::wedgePolyPatch::wedgePolyPatch
|
||||
(
|
||||
const wedgePolyPatch& pp,
|
||||
const polyBoundaryMesh& bm,
|
||||
const label index,
|
||||
const labelUList& mapAddressing,
|
||||
const label newStart
|
||||
)
|
||||
:
|
||||
polyPatch(pp, bm, index, mapAddressing, newStart),
|
||||
axis_(pp.axis_),
|
||||
centreNormal_(pp.centreNormal_),
|
||||
n_(pp.n_),
|
||||
cosAngle_(pp.cosAngle_),
|
||||
faceT_(pp.faceT_),
|
||||
cellT_(pp.cellT_)
|
||||
{}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -122,16 +122,6 @@ public:
|
||||
const label newStart
|
||||
);
|
||||
|
||||
//- Construct given the original patch and a map
|
||||
wedgePolyPatch
|
||||
(
|
||||
const wedgePolyPatch& pp,
|
||||
const polyBoundaryMesh& bm,
|
||||
const label index,
|
||||
const labelUList& mapAddressing,
|
||||
const label newStart
|
||||
);
|
||||
|
||||
//- Construct and return a clone, resetting the boundary mesh
|
||||
virtual autoPtr<polyPatch> clone(const polyBoundaryMesh& bm) const
|
||||
{
|
||||
@ -154,22 +144,6 @@ public:
|
||||
);
|
||||
}
|
||||
|
||||
//- Construct and return a clone, resetting the face list
|
||||
// and boundary mesh
|
||||
virtual autoPtr<polyPatch> clone
|
||||
(
|
||||
const polyBoundaryMesh& bm,
|
||||
const label index,
|
||||
const labelUList& mapAddressing,
|
||||
const label newStart
|
||||
) const
|
||||
{
|
||||
return autoPtr<polyPatch>
|
||||
(
|
||||
new wedgePolyPatch(*this, bm, index, mapAddressing, newStart)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -100,17 +100,4 @@ Foam::wallPolyPatch::wallPolyPatch
|
||||
{}
|
||||
|
||||
|
||||
Foam::wallPolyPatch::wallPolyPatch
|
||||
(
|
||||
const wallPolyPatch& pp,
|
||||
const polyBoundaryMesh& bm,
|
||||
const label index,
|
||||
const labelUList& mapAddressing,
|
||||
const label newStart
|
||||
)
|
||||
:
|
||||
polyPatch(pp, bm, index, mapAddressing, newStart)
|
||||
{}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -93,16 +93,6 @@ public:
|
||||
const label newStart
|
||||
);
|
||||
|
||||
//- Construct given the original patch and a map
|
||||
wallPolyPatch
|
||||
(
|
||||
const wallPolyPatch& pp,
|
||||
const polyBoundaryMesh& bm,
|
||||
const label index,
|
||||
const labelUList& mapAddressing,
|
||||
const label newStart
|
||||
);
|
||||
|
||||
//- Construct and return a clone, resetting the boundary mesh
|
||||
virtual autoPtr<polyPatch> clone(const polyBoundaryMesh& bm) const
|
||||
{
|
||||
@ -124,22 +114,6 @@ public:
|
||||
new wallPolyPatch(*this, bm, index, newSize, newStart)
|
||||
);
|
||||
}
|
||||
|
||||
//- Construct and return a clone, resetting the face list
|
||||
// and boundary mesh
|
||||
virtual autoPtr<polyPatch> clone
|
||||
(
|
||||
const polyBoundaryMesh& bm,
|
||||
const label index,
|
||||
const labelUList& mapAddressing,
|
||||
const label newStart
|
||||
) const
|
||||
{
|
||||
return autoPtr<polyPatch>
|
||||
(
|
||||
new wallPolyPatch(*this, bm, index, mapAddressing, newStart)
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -214,33 +214,6 @@ Foam::polyPatch::polyPatch
|
||||
{}
|
||||
|
||||
|
||||
Foam::polyPatch::polyPatch
|
||||
(
|
||||
const polyPatch& pp,
|
||||
const polyBoundaryMesh& bm,
|
||||
const label index,
|
||||
const labelUList& mapAddressing,
|
||||
const label newStart
|
||||
)
|
||||
:
|
||||
patchIdentifier(pp, index),
|
||||
primitivePatch
|
||||
(
|
||||
faceSubList
|
||||
(
|
||||
bm.mesh().faces(),
|
||||
mapAddressing.size(),
|
||||
newStart
|
||||
),
|
||||
bm.mesh().points()
|
||||
),
|
||||
start_(newStart),
|
||||
boundaryMesh_(bm),
|
||||
faceCellsPtr_(nullptr),
|
||||
mePtr_(nullptr)
|
||||
{}
|
||||
|
||||
|
||||
Foam::polyPatch::polyPatch(const polyPatch& p)
|
||||
:
|
||||
patchIdentifier(p),
|
||||
|
||||
@ -209,16 +209,6 @@ public:
|
||||
const label newStart
|
||||
);
|
||||
|
||||
//- Construct given the original patch and a map
|
||||
polyPatch
|
||||
(
|
||||
const polyPatch& pp,
|
||||
const polyBoundaryMesh& bm,
|
||||
const label index,
|
||||
const labelUList& mapAddressing,
|
||||
const label newStart
|
||||
);
|
||||
|
||||
//- Copy constructor
|
||||
polyPatch(const polyPatch&);
|
||||
|
||||
@ -244,22 +234,6 @@ public:
|
||||
);
|
||||
}
|
||||
|
||||
//- Construct and return a clone, resetting the face list
|
||||
// and boundary mesh
|
||||
virtual autoPtr<polyPatch> clone
|
||||
(
|
||||
const polyBoundaryMesh& bm,
|
||||
const label index,
|
||||
const labelUList& mapAddressing,
|
||||
const label newStart
|
||||
) const
|
||||
{
|
||||
return autoPtr<polyPatch>
|
||||
(
|
||||
new polyPatch(*this, bm, index, mapAddressing, newStart)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
// Selectors
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2020 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2020-2022 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -88,17 +88,4 @@ Foam::mergedCyclicPolyPatch::mergedCyclicPolyPatch
|
||||
{}
|
||||
|
||||
|
||||
Foam::mergedCyclicPolyPatch::mergedCyclicPolyPatch
|
||||
(
|
||||
const mergedCyclicPolyPatch& pp,
|
||||
const polyBoundaryMesh& bm,
|
||||
const label index,
|
||||
const labelUList& mapAddressing,
|
||||
const label newStart
|
||||
)
|
||||
:
|
||||
polyPatch(pp, bm, index, mapAddressing, newStart)
|
||||
{}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2020 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2020-2022 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -102,16 +102,6 @@ public:
|
||||
const label newStart
|
||||
);
|
||||
|
||||
//- Construct given the original patch and a map
|
||||
mergedCyclicPolyPatch
|
||||
(
|
||||
const mergedCyclicPolyPatch& pp,
|
||||
const polyBoundaryMesh& bm,
|
||||
const label index,
|
||||
const labelUList& mapAddressing,
|
||||
const label newStart
|
||||
);
|
||||
|
||||
//- Construct and return a clone, resetting the boundary mesh
|
||||
virtual autoPtr<polyPatch> clone(const polyBoundaryMesh& bm) const
|
||||
{
|
||||
@ -133,29 +123,6 @@ public:
|
||||
new mergedCyclicPolyPatch(*this, bm, index, newSize, newStart)
|
||||
);
|
||||
}
|
||||
|
||||
//- Construct and return a clone, resetting the face list
|
||||
// and boundary mesh
|
||||
virtual autoPtr<polyPatch> clone
|
||||
(
|
||||
const polyBoundaryMesh& bm,
|
||||
const label index,
|
||||
const labelUList& mapAddressing,
|
||||
const label newStart
|
||||
) const
|
||||
{
|
||||
return autoPtr<polyPatch>
|
||||
(
|
||||
new mergedCyclicPolyPatch
|
||||
(
|
||||
*this,
|
||||
bm,
|
||||
index,
|
||||
mapAddressing,
|
||||
newStart
|
||||
)
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -374,31 +374,6 @@ Foam::cyclicAMIPolyPatch::cyclicAMIPolyPatch
|
||||
}
|
||||
|
||||
|
||||
Foam::cyclicAMIPolyPatch::cyclicAMIPolyPatch
|
||||
(
|
||||
const cyclicAMIPolyPatch& pp,
|
||||
const polyBoundaryMesh& bm,
|
||||
const label index,
|
||||
const labelUList& mapAddressing,
|
||||
const label newStart
|
||||
)
|
||||
:
|
||||
coupledPolyPatch(pp, bm, index, mapAddressing, newStart),
|
||||
cyclicTransform(pp),
|
||||
nbrPatchName_(pp.nbrPatchName_),
|
||||
coupleGroup_(pp.coupleGroup_),
|
||||
nbrPatchID_(-1),
|
||||
AMIs_(),
|
||||
AMITransforms_(),
|
||||
AMIReverse_(pp.AMIReverse_),
|
||||
AMIRequireMatch_(pp.AMIRequireMatch_),
|
||||
AMILowWeightCorrection_(pp.AMILowWeightCorrection_),
|
||||
AMIMethod_(pp.AMIMethod_),
|
||||
surfPtr_(nullptr),
|
||||
surfDict_(pp.surfDict_)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::cyclicAMIPolyPatch::~cyclicAMIPolyPatch()
|
||||
|
||||
@ -175,17 +175,6 @@ public:
|
||||
const word& nbrPatchName
|
||||
);
|
||||
|
||||
//- Construct given the original patch and a map
|
||||
cyclicAMIPolyPatch
|
||||
(
|
||||
const cyclicAMIPolyPatch& pp,
|
||||
const polyBoundaryMesh& bm,
|
||||
const label index,
|
||||
const labelUList& mapAddressing,
|
||||
const label newStart
|
||||
);
|
||||
|
||||
|
||||
//- Construct and return a clone, resetting the boundary mesh
|
||||
virtual autoPtr<polyPatch> clone(const polyBoundaryMesh& bm) const
|
||||
{
|
||||
@ -216,29 +205,6 @@ public:
|
||||
);
|
||||
}
|
||||
|
||||
//- Construct and return a clone, resetting the face list
|
||||
// and boundary mesh
|
||||
virtual autoPtr<polyPatch> clone
|
||||
(
|
||||
const polyBoundaryMesh& bm,
|
||||
const label index,
|
||||
const labelUList& mapAddressing,
|
||||
const label newStart
|
||||
) const
|
||||
{
|
||||
return autoPtr<polyPatch>
|
||||
(
|
||||
new cyclicAMIPolyPatch
|
||||
(
|
||||
*this,
|
||||
bm,
|
||||
index,
|
||||
mapAddressing,
|
||||
newStart
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~cyclicAMIPolyPatch();
|
||||
|
||||
@ -149,20 +149,6 @@ Foam::mappedExtrudedWallPolyPatch::mappedExtrudedWallPolyPatch
|
||||
{}
|
||||
|
||||
|
||||
Foam::mappedExtrudedWallPolyPatch::mappedExtrudedWallPolyPatch
|
||||
(
|
||||
const mappedExtrudedWallPolyPatch& pp,
|
||||
const polyBoundaryMesh& bm,
|
||||
const label index,
|
||||
const labelUList& mapAddressing,
|
||||
const label newStart
|
||||
)
|
||||
:
|
||||
mappedWallPolyPatch(pp, bm, index, mapAddressing, newStart),
|
||||
bottomPatch_(pp.bottomPatch_)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::mappedExtrudedWallPolyPatch::~mappedExtrudedWallPolyPatch()
|
||||
|
||||
@ -135,16 +135,6 @@ public:
|
||||
const label newStart
|
||||
);
|
||||
|
||||
//- Construct given the original patch and a map
|
||||
mappedExtrudedWallPolyPatch
|
||||
(
|
||||
const mappedExtrudedWallPolyPatch& pp,
|
||||
const polyBoundaryMesh& bm,
|
||||
const label index,
|
||||
const labelUList& mapAddressing,
|
||||
const label newStart
|
||||
);
|
||||
|
||||
//- Construct and return a clone, resetting the boundary mesh
|
||||
virtual autoPtr<polyPatch> clone(const polyBoundaryMesh& bm) const
|
||||
{
|
||||
@ -177,29 +167,6 @@ public:
|
||||
);
|
||||
}
|
||||
|
||||
//- Construct and return a clone, resetting the face list
|
||||
// and boundary mesh
|
||||
virtual autoPtr<polyPatch> clone
|
||||
(
|
||||
const polyBoundaryMesh& bm,
|
||||
const label index,
|
||||
const labelUList& mapAddressing,
|
||||
const label newStart
|
||||
) const
|
||||
{
|
||||
return autoPtr<polyPatch>
|
||||
(
|
||||
new mappedExtrudedWallPolyPatch
|
||||
(
|
||||
*this,
|
||||
bm,
|
||||
index,
|
||||
mapAddressing,
|
||||
newStart
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~mappedExtrudedWallPolyPatch();
|
||||
|
||||
@ -65,9 +65,9 @@ namespace Foam
|
||||
3
|
||||
>::names[] =
|
||||
{
|
||||
"uniform",
|
||||
"nonuniform",
|
||||
"normal"
|
||||
"none",
|
||||
"normal",
|
||||
"direction"
|
||||
};
|
||||
}
|
||||
|
||||
@ -81,6 +81,41 @@ const Foam::NamedEnum<Foam::mappedPatchBase::offsetMode, 3>
|
||||
|
||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||
|
||||
Foam::mappedPatchBase::offsetMode Foam::mappedPatchBase::readOffsetMode
|
||||
(
|
||||
const dictionary& dict
|
||||
) const
|
||||
{
|
||||
if (dict.found("offsetMode"))
|
||||
{
|
||||
return offsetModeNames_.read(dict.lookup("offsetMode"));
|
||||
}
|
||||
else
|
||||
{
|
||||
const bool haveDistance = dict.found("distance");
|
||||
const bool haveOffset = dict.found("offset");
|
||||
|
||||
if (haveDistance && haveOffset)
|
||||
{
|
||||
// Error. Demand "offsetMode" setting to disambiguate.
|
||||
return offsetModeNames_.read(dict.lookup("offsetMode"));
|
||||
}
|
||||
else if (haveDistance)
|
||||
{
|
||||
return NORMAL;
|
||||
}
|
||||
else if (haveOffset)
|
||||
{
|
||||
return DIRECTION;
|
||||
}
|
||||
else
|
||||
{
|
||||
return NONE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void Foam::mappedPatchBase::findSamples
|
||||
(
|
||||
const globalIndex& patchGlobalIndex,
|
||||
@ -362,7 +397,6 @@ void Foam::mappedPatchBase::calcMapping() const
|
||||
<< "Mapping already calculated" << exit(FatalError);
|
||||
}
|
||||
|
||||
/*
|
||||
// Do a sanity check. Am I sampling my own patch? This only makes sense if
|
||||
// the position is transformed.
|
||||
if
|
||||
@ -370,16 +404,15 @@ void Foam::mappedPatchBase::calcMapping() const
|
||||
mode_ == NEARESTPATCHFACE
|
||||
&& sampleRegion() == patch_.boundaryMesh().mesh().name()
|
||||
&& samplePatch() == patch_.name()
|
||||
&& !transform_.transformsPosition()
|
||||
&& offsetMode_ == NONE
|
||||
)
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Patch " << patch_.name() << " is sampling itself with no "
|
||||
<< "transformation. The patch face values are undefined."
|
||||
<< "offset. The patch face values are undefined."
|
||||
<< exit(FatalError);
|
||||
|
||||
}
|
||||
*/
|
||||
|
||||
const globalIndex patchGlobalIndex(patch_.size());
|
||||
|
||||
@ -587,12 +620,11 @@ Foam::mappedPatchBase::mappedPatchBase
|
||||
sampleRegion_(patch_.boundaryMesh().mesh().name()),
|
||||
sameRegion_(sampleRegion_ == patch_.boundaryMesh().mesh().name()),
|
||||
mode_(NEARESTPATCHFACE),
|
||||
samplePatch_(""),
|
||||
samplePatch_(word::null),
|
||||
coupleGroup_(),
|
||||
offsetMode_(UNIFORM),
|
||||
offset_(Zero),
|
||||
offsets_(pp.size(), offset_),
|
||||
distance_(0),
|
||||
offsetMode_(NONE),
|
||||
distance_(NaN),
|
||||
offset_(vector::uniform(NaN)),
|
||||
mapPtr_(nullptr),
|
||||
mapIndices_(),
|
||||
AMIPtr_(nullptr),
|
||||
@ -607,8 +639,7 @@ Foam::mappedPatchBase::mappedPatchBase
|
||||
const polyPatch& pp,
|
||||
const word& sampleRegion,
|
||||
const sampleMode mode,
|
||||
const word& samplePatch,
|
||||
const vectorField& offsets
|
||||
const word& samplePatch
|
||||
)
|
||||
:
|
||||
patch_(pp),
|
||||
@ -617,66 +648,9 @@ Foam::mappedPatchBase::mappedPatchBase
|
||||
mode_(mode),
|
||||
samplePatch_(samplePatch),
|
||||
coupleGroup_(),
|
||||
offsetMode_(NONUNIFORM),
|
||||
offset_(Zero),
|
||||
offsets_(offsets),
|
||||
distance_(0),
|
||||
mapPtr_(nullptr),
|
||||
mapIndices_(),
|
||||
AMIPtr_(nullptr),
|
||||
AMIReverse_(false),
|
||||
surfPtr_(nullptr),
|
||||
surfDict_(fileName("surface"))
|
||||
{}
|
||||
|
||||
|
||||
Foam::mappedPatchBase::mappedPatchBase
|
||||
(
|
||||
const polyPatch& pp,
|
||||
const word& sampleRegion,
|
||||
const sampleMode mode,
|
||||
const word& samplePatch,
|
||||
const vector& offset
|
||||
)
|
||||
:
|
||||
patch_(pp),
|
||||
sampleRegion_(sampleRegion),
|
||||
sameRegion_(sampleRegion_ == patch_.boundaryMesh().mesh().name()),
|
||||
mode_(mode),
|
||||
samplePatch_(samplePatch),
|
||||
coupleGroup_(),
|
||||
offsetMode_(UNIFORM),
|
||||
offset_(offset),
|
||||
offsets_(0),
|
||||
distance_(0),
|
||||
mapPtr_(nullptr),
|
||||
mapIndices_(),
|
||||
AMIPtr_(nullptr),
|
||||
AMIReverse_(false),
|
||||
surfPtr_(nullptr),
|
||||
surfDict_(fileName("surface"))
|
||||
{}
|
||||
|
||||
|
||||
Foam::mappedPatchBase::mappedPatchBase
|
||||
(
|
||||
const polyPatch& pp,
|
||||
const word& sampleRegion,
|
||||
const sampleMode mode,
|
||||
const word& samplePatch,
|
||||
const scalar distance
|
||||
)
|
||||
:
|
||||
patch_(pp),
|
||||
sampleRegion_(sampleRegion),
|
||||
sameRegion_(sampleRegion_ == patch_.boundaryMesh().mesh().name()),
|
||||
mode_(mode),
|
||||
samplePatch_(samplePatch),
|
||||
coupleGroup_(),
|
||||
offsetMode_(NORMAL),
|
||||
offset_(Zero),
|
||||
offsets_(0),
|
||||
distance_(distance),
|
||||
offsetMode_(NONE),
|
||||
distance_(NaN),
|
||||
offset_(vector::uniform(NaN)),
|
||||
mapPtr_(nullptr),
|
||||
mapIndices_(),
|
||||
AMIPtr_(nullptr),
|
||||
@ -693,15 +667,24 @@ Foam::mappedPatchBase::mappedPatchBase
|
||||
)
|
||||
:
|
||||
patch_(pp),
|
||||
sampleRegion_(dict.lookupOrDefault<word>("sampleRegion", "")),
|
||||
sampleRegion_(dict.lookupOrDefault<word>("sampleRegion", word::null)),
|
||||
sameRegion_(sampleRegion_ == patch_.boundaryMesh().mesh().name()),
|
||||
mode_(sampleModeNames_.read(dict.lookup("sampleMode"))),
|
||||
samplePatch_(dict.lookupOrDefault<word>("samplePatch", "")),
|
||||
samplePatch_(dict.lookupOrDefault<word>("samplePatch", word::null)),
|
||||
coupleGroup_(dict),
|
||||
offsetMode_(UNIFORM),
|
||||
offset_(Zero),
|
||||
offsets_(0),
|
||||
distance_(0.0),
|
||||
offsetMode_(readOffsetMode(dict)),
|
||||
distance_
|
||||
(
|
||||
offsetMode_ == NORMAL
|
||||
? dict.lookup<scalar>("distance")
|
||||
: NaN
|
||||
),
|
||||
offset_
|
||||
(
|
||||
offsetMode_ == DIRECTION
|
||||
? dict.lookup<vector>("offset")
|
||||
: vector::uniform(NaN)
|
||||
),
|
||||
mapPtr_(nullptr),
|
||||
mapIndices_(),
|
||||
AMIPtr_(nullptr),
|
||||
@ -709,57 +692,11 @@ Foam::mappedPatchBase::mappedPatchBase
|
||||
surfPtr_(nullptr),
|
||||
surfDict_(dict.subOrEmptyDict("surface"))
|
||||
{
|
||||
if (!coupleGroup_.valid())
|
||||
if (!coupleGroup_.valid() && sampleRegion_.empty())
|
||||
{
|
||||
if (sampleRegion_.empty())
|
||||
{
|
||||
// If no coupleGroup and no sampleRegion assume local region
|
||||
sampleRegion_ = patch_.boundaryMesh().mesh().name();
|
||||
sameRegion_ = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (dict.found("offsetMode"))
|
||||
{
|
||||
offsetMode_ = offsetModeNames_.read(dict.lookup("offsetMode"));
|
||||
|
||||
switch(offsetMode_)
|
||||
{
|
||||
case UNIFORM:
|
||||
{
|
||||
offset_ = point(dict.lookup("offset"));
|
||||
}
|
||||
break;
|
||||
|
||||
case NONUNIFORM:
|
||||
{
|
||||
offsets_ = readListOrField("offsets", dict, patch_.size());
|
||||
}
|
||||
break;
|
||||
|
||||
case NORMAL:
|
||||
{
|
||||
distance_ = dict.lookup<scalar>("distance");
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if (dict.found("offset"))
|
||||
{
|
||||
offsetMode_ = UNIFORM;
|
||||
offset_ = point(dict.lookup("offset"));
|
||||
}
|
||||
else if (dict.found("offsets"))
|
||||
{
|
||||
offsetMode_ = NONUNIFORM;
|
||||
offsets_ = readListOrField("offsets", dict, patch_.size());
|
||||
}
|
||||
else if (mode_ != NEARESTPATCHFACE && mode_ != NEARESTPATCHFACEAMI)
|
||||
{
|
||||
FatalIOErrorInFunction(dict)
|
||||
<< "Please supply the offsetMode as one of "
|
||||
<< NamedEnum<offsetMode, 3>::words()
|
||||
<< exit(FatalIOError);
|
||||
// If no coupleGroup and no sampleRegion then assume the local region
|
||||
sampleRegion_ = patch_.boundaryMesh().mesh().name();
|
||||
sameRegion_ = true;
|
||||
}
|
||||
}
|
||||
|
||||
@ -777,40 +714,8 @@ Foam::mappedPatchBase::mappedPatchBase
|
||||
samplePatch_(mpb.samplePatch_),
|
||||
coupleGroup_(mpb.coupleGroup_),
|
||||
offsetMode_(mpb.offsetMode_),
|
||||
offset_(mpb.offset_),
|
||||
offsets_(mpb.offsets_),
|
||||
distance_(mpb.distance_),
|
||||
mapPtr_(nullptr),
|
||||
mapIndices_(),
|
||||
AMIPtr_(nullptr),
|
||||
AMIReverse_(mpb.AMIReverse_),
|
||||
surfPtr_(nullptr),
|
||||
surfDict_(mpb.surfDict_)
|
||||
{}
|
||||
|
||||
|
||||
Foam::mappedPatchBase::mappedPatchBase
|
||||
(
|
||||
const polyPatch& pp,
|
||||
const mappedPatchBase& mpb,
|
||||
const labelUList& mapAddressing
|
||||
)
|
||||
:
|
||||
patch_(pp),
|
||||
sampleRegion_(mpb.sampleRegion_),
|
||||
sameRegion_(mpb.sameRegion_),
|
||||
mode_(mpb.mode_),
|
||||
samplePatch_(mpb.samplePatch_),
|
||||
coupleGroup_(mpb.coupleGroup_),
|
||||
offsetMode_(mpb.offsetMode_),
|
||||
offset_(mpb.offset_),
|
||||
offsets_
|
||||
(
|
||||
offsetMode_ == NONUNIFORM
|
||||
? vectorField(mpb.offsets_, mapAddressing)
|
||||
: vectorField(0)
|
||||
),
|
||||
distance_(mpb.distance_),
|
||||
mapPtr_(nullptr),
|
||||
mapIndices_(),
|
||||
AMIPtr_(nullptr),
|
||||
@ -918,21 +823,14 @@ Foam::tmp<Foam::pointField> Foam::mappedPatchBase::samplePoints() const
|
||||
// Apply offset to get sample points
|
||||
switch (offsetMode_)
|
||||
{
|
||||
case UNIFORM:
|
||||
{
|
||||
result += offset_;
|
||||
case NONE:
|
||||
break;
|
||||
}
|
||||
case NONUNIFORM:
|
||||
{
|
||||
result += offsets_;
|
||||
break;
|
||||
}
|
||||
case NORMAL:
|
||||
{
|
||||
result += distance_*patch_.faceNormals();
|
||||
break;
|
||||
}
|
||||
case DIRECTION:
|
||||
result += offset_;
|
||||
break;
|
||||
}
|
||||
|
||||
return tresult;
|
||||
@ -961,50 +859,31 @@ void Foam::mappedPatchBase::write(Ostream& os) const
|
||||
}
|
||||
coupleGroup_.write(os);
|
||||
|
||||
if
|
||||
(
|
||||
offsetMode_ == UNIFORM
|
||||
&& offset_ == vector::zero
|
||||
&& (mode_ == NEARESTPATCHFACE || mode_ == NEARESTPATCHFACEAMI)
|
||||
)
|
||||
{
|
||||
// Collocated mode. No need to write offset data
|
||||
}
|
||||
else
|
||||
{
|
||||
writeEntry(os, "offsetMode", offsetModeNames_[offsetMode_]);
|
||||
writeEntry(os, "offsetMode", offsetModeNames_[offsetMode_]);
|
||||
|
||||
switch (offsetMode_)
|
||||
switch (offsetMode_)
|
||||
{
|
||||
case NONE:
|
||||
break;
|
||||
case NORMAL:
|
||||
writeEntry(os, "distance", distance_);
|
||||
break;
|
||||
case DIRECTION:
|
||||
writeEntry(os, "offset", offset_);
|
||||
break;
|
||||
}
|
||||
|
||||
if (mode_ == NEARESTPATCHFACEAMI)
|
||||
{
|
||||
if (AMIReverse_)
|
||||
{
|
||||
case UNIFORM:
|
||||
{
|
||||
writeEntry(os, "offset", offset_);
|
||||
break;
|
||||
}
|
||||
case NONUNIFORM:
|
||||
{
|
||||
writeEntry(os, "offsets", offsets_);
|
||||
break;
|
||||
}
|
||||
case NORMAL:
|
||||
{
|
||||
writeEntry(os, "distance", distance_);
|
||||
break;
|
||||
}
|
||||
writeEntry(os, "flipNormals", AMIReverse_);
|
||||
}
|
||||
|
||||
if (mode_ == NEARESTPATCHFACEAMI)
|
||||
if (!surfDict_.empty())
|
||||
{
|
||||
if (AMIReverse_)
|
||||
{
|
||||
writeEntry(os, "flipNormals", AMIReverse_);
|
||||
}
|
||||
|
||||
if (!surfDict_.empty())
|
||||
{
|
||||
writeKeyword(os, surfDict_.dictName());
|
||||
os << surfDict_;
|
||||
}
|
||||
writeKeyword(os, surfDict_.dictName());
|
||||
os << surfDict_;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -28,42 +28,44 @@ Description
|
||||
Determines a mapping between patch face centres and mesh cell or face
|
||||
centres and processors they're on.
|
||||
|
||||
If constructed from dictionary:
|
||||
Example:
|
||||
\verbatim
|
||||
// Region to sample (default is region0)
|
||||
sampleRegion region0;
|
||||
|
||||
// What to sample:
|
||||
// - nearestCell : sample cell containing point
|
||||
// - nearestOnlyCell : nearest sample cell (even if not containing
|
||||
// point)
|
||||
// What to sample
|
||||
// - nearestCell : cell containing the sampling point
|
||||
// - nearestPatchFace : nearest face on selected patch
|
||||
// - nearestPatchFaceAMI : nearest face on selected patch
|
||||
- patches need not conform
|
||||
- uses AMI interpolation
|
||||
// - nearestPatchFaceAMI : AMI interpolation from selected patch
|
||||
// - nearestFace : nearest boundary face on any patch
|
||||
sampleMode nearestCell;
|
||||
|
||||
// If sampleMode is nearestPatchFace : patch to find faces of
|
||||
// Region to sample from
|
||||
sampleRegion region0;
|
||||
|
||||
// If sampleMode is nearestPatchFace* : The patch to sample from
|
||||
samplePatch movingWall;
|
||||
|
||||
// If sampleMode is nearestPatchFace : specify patchgroup to find
|
||||
// samplePatch and sampleRegion (if not provided)
|
||||
// If sampleMode is nearestPatchFace* : Couple group to specify the
|
||||
// sample region and patch
|
||||
// (alternative to specifying
|
||||
// sampleRegion and samplePatch
|
||||
// directly)
|
||||
coupleGroup baffleGroup;
|
||||
|
||||
// How to supply offset (w.r.t. my patch face centres):
|
||||
// - uniform : single offset vector
|
||||
// - nonuniform : per-face offset vector
|
||||
// - normal : using supplied distance and face normal
|
||||
offsetMode uniform;
|
||||
// How to offset the patch face centres to the sampling locations
|
||||
// - none : no offset
|
||||
// - normal : distance along the patch face normals
|
||||
// - direction : specified offset vector
|
||||
offsetMode direction;
|
||||
|
||||
// According to offsetMode (see above) supply one of
|
||||
// offset, offsets or distance
|
||||
offset (1 0 0);
|
||||
// If offsetMode is normal : The normal distance to offset
|
||||
distance 1;
|
||||
|
||||
// If offsetMode is direction : The offset vector
|
||||
offset (1 0 0);
|
||||
\endverbatim
|
||||
|
||||
Note: if offsetMode is \c normal it uses outwards pointing normals. So
|
||||
supply a negative distance if sampling inside the domain.
|
||||
Note that patch normals point outward, so if offsetMode is \c normal then a
|
||||
negative distance will be required in order to sample value from inside the
|
||||
domain.
|
||||
|
||||
SourceFiles
|
||||
mappedPatchBase.C
|
||||
@ -109,9 +111,9 @@ public:
|
||||
//- How to project face centres
|
||||
enum offsetMode
|
||||
{
|
||||
UNIFORM, // single offset vector
|
||||
NONUNIFORM, // per-face offset vector
|
||||
NORMAL // use face normal + distance
|
||||
NONE, // do not offset
|
||||
NORMAL, // offset a distance in the face-normal direction
|
||||
DIRECTION // offset with a specified vector
|
||||
};
|
||||
|
||||
static const NamedEnum<sampleMode, 4> sampleModeNames_;
|
||||
@ -141,18 +143,15 @@ protected:
|
||||
//- PatchGroup (if in sampleMode NEARESTPATCH*)
|
||||
const coupleGroupIdentifier coupleGroup_;
|
||||
|
||||
//- How to obtain samples
|
||||
//- How to offset the patch face centres to the sampling locations
|
||||
offsetMode offsetMode_;
|
||||
|
||||
//- Offset vector (uniform)
|
||||
vector offset_;
|
||||
|
||||
//- Offset vector (nonuniform)
|
||||
vectorField offsets_;
|
||||
|
||||
//- Offset distance (normal)
|
||||
//- Offset distance
|
||||
scalar distance_;
|
||||
|
||||
//- Offset vector
|
||||
vector offset_;
|
||||
|
||||
|
||||
// Derived information
|
||||
|
||||
@ -180,6 +179,9 @@ protected:
|
||||
|
||||
// Protected Member Functions
|
||||
|
||||
//- Read the offset mode from a dictionary
|
||||
offsetMode readOffsetMode(const dictionary& dict) const;
|
||||
|
||||
//- Find cells/faces containing samples
|
||||
void findSamples
|
||||
(
|
||||
@ -217,34 +219,13 @@ public:
|
||||
//- Construct from patch
|
||||
mappedPatchBase(const polyPatch&);
|
||||
|
||||
//- Construct with offsetMode=non-uniform
|
||||
//- Construct with no offset
|
||||
mappedPatchBase
|
||||
(
|
||||
const polyPatch& pp,
|
||||
const word& sampleRegion,
|
||||
const sampleMode sampleMode,
|
||||
const word& samplePatch,
|
||||
const vectorField& offsets
|
||||
);
|
||||
|
||||
//- Construct from offsetMode=uniform
|
||||
mappedPatchBase
|
||||
(
|
||||
const polyPatch& pp,
|
||||
const word& sampleRegion,
|
||||
const sampleMode sampleMode,
|
||||
const word& samplePatch,
|
||||
const vector& offset
|
||||
);
|
||||
|
||||
//- Construct from offsetMode=normal and distance
|
||||
mappedPatchBase
|
||||
(
|
||||
const polyPatch& pp,
|
||||
const word& sampleRegion,
|
||||
const sampleMode sampleMode,
|
||||
const word& samplePatch,
|
||||
const scalar distance
|
||||
const word& samplePatch
|
||||
);
|
||||
|
||||
//- Construct from dictionary
|
||||
@ -253,14 +234,6 @@ public:
|
||||
//- Construct as copy, resetting patch
|
||||
mappedPatchBase(const polyPatch&, const mappedPatchBase&);
|
||||
|
||||
//- Construct as copy, resetting patch, map original data
|
||||
mappedPatchBase
|
||||
(
|
||||
const polyPatch&,
|
||||
const mappedPatchBase&,
|
||||
const labelUList& mapAddressing
|
||||
);
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~mappedPatchBase();
|
||||
|
||||
@ -60,56 +60,6 @@ Foam::mappedPolyPatch::mappedPolyPatch
|
||||
}
|
||||
|
||||
|
||||
Foam::mappedPolyPatch::mappedPolyPatch
|
||||
(
|
||||
const word& name,
|
||||
const label size,
|
||||
const label start,
|
||||
const label index,
|
||||
const word& sampleRegion,
|
||||
const mappedPatchBase::sampleMode mode,
|
||||
const word& samplePatch,
|
||||
const vectorField& offset,
|
||||
const polyBoundaryMesh& bm
|
||||
)
|
||||
:
|
||||
polyPatch(name, size, start, index, bm, typeName),
|
||||
mappedPatchBase
|
||||
(
|
||||
static_cast<const polyPatch&>(*this),
|
||||
sampleRegion,
|
||||
mode,
|
||||
samplePatch,
|
||||
offset
|
||||
)
|
||||
{}
|
||||
|
||||
|
||||
Foam::mappedPolyPatch::mappedPolyPatch
|
||||
(
|
||||
const word& name,
|
||||
const label size,
|
||||
const label start,
|
||||
const label index,
|
||||
const word& sampleRegion,
|
||||
const mappedPatchBase::sampleMode mode,
|
||||
const word& samplePatch,
|
||||
const vector& offset,
|
||||
const polyBoundaryMesh& bm
|
||||
)
|
||||
:
|
||||
polyPatch(name, size, start, index, bm, typeName),
|
||||
mappedPatchBase
|
||||
(
|
||||
static_cast<const polyPatch&>(*this),
|
||||
sampleRegion,
|
||||
mode,
|
||||
samplePatch,
|
||||
offset
|
||||
)
|
||||
{}
|
||||
|
||||
|
||||
Foam::mappedPolyPatch::mappedPolyPatch
|
||||
(
|
||||
const word& name,
|
||||
@ -155,20 +105,6 @@ Foam::mappedPolyPatch::mappedPolyPatch
|
||||
{}
|
||||
|
||||
|
||||
Foam::mappedPolyPatch::mappedPolyPatch
|
||||
(
|
||||
const mappedPolyPatch& pp,
|
||||
const polyBoundaryMesh& bm,
|
||||
const label index,
|
||||
const labelUList& mapAddressing,
|
||||
const label newStart
|
||||
)
|
||||
:
|
||||
polyPatch(pp, bm, index, mapAddressing, newStart),
|
||||
mappedPatchBase(*this, pp, mapAddressing)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::mappedPolyPatch::~mappedPolyPatch()
|
||||
|
||||
@ -97,34 +97,6 @@ public:
|
||||
const word& patchType
|
||||
);
|
||||
|
||||
//- Construct from components
|
||||
mappedPolyPatch
|
||||
(
|
||||
const word& name,
|
||||
const label size,
|
||||
const label start,
|
||||
const label index,
|
||||
const word& sampleRegion,
|
||||
const mappedPatchBase::sampleMode mode,
|
||||
const word& samplePatch,
|
||||
const vectorField& offset,
|
||||
const polyBoundaryMesh& bm
|
||||
);
|
||||
|
||||
//- Construct from components. Uniform offset.
|
||||
mappedPolyPatch
|
||||
(
|
||||
const word& name,
|
||||
const label size,
|
||||
const label start,
|
||||
const label index,
|
||||
const word& sampleRegion,
|
||||
const mappedPatchBase::sampleMode mode,
|
||||
const word& samplePatch,
|
||||
const vector& offset,
|
||||
const polyBoundaryMesh& bm
|
||||
);
|
||||
|
||||
//- Construct from dictionary
|
||||
mappedPolyPatch
|
||||
(
|
||||
@ -153,16 +125,6 @@ public:
|
||||
const label newStart
|
||||
);
|
||||
|
||||
//- Construct given the original patch and a map
|
||||
mappedPolyPatch
|
||||
(
|
||||
const mappedPolyPatch& pp,
|
||||
const polyBoundaryMesh& bm,
|
||||
const label index,
|
||||
const labelUList& mapAddressing,
|
||||
const label newStart
|
||||
);
|
||||
|
||||
//- Construct and return a clone, resetting the boundary mesh
|
||||
virtual autoPtr<polyPatch> clone(const polyBoundaryMesh& bm) const
|
||||
{
|
||||
@ -185,29 +147,6 @@ public:
|
||||
);
|
||||
}
|
||||
|
||||
//- Construct and return a clone, resetting the face list
|
||||
// and boundary mesh
|
||||
virtual autoPtr<polyPatch> clone
|
||||
(
|
||||
const polyBoundaryMesh& bm,
|
||||
const label index,
|
||||
const labelUList& mapAddressing,
|
||||
const label newStart
|
||||
) const
|
||||
{
|
||||
return autoPtr<polyPatch>
|
||||
(
|
||||
new mappedPolyPatch
|
||||
(
|
||||
*this,
|
||||
bm,
|
||||
index,
|
||||
mapAddressing,
|
||||
newStart
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~mappedPolyPatch();
|
||||
|
||||
@ -75,44 +75,11 @@ Foam::mappedWallPolyPatch::mappedWallPolyPatch
|
||||
const word& sampleRegion,
|
||||
const mappedPatchBase::sampleMode mode,
|
||||
const word& samplePatch,
|
||||
const vectorField& offset,
|
||||
const polyBoundaryMesh& bm
|
||||
)
|
||||
:
|
||||
wallPolyPatch(name, size, start, index, bm, typeName),
|
||||
mappedPatchBase
|
||||
(
|
||||
static_cast<const polyPatch&>(*this),
|
||||
sampleRegion,
|
||||
mode,
|
||||
samplePatch,
|
||||
offset
|
||||
)
|
||||
{}
|
||||
|
||||
|
||||
Foam::mappedWallPolyPatch::mappedWallPolyPatch
|
||||
(
|
||||
const word& name,
|
||||
const label size,
|
||||
const label start,
|
||||
const label index,
|
||||
const word& sampleRegion,
|
||||
const mappedPatchBase::sampleMode mode,
|
||||
const word& samplePatch,
|
||||
const vector& offset,
|
||||
const polyBoundaryMesh& bm
|
||||
)
|
||||
:
|
||||
wallPolyPatch(name, size, start, index, bm, typeName),
|
||||
mappedPatchBase
|
||||
(
|
||||
static_cast<const polyPatch&>(*this),
|
||||
sampleRegion,
|
||||
mode,
|
||||
samplePatch,
|
||||
offset
|
||||
)
|
||||
mappedPatchBase(*this, sampleRegion, mode, samplePatch)
|
||||
{}
|
||||
|
||||
|
||||
@ -161,20 +128,6 @@ Foam::mappedWallPolyPatch::mappedWallPolyPatch
|
||||
{}
|
||||
|
||||
|
||||
Foam::mappedWallPolyPatch::mappedWallPolyPatch
|
||||
(
|
||||
const mappedWallPolyPatch& pp,
|
||||
const polyBoundaryMesh& bm,
|
||||
const label index,
|
||||
const labelUList& mapAddressing,
|
||||
const label newStart
|
||||
)
|
||||
:
|
||||
wallPolyPatch(pp, bm, index, mapAddressing, newStart),
|
||||
mappedPatchBase(*this, pp, mapAddressing)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::mappedWallPolyPatch::~mappedWallPolyPatch()
|
||||
|
||||
@ -107,21 +107,6 @@ public:
|
||||
const word& sampleRegion,
|
||||
const mappedPatchBase::sampleMode mode,
|
||||
const word& samplePatch,
|
||||
const vectorField& offset,
|
||||
const polyBoundaryMesh& bm
|
||||
);
|
||||
|
||||
//- Construct from components. Uniform offset.
|
||||
mappedWallPolyPatch
|
||||
(
|
||||
const word& name,
|
||||
const label size,
|
||||
const label start,
|
||||
const label index,
|
||||
const word& sampleRegion,
|
||||
const mappedPatchBase::sampleMode mode,
|
||||
const word& samplePatch,
|
||||
const vector& offset,
|
||||
const polyBoundaryMesh& bm
|
||||
);
|
||||
|
||||
@ -153,16 +138,6 @@ public:
|
||||
const label newStart
|
||||
);
|
||||
|
||||
//- Construct given the original patch and a map
|
||||
mappedWallPolyPatch
|
||||
(
|
||||
const mappedWallPolyPatch& pp,
|
||||
const polyBoundaryMesh& bm,
|
||||
const label index,
|
||||
const labelUList& mapAddressing,
|
||||
const label newStart
|
||||
);
|
||||
|
||||
//- Construct and return a clone, resetting the boundary mesh
|
||||
virtual autoPtr<polyPatch> clone(const polyBoundaryMesh& bm) const
|
||||
{
|
||||
@ -192,29 +167,6 @@ public:
|
||||
);
|
||||
}
|
||||
|
||||
//- Construct and return a clone, resetting the face list
|
||||
// and boundary mesh
|
||||
virtual autoPtr<polyPatch> clone
|
||||
(
|
||||
const polyBoundaryMesh& bm,
|
||||
const label index,
|
||||
const labelUList& mapAddressing,
|
||||
const label newStart
|
||||
) const
|
||||
{
|
||||
return autoPtr<polyPatch>
|
||||
(
|
||||
new mappedWallPolyPatch
|
||||
(
|
||||
*this,
|
||||
bm,
|
||||
index,
|
||||
mapAddressing,
|
||||
newStart
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~mappedWallPolyPatch();
|
||||
|
||||
@ -220,24 +220,6 @@ Foam::nonConformalCyclicPolyPatch::nonConformalCyclicPolyPatch
|
||||
{}
|
||||
|
||||
|
||||
Foam::nonConformalCyclicPolyPatch::nonConformalCyclicPolyPatch
|
||||
(
|
||||
const nonConformalCyclicPolyPatch& pp,
|
||||
const polyBoundaryMesh& bm,
|
||||
const label index,
|
||||
const labelUList& mapAddressing,
|
||||
const label newStart
|
||||
)
|
||||
:
|
||||
cyclicPolyPatch(pp, bm, index, mapAddressing, newStart),
|
||||
nonConformalCoupledPolyPatch(*this, pp),
|
||||
intersectionIsValid_(false),
|
||||
intersection_(false),
|
||||
raysIsValid_(false),
|
||||
rays_(false)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::nonConformalCyclicPolyPatch::~nonConformalCyclicPolyPatch()
|
||||
|
||||
@ -162,16 +162,6 @@ public:
|
||||
const word& origPatchName
|
||||
);
|
||||
|
||||
//- Construct given the original patch and a map
|
||||
nonConformalCyclicPolyPatch
|
||||
(
|
||||
const nonConformalCyclicPolyPatch& pp,
|
||||
const polyBoundaryMesh& bm,
|
||||
const label index,
|
||||
const labelUList& mapAddressing,
|
||||
const label newStart
|
||||
);
|
||||
|
||||
//- Construct and return a clone, resetting the boundary mesh
|
||||
virtual autoPtr<polyPatch> clone(const polyBoundaryMesh& bm) const
|
||||
{
|
||||
@ -206,29 +196,6 @@ public:
|
||||
);
|
||||
}
|
||||
|
||||
//- Construct and return a clone, resetting the face list
|
||||
// and boundary mesh
|
||||
virtual autoPtr<polyPatch> clone
|
||||
(
|
||||
const polyBoundaryMesh& bm,
|
||||
const label index,
|
||||
const labelUList& mapAddressing,
|
||||
const label newStart
|
||||
) const
|
||||
{
|
||||
return autoPtr<polyPatch>
|
||||
(
|
||||
new nonConformalCyclicPolyPatch
|
||||
(
|
||||
*this,
|
||||
bm,
|
||||
index,
|
||||
mapAddressing,
|
||||
newStart
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~nonConformalCyclicPolyPatch();
|
||||
|
||||
@ -132,20 +132,6 @@ Foam::nonConformalErrorPolyPatch::nonConformalErrorPolyPatch
|
||||
{}
|
||||
|
||||
|
||||
Foam::nonConformalErrorPolyPatch::nonConformalErrorPolyPatch
|
||||
(
|
||||
const nonConformalErrorPolyPatch& pp,
|
||||
const polyBoundaryMesh& bm,
|
||||
const label index,
|
||||
const labelUList& mapAddressing,
|
||||
const label newStart
|
||||
)
|
||||
:
|
||||
polyPatch(pp, bm, index, mapAddressing, newStart),
|
||||
nonConformalPolyPatch(*this, pp)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::nonConformalErrorPolyPatch::~nonConformalErrorPolyPatch()
|
||||
|
||||
@ -132,16 +132,6 @@ public:
|
||||
const word& origPatchName
|
||||
);
|
||||
|
||||
//- Construct given the original patch and a map
|
||||
nonConformalErrorPolyPatch
|
||||
(
|
||||
const nonConformalErrorPolyPatch& pp,
|
||||
const polyBoundaryMesh& bm,
|
||||
const label index,
|
||||
const labelUList& mapAddressing,
|
||||
const label newStart
|
||||
);
|
||||
|
||||
//- Construct and return a clone, resetting the boundary mesh
|
||||
virtual autoPtr<polyPatch> clone(const polyBoundaryMesh& bm) const
|
||||
{
|
||||
@ -175,29 +165,6 @@ public:
|
||||
);
|
||||
}
|
||||
|
||||
//- Construct and return a clone, resetting the face list
|
||||
// and boundary mesh
|
||||
virtual autoPtr<polyPatch> clone
|
||||
(
|
||||
const polyBoundaryMesh& bm,
|
||||
const label index,
|
||||
const labelUList& mapAddressing,
|
||||
const label newStart
|
||||
) const
|
||||
{
|
||||
return autoPtr<polyPatch>
|
||||
(
|
||||
new nonConformalErrorPolyPatch
|
||||
(
|
||||
*this,
|
||||
bm,
|
||||
index,
|
||||
mapAddressing,
|
||||
newStart
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~nonConformalErrorPolyPatch();
|
||||
|
||||
@ -135,21 +135,6 @@ nonConformalProcessorCyclicPolyPatch
|
||||
{}
|
||||
|
||||
|
||||
Foam::nonConformalProcessorCyclicPolyPatch::
|
||||
nonConformalProcessorCyclicPolyPatch
|
||||
(
|
||||
const nonConformalProcessorCyclicPolyPatch& pp,
|
||||
const polyBoundaryMesh& bm,
|
||||
const label index,
|
||||
const labelUList& mapAddressing,
|
||||
const label newStart
|
||||
)
|
||||
:
|
||||
processorCyclicPolyPatch(pp, bm, index, mapAddressing, newStart),
|
||||
nonConformalCoupledPolyPatch(*this, pp)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
Foam::nonConformalProcessorCyclicPolyPatch::
|
||||
|
||||
@ -117,16 +117,6 @@ public:
|
||||
const label newStart
|
||||
);
|
||||
|
||||
//- Construct given the original patch and a map
|
||||
nonConformalProcessorCyclicPolyPatch
|
||||
(
|
||||
const nonConformalProcessorCyclicPolyPatch& pp,
|
||||
const polyBoundaryMesh& bm,
|
||||
const label index,
|
||||
const labelUList& mapAddressing,
|
||||
const label newStart
|
||||
);
|
||||
|
||||
//- Construct and return a clone, resetting the boundary mesh
|
||||
virtual autoPtr<polyPatch> clone(const polyBoundaryMesh& bm) const
|
||||
{
|
||||
@ -159,29 +149,6 @@ public:
|
||||
);
|
||||
}
|
||||
|
||||
//- Construct and return a clone, resetting the face list
|
||||
// and boundary mesh
|
||||
virtual autoPtr<polyPatch> clone
|
||||
(
|
||||
const polyBoundaryMesh& bm,
|
||||
const label index,
|
||||
const labelUList& mapAddressing,
|
||||
const label newStart
|
||||
) const
|
||||
{
|
||||
return autoPtr<polyPatch>
|
||||
(
|
||||
new nonConformalProcessorCyclicPolyPatch
|
||||
(
|
||||
*this,
|
||||
bm,
|
||||
index,
|
||||
mapAddressing,
|
||||
newStart
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
// Destructor
|
||||
virtual ~nonConformalProcessorCyclicPolyPatch();
|
||||
|
||||
@ -806,7 +806,7 @@ void Foam::domainDecomposition::decompose()
|
||||
|
||||
label nPatches = 0;
|
||||
|
||||
// Map existing non-proc patches
|
||||
// Copy existing non-proc patches
|
||||
forAll(curPatchSizes, patchi)
|
||||
{
|
||||
const polyPatch& meshPatch = meshPatches[patchi];
|
||||
@ -816,12 +816,7 @@ void Foam::domainDecomposition::decompose()
|
||||
(
|
||||
procMesh.boundaryMesh(),
|
||||
nPatches,
|
||||
SubList<label>
|
||||
(
|
||||
curFaceLabels,
|
||||
curPatchSizes[patchi],
|
||||
curPatchStarts[patchi]
|
||||
) - 1 - meshPatch.start(),
|
||||
curPatchSizes[patchi],
|
||||
curPatchStarts[patchi]
|
||||
).ptr();
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -32,7 +32,6 @@ namespace Foam
|
||||
{
|
||||
namespace sampledSurfaces
|
||||
{
|
||||
|
||||
defineTypeNameAndDebug(patchInternalField, 0);
|
||||
addToRunTimeSelectionTable(sampledSurface, patchInternalField, word);
|
||||
}
|
||||
@ -51,79 +50,32 @@ Foam::sampledSurfaces::patchInternalField::patchInternalField
|
||||
patch(name, mesh, dict),
|
||||
mappers_(patchIDs().size())
|
||||
{
|
||||
mappedPatchBase::offsetMode mode = mappedPatchBase::NORMAL;
|
||||
if (dict.found("offsetMode"))
|
||||
dictionary mappersDict(dict);
|
||||
|
||||
// Add the sample mode (i.e., nearest cell)
|
||||
mappersDict.add
|
||||
(
|
||||
"sampleMode",
|
||||
mappedPatchBase::sampleModeNames_[mappedPatchBase::NEARESTCELL]
|
||||
);
|
||||
|
||||
// Negate the distance so that we sample cells inside the patch
|
||||
if (dict.found("distance"))
|
||||
{
|
||||
mode = mappedPatchBase::offsetModeNames_.read
|
||||
(
|
||||
dict.lookup("offsetMode")
|
||||
);
|
||||
mappersDict.set("distance", -mappersDict.lookup<scalar>("distance"));
|
||||
}
|
||||
|
||||
switch (mode)
|
||||
forAll(patchIDs(), i)
|
||||
{
|
||||
case mappedPatchBase::NORMAL:
|
||||
{
|
||||
const scalar distance = dict.lookup<scalar>("distance");
|
||||
forAll(patchIDs(), i)
|
||||
{
|
||||
mappers_.set
|
||||
(
|
||||
i,
|
||||
new mappedPatchBase
|
||||
(
|
||||
mesh.boundaryMesh()[patchIDs()[i]],
|
||||
mesh.name(), // sampleRegion
|
||||
mappedPatchBase::NEARESTCELL, // sampleMode
|
||||
word::null, // samplePatch
|
||||
-distance // sample inside my domain
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case mappedPatchBase::UNIFORM:
|
||||
{
|
||||
const point offset(dict.lookup("offset"));
|
||||
forAll(patchIDs(), i)
|
||||
{
|
||||
mappers_.set
|
||||
(
|
||||
i,
|
||||
new mappedPatchBase
|
||||
(
|
||||
mesh.boundaryMesh()[patchIDs()[i]],
|
||||
mesh.name(), // sampleRegion
|
||||
mappedPatchBase::NEARESTCELL, // sampleMode
|
||||
word::null, // samplePatch
|
||||
offset // sample inside my domain
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case mappedPatchBase::NONUNIFORM:
|
||||
{
|
||||
const pointField offsets(dict.lookup("offsets"));
|
||||
forAll(patchIDs(), i)
|
||||
{
|
||||
mappers_.set
|
||||
(
|
||||
i,
|
||||
new mappedPatchBase
|
||||
(
|
||||
mesh.boundaryMesh()[patchIDs()[i]],
|
||||
mesh.name(), // sampleRegion
|
||||
mappedPatchBase::NEARESTCELL, // sampleMode
|
||||
word::null, // samplePatch
|
||||
offsets // sample inside my domain
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
break;
|
||||
mappers_.set
|
||||
(
|
||||
i,
|
||||
new mappedPatchBase
|
||||
(
|
||||
mesh.boundaryMesh()[patchIDs()[i]],
|
||||
mappersDict
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user