mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
STYLE: use labelRange for identity
This commit is contained in:
@ -6,6 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2012-2016 OpenFOAM Foundation
|
Copyright (C) 2012-2016 OpenFOAM Foundation
|
||||||
|
Copyright (C) 2020 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -24,7 +25,7 @@ License
|
|||||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
Application
|
Application
|
||||||
testPatchTools
|
Test-PatchTools
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Test app for PatchTools functionality
|
Test app for PatchTools functionality
|
||||||
@ -261,7 +262,7 @@ int main(int argc, char *argv[])
|
|||||||
// (
|
// (
|
||||||
// mesh,
|
// mesh,
|
||||||
// pp,
|
// pp,
|
||||||
// identity(pp.size(), pp.start())
|
// identity(pp.range())
|
||||||
// )
|
// )
|
||||||
// );
|
// );
|
||||||
// forAll(pn, pointi)
|
// forAll(pn, pointi)
|
||||||
@ -278,7 +279,7 @@ int main(int argc, char *argv[])
|
|||||||
// (
|
// (
|
||||||
// mesh,
|
// mesh,
|
||||||
// pp,
|
// pp,
|
||||||
// identity(pp.size(), pp.start())
|
// identity(pp.range())
|
||||||
// )
|
// )
|
||||||
// );
|
// );
|
||||||
// forAll(pn, pointi)
|
// forAll(pn, pointi)
|
||||||
|
|||||||
@ -41,7 +41,7 @@
|
|||||||
fz[3*pairi] = new faceZone
|
fz[3*pairi] = new faceZone
|
||||||
(
|
(
|
||||||
mergeName + "MasterZone",
|
mergeName + "MasterZone",
|
||||||
identity(masterPatch.size(), masterPatch.start()),
|
identity(masterPatch.range()),
|
||||||
false, // none are flipped
|
false, // none are flipped
|
||||||
0,
|
0,
|
||||||
mesh.faceZones()
|
mesh.faceZones()
|
||||||
@ -55,7 +55,7 @@
|
|||||||
fz[3*pairi + 1] = new faceZone
|
fz[3*pairi + 1] = new faceZone
|
||||||
(
|
(
|
||||||
mergeName + "SlaveZone",
|
mergeName + "SlaveZone",
|
||||||
identity(slavePatch.size(), slavePatch.start()),
|
identity(slavePatch.range()),
|
||||||
false, // none are flipped
|
false, // none are flipped
|
||||||
1,
|
1,
|
||||||
mesh.faceZones()
|
mesh.faceZones()
|
||||||
|
|||||||
@ -447,18 +447,15 @@ void Foam::perfectInterface::setRefinement(polyTopoChange& ref) const
|
|||||||
const polyPatch& patch0 = patches[masterPatchID_.index()];
|
const polyPatch& patch0 = patches[masterPatchID_.index()];
|
||||||
const polyPatch& patch1 = patches[slavePatchID_.index()];
|
const polyPatch& patch1 = patches[slavePatchID_.index()];
|
||||||
|
|
||||||
|
|
||||||
labelList pp0Labels(identity(patch0.size(), patch0.start()));
|
|
||||||
indirectPrimitivePatch pp0
|
indirectPrimitivePatch pp0
|
||||||
(
|
(
|
||||||
IndirectList<face>(mesh.faces(), pp0Labels),
|
IndirectList<face>(mesh.faces(), identity(patch0.range())),
|
||||||
mesh.points()
|
mesh.points()
|
||||||
);
|
);
|
||||||
|
|
||||||
labelList pp1Labels(identity(patch1.size(), patch1.start()));
|
|
||||||
indirectPrimitivePatch pp1
|
indirectPrimitivePatch pp1
|
||||||
(
|
(
|
||||||
IndirectList<face>(mesh.faces(), pp1Labels),
|
IndirectList<face>(mesh.faces(), identity(patch1.range())),
|
||||||
mesh.points()
|
mesh.points()
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -333,7 +333,7 @@ void Foam::ensightMesh::correct()
|
|||||||
part.classify
|
part.classify
|
||||||
(
|
(
|
||||||
mesh_.faces(),
|
mesh_.faces(),
|
||||||
identity(p.size(), p.start()),
|
identity(p.range()),
|
||||||
boolList(), // no flip map
|
boolList(), // no flip map
|
||||||
excludeFace
|
excludeFace
|
||||||
);
|
);
|
||||||
|
|||||||
@ -167,12 +167,6 @@ void Foam::snappyLayerDriver::checkMeshManifold() const
|
|||||||
|
|
||||||
Info<< nl << "Checking mesh manifoldness ..." << endl;
|
Info<< nl << "Checking mesh manifoldness ..." << endl;
|
||||||
|
|
||||||
// Get all outside faces
|
|
||||||
labelList outsideFaces
|
|
||||||
(
|
|
||||||
identity(mesh.nBoundaryFaces(), mesh.nInternalFaces())
|
|
||||||
);
|
|
||||||
|
|
||||||
pointSet nonManifoldPoints
|
pointSet nonManifoldPoints
|
||||||
(
|
(
|
||||||
mesh,
|
mesh,
|
||||||
@ -185,7 +179,11 @@ void Foam::snappyLayerDriver::checkMeshManifold() const
|
|||||||
(
|
(
|
||||||
indirectPrimitivePatch
|
indirectPrimitivePatch
|
||||||
(
|
(
|
||||||
IndirectList<face>(mesh.faces(), outsideFaces),
|
IndirectList<face>
|
||||||
|
(
|
||||||
|
mesh.faces(),
|
||||||
|
identity(mesh.boundaryMesh().range()) // All outside faces
|
||||||
|
),
|
||||||
mesh.points()
|
mesh.points()
|
||||||
),
|
),
|
||||||
nonManifoldPoints
|
nonManifoldPoints
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||||
Copyright (C) 2017-2019 OpenCFD Ltd.
|
Copyright (C) 2017-2020 OpenCFD Ltd.
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
This file is part of OpenFOAM.
|
This file is part of OpenFOAM.
|
||||||
@ -120,10 +120,7 @@ Foam::treeDataFace::treeDataFace
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
mesh_(patch.boundaryMesh().mesh()),
|
mesh_(patch.boundaryMesh().mesh()),
|
||||||
faceLabels_
|
faceLabels_(identity(patch.range())),
|
||||||
(
|
|
||||||
identity(patch.size(), patch.start())
|
|
||||||
),
|
|
||||||
isTreeFace_(mesh_.nFaces(), false),
|
isTreeFace_(mesh_.nFaces(), false),
|
||||||
cacheBb_(cacheBb)
|
cacheBb_(cacheBb)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -284,9 +284,6 @@ void Foam::mappedPatchBase::findSamples
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// patch faces
|
|
||||||
const labelList patchFaces(identity(pp.size(), pp.start()));
|
|
||||||
|
|
||||||
treeBoundBox patchBb
|
treeBoundBox patchBb
|
||||||
(
|
(
|
||||||
treeBoundBox(pp.points(), pp.meshPoints()).extend
|
treeBoundBox(pp.points(), pp.meshPoints()).extend
|
||||||
@ -304,7 +301,7 @@ void Foam::mappedPatchBase::findSamples
|
|||||||
(
|
(
|
||||||
false, // do not cache bb
|
false, // do not cache bb
|
||||||
mesh,
|
mesh,
|
||||||
patchFaces // boundary faces only
|
identity(pp.range()) // boundary faces only
|
||||||
),
|
),
|
||||||
patchBb, // overall search domain
|
patchBb, // overall search domain
|
||||||
8, // maxLevel
|
8, // maxLevel
|
||||||
|
|||||||
@ -88,7 +88,7 @@ void Foam::linearValveFvMesh::addZonesAndModifiers()
|
|||||||
fz[0] = new faceZone
|
fz[0] = new faceZone
|
||||||
(
|
(
|
||||||
"insideSliderZone",
|
"insideSliderZone",
|
||||||
identity(innerSlider.size(), innerSlider.start()),
|
identity(innerSlider.range()),
|
||||||
false, // none are flipped
|
false, // none are flipped
|
||||||
0,
|
0,
|
||||||
faceZones()
|
faceZones()
|
||||||
@ -104,7 +104,7 @@ void Foam::linearValveFvMesh::addZonesAndModifiers()
|
|||||||
fz[1] = new faceZone
|
fz[1] = new faceZone
|
||||||
(
|
(
|
||||||
"outsideSliderZone",
|
"outsideSliderZone",
|
||||||
identity(outerSlider.size(), outerSlider.start()),
|
identity(outerSlider.range()),
|
||||||
false, // none are flipped
|
false, // none are flipped
|
||||||
1,
|
1,
|
||||||
faceZones()
|
faceZones()
|
||||||
|
|||||||
@ -95,7 +95,7 @@ void Foam::linearValveLayersFvMesh::addZonesAndModifiers()
|
|||||||
fz[0] = new faceZone
|
fz[0] = new faceZone
|
||||||
(
|
(
|
||||||
"insideSliderZone",
|
"insideSliderZone",
|
||||||
identity(innerSlider.size(), innerSlider.start()),
|
identity(innerSlider.range()),
|
||||||
false, // none are flipped
|
false, // none are flipped
|
||||||
0,
|
0,
|
||||||
faceZones()
|
faceZones()
|
||||||
@ -111,7 +111,7 @@ void Foam::linearValveLayersFvMesh::addZonesAndModifiers()
|
|||||||
fz[1] = new faceZone
|
fz[1] = new faceZone
|
||||||
(
|
(
|
||||||
"outsideSliderZone",
|
"outsideSliderZone",
|
||||||
identity(outsideSlider.size(), outsideSlider.start()),
|
identity(outsideSlider.range()),
|
||||||
false, // none are flipped
|
false, // none are flipped
|
||||||
1,
|
1,
|
||||||
faceZones()
|
faceZones()
|
||||||
@ -131,7 +131,7 @@ void Foam::linearValveLayersFvMesh::addZonesAndModifiers()
|
|||||||
fz[3] = new faceZone
|
fz[3] = new faceZone
|
||||||
(
|
(
|
||||||
"valveLayerZone",
|
"valveLayerZone",
|
||||||
identity(layerPatch.size(), layerPatch.start()),
|
identity(layerPatch.range()),
|
||||||
lpf,
|
lpf,
|
||||||
true, // all are flipped
|
true, // all are flipped
|
||||||
0,
|
0,
|
||||||
|
|||||||
@ -89,7 +89,7 @@ void Foam::mixerFvMesh::addZonesAndModifiers()
|
|||||||
fz[0] = new faceZone
|
fz[0] = new faceZone
|
||||||
(
|
(
|
||||||
"insideSliderZone",
|
"insideSliderZone",
|
||||||
identity(innerSlider.size(), innerSlider.start()),
|
identity(innerSlider.range()),
|
||||||
false, // none are flipped
|
false, // none are flipped
|
||||||
0,
|
0,
|
||||||
faceZones()
|
faceZones()
|
||||||
@ -105,7 +105,7 @@ void Foam::mixerFvMesh::addZonesAndModifiers()
|
|||||||
fz[1] = new faceZone
|
fz[1] = new faceZone
|
||||||
(
|
(
|
||||||
"outsideSliderZone",
|
"outsideSliderZone",
|
||||||
identity(outerSlider.size(), outerSlider.start()),
|
identity(outerSlider.range()),
|
||||||
false, // none are flipped
|
false, // none are flipped
|
||||||
1,
|
1,
|
||||||
faceZones()
|
faceZones()
|
||||||
|
|||||||
Reference in New Issue
Block a user