MeshZones: Renamed findZoneID -> findIndex
Index is a better name to describe a label index than ID which may be an integer, word or other means of identification.
This commit is contained in:
@ -54,7 +54,7 @@
|
||||
|
||||
forAll(magnets, i)
|
||||
{
|
||||
label magnetZonei = mesh.faceZones().findZoneID(magnets[i].name());
|
||||
label magnetZonei = mesh.faceZones().findIndex(magnets[i].name());
|
||||
|
||||
if (magnetZonei == -1)
|
||||
{
|
||||
|
||||
@ -1203,7 +1203,7 @@ int main(int argc, char *argv[])
|
||||
if (zoneSourceTypes[zonei] != zoneSourceType::zone) continue;
|
||||
|
||||
zoneMeshZoneID[zonei] =
|
||||
mesh.faceZones().findZoneID(zoneNames[zonei]);
|
||||
mesh.faceZones().findIndex(zoneNames[zonei]);
|
||||
|
||||
if (zoneMeshZoneID[zonei] == -1)
|
||||
{
|
||||
@ -1216,7 +1216,7 @@ int main(int argc, char *argv[])
|
||||
if (!oppositeZoneNames[zonei].empty())
|
||||
{
|
||||
oppositeZoneMeshZoneID[zonei] =
|
||||
mesh.faceZones().findZoneID(oppositeZoneNames[zonei]);
|
||||
mesh.faceZones().findIndex(oppositeZoneNames[zonei]);
|
||||
|
||||
if (oppositeZoneMeshZoneID[zonei] == -1)
|
||||
{
|
||||
|
||||
@ -413,7 +413,7 @@ int main(int argc, char *argv[])
|
||||
{
|
||||
const word& name = selectors[selectorI].name();
|
||||
|
||||
if (mesh.faceZones().findZoneID(name) == -1)
|
||||
if (mesh.faceZones().findIndex(name) == -1)
|
||||
{
|
||||
mesh.faceZones().clearAddressing();
|
||||
|
||||
@ -437,7 +437,7 @@ int main(int argc, char *argv[])
|
||||
forAll(selectors, selectorI)
|
||||
{
|
||||
const word& name = selectors[selectorI].name();
|
||||
label zoneID = mesh.faceZones().findZoneID(name);
|
||||
label zoneID = mesh.faceZones().findIndex(name);
|
||||
|
||||
selectors[selectorI].select(zoneID, faceToZoneID, faceToFlip);
|
||||
}
|
||||
@ -455,7 +455,7 @@ int main(int argc, char *argv[])
|
||||
forAll(selectors, selectorI)
|
||||
{
|
||||
const word& name = selectors[selectorI].name();
|
||||
const label zoneID = mesh.faceZones().findZoneID(name);
|
||||
const label zoneID = mesh.faceZones().findIndex(name);
|
||||
|
||||
label& n = nFaces[zoneID];
|
||||
labelList addr(n);
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2012-2018 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2012-2023 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -67,7 +67,7 @@ void Foam::faceSelections::faceZoneSelection::select
|
||||
boolList& faceToFlip
|
||||
) const
|
||||
{
|
||||
label readID = mesh_.faceZones().findZoneID(zoneName_);
|
||||
label readID = mesh_.faceZones().findIndex(zoneName_);
|
||||
|
||||
if (readID == -1)
|
||||
{
|
||||
|
||||
@ -112,7 +112,7 @@ int main(int argc, char *argv[])
|
||||
pointSet set(*iter());
|
||||
SortableList<label> pointLabels(set.toc());
|
||||
|
||||
label zoneID = mesh.pointZones().findZoneID(set.name());
|
||||
label zoneID = mesh.pointZones().findIndex(set.name());
|
||||
if (zoneID == -1)
|
||||
{
|
||||
Info<< "Adding set " << set.name() << " as a pointZone." << endl;
|
||||
@ -243,7 +243,7 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
}
|
||||
|
||||
label zoneID = mesh.faceZones().findZoneID(set.name());
|
||||
label zoneID = mesh.faceZones().findIndex(set.name());
|
||||
if (zoneID == -1)
|
||||
{
|
||||
Info<< "Adding set " << set.name() << " as a faceZone." << endl;
|
||||
@ -292,7 +292,7 @@ int main(int argc, char *argv[])
|
||||
cellSet set(*iter());
|
||||
SortableList<label> cellLabels(set.toc());
|
||||
|
||||
label zoneID = mesh.cellZones().findZoneID(set.name());
|
||||
label zoneID = mesh.cellZones().findIndex(set.name());
|
||||
if (zoneID == -1)
|
||||
{
|
||||
Info<< "Adding set " << set.name() << " as a cellZone." << endl;
|
||||
|
||||
@ -1825,7 +1825,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
word zoneName = "region" + Foam::name(regioni);
|
||||
|
||||
zoneI = cellZones.findZoneID(zoneName);
|
||||
zoneI = cellZones.findIndex(zoneName);
|
||||
|
||||
if (zoneI == -1)
|
||||
{
|
||||
|
||||
@ -76,7 +76,7 @@ using namespace Foam;
|
||||
|
||||
label addPointZone(const polyMesh& mesh, const word& name)
|
||||
{
|
||||
label zoneID = mesh.pointZones().findZoneID(name);
|
||||
label zoneID = mesh.pointZones().findIndex(name);
|
||||
|
||||
if (zoneID != -1)
|
||||
{
|
||||
@ -109,7 +109,7 @@ label addPointZone(const polyMesh& mesh, const word& name)
|
||||
|
||||
label addFaceZone(const polyMesh& mesh, const word& name)
|
||||
{
|
||||
label zoneID = mesh.faceZones().findZoneID(name);
|
||||
label zoneID = mesh.faceZones().findIndex(name);
|
||||
|
||||
if (zoneID != -1)
|
||||
{
|
||||
@ -142,7 +142,7 @@ label addFaceZone(const polyMesh& mesh, const word& name)
|
||||
|
||||
label addCellZone(const polyMesh& mesh, const word& name)
|
||||
{
|
||||
label zoneID = mesh.cellZones().findZoneID(name);
|
||||
label zoneID = mesh.cellZones().findIndex(name);
|
||||
|
||||
if (zoneID != -1)
|
||||
{
|
||||
|
||||
@ -65,7 +65,7 @@ void removeZone
|
||||
const word& setName
|
||||
)
|
||||
{
|
||||
label zoneID = zones.findZoneID(setName);
|
||||
label zoneID = zones.findIndex(setName);
|
||||
|
||||
if (zoneID != -1)
|
||||
{
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -466,7 +466,7 @@ void ensightField
|
||||
|
||||
eMesh.barrier();
|
||||
|
||||
label zoneID = mesh.faceZones().findZoneID(faceZoneName);
|
||||
label zoneID = mesh.faceZones().findIndex(faceZoneName);
|
||||
|
||||
const faceZone& fz = mesh.faceZones()[zoneID];
|
||||
|
||||
@ -668,7 +668,7 @@ void ensightPointField
|
||||
|
||||
eMesh.barrier();
|
||||
|
||||
label zoneID = mesh.faceZones().findZoneID(faceZoneName);
|
||||
label zoneID = mesh.faceZones().findIndex(faceZoneName);
|
||||
|
||||
const faceZone& fz = mesh.faceZones()[zoneID];
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -305,7 +305,7 @@ void Foam::ensightMesh::correct()
|
||||
forAll(faceZoneNamesAll, zoneI)
|
||||
{
|
||||
const word& zoneName = faceZoneNamesAll[zoneI];
|
||||
const label faceZoneId = mesh_.faceZones().findZoneID(zoneName);
|
||||
const label faceZoneId = mesh_.faceZones().findIndex(zoneName);
|
||||
|
||||
const faceZone& fz = mesh_.faceZones()[faceZoneId];
|
||||
|
||||
@ -361,7 +361,7 @@ void Foam::ensightMesh::correct()
|
||||
{
|
||||
const word& zoneName = faceZoneNamesAll[zoneI];
|
||||
nFacePrimitives nfp;
|
||||
const label faceZoneId = mesh_.faceZones().findZoneID(zoneName);
|
||||
const label faceZoneId = mesh_.faceZones().findIndex(zoneName);
|
||||
|
||||
if (faceZoneNames_.found(zoneName))
|
||||
{
|
||||
@ -1249,7 +1249,7 @@ void Foam::ensightMesh::write
|
||||
{
|
||||
const word& faceZoneName = iter.key();
|
||||
|
||||
label faceID = mesh_.faceZones().findZoneID(faceZoneName);
|
||||
label faceID = mesh_.faceZones().findIndex(faceZoneName);
|
||||
|
||||
const faceZone& fz = mesh_.faceZones()[faceID];
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -268,7 +268,7 @@ void Foam::vtkPVFoam::convertMeshCellZones
|
||||
for (int partId = range.start(); partId < range.end(); ++partId)
|
||||
{
|
||||
const word zoneName = getPartName(partId);
|
||||
const label zoneId = zMesh.findZoneID(zoneName);
|
||||
const label zoneId = zMesh.findIndex(zoneName);
|
||||
|
||||
if (!partStatus_[partId] || zoneId < 0)
|
||||
{
|
||||
@ -436,7 +436,7 @@ void Foam::vtkPVFoam::convertMeshFaceZones
|
||||
for (int partId = range.start(); partId < range.end(); ++partId)
|
||||
{
|
||||
const word zoneName = getPartName(partId);
|
||||
const label zoneId = zMesh.findZoneID(zoneName);
|
||||
const label zoneId = zMesh.findIndex(zoneName);
|
||||
|
||||
if (!partStatus_[partId] || zoneId < 0)
|
||||
{
|
||||
@ -554,7 +554,7 @@ void Foam::vtkPVFoam::convertMeshPointZones
|
||||
for (int partId = range.start(); partId < range.end(); ++partId)
|
||||
{
|
||||
word zoneName = getPartName(partId);
|
||||
label zoneId = zMesh.findZoneID(zoneName);
|
||||
label zoneId = zMesh.findIndex(zoneName);
|
||||
|
||||
if (!partStatus_[partId] || zoneId < 0)
|
||||
{
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -142,7 +142,7 @@ void Foam::vtkPVFoam::convertPointFields
|
||||
{
|
||||
const word zoneName = getPartName(partId);
|
||||
const label datasetNo = partDataset_[partId];
|
||||
const label zoneId = mesh.faceZones().findZoneID(zoneName);
|
||||
const label zoneId = mesh.faceZones().findIndex(zoneName);
|
||||
|
||||
if (!partStatus_[partId] || datasetNo < 0 || zoneId < 0)
|
||||
{
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -261,7 +261,7 @@ void Foam::vtkPVFoam::convertSurfaceFields
|
||||
}
|
||||
|
||||
const meshFaceZones& zMesh = mesh.faceZones();
|
||||
const label zoneId = zMesh.findZoneID(zoneName);
|
||||
const label zoneId = zMesh.findIndex(zoneName);
|
||||
|
||||
if (zoneId < 0)
|
||||
{
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -218,7 +218,7 @@ void Foam::vtkPVFoam::convertVolFields
|
||||
}
|
||||
|
||||
const meshFaceZones& zMesh = mesh.faceZones();
|
||||
const label zoneId = zMesh.findZoneID(zoneName);
|
||||
const label zoneId = zMesh.findIndex(zoneName);
|
||||
|
||||
if (zoneId < 0)
|
||||
{
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -237,7 +237,7 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
else
|
||||
{
|
||||
label zoneI = mfz.findZoneID(iter.key());
|
||||
label zoneI = mfz.findIndex(iter.key());
|
||||
faceZoneToCompactZone[zoneI] = iter();
|
||||
}
|
||||
}
|
||||
|
||||
@ -292,7 +292,7 @@ bool Foam::MeshZones<ZoneType, MeshType>::found
|
||||
|
||||
|
||||
template<class ZoneType, class MeshType>
|
||||
Foam::label Foam::MeshZones<ZoneType, MeshType>::findZoneID
|
||||
Foam::label Foam::MeshZones<ZoneType, MeshType>::findIndex
|
||||
(
|
||||
const word& zoneName
|
||||
) const
|
||||
@ -514,7 +514,7 @@ void Foam::MeshZones<ZoneType, MeshType>::swap(MeshZones& otherZones)
|
||||
|
||||
forAll(zones, zi)
|
||||
{
|
||||
const label ozi = otherZones.findZoneID(zones[zi].name());
|
||||
const label ozi = otherZones.findIndex(zones[zi].name());
|
||||
|
||||
if (ozi < 0)
|
||||
{
|
||||
@ -524,7 +524,7 @@ void Foam::MeshZones<ZoneType, MeshType>::swap(MeshZones& otherZones)
|
||||
|
||||
forAll(otherZones, ozi)
|
||||
{
|
||||
const label zi = findZoneID(otherZones[ozi].name());
|
||||
const label zi = findIndex(otherZones[ozi].name());
|
||||
|
||||
if (zi < 0)
|
||||
{
|
||||
@ -564,7 +564,7 @@ const ZoneType& Foam::MeshZones<ZoneType, MeshType>::operator[]
|
||||
const word& zoneName
|
||||
) const
|
||||
{
|
||||
const label zi = findZoneID(zoneName);
|
||||
const label zi = findIndex(zoneName);
|
||||
|
||||
if (zi < 0)
|
||||
{
|
||||
@ -584,7 +584,7 @@ ZoneType& Foam::MeshZones<ZoneType, MeshType>::operator[]
|
||||
const word& zoneName
|
||||
)
|
||||
{
|
||||
const label zi = findZoneID(zoneName);
|
||||
const label zi = findIndex(zoneName);
|
||||
|
||||
if (zi < 0)
|
||||
{
|
||||
|
||||
@ -146,18 +146,8 @@ public:
|
||||
//- Return true if the given zoneName is present
|
||||
bool found(const word& zoneName) const;
|
||||
|
||||
//- Return zone index for the first match, return -1 if not found
|
||||
//- Find the zone index given the zone name
|
||||
label findIndex(const wordRe&) const = delete;
|
||||
|
||||
//- Find the zone index given the zone name
|
||||
label findIndex(const word& zoneName) const
|
||||
{
|
||||
return findZoneID(zoneName);
|
||||
}
|
||||
|
||||
//- Find the zone index given the zone name
|
||||
label findZoneID(const word& zoneName) const;
|
||||
label findIndex(const word& zoneName) const;
|
||||
|
||||
//- Mark cells that match the zone specification
|
||||
PackedBoolList findMatching(const wordRe&) const;
|
||||
|
||||
@ -34,24 +34,39 @@ bool Foam::bound(volScalarField& vsf, const dimensionedScalar& min)
|
||||
|
||||
if (minVsf < min.value())
|
||||
{
|
||||
scalarField& isf = vsf.primitiveFieldRef();
|
||||
|
||||
Info<< "bounding " << vsf.name()
|
||||
<< ", min: " << minVsf
|
||||
<< " max: " << max(vsf).value()
|
||||
<< " average: " << gAverage(vsf.primitiveField())
|
||||
<< " average: " << gAverage(isf)
|
||||
<< endl;
|
||||
|
||||
vsf.primitiveFieldRef() = max
|
||||
isf = max
|
||||
(
|
||||
max
|
||||
(
|
||||
vsf.primitiveField(),
|
||||
isf,
|
||||
fvc::average(max(vsf, min))().primitiveField()
|
||||
*pos0(-vsf.primitiveField())
|
||||
*pos0(-isf)
|
||||
),
|
||||
min.value()
|
||||
);
|
||||
|
||||
vsf.boundaryFieldRef() = max(vsf.boundaryField(), min.value());
|
||||
volScalarField::Boundary& bsf = vsf.boundaryFieldRef();
|
||||
forAll(bsf, patchi)
|
||||
{
|
||||
bsf[patchi] == max
|
||||
(
|
||||
max
|
||||
(
|
||||
bsf[patchi],
|
||||
bsf[patchi].patchInternalField()
|
||||
*pos0(-bsf[patchi])
|
||||
),
|
||||
min.value()
|
||||
);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -103,7 +103,7 @@ const Foam::NamedEnum
|
||||
|
||||
void Foam::functionObjects::fieldValues::surfaceFieldValue::setFaceZoneFaces()
|
||||
{
|
||||
label zoneId = mesh_.faceZones().findZoneID(selectionName_);
|
||||
label zoneId = mesh_.faceZones().findIndex(selectionName_);
|
||||
|
||||
if (zoneId < 0)
|
||||
{
|
||||
|
||||
@ -721,7 +721,7 @@ const Foam::cellZone& Foam::fvMeshTopoChangers::refiner::findCellZone
|
||||
const word& cellZoneName
|
||||
) const
|
||||
{
|
||||
const label cellZoneID = mesh().cellZones().findZoneID(cellZoneName);
|
||||
const label cellZoneID = mesh().cellZones().findIndex(cellZoneName);
|
||||
|
||||
bool cellZoneFound = (cellZoneID != -1);
|
||||
reduce(cellZoneFound, orOp<bool>());
|
||||
|
||||
@ -69,7 +69,7 @@ void Foam::fv::effectivenessHeatExchanger::readCoeffs()
|
||||
|
||||
void Foam::fv::effectivenessHeatExchanger::setZone()
|
||||
{
|
||||
zoneID_ = mesh().faceZones().findZoneID(faceZoneName_);
|
||||
zoneID_ = mesh().faceZones().findIndex(faceZoneName_);
|
||||
if (zoneID_ < 0)
|
||||
{
|
||||
FatalErrorInFunction
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -79,7 +79,7 @@ displacementComponentLaplacianFvMotionSolver
|
||||
frozenPointsZone_
|
||||
(
|
||||
coeffDict().found("frozenPointsZone")
|
||||
? fvMesh_.pointZones().findZoneID(coeffDict().lookup("frozenPointsZone"))
|
||||
? fvMesh_.pointZones().findIndex(coeffDict().lookup("frozenPointsZone"))
|
||||
: -1
|
||||
)
|
||||
{
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -85,7 +85,7 @@ Foam::displacementLaplacianFvMotionSolver::displacementLaplacianFvMotionSolver
|
||||
frozenPointsZone_
|
||||
(
|
||||
coeffDict().found("frozenPointsZone")
|
||||
? fvMesh_.pointZones().findZoneID(coeffDict().lookup("frozenPointsZone"))
|
||||
? fvMesh_.pointZones().findIndex(coeffDict().lookup("frozenPointsZone"))
|
||||
: -1
|
||||
)
|
||||
{
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -270,7 +270,7 @@ Foam::FacePostProcessing<CloudType>::FacePostProcessing
|
||||
forAll(faceZoneNames, i)
|
||||
{
|
||||
const word& zoneName = faceZoneNames[i];
|
||||
label zoneI = mfz.findZoneID(zoneName);
|
||||
label zoneI = mfz.findIndex(zoneName);
|
||||
if (zoneI != -1)
|
||||
{
|
||||
zoneIDs.append(zoneI);
|
||||
|
||||
@ -217,7 +217,7 @@ void Foam::CellZoneInjection<CloudType>::topoChange()
|
||||
{
|
||||
// Set/cache the injector cells
|
||||
const fvMesh& mesh = this->owner().mesh();
|
||||
const label zoneI = mesh.cellZones().findZoneID(cellZoneName_);
|
||||
const label zoneI = mesh.cellZones().findIndex(cellZoneName_);
|
||||
|
||||
if (zoneI < 0)
|
||||
{
|
||||
|
||||
@ -246,7 +246,7 @@ Foam::Map<Foam::labelPair> Foam::meshRefinement::getZoneBafflePatches
|
||||
if (faceZoneName.size())
|
||||
{
|
||||
// Get zone
|
||||
const label zonei = fZones.findZoneID(faceZoneName);
|
||||
const label zonei = fZones.findIndex(faceZoneName);
|
||||
const faceZone& fZone = fZones[zonei];
|
||||
|
||||
// Get patch allocated for zone
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2013-2021 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2013-2023 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -350,7 +350,7 @@ Foam::labelList Foam::surfaceZonesInfo::addCellZonesToMesh
|
||||
|
||||
if (cellZoneName != word::null)
|
||||
{
|
||||
label zonei = cellZones.findZoneID(cellZoneName);
|
||||
label zonei = cellZones.findIndex(cellZoneName);
|
||||
|
||||
if (zonei == -1)
|
||||
{
|
||||
@ -413,7 +413,7 @@ Foam::labelList Foam::surfaceZonesInfo::addFaceZonesToMesh
|
||||
|
||||
const word& faceZoneName = surfList[surfi].faceZoneName();
|
||||
|
||||
label zonei = faceZones.findZoneID(faceZoneName);
|
||||
label zonei = faceZones.findIndex(faceZoneName);
|
||||
|
||||
if (zonei == -1)
|
||||
{
|
||||
|
||||
@ -753,7 +753,7 @@ Foam::labelList Foam::snappySnapDriver::getZoneSurfacePoints
|
||||
const word& zoneName
|
||||
)
|
||||
{
|
||||
label zonei = mesh.faceZones().findZoneID(zoneName);
|
||||
label zonei = mesh.faceZones().findIndex(zoneName);
|
||||
|
||||
if (zonei == -1)
|
||||
{
|
||||
@ -2204,7 +2204,7 @@ void Foam::snappySnapDriver::doSnap
|
||||
)
|
||||
{
|
||||
// Filter out all faces for this zone.
|
||||
label zonei = fZones.findZoneID(faceZoneName);
|
||||
label zonei = fZones.findIndex(faceZoneName);
|
||||
const faceZone& fZone = fZones[zonei];
|
||||
forAll(fZone, i)
|
||||
{
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -261,7 +261,7 @@ void Foam::snappySnapDriver::calcNearestFace
|
||||
const word& faceZoneName = surfZones[zoneSurfI].faceZoneName();
|
||||
|
||||
// Get indices of faces on pp that are also in zone
|
||||
label zonei = mesh.faceZones().findZoneID(faceZoneName);
|
||||
label zonei = mesh.faceZones().findIndex(faceZoneName);
|
||||
if (zonei == -1)
|
||||
{
|
||||
FatalErrorInFunction
|
||||
|
||||
@ -97,7 +97,7 @@ void Foam::polyCellSet::setCells()
|
||||
Info<< indent
|
||||
<< "- selecting cells using cellZone " << cellSetName_ << endl;
|
||||
|
||||
const label zoneID = mesh_.cellZones().findZoneID(cellSetName_);
|
||||
const label zoneID = mesh_.cellZones().findIndex(cellSetName_);
|
||||
if (zoneID == -1)
|
||||
{
|
||||
FatalErrorInFunction
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -75,7 +75,7 @@ cellZoneSet::cellZoneSet
|
||||
addressing_(0)
|
||||
{
|
||||
const meshCellZones& cellZones = mesh.cellZones();
|
||||
label zoneID = cellZones.findZoneID(name);
|
||||
label zoneID = cellZones.findIndex(name);
|
||||
|
||||
if
|
||||
(
|
||||
@ -260,7 +260,7 @@ bool cellZoneSet::writeObject
|
||||
|
||||
// Modify cellZone
|
||||
meshCellZones& cellZones = const_cast<polyMesh&>(mesh_).cellZones();
|
||||
label zoneID = cellZones.findZoneID(name());
|
||||
label zoneID = cellZones.findIndex(name());
|
||||
|
||||
if (zoneID == -1)
|
||||
{
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -80,7 +80,7 @@ faceZoneSet::faceZoneSet
|
||||
flipMap_(0)
|
||||
{
|
||||
const meshFaceZones& faceZones = mesh.faceZones();
|
||||
label zoneID = faceZones.findZoneID(name);
|
||||
label zoneID = faceZones.findIndex(name);
|
||||
|
||||
if
|
||||
(
|
||||
@ -475,7 +475,7 @@ bool faceZoneSet::writeObject
|
||||
|
||||
// Modify faceZone
|
||||
meshFaceZones& faceZones = const_cast<polyMesh&>(mesh_).faceZones();
|
||||
label zoneID = faceZones.findZoneID(name());
|
||||
label zoneID = faceZones.findIndex(name());
|
||||
|
||||
if (zoneID == -1)
|
||||
{
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -77,7 +77,7 @@ pointZoneSet::pointZoneSet
|
||||
addressing_(0)
|
||||
{
|
||||
const meshPointZones& pointZones = mesh.pointZones();
|
||||
label zoneID = pointZones.findZoneID(name);
|
||||
label zoneID = pointZones.findIndex(name);
|
||||
|
||||
if
|
||||
(
|
||||
@ -261,7 +261,7 @@ bool pointZoneSet::writeObject
|
||||
|
||||
// Modify pointZone
|
||||
meshPointZones& pointZones = const_cast<polyMesh&>(mesh_).pointZones();
|
||||
label zoneID = pointZones.findZoneID(name());
|
||||
label zoneID = pointZones.findIndex(name());
|
||||
|
||||
if (zoneID == -1)
|
||||
{
|
||||
|
||||
@ -304,7 +304,7 @@ void Foam::displacementLayeredMotionMotionSolver::cellZoneSolve
|
||||
forAllConstIter(dictionary, patchesDict, patchiter)
|
||||
{
|
||||
const word& faceZoneName = patchiter().keyword();
|
||||
label zoneI = mesh().faceZones().findZoneID(faceZoneName);
|
||||
label zoneI = mesh().faceZones().findIndex(faceZoneName);
|
||||
if (zoneI == -1)
|
||||
{
|
||||
FatalErrorInFunction
|
||||
@ -535,7 +535,7 @@ void Foam::displacementLayeredMotionMotionSolver::solve()
|
||||
const word& cellZoneName = regionIter().keyword();
|
||||
const dictionary& regionDict = regionIter().dict();
|
||||
|
||||
label zoneI = mesh().cellZones().findZoneID(cellZoneName);
|
||||
label zoneI = mesh().cellZones().findIndex(cellZoneName);
|
||||
|
||||
Info<< "solving for zone: " << cellZoneName << endl;
|
||||
|
||||
|
||||
@ -64,7 +64,7 @@ Foam::multiSolidBodyMotionSolver::multiSolidBodyMotionSolver
|
||||
{
|
||||
if (iter().isDict())
|
||||
{
|
||||
zoneIDs_[zonei] = mesh.cellZones().findZoneID(iter().keyword());
|
||||
zoneIDs_[zonei] = mesh.cellZones().findIndex(iter().keyword());
|
||||
|
||||
if (zoneIDs_[zonei] == -1)
|
||||
{
|
||||
|
||||
@ -1540,7 +1540,7 @@ void Foam::fvMeshDistribute::sendMesh
|
||||
|
||||
forAll(pointZoneNames, nameI)
|
||||
{
|
||||
label myZoneID = pointZones.findZoneID(pointZoneNames[nameI]);
|
||||
label myZoneID = pointZones.findIndex(pointZoneNames[nameI]);
|
||||
|
||||
if (myZoneID != -1)
|
||||
{
|
||||
@ -1551,7 +1551,7 @@ void Foam::fvMeshDistribute::sendMesh
|
||||
|
||||
forAll(pointZoneNames, nameI)
|
||||
{
|
||||
label myZoneID = pointZones.findZoneID(pointZoneNames[nameI]);
|
||||
label myZoneID = pointZones.findIndex(pointZoneNames[nameI]);
|
||||
|
||||
if (myZoneID != -1)
|
||||
{
|
||||
@ -1570,7 +1570,7 @@ void Foam::fvMeshDistribute::sendMesh
|
||||
|
||||
forAll(faceZoneNames, nameI)
|
||||
{
|
||||
label myZoneID = faceZones.findZoneID(faceZoneNames[nameI]);
|
||||
label myZoneID = faceZones.findIndex(faceZoneNames[nameI]);
|
||||
|
||||
if (myZoneID != -1)
|
||||
{
|
||||
@ -1583,7 +1583,7 @@ void Foam::fvMeshDistribute::sendMesh
|
||||
|
||||
forAll(faceZoneNames, nameI)
|
||||
{
|
||||
label myZoneID = faceZones.findZoneID(faceZoneNames[nameI]);
|
||||
label myZoneID = faceZones.findIndex(faceZoneNames[nameI]);
|
||||
|
||||
if (myZoneID != -1)
|
||||
{
|
||||
@ -1602,7 +1602,7 @@ void Foam::fvMeshDistribute::sendMesh
|
||||
|
||||
forAll(cellZoneNames, nameI)
|
||||
{
|
||||
label myZoneID = cellZones.findZoneID(cellZoneNames[nameI]);
|
||||
label myZoneID = cellZones.findIndex(cellZoneNames[nameI]);
|
||||
|
||||
if (myZoneID != -1)
|
||||
{
|
||||
@ -1614,7 +1614,7 @@ void Foam::fvMeshDistribute::sendMesh
|
||||
|
||||
forAll(cellZoneNames, nameI)
|
||||
{
|
||||
label myZoneID = cellZones.findZoneID(cellZoneNames[nameI]);
|
||||
label myZoneID = cellZones.findIndex(cellZoneNames[nameI]);
|
||||
|
||||
if (myZoneID != -1)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user