boundaryField() -> boundaryFieldRef()

This commit is contained in:
Henry Weller
2016-04-24 22:07:37 +01:00
parent 6005258c10
commit 6a27f7af46
155 changed files with 1650 additions and 1466 deletions

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -220,13 +220,13 @@ int main(int argc, char *argv[])
// Overwrite
newPatches.setSize(max(nRegions1, nRegions2));
forAll(surface1.patches(), patchI)
forAll(surface1.patches(), patchi)
{
newPatches[patchI] = surface1.patches()[patchI];
newPatches[patchi] = surface1.patches()[patchi];
}
forAll(surface2.patches(), patchI)
forAll(surface2.patches(), patchi)
{
newPatches[patchI] = surface2.patches()[patchI];
newPatches[patchi] = surface2.patches()[patchi];
}
}
else
@ -246,22 +246,22 @@ int main(int argc, char *argv[])
label newPatchI = 0;
forAll(surface1.patches(), patchI)
forAll(surface1.patches(), patchi)
{
newPatches[newPatchI++] = surface1.patches()[patchI];
newPatches[newPatchI++] = surface1.patches()[patchi];
}
forAll(surface2.patches(), patchI)
forAll(surface2.patches(), patchi)
{
newPatches[newPatchI++] = surface2.patches()[patchI];
newPatches[newPatchI++] = surface2.patches()[patchi];
}
}
Info<< "New patches:" << nl;
forAll(newPatches, patchI)
forAll(newPatches, patchi)
{
Info<< " " << patchI << '\t' << newPatches[patchI].name() << nl;
Info<< " " << patchi << '\t' << newPatches[patchi].name() << nl;
}
Info<< endl;

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -106,10 +106,10 @@ int main(int argc, char *argv[])
// Create some patches
surf.patches().setSize(nRegions);
forAll(surf.patches(), patchI)
forAll(surf.patches(), patchi)
{
surf.patches()[patchI].name() = "patch" + Foam::name(patchI);
surf.patches()[patchI].geometricType() = "empty";
surf.patches()[patchi].name() = "patch" + Foam::name(patchi);
surf.patches()[patchi].geometricType() = "empty";
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -268,10 +268,10 @@ int main(int argc, char *argv[])
Info<< "Region\tSize" << nl
<< "------\t----" << nl;
forAll(surf.patches(), patchI)
forAll(surf.patches(), patchi)
{
Info<< surf.patches()[patchI].name() << '\t'
<< regionSize[patchI] << nl;
Info<< surf.patches()[patchi].name() << '\t'
<< regionSize[patchi] << nl;
}
Info<< nl << endl;
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -129,13 +129,13 @@ int main(int argc, char *argv[])
}
else
{
forAll(bMesh, patchI)
forAll(bMesh, patchi)
{
const polyPatch& patch = bMesh[patchI];
const polyPatch& patch = bMesh[patchi];
if (includeProcPatches || !isA<processorPolyPatch>(patch))
{
includePatches.insert(patchI);
includePatches.insert(patchi);
}
}
}
@ -230,10 +230,10 @@ int main(int argc, char *argv[])
labelList faceZoneToCompactZone(bMesh.size(), -1);
forAllConstIter(HashTable<label>, compactZoneID, iter)
{
label patchI = bMesh.findPatchID(iter.key());
if (patchI != -1)
label patchi = bMesh.findPatchID(iter.key());
if (patchi != -1)
{
patchToCompactZone[patchI] = iter();
patchToCompactZone[patchi] = iter();
}
else
{

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -63,15 +63,15 @@ int main(int argc, char *argv[])
const geometricSurfacePatchList& patches = surf.patches();
forAll(patches, patchI)
forAll(patches, patchi)
{
const geometricSurfacePatch& pp = patches[patchI];
const geometricSurfacePatch& pp = patches[patchi];
word patchName = pp.name();
if (patchName.empty())
{
patchName = "patch" + Foam::name(patchI);
patchName = "patch" + Foam::name(patchi);
}
fileName outFile(surfBase + '_' + patchName + '.' + extension);
@ -87,7 +87,7 @@ int main(int argc, char *argv[])
{
const labelledTri& f = surf[faceI];
if (f.region() == patchI)
if (f.region() == patchi)
{
includeMap[faceI] = true;
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -46,41 +46,41 @@ using namespace Foam;
// Adds empty patch if not yet there. Returns patchID.
label addPatch(polyMesh& mesh, const word& patchName)
{
label patchI = mesh.boundaryMesh().findPatchID(patchName);
label patchi = mesh.boundaryMesh().findPatchID(patchName);
if (patchI == -1)
if (patchi == -1)
{
const polyBoundaryMesh& patches = mesh.boundaryMesh();
List<polyPatch*> newPatches(patches.size() + 1);
patchI = 0;
patchi = 0;
// Copy all old patches
forAll(patches, i)
{
const polyPatch& pp = patches[i];
newPatches[patchI] =
newPatches[patchi] =
pp.clone
(
patches,
patchI,
patchi,
pp.size(),
pp.start()
).ptr();
patchI++;
patchi++;
}
// Add zero-sized patch
newPatches[patchI] =
newPatches[patchi] =
new polyPatch
(
patchName,
0,
mesh.nFaces(),
patchI,
patchi,
patches,
polyPatch::typeName
);
@ -88,14 +88,14 @@ label addPatch(polyMesh& mesh, const word& patchName)
mesh.removeBoundary();
mesh.addPatches(newPatches);
Pout<< "Created patch " << patchName << " at " << patchI << endl;
Pout<< "Created patch " << patchName << " at " << patchi << endl;
}
else
{
Pout<< "Reusing patch " << patchName << " at " << patchI << endl;
Pout<< "Reusing patch " << patchName << " at " << patchi << endl;
}
return patchI;
return patchi;
}
@ -222,10 +222,10 @@ int main(int argc, char *argv[])
Info<< "Before patching:" << nl
<< " patch\tsize" << endl;
forAll(mesh.boundaryMesh(), patchI)
forAll(mesh.boundaryMesh(), patchi)
{
Info<< " " << mesh.boundaryMesh()[patchI].name() << '\t'
<< mesh.boundaryMesh()[patchI].size() << nl;
Info<< " " << mesh.boundaryMesh()[patchi].name() << '\t'
<< mesh.boundaryMesh()[patchi].size() << nl;
}
Info<< endl;
@ -313,10 +313,10 @@ int main(int argc, char *argv[])
Info<< "After patching:" << nl
<< " patch\tsize" << endl;
forAll(mesh.boundaryMesh(), patchI)
forAll(mesh.boundaryMesh(), patchi)
{
Info<< " " << mesh.boundaryMesh()[patchI].name() << '\t'
<< mesh.boundaryMesh()[patchI].size() << endl;
Info<< " " << mesh.boundaryMesh()[patchi].name() << '\t'
<< mesh.boundaryMesh()[patchi].size() << endl;
}
Info<< endl;