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