mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Standardized cell, patch and face loop index names
This commit is contained in:
@ -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
|
||||
@ -88,9 +88,9 @@ int main(int argc, char *argv[])
|
||||
dimensionedScalar("aggomeration", dimless, 0.0)
|
||||
);
|
||||
scalarField& fld = scalarAgglomeration.internalField();
|
||||
forAll(fld, cellI)
|
||||
forAll(fld, celli)
|
||||
{
|
||||
fld[cellI] = cellToCoarse[cellI];
|
||||
fld[celli] = cellToCoarse[celli];
|
||||
}
|
||||
fld /= max(fld);
|
||||
scalarAgglomeration.correctBoundaryConditions();
|
||||
@ -167,9 +167,9 @@ int main(int argc, char *argv[])
|
||||
dimensionedScalar("aggomeration", dimless, 0.0)
|
||||
);
|
||||
scalarField& fld = scalarAgglomeration.internalField();
|
||||
forAll(fld, cellI)
|
||||
forAll(fld, celli)
|
||||
{
|
||||
fld[cellI] = cellToCoarse[cellI];
|
||||
fld[celli] = cellToCoarse[celli];
|
||||
}
|
||||
if (normalise)
|
||||
{
|
||||
@ -185,9 +185,9 @@ int main(int argc, char *argv[])
|
||||
label vertI = 0;
|
||||
|
||||
// Write all mesh cc
|
||||
forAll(mesh.cellCentres(), cellI)
|
||||
forAll(mesh.cellCentres(), celli)
|
||||
{
|
||||
meshTools::writeOBJ(str, mesh.cellCentres()[cellI]);
|
||||
meshTools::writeOBJ(str, mesh.cellCentres()[celli]);
|
||||
vertI++;
|
||||
}
|
||||
|
||||
@ -205,9 +205,9 @@ int main(int argc, char *argv[])
|
||||
|
||||
forAll(cellLabels, i)
|
||||
{
|
||||
label cellI = cellLabels[i];
|
||||
label celli = cellLabels[i];
|
||||
|
||||
str << "l " << cellI+1 << ' ' << vertI << nl;
|
||||
str << "l " << celli+1 << ' ' << vertI << nl;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -114,9 +114,9 @@ int main(int argc, char *argv[])
|
||||
dimensionedScalar("patchDist", dimLength, 0.0)
|
||||
);
|
||||
scalarField pf(vsf.boundaryField()[patch.index()].size());
|
||||
forAll(pf, faceI)
|
||||
forAll(pf, facei)
|
||||
{
|
||||
pf[faceI] = Foam::sqrt(allFaceInfo[faceI].distSqr());
|
||||
pf[facei] = Foam::sqrt(allFaceInfo[facei].distSqr());
|
||||
}
|
||||
vsf.boundaryFieldRef()[patch.index()] = pf;
|
||||
|
||||
|
||||
@ -72,10 +72,10 @@ using namespace Foam;
|
||||
// const faceList& localFaces = p.localFaces();
|
||||
// const vectorField& faceAreas = mesh.faceAreas();
|
||||
//
|
||||
// forAll(localFaces, faceI)
|
||||
// forAll(localFaces, facei)
|
||||
// {
|
||||
// const face& f = localFaces[faceI];
|
||||
// const vector& n = faceAreas[meshFaces[faceI]];
|
||||
// const face& f = localFaces[facei];
|
||||
// const vector& n = faceAreas[meshFaces[facei]];
|
||||
// forAll(f, fp)
|
||||
// {
|
||||
// extrudeN[f[fp]] += n;
|
||||
|
||||
@ -168,13 +168,13 @@ int main(int argc, char *argv[])
|
||||
// stencilPoints
|
||||
// );
|
||||
//
|
||||
// forAll(stencilPoints, faceI)
|
||||
// forAll(stencilPoints, facei)
|
||||
// {
|
||||
// writeStencilOBJ
|
||||
// (
|
||||
// runTime.path()/"faceEdgeCell" + Foam::name(faceI) + ".obj",
|
||||
// mesh.faceCentres()[faceI],
|
||||
// stencilPoints[faceI]
|
||||
// runTime.path()/"faceEdgeCell" + Foam::name(facei) + ".obj",
|
||||
// mesh.faceCentres()[facei],
|
||||
// stencilPoints[facei]
|
||||
// );
|
||||
// }
|
||||
// }
|
||||
@ -200,14 +200,14 @@ int main(int argc, char *argv[])
|
||||
// //{
|
||||
// // const labelListList& stencil = addressing.stencil();
|
||||
// // List<List<scalar>> stencilWeights(stencil.size());
|
||||
// // forAll(stencil, faceI)
|
||||
// // forAll(stencil, facei)
|
||||
// // {
|
||||
// // const labelList& fStencil = stencil[faceI];
|
||||
// // const labelList& fStencil = stencil[facei];
|
||||
// //
|
||||
// // if (fStencil.size() > 0)
|
||||
// // {
|
||||
// // // Uniform weights
|
||||
// // stencilWeights[faceI] = scalarList
|
||||
// // stencilWeights[facei] = scalarList
|
||||
// // (
|
||||
// // fStencil.size(),
|
||||
// // 1.0/fStencil.size()
|
||||
@ -230,15 +230,15 @@ int main(int argc, char *argv[])
|
||||
// stencilPoints
|
||||
// );
|
||||
//
|
||||
// forAll(stencilPoints, faceI)
|
||||
// forAll(stencilPoints, facei)
|
||||
// {
|
||||
// if (stencilPoints[faceI].size() >= 15)
|
||||
// if (stencilPoints[facei].size() >= 15)
|
||||
// {
|
||||
// writeStencilOBJ
|
||||
// (
|
||||
// runTime.path()/"centredFace" + Foam::name(faceI) + ".obj",
|
||||
// mesh.faceCentres()[faceI],
|
||||
// stencilPoints[faceI]
|
||||
// runTime.path()/"centredFace" + Foam::name(facei) + ".obj",
|
||||
// mesh.faceCentres()[facei],
|
||||
// stencilPoints[facei]
|
||||
// );
|
||||
// }
|
||||
// }
|
||||
@ -267,13 +267,13 @@ int main(int argc, char *argv[])
|
||||
// // stencilPoints
|
||||
// //);
|
||||
// //
|
||||
// //forAll(stencilPoints, faceI)
|
||||
// //forAll(stencilPoints, facei)
|
||||
// //{
|
||||
// // writeStencilOBJ
|
||||
// // (
|
||||
// // runTime.path()/"centredPoint" + Foam::name(faceI) + ".obj",
|
||||
// // mesh.faceCentres()[faceI],
|
||||
// // stencilPoints[faceI]
|
||||
// // runTime.path()/"centredPoint" + Foam::name(facei) + ".obj",
|
||||
// // mesh.faceCentres()[facei],
|
||||
// // stencilPoints[facei]
|
||||
// // );
|
||||
// //}
|
||||
// }
|
||||
@ -302,13 +302,13 @@ int main(int argc, char *argv[])
|
||||
// // stencilPoints
|
||||
// //);
|
||||
// //
|
||||
// //forAll(stencilPoints, faceI)
|
||||
// //forAll(stencilPoints, facei)
|
||||
// //{
|
||||
// // writeStencilOBJ
|
||||
// // (
|
||||
// // runTime.path()/"centredEdge" + Foam::name(faceI) + ".obj",
|
||||
// // mesh.faceCentres()[faceI],
|
||||
// // stencilPoints[faceI]
|
||||
// // runTime.path()/"centredEdge" + Foam::name(facei) + ".obj",
|
||||
// // mesh.faceCentres()[facei],
|
||||
// // stencilPoints[facei]
|
||||
// // );
|
||||
// //}
|
||||
// }
|
||||
@ -340,13 +340,13 @@ int main(int argc, char *argv[])
|
||||
// ownPoints
|
||||
// );
|
||||
//
|
||||
// forAll(ownPoints, faceI)
|
||||
// forAll(ownPoints, facei)
|
||||
// {
|
||||
// writeStencilOBJ
|
||||
// (
|
||||
// runTime.path()/"ownFEC" + Foam::name(faceI) + ".obj",
|
||||
// mesh.faceCentres()[faceI],
|
||||
// ownPoints[faceI]
|
||||
// runTime.path()/"ownFEC" + Foam::name(facei) + ".obj",
|
||||
// mesh.faceCentres()[facei],
|
||||
// ownPoints[facei]
|
||||
// );
|
||||
// }
|
||||
// }
|
||||
@ -361,13 +361,13 @@ int main(int argc, char *argv[])
|
||||
// neiPoints
|
||||
// );
|
||||
//
|
||||
// forAll(neiPoints, faceI)
|
||||
// forAll(neiPoints, facei)
|
||||
// {
|
||||
// writeStencilOBJ
|
||||
// (
|
||||
// runTime.path()/"neiFEC" + Foam::name(faceI) + ".obj",
|
||||
// mesh.faceCentres()[faceI],
|
||||
// neiPoints[faceI]
|
||||
// runTime.path()/"neiFEC" + Foam::name(facei) + ".obj",
|
||||
// mesh.faceCentres()[facei],
|
||||
// neiPoints[facei]
|
||||
// );
|
||||
// }
|
||||
// }
|
||||
@ -400,13 +400,13 @@ int main(int argc, char *argv[])
|
||||
// ownPoints
|
||||
// );
|
||||
//
|
||||
// forAll(ownPoints, faceI)
|
||||
// forAll(ownPoints, facei)
|
||||
// {
|
||||
// writeStencilOBJ
|
||||
// (
|
||||
// runTime.path()/"ownCFC" + Foam::name(faceI) + ".obj",
|
||||
// mesh.faceCentres()[faceI],
|
||||
// ownPoints[faceI]
|
||||
// runTime.path()/"ownCFC" + Foam::name(facei) + ".obj",
|
||||
// mesh.faceCentres()[facei],
|
||||
// ownPoints[facei]
|
||||
// );
|
||||
// }
|
||||
// }
|
||||
@ -421,13 +421,13 @@ int main(int argc, char *argv[])
|
||||
// neiPoints
|
||||
// );
|
||||
//
|
||||
// forAll(neiPoints, faceI)
|
||||
// forAll(neiPoints, facei)
|
||||
// {
|
||||
// writeStencilOBJ
|
||||
// (
|
||||
// runTime.path()/"neiCFC" + Foam::name(faceI) + ".obj",
|
||||
// mesh.faceCentres()[faceI],
|
||||
// neiPoints[faceI]
|
||||
// runTime.path()/"neiCFC" + Foam::name(facei) + ".obj",
|
||||
// mesh.faceCentres()[facei],
|
||||
// neiPoints[facei]
|
||||
// );
|
||||
// }
|
||||
// }
|
||||
@ -458,13 +458,13 @@ int main(int argc, char *argv[])
|
||||
stencilPoints
|
||||
);
|
||||
|
||||
forAll(stencilPoints, cellI)
|
||||
forAll(stencilPoints, celli)
|
||||
{
|
||||
writeStencilOBJ
|
||||
(
|
||||
runTime.path()/"centredCECCell" + Foam::name(cellI) + ".obj",
|
||||
mesh.cellCentres()[cellI],
|
||||
stencilPoints[cellI]
|
||||
runTime.path()/"centredCECCell" + Foam::name(celli) + ".obj",
|
||||
mesh.cellCentres()[celli],
|
||||
stencilPoints[celli]
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -486,13 +486,13 @@ int main(int argc, char *argv[])
|
||||
stencilPoints
|
||||
);
|
||||
|
||||
forAll(stencilPoints, cellI)
|
||||
forAll(stencilPoints, celli)
|
||||
{
|
||||
writeStencilOBJ
|
||||
(
|
||||
runTime.path()/"centredCPCCell" + Foam::name(cellI) + ".obj",
|
||||
mesh.cellCentres()[cellI],
|
||||
stencilPoints[cellI]
|
||||
runTime.path()/"centredCPCCell" + Foam::name(celli) + ".obj",
|
||||
mesh.cellCentres()[celli],
|
||||
stencilPoints[celli]
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -514,13 +514,13 @@ int main(int argc, char *argv[])
|
||||
stencilPoints
|
||||
);
|
||||
|
||||
forAll(stencilPoints, cellI)
|
||||
forAll(stencilPoints, celli)
|
||||
{
|
||||
writeStencilOBJ
|
||||
(
|
||||
runTime.path()/"centredCFCCell" + Foam::name(cellI) + ".obj",
|
||||
mesh.cellCentres()[cellI],
|
||||
stencilPoints[cellI]
|
||||
runTime.path()/"centredCFCCell" + Foam::name(celli) + ".obj",
|
||||
mesh.cellCentres()[celli],
|
||||
stencilPoints[celli]
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -538,12 +538,12 @@ int main(int argc, char *argv[])
|
||||
// );
|
||||
// for (label faci = 0; faci < mesh.nInternalFaces(); faci++)
|
||||
// {
|
||||
// const scalarList& stData = stencilData[faceI];
|
||||
// const scalarList& stWeight = fit[faceI];
|
||||
// const scalarList& stData = stencilData[facei];
|
||||
// const scalarList& stWeight = fit[facei];
|
||||
//
|
||||
// forAll(stData, i)
|
||||
// {
|
||||
// sf[faceI] += stWeight[i]*stData[i];
|
||||
// sf[facei] += stWeight[i]*stData[i];
|
||||
// }
|
||||
// }
|
||||
// See finiteVolume/lnInclude/leastSquaresGrad.C
|
||||
|
||||
@ -150,9 +150,9 @@ int main(int argc, char *argv[])
|
||||
List<point> compactFld(map.constructSize(), Zero);
|
||||
|
||||
// Insert my internal values
|
||||
forAll(fld, cellI)
|
||||
forAll(fld, celli)
|
||||
{
|
||||
compactFld[cellI] = fld[cellI];
|
||||
compactFld[celli] = fld[celli];
|
||||
}
|
||||
// Insert my boundary values
|
||||
label nCompact = fld.size();
|
||||
@ -172,27 +172,27 @@ int main(int argc, char *argv[])
|
||||
// 2. Pull to stencil
|
||||
stencilPoints.setSize(stencil.size());
|
||||
|
||||
forAll(stencil, cellI)
|
||||
forAll(stencil, celli)
|
||||
{
|
||||
const labelList& compactCells = stencil[cellI];
|
||||
const labelList& compactCells = stencil[celli];
|
||||
|
||||
stencilPoints[cellI].setSize(compactCells.size());
|
||||
stencilPoints[celli].setSize(compactCells.size());
|
||||
|
||||
forAll(compactCells, i)
|
||||
{
|
||||
stencilPoints[cellI][i] = compactFld[compactCells[i]];
|
||||
stencilPoints[celli][i] = compactFld[compactCells[i]];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
forAll(stencilPoints, cellI)
|
||||
forAll(stencilPoints, celli)
|
||||
{
|
||||
writeStencilOBJ
|
||||
(
|
||||
runTime.path()/"centredCell" + Foam::name(cellI) + ".obj",
|
||||
mesh.cellCentres()[cellI],
|
||||
stencilPoints[cellI]
|
||||
runTime.path()/"centredCell" + Foam::name(celli) + ".obj",
|
||||
mesh.cellCentres()[celli],
|
||||
stencilPoints[celli]
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@ -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
|
||||
@ -66,26 +66,26 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
|
||||
// convert from local to global and back.
|
||||
for (label cellI = 0; cellI < mesh.nCells(); cellI++)
|
||||
for (label celli = 0; celli < mesh.nCells(); celli++)
|
||||
{
|
||||
// to global index
|
||||
label globalCellI = globalNumbering.toGlobal(cellI);
|
||||
label globalCellI = globalNumbering.toGlobal(celli);
|
||||
|
||||
// and back
|
||||
label procI = globalNumbering.whichProcID(globalCellI);
|
||||
label localCellI = globalNumbering.toLocal(globalCellI);
|
||||
|
||||
if (procI != Pstream::myProcNo() || localCellI != cellI)
|
||||
if (procI != Pstream::myProcNo() || localCellI != celli)
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Problem. cellI:" << cellI << " localCellI:" << localCellI
|
||||
<< "Problem. celli:" << celli << " localCellI:" << localCellI
|
||||
<< " procI:" << procI << abort(FatalError);
|
||||
}
|
||||
|
||||
if (!globalNumbering.isLocal(globalCellI))
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Problem. cellI:" << cellI << " globalCellI:" << globalCellI
|
||||
<< "Problem. celli:" << celli << " globalCellI:" << globalCellI
|
||||
<< " not local" << abort(FatalError);
|
||||
}
|
||||
}
|
||||
|
||||
@ -196,16 +196,16 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
|
||||
{
|
||||
const label cellI = args.optionLookupOrDefault("cell", 0);
|
||||
const label celli = args.optionLookupOrDefault("cell", 0);
|
||||
|
||||
tensorField mI(momentOfInertia::meshInertia(mesh));
|
||||
|
||||
tensor& J = mI[cellI];
|
||||
tensor& J = mI[celli];
|
||||
|
||||
vector eVal = eigenValues(J);
|
||||
|
||||
Info<< nl
|
||||
<< "Inertia tensor of cell " << cellI << " " << J << nl
|
||||
<< "Inertia tensor of cell " << celli << " " << J << nl
|
||||
<< "eigenValues (principal moments) " << eVal << endl;
|
||||
|
||||
J /= cmptMax(eVal);
|
||||
@ -215,16 +215,16 @@ int main(int argc, char *argv[])
|
||||
Info<< "eigenVectors (principal axes, from normalised inertia) " << eVec
|
||||
<< endl;
|
||||
|
||||
OFstream str("cell_" + name(cellI) + "_inertia.obj");
|
||||
OFstream str("cell_" + name(celli) + "_inertia.obj");
|
||||
|
||||
Info<< nl << "Writing scaled principal axes of cell " << cellI << " to "
|
||||
Info<< nl << "Writing scaled principal axes of cell " << celli << " to "
|
||||
<< str.name() << endl;
|
||||
|
||||
const point& cC = mesh.cellCentres()[cellI];
|
||||
const point& cC = mesh.cellCentres()[celli];
|
||||
|
||||
scalar scale = mag
|
||||
(
|
||||
(cC - mesh.faceCentres()[mesh.cells()[cellI][0]])
|
||||
(cC - mesh.faceCentres()[mesh.cells()[celli][0]])
|
||||
/eVal.component(findMin(eVal))
|
||||
);
|
||||
|
||||
|
||||
@ -76,11 +76,11 @@ int main(int argc, char *argv[])
|
||||
DynamicList<label> changedEdges(4*patch.size());
|
||||
DynamicList<patchEdgeFaceRegions> changedInfo(changedEdges.size());
|
||||
|
||||
forAll(patch, faceI)
|
||||
forAll(patch, facei)
|
||||
{
|
||||
const labelList& fEdges = patch.faceEdges()[faceI];
|
||||
const labelList& fEdges = patch.faceEdges()[facei];
|
||||
|
||||
label globalFaceI = globalNumbering.toGlobal(faceI);
|
||||
label globalFaceI = globalNumbering.toGlobal(facei);
|
||||
|
||||
forAll(fEdges, i)
|
||||
{
|
||||
@ -117,13 +117,13 @@ int main(int argc, char *argv[])
|
||||
{
|
||||
labelList currentRegion(patch.nPoints(), -1);
|
||||
|
||||
forAll(patch.localFaces(), faceI)
|
||||
forAll(patch.localFaces(), facei)
|
||||
{
|
||||
const face& f = patch.localFaces()[faceI];
|
||||
const face& f = patch.localFaces()[facei];
|
||||
|
||||
forAll(f, fp)
|
||||
{
|
||||
label faceRegion = allFaceInfo[faceI].regions()[fp];
|
||||
label faceRegion = allFaceInfo[facei].regions()[fp];
|
||||
|
||||
label pointI = f[fp];
|
||||
|
||||
|
||||
@ -59,11 +59,11 @@ void checkFaceEdges
|
||||
const labelListList& faceEdges
|
||||
)
|
||||
{
|
||||
forAll(faceEdges, faceI)
|
||||
forAll(faceEdges, facei)
|
||||
{
|
||||
const face& f = localFaces[faceI];
|
||||
const face& f = localFaces[facei];
|
||||
|
||||
const labelList& myEdges = faceEdges[faceI];
|
||||
const labelList& myEdges = faceEdges[facei];
|
||||
|
||||
forAll(f, fp)
|
||||
{
|
||||
@ -73,7 +73,7 @@ void checkFaceEdges
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Edges of face not in face point order:"
|
||||
<< "face:" << faceI << " localF:" << f
|
||||
<< "face:" << facei << " localF:" << f
|
||||
<< " faceEdges:" << myEdges
|
||||
<< abort(FatalError);
|
||||
}
|
||||
@ -130,9 +130,9 @@ void writeFaceEdges
|
||||
|
||||
writeObj(feStream, localPoints);
|
||||
|
||||
forAll(faceEdges, faceI)
|
||||
forAll(faceEdges, facei)
|
||||
{
|
||||
const labelList& myEdges = faceEdges[faceI];
|
||||
const labelList& myEdges = faceEdges[facei];
|
||||
|
||||
forAll(myEdges, i)
|
||||
{
|
||||
@ -158,9 +158,9 @@ void writeEdgeFaces
|
||||
|
||||
pointField ctrs(localFaces.size(), Zero);
|
||||
|
||||
forAll(localFaces, faceI)
|
||||
forAll(localFaces, facei)
|
||||
{
|
||||
ctrs[faceI] = localFaces[faceI].centre(localPoints);
|
||||
ctrs[facei] = localFaces[facei].centre(localPoints);
|
||||
}
|
||||
writeObj(efStream, ctrs);
|
||||
|
||||
@ -190,19 +190,19 @@ void writeFaceFaces
|
||||
|
||||
pointField ctrs(localFaces.size(), Zero);
|
||||
|
||||
forAll(localFaces, faceI)
|
||||
forAll(localFaces, facei)
|
||||
{
|
||||
ctrs[faceI] = localFaces[faceI].centre(localPoints);
|
||||
ctrs[facei] = localFaces[facei].centre(localPoints);
|
||||
}
|
||||
writeObj(ffStream, ctrs);
|
||||
|
||||
forAll(faceFaces, faceI)
|
||||
forAll(faceFaces, facei)
|
||||
{
|
||||
const labelList& nbrs = faceFaces[faceI];
|
||||
const labelList& nbrs = faceFaces[facei];
|
||||
|
||||
forAll(nbrs, nbI)
|
||||
{
|
||||
ffStream << "l " << faceI+1 << ' ' << nbrs[nbI]+1 << endl;
|
||||
ffStream << "l " << facei+1 << ' ' << nbrs[nbI]+1 << endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -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
|
||||
@ -141,15 +141,15 @@ void testPackedList(const polyMesh& mesh, Random& rndGen)
|
||||
|
||||
{
|
||||
PackedList<3> bits(mesh.nFaces());
|
||||
forAll(bits, faceI)
|
||||
forAll(bits, facei)
|
||||
{
|
||||
bits.set(faceI, rndGen.integer(0,3));
|
||||
bits.set(facei, rndGen.integer(0,3));
|
||||
}
|
||||
|
||||
labelList faceValues(mesh.nFaces());
|
||||
forAll(bits, faceI)
|
||||
forAll(bits, facei)
|
||||
{
|
||||
faceValues[faceI] = bits.get(faceI);
|
||||
faceValues[facei] = bits.get(facei);
|
||||
}
|
||||
|
||||
PackedList<3> maxBits(bits);
|
||||
@ -161,20 +161,20 @@ void testPackedList(const polyMesh& mesh, Random& rndGen)
|
||||
syncTools::syncFaceList(mesh, maxBits, maxEqOp<unsigned int>());
|
||||
syncTools::syncFaceList(mesh, maxFaceValues, maxEqOp<label>());
|
||||
|
||||
forAll(bits, faceI)
|
||||
forAll(bits, facei)
|
||||
{
|
||||
if
|
||||
(
|
||||
faceValues[faceI] != label(bits.get(faceI))
|
||||
|| maxFaceValues[faceI] != label(maxBits.get(faceI))
|
||||
faceValues[facei] != label(bits.get(facei))
|
||||
|| maxFaceValues[facei] != label(maxBits.get(facei))
|
||||
)
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "face:" << faceI
|
||||
<< " minlabel:" << faceValues[faceI]
|
||||
<< " minbits:" << bits.get(faceI)
|
||||
<< " maxLabel:" << maxFaceValues[faceI]
|
||||
<< " maxBits:" << maxBits.get(faceI)
|
||||
<< "face:" << facei
|
||||
<< " minlabel:" << faceValues[facei]
|
||||
<< " minbits:" << bits.get(facei)
|
||||
<< " maxLabel:" << maxFaceValues[facei]
|
||||
<< " maxBits:" << maxBits.get(facei)
|
||||
<< exit(FatalError);
|
||||
}
|
||||
}
|
||||
@ -532,14 +532,14 @@ void testFaceSync(const polyMesh& mesh, Random& rndGen)
|
||||
maxMagSqrEqOp<point>()
|
||||
);
|
||||
|
||||
forAll(syncedFc, faceI)
|
||||
forAll(syncedFc, facei)
|
||||
{
|
||||
if (mag(syncedFc[faceI] - mesh.faceCentres()[faceI]) > SMALL)
|
||||
if (mag(syncedFc[facei] - mesh.faceCentres()[facei]) > SMALL)
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Face " << faceI
|
||||
<< " original centre " << mesh.faceCentres()[faceI]
|
||||
<< " synced centre " << syncedFc[faceI]
|
||||
<< "Face " << facei
|
||||
<< " original centre " << mesh.faceCentres()[facei]
|
||||
<< " synced centre " << syncedFc[facei]
|
||||
<< exit(FatalError);
|
||||
}
|
||||
}
|
||||
@ -552,11 +552,11 @@ void testFaceSync(const polyMesh& mesh, Random& rndGen)
|
||||
|
||||
PackedBoolList isMasterFace(syncTools::getMasterFaces(mesh));
|
||||
|
||||
forAll(isMasterFace, faceI)
|
||||
forAll(isMasterFace, facei)
|
||||
{
|
||||
if (isMasterFace[faceI])
|
||||
if (isMasterFace[facei])
|
||||
{
|
||||
nMasters[faceI] = 1;
|
||||
nMasters[facei] = 1;
|
||||
}
|
||||
}
|
||||
|
||||
@ -567,14 +567,14 @@ void testFaceSync(const polyMesh& mesh, Random& rndGen)
|
||||
plusEqOp<label>()
|
||||
);
|
||||
|
||||
forAll(nMasters, faceI)
|
||||
forAll(nMasters, facei)
|
||||
{
|
||||
if (nMasters[faceI] != 1)
|
||||
if (nMasters[facei] != 1)
|
||||
{
|
||||
FatalErrorInFunction
|
||||
<< "Face " << faceI
|
||||
<< " centre " << mesh.faceCentres()[faceI]
|
||||
<< " has " << nMasters[faceI]
|
||||
<< "Face " << facei
|
||||
<< " centre " << mesh.faceCentres()[facei]
|
||||
<< " has " << nMasters[facei]
|
||||
<< " masters."
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user