STYLE: use forAllIter, forAllConstIter instead of long-hand version
STYLE: use 'forAll(' NOT 'forAll (', as per coding guide
This commit is contained in:
parent
0f58ac5a9b
commit
a50f01b079
@ -84,7 +84,7 @@
|
||||
|
||||
multivariateSurfaceInterpolationScheme<scalar>::fieldTable fields;
|
||||
|
||||
forAll (Y, i)
|
||||
forAll(Y, i)
|
||||
{
|
||||
fields.add(Y[i]);
|
||||
}
|
||||
|
@ -292,20 +292,14 @@ void addCutNeighbours
|
||||
|
||||
labelHashSet addCutFaces(cutCells.size());
|
||||
|
||||
for
|
||||
(
|
||||
labelHashSet::const_iterator iter = cutCells.begin();
|
||||
iter != cutCells.end();
|
||||
++iter
|
||||
)
|
||||
forAllConstIter(labelHashSet, cutCells, iter)
|
||||
{
|
||||
label cellI = iter.key();
|
||||
|
||||
const label cellI = iter.key();
|
||||
const labelList& cFaces = mesh.cells()[cellI];
|
||||
|
||||
forAll(cFaces, i)
|
||||
{
|
||||
label faceI = cFaces[i];
|
||||
const label faceI = cFaces[i];
|
||||
|
||||
if (mesh.isInternalFace(faceI))
|
||||
{
|
||||
@ -331,12 +325,7 @@ void addCutNeighbours
|
||||
Info<< " Selected an additional " << addCutFaces.size()
|
||||
<< " neighbours of cutCells to refine" << endl;
|
||||
|
||||
for
|
||||
(
|
||||
labelHashSet::const_iterator iter = addCutFaces.begin();
|
||||
iter != addCutFaces.end();
|
||||
++iter
|
||||
)
|
||||
forAllConstIter(labelHashSet, addCutFaces, iter)
|
||||
{
|
||||
cutCells.insert(iter.key());
|
||||
}
|
||||
@ -386,21 +375,15 @@ bool limitRefinementLevel
|
||||
|
||||
labelHashSet addCutCells(cutCells.size());
|
||||
|
||||
for
|
||||
(
|
||||
labelHashSet::const_iterator iter = cutCells.begin();
|
||||
iter != cutCells.end();
|
||||
++iter
|
||||
)
|
||||
forAllConstIter(labelHashSet, cutCells, iter)
|
||||
{
|
||||
// cellI will be refined.
|
||||
label cellI = iter.key();
|
||||
|
||||
const label cellI = iter.key();
|
||||
const labelList& cCells = mesh.cellCells()[cellI];
|
||||
|
||||
forAll(cCells, i)
|
||||
{
|
||||
label nbr = cCells[i];
|
||||
const label nbr = cCells[i];
|
||||
|
||||
if (!excludeCells.found(nbr) && !cutCells.found(nbr))
|
||||
{
|
||||
@ -419,12 +402,8 @@ bool limitRefinementLevel
|
||||
Info<< "Added an additional " << addCutCells.size() << " cells"
|
||||
<< " to satisfy 1:" << limitDiff << " refinement level"
|
||||
<< endl;
|
||||
for
|
||||
(
|
||||
labelHashSet::const_iterator iter = addCutCells.begin();
|
||||
iter != addCutCells.end();
|
||||
++iter
|
||||
)
|
||||
|
||||
forAllConstIter(labelHashSet, addCutCells, iter)
|
||||
{
|
||||
cutCells.insert(iter.key());
|
||||
}
|
||||
|
@ -112,12 +112,7 @@ int main(int argc, char *argv[])
|
||||
<< cells.instance()/cells.local()/cells.name()
|
||||
<< nl << endl;
|
||||
|
||||
for
|
||||
(
|
||||
cellSet::const_iterator iter = cells.begin();
|
||||
iter != cells.end();
|
||||
++iter
|
||||
)
|
||||
forAllConstIter(cellSet, cells, iter)
|
||||
{
|
||||
cutCells.erase(iter.key());
|
||||
}
|
||||
@ -131,7 +126,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
forAll(meshPoints, pointI)
|
||||
{
|
||||
label meshPointI = meshPoints[pointI];
|
||||
const label meshPointI = meshPoints[pointI];
|
||||
|
||||
vertOnPatch[meshPointI] = true;
|
||||
}
|
||||
@ -151,8 +146,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
forAll(pEdges, pEdgeI)
|
||||
{
|
||||
label edgeI = pEdges[pEdgeI];
|
||||
|
||||
const label edgeI = pEdges[pEdgeI];
|
||||
const edge& e = mesh.edges()[edgeI];
|
||||
|
||||
label otherPointI = e.otherVertex(meshPointI);
|
||||
|
@ -392,15 +392,9 @@ void collectCuts
|
||||
boolList edgeIsCut(mesh.nEdges(), false);
|
||||
scalarField edgeWeight(mesh.nEdges(), -GREAT);
|
||||
|
||||
for
|
||||
(
|
||||
cellSet::const_iterator iter = cellsToCut.begin();
|
||||
iter != cellsToCut.end();
|
||||
++iter
|
||||
)
|
||||
forAllConstIter(cellSet, cellsToCut, iter)
|
||||
{
|
||||
label cellI = iter.key();
|
||||
|
||||
const label cellI = iter.key();
|
||||
const labelList& cEdges = cellEdges[cellI];
|
||||
|
||||
forAll(cEdges, i)
|
||||
|
@ -268,13 +268,8 @@ int main(int argc, char *argv[])
|
||||
|
||||
pointField points(slPoints.size());
|
||||
|
||||
label i=0;
|
||||
for
|
||||
(
|
||||
SLList<point>::iterator pointIter = slPoints.begin();
|
||||
pointIter != slPoints.end();
|
||||
++pointIter
|
||||
)
|
||||
label i = 0;
|
||||
forAllConstIter(SLList<point>, slPoints, pointIter)
|
||||
{
|
||||
// Scale points for the given scale factor
|
||||
points[i++] = scaleFactor * pointIter();
|
||||
@ -283,13 +278,8 @@ int main(int argc, char *argv[])
|
||||
|
||||
labelList pointMap(maxNodei+1);
|
||||
|
||||
i=0;
|
||||
for
|
||||
(
|
||||
SLList<label>::iterator pointMapIter = slPointMap.begin();
|
||||
pointMapIter != slPointMap.end();
|
||||
++pointMapIter
|
||||
)
|
||||
i = 0;
|
||||
forAllConstIter(SLList<label>, slPointMap, pointMapIter)
|
||||
{
|
||||
pointMap[pointMapIter()] = i++;
|
||||
}
|
||||
@ -298,13 +288,8 @@ int main(int argc, char *argv[])
|
||||
|
||||
labelList cellMap(maxCelli+1);
|
||||
|
||||
i=0;
|
||||
for
|
||||
(
|
||||
SLList<label>::iterator cellMapIter = slCellMap.begin();
|
||||
cellMapIter != slCellMap.end();
|
||||
++cellMapIter
|
||||
)
|
||||
i = 0;
|
||||
forAllConstIter(SLList<label>, slCellMap, cellMapIter)
|
||||
{
|
||||
cellMap[cellMapIter()] = i++;
|
||||
}
|
||||
@ -323,12 +308,7 @@ int main(int argc, char *argv[])
|
||||
cellShapeList cellShapes(slCellLabels.size());
|
||||
label nCells = 0;
|
||||
|
||||
for
|
||||
(
|
||||
SLPtrList<labelList>::iterator cellIter = slCellLabels.begin();
|
||||
cellIter != slCellLabels.end();
|
||||
++cellIter
|
||||
)
|
||||
forAllConstIter(SLPtrList<labelList>, slCellLabels, cellIter)
|
||||
{
|
||||
if // Tetrahedron
|
||||
(
|
||||
|
@ -327,12 +327,7 @@ if
|
||||
{
|
||||
scalar minz = GREAT;
|
||||
|
||||
for
|
||||
(
|
||||
SLList<face>::iterator iter = pFaces[CYLINDERHEAD][0].begin();
|
||||
iter != pFaces[CYLINDERHEAD][0].end();
|
||||
++iter
|
||||
)
|
||||
forAllConstIter(SLList<face>, pFaces[CYLINDERHEAD][0], iter)
|
||||
{
|
||||
const face& pf = iter();
|
||||
|
||||
@ -346,12 +341,7 @@ if
|
||||
|
||||
SLList<face> newLinerFaces;
|
||||
|
||||
for
|
||||
(
|
||||
SLList<face>::iterator iter = pFaces[LINER][0].begin();
|
||||
iter != pFaces[LINER][0].end();
|
||||
++iter
|
||||
)
|
||||
forAllConstIter(SLList<face>, pFaces[LINER][0], iter)
|
||||
{
|
||||
const face& pf = iter();
|
||||
|
||||
@ -380,12 +370,7 @@ if
|
||||
|
||||
SLList<face> newCylinderHeadFaces;
|
||||
|
||||
for
|
||||
(
|
||||
SLList<face>::iterator iter = pFaces[CYLINDERHEAD][0].begin();
|
||||
iter != pFaces[CYLINDERHEAD][0].end();
|
||||
++iter
|
||||
)
|
||||
forAllConstIter(SLList<face>, pFaces[CYLINDERHEAD][0], iter)
|
||||
{
|
||||
const face& pf = iter();
|
||||
|
||||
|
@ -468,12 +468,7 @@ int main(int argc, char *argv[])
|
||||
// Print region to patch mapping
|
||||
Info<< "Regions:" << endl;
|
||||
|
||||
for
|
||||
(
|
||||
Map<label>::const_iterator iter = regionToPatch.begin();
|
||||
iter != regionToPatch.end();
|
||||
++iter
|
||||
)
|
||||
forAllConstIter(Map<label>, regionToPatch, iter)
|
||||
{
|
||||
Info<< " region:" << iter.key() << '\t' << "patch:"
|
||||
<< iter() << endl;
|
||||
|
@ -356,12 +356,7 @@ void writePointCells
|
||||
|
||||
label vertI = 0;
|
||||
|
||||
for
|
||||
(
|
||||
labelHashSet::const_iterator iter = allEdges.begin();
|
||||
iter != allEdges.end();
|
||||
++iter
|
||||
)
|
||||
forAllConstIter(labelHashSet, allEdges, iter)
|
||||
{
|
||||
const edge& e = mesh.edges()[iter.key()];
|
||||
|
||||
|
@ -100,12 +100,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
//Pout<< "pointSets:" << pointObjects.names() << endl;
|
||||
|
||||
for
|
||||
(
|
||||
IOobjectList::const_iterator iter = pointObjects.begin();
|
||||
iter != pointObjects.end();
|
||||
++iter
|
||||
)
|
||||
forAllConstIter(IOobjectList, pointObjects, iter)
|
||||
{
|
||||
// Not in memory. Load it.
|
||||
pointSet set(*iter());
|
||||
@ -149,12 +144,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
//Pout<< "faceSets:" << faceObjects.names() << endl;
|
||||
|
||||
for
|
||||
(
|
||||
IOobjectList::const_iterator iter = faceObjects.begin();
|
||||
iter != faceObjects.end();
|
||||
++iter
|
||||
)
|
||||
forAllConstIter(IOobjectList, faceObjects, iter)
|
||||
{
|
||||
// Not in memory. Load it.
|
||||
faceSet set(*iter());
|
||||
@ -288,12 +278,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
//Pout<< "cellSets:" << cellObjects.names() << endl;
|
||||
|
||||
for
|
||||
(
|
||||
IOobjectList::const_iterator iter = cellObjects.begin();
|
||||
iter != cellObjects.end();
|
||||
++iter
|
||||
)
|
||||
forAllConstIter(IOobjectList, cellObjects, iter)
|
||||
{
|
||||
if (!slaveCellSets.found(iter.key()))
|
||||
{
|
||||
|
@ -81,8 +81,7 @@ Foam::label Foam::regionSide::otherEdge
|
||||
|
||||
forAll(fEdges, fEdgeI)
|
||||
{
|
||||
label otherEdgeI = fEdges[fEdgeI];
|
||||
|
||||
const label otherEdgeI = fEdges[fEdgeI];
|
||||
const edge& otherE = mesh.edges()[otherEdgeI];
|
||||
|
||||
if
|
||||
@ -300,15 +299,9 @@ void Foam::regionSide::walkAllPointConnectedFaces
|
||||
//
|
||||
labelHashSet regionEdges(4*regionFaces.size());
|
||||
|
||||
for
|
||||
(
|
||||
labelHashSet::const_iterator iter = regionFaces.begin();
|
||||
iter != regionFaces.end();
|
||||
++iter
|
||||
)
|
||||
forAllConstIter(labelHashSet, regionFaces, iter)
|
||||
{
|
||||
label faceI = iter.key();
|
||||
|
||||
const label faceI = iter.key();
|
||||
const labelList& fEdges = mesh.faceEdges()[faceI];
|
||||
|
||||
forAll(fEdges, fEdgeI)
|
||||
@ -326,12 +319,7 @@ void Foam::regionSide::walkAllPointConnectedFaces
|
||||
labelHashSet visitedPoint(4*regionFaces.size());
|
||||
|
||||
// Insert fence points so we don't visit them
|
||||
for
|
||||
(
|
||||
labelHashSet::const_iterator iter = fencePoints.begin();
|
||||
iter != fencePoints.end();
|
||||
++iter
|
||||
)
|
||||
forAllConstIter(labelHashSet, fencePoints, iter)
|
||||
{
|
||||
visitedPoint.insert(iter.key());
|
||||
}
|
||||
@ -344,14 +332,9 @@ void Foam::regionSide::walkAllPointConnectedFaces
|
||||
Info<< "Excluding visit of points:" << visitedPoint << endl;
|
||||
}
|
||||
|
||||
for
|
||||
(
|
||||
labelHashSet::const_iterator iter = regionFaces.begin();
|
||||
iter != regionFaces.end();
|
||||
++iter
|
||||
)
|
||||
forAllConstIter(labelHashSet, regionFaces, iter)
|
||||
{
|
||||
label faceI = iter.key();
|
||||
const label faceI = iter.key();
|
||||
|
||||
// Get side of face.
|
||||
label cellI;
|
||||
@ -459,12 +442,7 @@ Foam::regionSide::regionSide
|
||||
|
||||
labelHashSet fencePoints(fenceEdges.size());
|
||||
|
||||
for
|
||||
(
|
||||
labelHashSet::const_iterator iter = fenceEdges.begin();
|
||||
iter != fenceEdges.end();
|
||||
++iter
|
||||
)
|
||||
forAllConstIter(labelHashSet, fenceEdges, iter)
|
||||
{
|
||||
const edge& e = mesh.edges()[iter.key()];
|
||||
|
||||
|
@ -360,7 +360,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
labelList osf(slavePatch.size());
|
||||
|
||||
forAll (osf, i)
|
||||
forAll(osf, i)
|
||||
{
|
||||
osf[i] = slavePatch.start() + i;
|
||||
}
|
||||
|
@ -76,12 +76,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
if (args.optionFound("keywords") && !args.optionFound("entry"))
|
||||
{
|
||||
for
|
||||
(
|
||||
IDLList<entry>::iterator iter = dict.begin();
|
||||
iter != dict.end();
|
||||
++iter
|
||||
)
|
||||
forAllConstIter(dictionary, dict, iter)
|
||||
{
|
||||
Info<< iter().keyword() << endl;
|
||||
}
|
||||
@ -137,13 +132,8 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
*/
|
||||
|
||||
const dictionary& dict(entPtr->dict());
|
||||
for
|
||||
(
|
||||
IDLList<entry>::const_iterator iter = dict.begin();
|
||||
iter != dict.end();
|
||||
++iter
|
||||
)
|
||||
const dictionary& dict = entPtr->dict();
|
||||
forAllConstIter(dictionary, dict, iter)
|
||||
{
|
||||
Info<< iter().keyword() << endl;
|
||||
}
|
||||
|
@ -506,12 +506,7 @@ void Foam::domainDecomposition::decomposeMesh()
|
||||
// Add internal and boundary faces
|
||||
// Remember to increment the index by one such that the
|
||||
// turning index works properly.
|
||||
for
|
||||
(
|
||||
SLList<label>::iterator curProcFacesIter = curProcFaces.begin();
|
||||
curProcFacesIter != curProcFaces.end();
|
||||
++curProcFacesIter
|
||||
)
|
||||
forAllIter(SLList<label>, curProcFaces, curProcFacesIter)
|
||||
{
|
||||
curProcFaceAddressing[nFaces] = curProcFacesIter() + 1;
|
||||
nFaces++;
|
||||
@ -564,12 +559,11 @@ void Foam::domainDecomposition::decomposeMesh()
|
||||
|
||||
// add faces for this processor boundary
|
||||
|
||||
for
|
||||
forAllIter
|
||||
(
|
||||
SLList<label>::iterator curFacesIter =
|
||||
curInterProcBFacesIter().begin();
|
||||
curFacesIter != curInterProcBFacesIter().end();
|
||||
++curFacesIter
|
||||
SLList<label>,
|
||||
curInterProcBFacesIter(),
|
||||
curFacesIter
|
||||
)
|
||||
{
|
||||
// add the face
|
||||
|
@ -48,22 +48,13 @@ void Foam::readFields
|
||||
// Construct the vol scalar fields
|
||||
fields.setSize(fieldObjects.size());
|
||||
|
||||
label fieldi=0;
|
||||
for
|
||||
(
|
||||
IOobjectList::iterator iter = fieldObjects.begin();
|
||||
iter != fieldObjects.end();
|
||||
++iter
|
||||
)
|
||||
label fieldI = 0;
|
||||
forAllIter(IOobjectList, fieldObjects, iter)
|
||||
{
|
||||
fields.set
|
||||
(
|
||||
fieldi++,
|
||||
new GeoField
|
||||
(
|
||||
*iter(),
|
||||
mesh
|
||||
)
|
||||
fieldI++,
|
||||
new GeoField(*iter(), mesh)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -110,34 +110,21 @@ int main(int argc, char *argv[])
|
||||
// Search list of objects for volScalarFields
|
||||
IOobjectList scalarFields(objects.lookupClass("volScalarField"));
|
||||
|
||||
for
|
||||
(
|
||||
IOobjectList::iterator scalarFieldIter = scalarFields.begin();
|
||||
scalarFieldIter != scalarFields.end();
|
||||
++scalarFieldIter
|
||||
)
|
||||
forAllIter(IOobjectList, scalarFields, iter)
|
||||
{
|
||||
// Read field
|
||||
volScalarField field
|
||||
volScalarField field(*iter(), mesh);
|
||||
|
||||
// lookup field from dictionary and convert field
|
||||
label unitNumber;
|
||||
if
|
||||
(
|
||||
*scalarFieldIter(),
|
||||
mesh
|
||||
);
|
||||
|
||||
// lookup field from dictionary
|
||||
if (foamDataToFluentDict.found(field.name()))
|
||||
foamDataToFluentDict.readIfPresent(field.name(), unitNumber)
|
||||
&& unitNumber > 0
|
||||
)
|
||||
{
|
||||
label unitNumber
|
||||
(
|
||||
readLabel(foamDataToFluentDict.lookup(field.name()))
|
||||
);
|
||||
|
||||
// Convert field
|
||||
if (unitNumber > 0)
|
||||
{
|
||||
Info<< " Converting field " << field.name() << endl;
|
||||
writeFluentField(field, unitNumber, fluentDataFile);
|
||||
}
|
||||
Info<< " Converting field " << field.name() << endl;
|
||||
writeFluentField(field, unitNumber, fluentDataFile);
|
||||
}
|
||||
}
|
||||
|
||||
@ -148,34 +135,21 @@ int main(int argc, char *argv[])
|
||||
// Search list of objects for volVectorFields
|
||||
IOobjectList vectorFields(objects.lookupClass("volVectorField"));
|
||||
|
||||
for
|
||||
(
|
||||
IOobjectList::iterator vectorFieldIter = vectorFields.begin();
|
||||
vectorFieldIter != vectorFields.end();
|
||||
++vectorFieldIter
|
||||
)
|
||||
forAllIter(IOobjectList, vectorFields, iter)
|
||||
{
|
||||
// Read field
|
||||
volVectorField field
|
||||
volVectorField field(*iter(), mesh);
|
||||
|
||||
// lookup field from dictionary and convert field
|
||||
label unitNumber;
|
||||
if
|
||||
(
|
||||
*vectorFieldIter(),
|
||||
mesh
|
||||
);
|
||||
|
||||
// lookup field from dictionary
|
||||
if (foamDataToFluentDict.found(field.name()))
|
||||
foamDataToFluentDict.readIfPresent(field.name(), unitNumber)
|
||||
&& unitNumber > 0
|
||||
)
|
||||
{
|
||||
label unitNumber
|
||||
(
|
||||
readLabel(foamDataToFluentDict.lookup(field.name()))
|
||||
);
|
||||
|
||||
// Convert field
|
||||
if (unitNumber > 0)
|
||||
{
|
||||
Info<< " Converting field " << field.name() << endl;
|
||||
writeFluentField(field, unitNumber, fluentDataFile);
|
||||
}
|
||||
Info<< " Converting field " << field.name() << endl;
|
||||
writeFluentField(field, unitNumber, fluentDataFile);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -22,11 +22,11 @@ for (label i=0; i < nTypes; i++)
|
||||
|
||||
if (fieldTypes[i] == "volScalarField")
|
||||
{
|
||||
volScalarField gmvScalarField(fieldObject, mesh);
|
||||
volScalarField fld(fieldObject, mesh);
|
||||
gmvFile << fieldName << " 0" << nl;
|
||||
for (label indx=0;indx<mesh.nCells();indx++)
|
||||
{
|
||||
gmvFile << gmvScalarField[indx] << " ";
|
||||
gmvFile << fld[indx] << " ";
|
||||
}
|
||||
gmvFile << nl;
|
||||
}
|
||||
@ -35,19 +35,19 @@ for (label i=0; i < nTypes; i++)
|
||||
{
|
||||
if (fieldName == vComp)
|
||||
{
|
||||
volVectorField gmvVectorField(fieldObject, mesh);
|
||||
volVectorField fld(fieldObject, mesh);
|
||||
gmvFile << "velocity 0" << nl;
|
||||
for (label indx=0;indx<mesh.nCells();indx++)
|
||||
{
|
||||
gmvFile << gmvVectorField[indx].x() << " ";
|
||||
gmvFile << fld[indx].x() << " ";
|
||||
}
|
||||
for (label indx=0;indx<mesh.nCells();indx++)
|
||||
{
|
||||
gmvFile << gmvVectorField[indx].y() << " ";
|
||||
gmvFile << fld[indx].y() << " ";
|
||||
}
|
||||
for (label indx=0;indx<mesh.nCells();indx++)
|
||||
{
|
||||
gmvFile << gmvVectorField[indx].z() << " ";
|
||||
gmvFile << fld[indx].z() << " ";
|
||||
}
|
||||
gmvFile << nl;
|
||||
}
|
||||
|
@ -1,42 +1,27 @@
|
||||
gmvFile << "tracers " << particles.size() << nl;
|
||||
for
|
||||
(
|
||||
Cloud<passiveParticle>::iterator elmnt = particles.begin();
|
||||
elmnt != particles.end();
|
||||
++elmnt
|
||||
)
|
||||
forAllConstIter(Cloud<passiveParticle>, particles, iter)
|
||||
{
|
||||
gmvFile << elmnt().position().x() << " ";
|
||||
gmvFile << iter().position().x() << ' ';
|
||||
}
|
||||
gmvFile << nl;
|
||||
|
||||
for
|
||||
(
|
||||
Cloud<passiveParticle>::iterator elmnt = particles.begin();
|
||||
elmnt != particles.end();
|
||||
++elmnt
|
||||
)
|
||||
forAllConstIter(Cloud<passiveParticle>, particles, iter)
|
||||
{
|
||||
gmvFile << elmnt().position().y() << " ";
|
||||
gmvFile << iter().position().y() << ' ';
|
||||
}
|
||||
gmvFile << nl;
|
||||
|
||||
for
|
||||
(
|
||||
Cloud<passiveParticle>::iterator elmnt = particles.begin();
|
||||
elmnt != particles.end();
|
||||
++elmnt
|
||||
)
|
||||
forAllConstIter(Cloud<passiveParticle>, particles, iter)
|
||||
{
|
||||
gmvFile << elmnt().position().z() << " ";
|
||||
gmvFile << iter().position().z() << ' ';
|
||||
}
|
||||
gmvFile << nl;
|
||||
|
||||
forAll(lagrangianScalarNames, i)
|
||||
{
|
||||
word name = lagrangianScalarNames[i];
|
||||
const word name = lagrangianScalarNames[i];
|
||||
|
||||
IOField<scalar> s
|
||||
IOField<scalar> fld
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
@ -49,13 +34,13 @@ forAll(lagrangianScalarNames, i)
|
||||
)
|
||||
);
|
||||
|
||||
if (s.size())
|
||||
if (fld.size())
|
||||
{
|
||||
gmvFile << name << nl;
|
||||
|
||||
for (label n = 0; n < s.size(); n++)
|
||||
forAll(fld, n)
|
||||
{
|
||||
gmvFile << s[n] << token::SPACE;
|
||||
gmvFile << fld[n] << token::SPACE;
|
||||
}
|
||||
gmvFile << nl;
|
||||
}
|
||||
@ -65,9 +50,9 @@ forAll(lagrangianScalarNames, i)
|
||||
|
||||
forAll(lagrangianVectorNames, i)
|
||||
{
|
||||
word name = lagrangianVectorNames[i];
|
||||
const word name = lagrangianVectorNames[i];
|
||||
|
||||
IOField<vector> v
|
||||
IOField<vector> fld
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
@ -80,29 +65,29 @@ forAll(lagrangianVectorNames, i)
|
||||
)
|
||||
);
|
||||
|
||||
if (v.size())
|
||||
if (fld.size())
|
||||
{
|
||||
gmvFile << name + "x" << nl;
|
||||
|
||||
for (label n = 0; n < v.size(); n++)
|
||||
forAll(fld, n)
|
||||
{
|
||||
gmvFile << v[n].x() << token::SPACE;
|
||||
gmvFile << fld[n].x() << token::SPACE;
|
||||
}
|
||||
gmvFile << nl;
|
||||
|
||||
gmvFile << name + "y" << nl;
|
||||
|
||||
for (label n = 0; n < v.size(); n++)
|
||||
forAll(fld, n)
|
||||
{
|
||||
gmvFile << v[n].y() << token::SPACE;
|
||||
gmvFile << fld[n].y() << token::SPACE;
|
||||
}
|
||||
gmvFile << nl;
|
||||
|
||||
gmvFile << name + "z" << nl;
|
||||
|
||||
for (label n = 0; n < v.size(); n++)
|
||||
forAll(fld, n)
|
||||
{
|
||||
gmvFile << v[n].z() << token::SPACE;
|
||||
gmvFile << fld[n].z() << token::SPACE;
|
||||
}
|
||||
gmvFile << nl;
|
||||
}
|
||||
|
@ -1,81 +1,48 @@
|
||||
gmvFile << "tracers " << particles.size() << nl;
|
||||
for
|
||||
(
|
||||
discretePhase::iterator elmnt = particles.begin();
|
||||
elmnt != particles.end();
|
||||
++elmnt
|
||||
)
|
||||
forAllConstIter(discretePhase, particles, iter)
|
||||
{
|
||||
gmvFile << elmnt().position().x() << " ";
|
||||
gmvFile << iter().position().x() << " ";
|
||||
}
|
||||
gmvFile << nl;
|
||||
for
|
||||
(
|
||||
discretePhase::iterator elmnt = particles.begin();
|
||||
elmnt != particles.end();
|
||||
++elmnt
|
||||
)
|
||||
|
||||
forAllConstIter(discretePhase, particles, iter)
|
||||
{
|
||||
gmvFile << elmnt().position().y() << " ";
|
||||
gmvFile << iter().position().y() << " ";
|
||||
}
|
||||
gmvFile << nl;
|
||||
for
|
||||
(
|
||||
discretePhase::iterator elmnt = particles.begin();
|
||||
elmnt != particles.end();
|
||||
++elmnt
|
||||
)
|
||||
|
||||
forAllConstIter(discretePhase, particles, iter)
|
||||
{
|
||||
gmvFile << elmnt().position().z() << " ";
|
||||
gmvFile << iter().position().z() << " ";
|
||||
}
|
||||
gmvFile << nl;
|
||||
|
||||
gmvFile << "U" << nl;
|
||||
for
|
||||
(
|
||||
discretePhase::iterator elmnt = particles.begin();
|
||||
elmnt != particles.end();
|
||||
++elmnt
|
||||
)
|
||||
forAllConstIter(discretePhase, particles, iter)
|
||||
{
|
||||
gmvFile << elmnt().velocity().x() << " ";
|
||||
gmvFile << iter().velocity().x() << " ";
|
||||
}
|
||||
gmvFile << nl;
|
||||
|
||||
gmvFile << "V" << nl;
|
||||
for
|
||||
(
|
||||
discretePhase::iterator elmnt = particles.begin();
|
||||
elmnt != particles.end();
|
||||
++elmnt
|
||||
)
|
||||
forAllConstIter(discretePhase, particles, iter)
|
||||
{
|
||||
gmvFile << elmnt().velocity().y() << " ";
|
||||
gmvFile << iter().velocity().y() << " ";
|
||||
}
|
||||
gmvFile << nl;
|
||||
|
||||
gmvFile << "W" << nl;
|
||||
for
|
||||
(
|
||||
discretePhase::iterator elmnt = particles.begin();
|
||||
elmnt != particles.end();
|
||||
++elmnt
|
||||
)
|
||||
forAllConstIter(discretePhase, particles, iter)
|
||||
{
|
||||
gmvFile << elmnt().velocity().z() << " ";
|
||||
{
|
||||
gmvFile << iter().velocity().z() << " ";
|
||||
}
|
||||
gmvFile << nl;
|
||||
|
||||
gmvFile << "Diam" << nl;
|
||||
|
||||
for
|
||||
(
|
||||
discretePhase::iterator elmnt = particles.begin();
|
||||
elmnt != particles.end();
|
||||
++elmnt
|
||||
)
|
||||
forAllConstIter(discretePhase, particles, iter)
|
||||
{
|
||||
gmvFile << elmnt().d() << " ";
|
||||
gmvFile << iter().d() << " ";
|
||||
}
|
||||
|
||||
|
||||
gmvFile << "endtrace"<< nl;
|
||||
|
@ -1,32 +1,19 @@
|
||||
gmvFile << "tracers " << particles.size() << nl;
|
||||
for
|
||||
(
|
||||
Cloud<passiveParticle>::iterator elmnt = particles.begin();
|
||||
elmnt != particles.end();
|
||||
++elmnt
|
||||
)
|
||||
forAllConstIter(Cloud<passiveParticle>, particles, iter)
|
||||
{
|
||||
gmvFile << elmnt().position().x() << " ";
|
||||
gmvFile << iter().position().x() << " ";
|
||||
}
|
||||
gmvFile << nl;
|
||||
for
|
||||
(
|
||||
Cloud<passiveParticle>::iterator elmnt = particles.begin();
|
||||
elmnt != particles.end();
|
||||
++elmnt
|
||||
)
|
||||
|
||||
forAllConstIter(Cloud<passiveParticle>, particles, iter)
|
||||
{
|
||||
gmvFile << elmnt().position().y() << " ";
|
||||
gmvFile << iter().position().y() << " ";
|
||||
}
|
||||
gmvFile << nl;
|
||||
for
|
||||
(
|
||||
Cloud<passiveParticles>::iterator elmnt = particles.begin();
|
||||
elmnt != particles.end();
|
||||
++elmnt
|
||||
)
|
||||
|
||||
forAllConstIter(Cloud<passiveParticle>, particles, iter)
|
||||
{
|
||||
gmvFile << elmnt().position().z() << " ";
|
||||
gmvFile << iter().position().z() << " ";
|
||||
}
|
||||
gmvFile << nl;
|
||||
|
||||
@ -51,15 +38,13 @@ forAll(lagrangianScalarNames, i)
|
||||
{
|
||||
gmvFile << name << nl;
|
||||
|
||||
for (label n = 0; n < s.size(); n++)
|
||||
forAll(s, n)
|
||||
{
|
||||
gmvFile << s[n] << token::SPACE;
|
||||
}
|
||||
gmvFile << nl;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
gmvFile << "endtrace"<< nl;
|
||||
|
@ -1,2 +1,3 @@
|
||||
gmvFile << "probtime " << runTime.timeName() << nl;
|
||||
gmvFile << "endgmv" << nl;
|
||||
gmvFile
|
||||
<< "probtime " << runTime.timeName() << nl
|
||||
<< "endgmv" << nl;
|
||||
|
@ -26,13 +26,14 @@ word format
|
||||
conversionProperties.lookup("format")
|
||||
);
|
||||
|
||||
if ( (format != "ascii") && (format != "ieeei4r8") )
|
||||
if ((format != "ascii") && (format != "ieeei4r8"))
|
||||
{
|
||||
FatalError << "format type: " << format << " unknown."
|
||||
<< " Valid options are: ascii ieeei4r8"
|
||||
<< abort(FatalError);
|
||||
|
||||
}
|
||||
|
||||
word cells
|
||||
(
|
||||
conversionProperties.lookup("cells")
|
||||
|
@ -50,12 +50,7 @@ void readFields
|
||||
label nFields = fields.size();
|
||||
fields.setSize(nFields + fieldObjects.size());
|
||||
|
||||
for
|
||||
(
|
||||
IOobjectList::iterator iter = fieldObjects.begin();
|
||||
iter != fieldObjects.end();
|
||||
++iter
|
||||
)
|
||||
forAllIter(IOobjectList::iterator, fieldObjects, iter)
|
||||
{
|
||||
if (selectedFields.empty() || selectedFields.found(iter()->name()))
|
||||
{
|
||||
|
@ -50,12 +50,7 @@ void readFields
|
||||
fields.setSize(fieldObjects.size());
|
||||
label nFields = 0;
|
||||
|
||||
for
|
||||
(
|
||||
IOobjectList::iterator iter = fieldObjects.begin();
|
||||
iter != fieldObjects.end();
|
||||
++iter
|
||||
)
|
||||
forAllIter(IOobjectList, fieldObjects, iter)
|
||||
{
|
||||
if (selectedFields.empty() || selectedFields.found(iter()->name()))
|
||||
{
|
||||
|
@ -27,14 +27,9 @@ License
|
||||
#include "OFstream.H"
|
||||
#include "writeFuns.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
// * * * * * * * * * * * * * * * Global Functions * * * * * * * * * * * * * //
|
||||
|
||||
void writeFaceSet
|
||||
void Foam::writeFaceSet
|
||||
(
|
||||
const bool binary,
|
||||
const vtkMesh& vMesh,
|
||||
@ -73,12 +68,7 @@ void writeFaceSet
|
||||
labelList setFaceLabels(set.size());
|
||||
label setFaceI = 0;
|
||||
|
||||
for
|
||||
(
|
||||
faceSet::const_iterator iter = set.begin();
|
||||
iter != set.end();
|
||||
++iter
|
||||
)
|
||||
forAllConstIter(faceSet, set, iter)
|
||||
{
|
||||
setFaceLabels[setFaceI] = iter.key();
|
||||
setFaces[setFaceI] = faces[iter.key()];
|
||||
@ -139,8 +129,5 @@ void writeFaceSet
|
||||
writeFuns::write(pStream, binary, setFaceLabels);
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// ************************************************************************* //
|
||||
|
@ -47,19 +47,13 @@ int USERD_get_part_coords
|
||||
}
|
||||
else if (part_number == nPatches+2)
|
||||
{
|
||||
|
||||
label indx = 1;
|
||||
|
||||
for
|
||||
(
|
||||
Cloud<passiveParticle>::iterator elmnt = sprayPtr->begin();
|
||||
elmnt != sprayPtr->end();
|
||||
++elmnt
|
||||
)
|
||||
forAllConstIter(Cloud<passiveParticle>, *sprayPtr, iter)
|
||||
{
|
||||
coord_array[0][indx] = (float)elmnt().position().x();
|
||||
coord_array[1][indx] = (float)elmnt().position().y();
|
||||
coord_array[2][indx] = (float)elmnt().position().z();
|
||||
coord_array[0][indx] = (float)iter().position().x();
|
||||
coord_array[1][indx] = (float)iter().position().y();
|
||||
coord_array[2][indx] = (float)iter().position().z();
|
||||
indx++;
|
||||
}
|
||||
|
||||
|
@ -17,7 +17,7 @@ int USERD_get_part_node_ids
|
||||
nodeid_array[indx] = indx + 1;
|
||||
}
|
||||
}
|
||||
else if (part_number < nPatches+2)
|
||||
else if (part_number < nPatches+2)
|
||||
{
|
||||
|
||||
label patchi = part_number-2;
|
||||
@ -32,18 +32,14 @@ int USERD_get_part_node_ids
|
||||
}
|
||||
|
||||
}
|
||||
else if (part_number == nPatches+2)
|
||||
else if (part_number == nPatches+2)
|
||||
{
|
||||
label indx = 0;
|
||||
for
|
||||
(
|
||||
Cloud<passiveParticle>::iterator elmnt = sprayPtr->begin();
|
||||
elmnt != sprayPtr->end();
|
||||
++elmnt
|
||||
)
|
||||
|
||||
forAllConstIter(Cloud<passiveParticle>, *sprayPtr, iter)
|
||||
{
|
||||
nodeid_array[indx] = indx + 1;
|
||||
indx++;
|
||||
nodeid_array[indx] = indx + 1;
|
||||
indx++;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -52,12 +52,7 @@ void MapConsistentVolFields
|
||||
|
||||
IOobjectList fields = objects.lookupClass(fieldClassName);
|
||||
|
||||
for
|
||||
(
|
||||
IOobjectList::iterator fieldIter = fields.begin();
|
||||
fieldIter != fields.end();
|
||||
++fieldIter
|
||||
)
|
||||
forAllIter(IOobjectList, fields, fieldIter)
|
||||
{
|
||||
Info<< " interpolating " << fieldIter()->name()
|
||||
<< endl;
|
||||
|
@ -52,12 +52,7 @@ void MapVolFields
|
||||
|
||||
IOobjectList fields = objects.lookupClass(fieldClassName);
|
||||
|
||||
for
|
||||
(
|
||||
IOobjectList::iterator fieldIter = fields.begin();
|
||||
fieldIter != fields.end();
|
||||
++fieldIter
|
||||
)
|
||||
forAllIter(IOobjectList, fields, fieldIter)
|
||||
{
|
||||
IOobject fieldTargetIOobject
|
||||
(
|
||||
|
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -39,12 +39,7 @@ void UnMapped(const IOobjectList& objects)
|
||||
{
|
||||
IOobjectList fields = objects.lookupClass(Type::typeName);
|
||||
|
||||
for
|
||||
(
|
||||
IOobjectList::iterator fieldIter = fields.begin();
|
||||
fieldIter != fields.end();
|
||||
++fieldIter
|
||||
)
|
||||
forAllConstIter(IOobjectList, fields, fieldIter)
|
||||
{
|
||||
mvBak(fieldIter()->objectPath(), "unmapped");
|
||||
}
|
||||
|
@ -126,18 +126,13 @@ void dumpFaces
|
||||
|
||||
OFstream os(fName);
|
||||
|
||||
for
|
||||
(
|
||||
Map<label>::const_iterator iter = connectedFaces.begin();
|
||||
iter != connectedFaces.end();
|
||||
++iter
|
||||
)
|
||||
forAllConstIter(Map<label>, connectedFaces, iter)
|
||||
{
|
||||
const labelledTri& f = surf.localFaces()[iter.key()];
|
||||
|
||||
point ctr(f.centre(surf.localPoints()));
|
||||
|
||||
os << "v " << ctr.x() << ' ' << ctr.y() << ' ' << ctr.z() << endl;
|
||||
os << "v " << ctr.x() << ' ' << ctr.y() << ' ' << ctr.z() << endl;
|
||||
}
|
||||
}
|
||||
|
||||
@ -502,14 +497,9 @@ void calcPointVecs
|
||||
|
||||
boolList edgeDone(surf.nEdges(), false);
|
||||
|
||||
for
|
||||
(
|
||||
Map<label>::const_iterator iter = faceToEdge.begin();
|
||||
iter != faceToEdge.end();
|
||||
++iter
|
||||
)
|
||||
forAllConstIter(Map<label>, faceToEdge, iter)
|
||||
{
|
||||
label edgeI = iter();
|
||||
const label edgeI = iter();
|
||||
|
||||
if (!edgeDone[edgeI])
|
||||
{
|
||||
@ -610,15 +600,9 @@ void renumberFaces
|
||||
List<labelledTri>& newTris
|
||||
)
|
||||
{
|
||||
for
|
||||
(
|
||||
Map<label>::const_iterator iter = faceToEdge.begin();
|
||||
iter != faceToEdge.end();
|
||||
++iter
|
||||
)
|
||||
forAllConstIter(Map<label>, faceToEdge, iter)
|
||||
{
|
||||
label faceI = iter.key();
|
||||
|
||||
const label faceI = iter.key();
|
||||
const labelledTri& f = surf.localFaces()[faceI];
|
||||
|
||||
forAll(f, fp)
|
||||
|
@ -51,7 +51,6 @@ int main(int argc, char *argv[])
|
||||
{
|
||||
|
||||
# include "setRootCase.H"
|
||||
|
||||
# include "createTime.H"
|
||||
|
||||
Info<< nl << "Reading Burcat data IOdictionary" << endl;
|
||||
@ -119,17 +118,11 @@ int main(int argc, char *argv[])
|
||||
);
|
||||
|
||||
|
||||
for
|
||||
(
|
||||
SLPtrList<thermo>::iterator EQreactionsIter = EQreactions.begin();
|
||||
EQreactionsIter != EQreactions.end();
|
||||
++EQreactionsIter
|
||||
)
|
||||
forAllConstIter(SLPtrList<thermo>, EQreactions, iter)
|
||||
{
|
||||
Info<< "Kc(EQreactions) = " << EQreactionsIter().Kc(T) << endl;
|
||||
Info<< "Kc(EQreactions) = " << iter().Kc(T) << endl;
|
||||
}
|
||||
|
||||
|
||||
Info<< nl << "end" << endl;
|
||||
|
||||
return 0;
|
||||
|
@ -80,7 +80,7 @@ Foam::Keyed<T>::createList(const List<T>& lst, const label key)
|
||||
{
|
||||
List<Keyed<T> > newList(lst.size());
|
||||
|
||||
forAll (lst, elemI)
|
||||
forAll(lst, elemI)
|
||||
{
|
||||
newList[elemI] = Keyed(lst[elemI], key);
|
||||
}
|
||||
@ -106,7 +106,7 @@ Foam::Keyed<T>::createList(const List<T>& lst, const List<label>& keys)
|
||||
|
||||
List<Keyed<T> > newList(lst.size());
|
||||
|
||||
forAll (lst, elemI)
|
||||
forAll(lst, elemI)
|
||||
{
|
||||
newList[elemI] = Keyed(lst[elemI], keys[elemI]);
|
||||
}
|
||||
|
@ -152,12 +152,7 @@ Foam::IOobjectList Foam::IOobjectList::lookupClass(const word& ClassName) const
|
||||
{
|
||||
IOobjectList objectsOfClass(size());
|
||||
|
||||
for
|
||||
(
|
||||
HashPtrTable<IOobject>::const_iterator iter = begin();
|
||||
iter != end();
|
||||
++iter
|
||||
)
|
||||
forAllConstIter(HashPtrTable<IOobject>, *this, iter)
|
||||
{
|
||||
if (iter()->headerClassName() == ClassName)
|
||||
{
|
||||
@ -192,12 +187,7 @@ Foam::wordList Foam::IOobjectList::names(const word& ClassName) const
|
||||
wordList objectNames(size());
|
||||
|
||||
label count = 0;
|
||||
for
|
||||
(
|
||||
HashPtrTable<IOobject>::const_iterator iter = begin();
|
||||
iter != end();
|
||||
++iter
|
||||
)
|
||||
forAllConstIter(HashPtrTable<IOobject>, *this, iter)
|
||||
{
|
||||
if (iter()->headerClassName() == ClassName)
|
||||
{
|
||||
|
@ -379,7 +379,7 @@ interfaces() const
|
||||
{
|
||||
lduInterfaceFieldPtrsList interfaces(this->size());
|
||||
|
||||
forAll (interfaces, patchi)
|
||||
forAll(interfaces, patchi)
|
||||
{
|
||||
if (isA<lduInterfaceField>(this->operator[](patchi)))
|
||||
{
|
||||
|
@ -50,7 +50,7 @@ slicedBoundaryField
|
||||
|
||||
FieldField<PatchField, Type>& bf = tbf();
|
||||
|
||||
forAll (mesh.boundary(), patchi)
|
||||
forAll(mesh.boundary(), patchi)
|
||||
{
|
||||
if (preserveCouples && mesh.boundary()[patchi].coupled())
|
||||
{
|
||||
@ -119,7 +119,7 @@ slicedBoundaryField
|
||||
|
||||
FieldField<PatchField, Type>& bf = tbf();
|
||||
|
||||
forAll (mesh.boundary(), patchi)
|
||||
forAll(mesh.boundary(), patchi)
|
||||
{
|
||||
if (preserveCouples && mesh.boundary()[patchi].coupled())
|
||||
{
|
||||
|
@ -144,7 +144,7 @@ tmp<Field<Type1> > pointPatchField<Type>::patchInternalField
|
||||
tmp<Field<Type1> > tvalues(new Field<Type1>(meshPoints.size()));
|
||||
Field<Type1>& values = tvalues();
|
||||
|
||||
forAll (meshPoints, pointI)
|
||||
forAll(meshPoints, pointI)
|
||||
{
|
||||
values[pointI] = iF[meshPoints[pointI]];
|
||||
}
|
||||
@ -202,7 +202,7 @@ void pointPatchField<Type>::addToInternalField
|
||||
// Get the addressing
|
||||
const labelList& mp = patch().meshPoints();
|
||||
|
||||
forAll (mp, pointI)
|
||||
forAll(mp, pointI)
|
||||
{
|
||||
iF[mp[pointI]] += pF[pointI];
|
||||
}
|
||||
@ -292,7 +292,7 @@ void pointPatchField<Type>::setInInternalField
|
||||
<< abort(FatalError);
|
||||
}
|
||||
|
||||
forAll (meshPoints, pointI)
|
||||
forAll(meshPoints, pointI)
|
||||
{
|
||||
iF[meshPoints[pointI]] = pF[pointI];
|
||||
}
|
||||
|
@ -47,7 +47,7 @@ void graph::readCurves(Istream& is)
|
||||
x_.setSize(xyData.size());
|
||||
scalarField y(xyData.size());
|
||||
|
||||
forAll (xyData, i)
|
||||
forAll(xyData, i)
|
||||
{
|
||||
x_[i] = xyData[i].x_;
|
||||
y[i] = xyData[i].y_;
|
||||
@ -191,18 +191,13 @@ void graph::writeTable(Ostream& os) const
|
||||
{
|
||||
forAll(x_, xi)
|
||||
{
|
||||
os << setw(10) << x_[xi];
|
||||
os << setw(10) << x_[xi];
|
||||
|
||||
for
|
||||
(
|
||||
graph::const_iterator iter = begin();
|
||||
iter != end();
|
||||
++iter
|
||||
)
|
||||
forAllConstIter(graph, *this, iter)
|
||||
{
|
||||
os << token::SPACE << setw(10) << (*iter())[xi];
|
||||
os << token::SPACE << setw(10) << (*iter())[xi];
|
||||
}
|
||||
os << endl;
|
||||
os << endl;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -51,7 +51,7 @@ void Foam::gnuplotGraph::write(const graph& g, Ostream& os) const
|
||||
|
||||
bool firstField = true;
|
||||
|
||||
for (graph::const_iterator iter = g.begin(); iter != g.end(); ++iter)
|
||||
forAllConstIter(graph, g, iter)
|
||||
{
|
||||
if (!firstField)
|
||||
{
|
||||
@ -64,9 +64,9 @@ void Foam::gnuplotGraph::write(const graph& g, Ostream& os) const
|
||||
os << "; pause -1" << endl;
|
||||
|
||||
|
||||
for (graph::const_iterator iter = g.begin(); iter != g.end(); ++iter)
|
||||
forAllConstIter(graph, g, iter)
|
||||
{
|
||||
os << endl;
|
||||
os << endl;
|
||||
writeXY(g.x(), *iter(), os);
|
||||
}
|
||||
}
|
||||
|
@ -41,12 +41,12 @@ namespace Foam
|
||||
|
||||
void Foam::jplotGraph::write(const graph& g, Ostream& os) const
|
||||
{
|
||||
os << "# JPlot file" << endl
|
||||
os << "# JPlot file" << nl
|
||||
<< "# column 1: " << g.xName() << endl;
|
||||
|
||||
label fieldI = 0;
|
||||
|
||||
for (graph::const_iterator iter = g.begin(); iter != g.end(); ++iter)
|
||||
forAllConstIter(graph, g, iter)
|
||||
{
|
||||
os << "# column " << fieldI + 2 << ": " << (*iter()).name() << endl;
|
||||
fieldI++;
|
||||
|
@ -42,17 +42,17 @@ namespace Foam
|
||||
|
||||
void Foam::xmgrGraph::write(const graph& g, Ostream& os) const
|
||||
{
|
||||
os << "@title " << g.title() << endl
|
||||
<< "@xaxis label " << g.xName() << endl
|
||||
os << "@title " << g.title() << nl
|
||||
<< "@xaxis label " << g.xName() << nl
|
||||
<< "@yaxis label " << g.yName() << endl;
|
||||
|
||||
label fieldI = 0;
|
||||
|
||||
for (graph::const_iterator iter = g.begin(); iter != g.end(); ++iter)
|
||||
forAllConstIter(graph, g, iter)
|
||||
{
|
||||
os << "@s" << fieldI << " legend "
|
||||
<< iter()->name() << endl
|
||||
<< "@target G0.S" << fieldI << endl
|
||||
<< iter()->name() << nl
|
||||
<< "@target G0.S" << fieldI << nl
|
||||
<< "@type xy" << endl;
|
||||
|
||||
writeXY(g.x(), *iter(), os);
|
||||
|
@ -73,7 +73,7 @@ void PatchToPatchInterpolation<FromPatch, ToPatch>::calcPointAddressing() const
|
||||
|
||||
bool doWeights = false;
|
||||
|
||||
forAll (pointAddressing, pointI)
|
||||
forAll(pointAddressing, pointI)
|
||||
{
|
||||
doWeights = false;
|
||||
|
||||
@ -146,7 +146,7 @@ void PatchToPatchInterpolation<FromPatch, ToPatch>::calcPointAddressing() const
|
||||
edgeList hitFaceEdges =
|
||||
fromPatchFaces[proj[pointI].hitObject()].edges();
|
||||
|
||||
forAll (hitFaceEdges, edgeI)
|
||||
forAll(hitFaceEdges, edgeI)
|
||||
{
|
||||
minEdgeLength =
|
||||
min
|
||||
@ -158,7 +158,7 @@ void PatchToPatchInterpolation<FromPatch, ToPatch>::calcPointAddressing() const
|
||||
|
||||
const labelList& curEdges = toPatchPointEdges[pointI];
|
||||
|
||||
forAll (curEdges, edgeI)
|
||||
forAll(curEdges, edgeI)
|
||||
{
|
||||
minEdgeLength =
|
||||
min
|
||||
@ -208,7 +208,7 @@ void PatchToPatchInterpolation<FromPatch, ToPatch>::calcPointAddressing() const
|
||||
|
||||
pointField hitFacePoints = hitFace.points(fromPatchPoints);
|
||||
|
||||
forAll (hitFacePoints, masterPointI)
|
||||
forAll(hitFacePoints, masterPointI)
|
||||
{
|
||||
pointWeights[pointI][masterPointI] =
|
||||
1.0/
|
||||
@ -252,7 +252,7 @@ void PatchToPatchInterpolation<FromPatch, ToPatch>::calcFaceAddressing() const
|
||||
|
||||
vectorField fromPatchFaceCentres(fromPatchFaces.size());
|
||||
|
||||
forAll (fromPatchFaceCentres, faceI)
|
||||
forAll(fromPatchFaceCentres, faceI)
|
||||
{
|
||||
fromPatchFaceCentres[faceI] =
|
||||
fromPatchFaces[faceI].centre(fromPatchPoints);
|
||||
@ -275,7 +275,7 @@ void PatchToPatchInterpolation<FromPatch, ToPatch>::calcFaceAddressing() const
|
||||
faceAddressingPtr_ = new labelList(proj.size(), -1);
|
||||
labelList& faceAddressing = *faceAddressingPtr_;
|
||||
|
||||
forAll (faceAddressing, faceI)
|
||||
forAll(faceAddressing, faceI)
|
||||
{
|
||||
if (proj[faceI].hit())
|
||||
{
|
||||
@ -327,7 +327,7 @@ void PatchToPatchInterpolation<FromPatch, ToPatch>::calcFaceAddressing() const
|
||||
|
||||
faceWeights[faceI][0] = 1.0/m;
|
||||
|
||||
forAll (neighbours, nI)
|
||||
forAll(neighbours, nI)
|
||||
{
|
||||
faceWeights[faceI][nI + 1] =
|
||||
1.0/
|
||||
|
@ -71,7 +71,7 @@ PatchToPatchInterpolation<FromPatch, ToPatch>::pointInterpolate
|
||||
|
||||
const labelList& addr = pointAddr();
|
||||
|
||||
forAll (result, pointI)
|
||||
forAll(result, pointI)
|
||||
{
|
||||
const scalarField& curWeights = weights[pointI];
|
||||
|
||||
@ -80,7 +80,7 @@ PatchToPatchInterpolation<FromPatch, ToPatch>::pointInterpolate
|
||||
const labelList& hitFacePoints =
|
||||
fromPatchLocalFaces[addr[pointI]];
|
||||
|
||||
forAll (curWeights, wI)
|
||||
forAll(curWeights, wI)
|
||||
{
|
||||
result[pointI] += curWeights[wI]*pf[hitFacePoints[wI]];
|
||||
}
|
||||
@ -142,7 +142,7 @@ PatchToPatchInterpolation<FromPatch, ToPatch>::faceInterpolate
|
||||
|
||||
const labelList& addr = faceAddr();
|
||||
|
||||
forAll (result, faceI)
|
||||
forAll(result, faceI)
|
||||
{
|
||||
const scalarField& curWeights = weights[faceI];
|
||||
|
||||
|
@ -44,7 +44,7 @@ void Foam::lduAddressing::calcLosort() const
|
||||
|
||||
const unallocLabelList& nbr = upperAddr();
|
||||
|
||||
forAll (nbr, nbrI)
|
||||
forAll(nbr, nbrI)
|
||||
{
|
||||
nNbrOfFace[nbr[nbrI]]++;
|
||||
}
|
||||
@ -52,7 +52,7 @@ void Foam::lduAddressing::calcLosort() const
|
||||
// Create temporary neighbour addressing
|
||||
labelListList cellNbrFaces(size());
|
||||
|
||||
forAll (cellNbrFaces, cellI)
|
||||
forAll(cellNbrFaces, cellI)
|
||||
{
|
||||
cellNbrFaces[cellI].setSize(nNbrOfFace[cellI]);
|
||||
}
|
||||
@ -61,7 +61,7 @@ void Foam::lduAddressing::calcLosort() const
|
||||
nNbrOfFace = 0;
|
||||
|
||||
// Scatter the neighbour faces
|
||||
forAll (nbr, nbrI)
|
||||
forAll(nbr, nbrI)
|
||||
{
|
||||
cellNbrFaces[nbr[nbrI]][nNbrOfFace[nbr[nbrI]]] = nbrI;
|
||||
|
||||
@ -76,11 +76,11 @@ void Foam::lduAddressing::calcLosort() const
|
||||
// Set counter for losort
|
||||
label lstI = 0;
|
||||
|
||||
forAll (cellNbrFaces, cellI)
|
||||
forAll(cellNbrFaces, cellI)
|
||||
{
|
||||
const labelList& curNbr = cellNbrFaces[cellI];
|
||||
|
||||
forAll (curNbr, curNbrI)
|
||||
forAll(curNbr, curNbrI)
|
||||
{
|
||||
lst[lstI] = curNbr[curNbrI];
|
||||
lstI++;
|
||||
@ -109,7 +109,7 @@ void Foam::lduAddressing::calcOwnerStart() const
|
||||
label nOwnStart = 0;
|
||||
label i = 1;
|
||||
|
||||
forAll (own, faceI)
|
||||
forAll(own, faceI)
|
||||
{
|
||||
label curOwn = own[faceI];
|
||||
|
||||
@ -148,7 +148,7 @@ void Foam::lduAddressing::calcLosortStart() const
|
||||
label nLsrtStart = 0;
|
||||
label i = 0;
|
||||
|
||||
forAll (lsrt, faceI)
|
||||
forAll(lsrt, faceI)
|
||||
{
|
||||
// Get neighbour
|
||||
const label curNbr = nbr[lsrt[faceI]];
|
||||
|
@ -42,7 +42,7 @@ void Foam::lduMatrix::initMatrixInterfaces
|
||||
|| Pstream::defaultCommsType == Pstream::nonBlocking
|
||||
)
|
||||
{
|
||||
forAll (interfaces, interfaceI)
|
||||
forAll(interfaces, interfaceI)
|
||||
{
|
||||
if (interfaces.set(interfaceI))
|
||||
{
|
||||
@ -117,7 +117,7 @@ void Foam::lduMatrix::updateMatrixInterfaces
|
||||
OPstream::waitRequests();
|
||||
}
|
||||
|
||||
forAll (interfaces, interfaceI)
|
||||
forAll(interfaces, interfaceI)
|
||||
{
|
||||
if (interfaces.set(interfaceI))
|
||||
{
|
||||
@ -138,7 +138,7 @@ void Foam::lduMatrix::updateMatrixInterfaces
|
||||
const lduSchedule& patchSchedule = this->patchSchedule();
|
||||
|
||||
// Loop over all the "normal" interfaces relating to standard patches
|
||||
forAll (patchSchedule, i)
|
||||
forAll(patchSchedule, i)
|
||||
{
|
||||
label interfaceI = patchSchedule[i].patch;
|
||||
|
||||
|
@ -88,7 +88,7 @@ void Foam::GAMGAgglomeration::agglomerateLduAddressing
|
||||
label nCoarseFaces = 0;
|
||||
|
||||
// Loop through all fine faces
|
||||
forAll (upperAddr, fineFacei)
|
||||
forAll(upperAddr, fineFacei)
|
||||
{
|
||||
label rmUpperAddr = restrictMap[upperAddr[fineFacei]];
|
||||
label rmLowerAddr = restrictMap[lowerAddr[fineFacei]];
|
||||
@ -174,7 +174,7 @@ void Foam::GAMGAgglomeration::agglomerateLduAddressing
|
||||
|
||||
label coarseFacei = 0;
|
||||
|
||||
forAll (cCellnFaces, cci)
|
||||
forAll(cCellnFaces, cci)
|
||||
{
|
||||
label* cFaces = &cCellFaces[maxNnbrs*cci];
|
||||
label ccnFaces = cCellnFaces[cci];
|
||||
@ -223,7 +223,7 @@ void Foam::GAMGAgglomeration::agglomerateLduAddressing
|
||||
labelListList coarseInterfaceAddr(fineInterfaces.size());
|
||||
|
||||
// Initialise transfer of restrict addressing on the interface
|
||||
forAll (fineInterfaces, inti)
|
||||
forAll(fineInterfaces, inti)
|
||||
{
|
||||
if (fineInterfaces.set(inti))
|
||||
{
|
||||
@ -236,7 +236,7 @@ void Foam::GAMGAgglomeration::agglomerateLduAddressing
|
||||
}
|
||||
|
||||
// Add the coarse level
|
||||
forAll (fineInterfaces, inti)
|
||||
forAll(fineInterfaces, inti)
|
||||
{
|
||||
if (fineInterfaces.set(inti))
|
||||
{
|
||||
|
@ -202,7 +202,7 @@ Foam::GAMGAgglomeration::~GAMGAgglomeration()
|
||||
{
|
||||
lduInterfacePtrsList& curLevel = interfaceLevels_[leveli];
|
||||
|
||||
forAll (curLevel, i)
|
||||
forAll(curLevel, i)
|
||||
{
|
||||
if (curLevel.set(i))
|
||||
{
|
||||
|
@ -48,18 +48,18 @@ Foam::tmp<Foam::labelField> Foam::pairGAMGAgglomeration::agglomerate
|
||||
{
|
||||
labelList nNbrs(nFineCells, 0);
|
||||
|
||||
forAll (upperAddr, facei)
|
||||
forAll(upperAddr, facei)
|
||||
{
|
||||
nNbrs[upperAddr[facei]]++;
|
||||
}
|
||||
|
||||
forAll (lowerAddr, facei)
|
||||
forAll(lowerAddr, facei)
|
||||
{
|
||||
nNbrs[lowerAddr[facei]]++;
|
||||
}
|
||||
|
||||
cellFaceOffsets[0] = 0;
|
||||
forAll (nNbrs, celli)
|
||||
forAll(nNbrs, celli)
|
||||
{
|
||||
cellFaceOffsets[celli+1] = cellFaceOffsets[celli] + nNbrs[celli];
|
||||
}
|
||||
@ -67,7 +67,7 @@ Foam::tmp<Foam::labelField> Foam::pairGAMGAgglomeration::agglomerate
|
||||
// reset the whole list to use as counter
|
||||
nNbrs = 0;
|
||||
|
||||
forAll (upperAddr, facei)
|
||||
forAll(upperAddr, facei)
|
||||
{
|
||||
cellFaces
|
||||
[
|
||||
@ -77,7 +77,7 @@ Foam::tmp<Foam::labelField> Foam::pairGAMGAgglomeration::agglomerate
|
||||
nNbrs[upperAddr[facei]]++;
|
||||
}
|
||||
|
||||
forAll (lowerAddr, facei)
|
||||
forAll(lowerAddr, facei)
|
||||
{
|
||||
cellFaces
|
||||
[
|
||||
@ -187,7 +187,7 @@ Foam::tmp<Foam::labelField> Foam::pairGAMGAgglomeration::agglomerate
|
||||
// (doesn't always help and is sometimes detrimental)
|
||||
nCoarseCells--;
|
||||
|
||||
forAll (coarseCellMap, celli)
|
||||
forAll(coarseCellMap, celli)
|
||||
{
|
||||
coarseCellMap[celli] = nCoarseCells - coarseCellMap[celli];
|
||||
}
|
||||
|
@ -78,7 +78,7 @@ void Foam::pairGAMGAgglomeration::combineLevels(const label curLevel)
|
||||
const lduInterfacePtrsList& curInterLevel = interfaceLevels_[curLevel+1];
|
||||
lduInterfacePtrsList& prevInterLevel = interfaceLevels_[prevLevel+1];
|
||||
|
||||
forAll (prevInterLevel, inti)
|
||||
forAll(prevInterLevel, inti)
|
||||
{
|
||||
if (prevInterLevel.set(inti))
|
||||
{
|
||||
|
@ -127,11 +127,11 @@ Foam::GAMGSolver::GAMGSolver
|
||||
Foam::GAMGSolver::~GAMGSolver()
|
||||
{
|
||||
// Clear the the lists of pointers to the interfaces
|
||||
forAll (interfaceLevels_, leveli)
|
||||
forAll(interfaceLevels_, leveli)
|
||||
{
|
||||
lduInterfaceFieldPtrsList& curLevel = interfaceLevels_[leveli];
|
||||
|
||||
forAll (curLevel, i)
|
||||
forAll(curLevel, i)
|
||||
{
|
||||
if (curLevel.set(i))
|
||||
{
|
||||
|
@ -91,7 +91,7 @@ void Foam::GAMGSolver::agglomerateMatrix(const label fineLevelIndex)
|
||||
interfaceLevelsIntCoeffs_[fineLevelIndex];
|
||||
|
||||
// Add the coarse level
|
||||
forAll (fineInterfaces, inti)
|
||||
forAll(fineInterfaces, inti)
|
||||
{
|
||||
if (fineInterfaces.set(inti))
|
||||
{
|
||||
|
@ -377,7 +377,7 @@ void Foam::GAMGSolver::initVcycle
|
||||
)
|
||||
);
|
||||
|
||||
forAll (matrixLevels_, leveli)
|
||||
forAll(matrixLevels_, leveli)
|
||||
{
|
||||
coarseCorrFields.set
|
||||
(
|
||||
|
@ -36,7 +36,7 @@ Foam::tmp<Foam::Field<Type> > Foam::GAMGInterface::interfaceInternalField
|
||||
tmp<Field<Type> > tresult(new Field<Type>(size()));
|
||||
Field<Type>& result = tresult();
|
||||
|
||||
forAll (result, elemI)
|
||||
forAll(result, elemI)
|
||||
{
|
||||
result[elemI] = iF[faceCells_[elemI]];
|
||||
}
|
||||
|
@ -144,7 +144,7 @@ Foam::cyclicGAMGInterface::cyclicGAMGInterface
|
||||
nCoarseFaces = 0;
|
||||
|
||||
// On master side, the owner addressing is stored in table of contents
|
||||
forAll (contents, masterI)
|
||||
forAll(contents, masterI)
|
||||
{
|
||||
SLList<label>& curNbrs = neighboursTable.find(contents[masterI])();
|
||||
|
||||
@ -163,12 +163,7 @@ Foam::cyclicGAMGInterface::cyclicGAMGInterface
|
||||
{
|
||||
faceCells_[nCoarseFaces] = contents[masterI];
|
||||
|
||||
for
|
||||
(
|
||||
SLList<label>::iterator facesIter = faceFacesIter().begin();
|
||||
facesIter != faceFacesIter().end();
|
||||
++facesIter
|
||||
)
|
||||
forAllIter(SLList<label>, faceFacesIter(), facesIter)
|
||||
{
|
||||
faceRestrictAddressing_[facesIter()] = nCoarseFaces;
|
||||
}
|
||||
@ -178,7 +173,7 @@ Foam::cyclicGAMGInterface::cyclicGAMGInterface
|
||||
}
|
||||
|
||||
// On slave side, the owner addressing is stored in linked lists
|
||||
forAll (contents, masterI)
|
||||
forAll(contents, masterI)
|
||||
{
|
||||
SLList<label>& curNbrs = neighboursTable.find(contents[masterI])();
|
||||
|
||||
@ -197,12 +192,7 @@ Foam::cyclicGAMGInterface::cyclicGAMGInterface
|
||||
{
|
||||
faceCells_[nCoarseFaces] = nbrsIter();
|
||||
|
||||
for
|
||||
(
|
||||
SLList<label>::iterator facesIter = faceFacesIter().begin();
|
||||
facesIter != faceFacesIter().end();
|
||||
++facesIter
|
||||
)
|
||||
forAllIter(SLList<label>, faceFacesIter(), facesIter)
|
||||
{
|
||||
faceRestrictAddressing_[facesIter() + sizeBy2] = nCoarseFaces;
|
||||
}
|
||||
|
@ -71,7 +71,7 @@ Foam::processorGAMGInterface::processorGAMGInterface
|
||||
|
||||
label nCoarseFaces = 0;
|
||||
|
||||
forAll (localRestrictAddressing, ffi)
|
||||
forAll(localRestrictAddressing, ffi)
|
||||
{
|
||||
label curMaster = -1;
|
||||
label curSlave = -1;
|
||||
@ -159,7 +159,7 @@ Foam::processorGAMGInterface::processorGAMGInterface
|
||||
if (myProcNo() < neighbProcNo())
|
||||
{
|
||||
// On master side, the owner addressing is stored in table of contents
|
||||
forAll (contents, masterI)
|
||||
forAll(contents, masterI)
|
||||
{
|
||||
SLList<label>& curNbrs = neighboursTable.find(contents[masterI])();
|
||||
|
||||
@ -180,12 +180,7 @@ Foam::processorGAMGInterface::processorGAMGInterface
|
||||
{
|
||||
faceCells_[nCoarseFaces] = contents[masterI];
|
||||
|
||||
for
|
||||
(
|
||||
SLList<label>::iterator facesIter = faceFacesIter().begin();
|
||||
facesIter != faceFacesIter().end();
|
||||
++facesIter
|
||||
)
|
||||
forAllIter(SLList<label>, faceFacesIter(), facesIter)
|
||||
{
|
||||
faceRestrictAddressing_[facesIter()] = nCoarseFaces;
|
||||
}
|
||||
@ -197,7 +192,7 @@ Foam::processorGAMGInterface::processorGAMGInterface
|
||||
else
|
||||
{
|
||||
// On slave side, the owner addressing is stored in linked lists
|
||||
forAll (contents, masterI)
|
||||
forAll(contents, masterI)
|
||||
{
|
||||
SLList<label>& curNbrs = neighboursTable.find(contents[masterI])();
|
||||
|
||||
@ -218,12 +213,7 @@ Foam::processorGAMGInterface::processorGAMGInterface
|
||||
{
|
||||
faceCells_[nCoarseFaces] = nbrsIter();
|
||||
|
||||
for
|
||||
(
|
||||
SLList<label>::iterator facesIter = faceFacesIter().begin();
|
||||
facesIter != faceFacesIter().end();
|
||||
++facesIter
|
||||
)
|
||||
forAllIter(SLList<label>, faceFacesIter(), facesIter)
|
||||
{
|
||||
faceRestrictAddressing_[facesIter()] = nCoarseFaces;
|
||||
}
|
||||
|
@ -48,13 +48,13 @@ Foam::labelList Foam::bandCompression(const labelListList& cellCellAddressing)
|
||||
label cellInOrder = 0;
|
||||
|
||||
// reset the visited cells list
|
||||
forAll (visited, cellI)
|
||||
forAll(visited, cellI)
|
||||
{
|
||||
visited[cellI] = 0;
|
||||
}
|
||||
|
||||
// loop over the cells
|
||||
forAll (visited, cellI)
|
||||
forAll(visited, cellI)
|
||||
{
|
||||
// find the first cell that has not been visited yet
|
||||
if (visited[cellI] == 0)
|
||||
@ -85,7 +85,7 @@ Foam::labelList Foam::bandCompression(const labelListList& cellCellAddressing)
|
||||
const labelList& neighbours =
|
||||
cellCellAddressing[currentCell];
|
||||
|
||||
forAll (neighbours, nI)
|
||||
forAll(neighbours, nI)
|
||||
{
|
||||
if (visited[neighbours[nI]] == 0)
|
||||
{
|
||||
|
@ -41,7 +41,7 @@ Foam::labelList Foam::cell::labels(const unallocFaceList& f) const
|
||||
|
||||
const labelList& faces = *this;
|
||||
|
||||
forAll (faces, faceI)
|
||||
forAll(faces, faceI)
|
||||
{
|
||||
maxVert += f[faces[faceI]].size();
|
||||
}
|
||||
@ -52,7 +52,7 @@ Foam::labelList Foam::cell::labels(const unallocFaceList& f) const
|
||||
// in the first face there is no duplicates
|
||||
const labelList& first = f[faces[0]];
|
||||
|
||||
forAll (first, pointI)
|
||||
forAll(first, pointI)
|
||||
{
|
||||
p[pointI] = first[pointI];
|
||||
}
|
||||
@ -67,7 +67,7 @@ Foam::labelList Foam::cell::labels(const unallocFaceList& f) const
|
||||
{
|
||||
const labelList& curFace = f[faces[faceI]];
|
||||
|
||||
forAll (curFace, pointI)
|
||||
forAll(curFace, pointI)
|
||||
{
|
||||
const label curPoint = curFace[pointI];
|
||||
|
||||
@ -126,7 +126,7 @@ Foam::edgeList Foam::cell::edges(const unallocFaceList& f) const
|
||||
// create a list of edges
|
||||
label maxNoEdges = 0;
|
||||
|
||||
forAll (curFaces, faceI)
|
||||
forAll(curFaces, faceI)
|
||||
{
|
||||
maxNoEdges += f[curFaces[faceI]].nEdges();
|
||||
}
|
||||
@ -134,11 +134,11 @@ Foam::edgeList Foam::cell::edges(const unallocFaceList& f) const
|
||||
edgeList allEdges(maxNoEdges);
|
||||
label nEdges = 0;
|
||||
|
||||
forAll (curFaces, faceI)
|
||||
forAll(curFaces, faceI)
|
||||
{
|
||||
const edgeList curFaceEdges = f[curFaces[faceI]].edges();
|
||||
|
||||
forAll (curFaceEdges, faceEdgeI)
|
||||
forAll(curFaceEdges, faceEdgeI)
|
||||
{
|
||||
const edge& curEdge = curFaceEdges[faceEdgeI];
|
||||
|
||||
@ -197,7 +197,7 @@ Foam::point Foam::cell::centre
|
||||
|
||||
const labelList& faces = *this;
|
||||
|
||||
forAll (faces, faceI)
|
||||
forAll(faces, faceI)
|
||||
{
|
||||
scalar a = f[faces[faceI]].mag(p);
|
||||
cEst += f[faces[faceI]].centre(p)*a;
|
||||
@ -212,7 +212,7 @@ Foam::point Foam::cell::centre
|
||||
|
||||
scalar sumV = 0;
|
||||
|
||||
forAll (faces, faceI)
|
||||
forAll(faces, faceI)
|
||||
{
|
||||
// calculate pyramid volume. If it is greater than zero, OK.
|
||||
// If not, the pyramid is inside-out. Create a face with the opposite
|
||||
@ -256,7 +256,7 @@ Foam::scalar Foam::cell::mag
|
||||
|
||||
const labelList& faces = *this;
|
||||
|
||||
forAll (faces, faceI)
|
||||
forAll(faces, faceI)
|
||||
{
|
||||
cEst += f[faces[faceI]].centre(p);
|
||||
nCellFaces += 1;
|
||||
@ -267,7 +267,7 @@ Foam::scalar Foam::cell::mag
|
||||
// Calculate the magnitude by summing the mags of the pyramids
|
||||
scalar v = 0;
|
||||
|
||||
forAll (faces, faceI)
|
||||
forAll(faces, faceI)
|
||||
{
|
||||
v += ::Foam::mag(pyramidPointFaceRef(f[faces[faceI]], cEst).mag(p));
|
||||
}
|
||||
@ -288,13 +288,13 @@ bool Foam::operator==(const cell& a, const cell& b)
|
||||
|
||||
List<bool> fnd(a.size(), false);
|
||||
|
||||
forAll (b, bI)
|
||||
forAll(b, bI)
|
||||
{
|
||||
label curLabel = b[bI];
|
||||
|
||||
bool found = false;
|
||||
|
||||
forAll (a, aI)
|
||||
forAll(a, aI)
|
||||
{
|
||||
if (a[aI] == curLabel)
|
||||
{
|
||||
@ -313,7 +313,7 @@ bool Foam::operator==(const cell& a, const cell& b)
|
||||
// check if all faces on a were marked
|
||||
bool result = true;
|
||||
|
||||
forAll (fnd, aI)
|
||||
forAll(fnd, aI)
|
||||
{
|
||||
result = (result && fnd[aI]);
|
||||
}
|
||||
|
@ -54,7 +54,7 @@ Foam::label Foam::cell::opposingFaceLabel
|
||||
|
||||
label oppositeFaceLabel = -1;
|
||||
|
||||
forAll (curFaceLabels, faceI)
|
||||
forAll(curFaceLabels, faceI)
|
||||
{
|
||||
// Compare the face with the master
|
||||
const face& curFace = meshFaces[curFaceLabels[faceI]];
|
||||
@ -70,11 +70,11 @@ Foam::label Foam::cell::opposingFaceLabel
|
||||
|
||||
// Compare every vertex of the current face agains the
|
||||
// vertices of the master face
|
||||
forAll (curFace, pointI)
|
||||
forAll(curFace, pointI)
|
||||
{
|
||||
const label l = curFace[pointI];
|
||||
|
||||
forAll (masterFace, masterPointI)
|
||||
forAll(masterFace, masterPointI)
|
||||
{
|
||||
if (masterFace[masterPointI] == l)
|
||||
{
|
||||
@ -149,11 +149,11 @@ Foam::oppositeFace Foam::cell::opposingFace
|
||||
oppFaceLabel
|
||||
);
|
||||
|
||||
forAll (masterFace, pointI)
|
||||
forAll(masterFace, pointI)
|
||||
{
|
||||
// Go through the list of edges and find the edge from this vertex
|
||||
// to the slave face
|
||||
forAll (e, edgeI)
|
||||
forAll(e, edgeI)
|
||||
{
|
||||
if (!usedEdges[edgeI])
|
||||
{
|
||||
@ -166,7 +166,7 @@ Foam::oppositeFace Foam::cell::opposingFace
|
||||
// Found an edge coming from this vertex.
|
||||
// Check all vertices of the slave to find out
|
||||
// if it exists.
|
||||
forAll (slaveFace, slavePointI)
|
||||
forAll(slaveFace, slavePointI)
|
||||
{
|
||||
if (slaveFace[slavePointI] == otherVertex)
|
||||
{
|
||||
|
@ -123,14 +123,9 @@ Foam::label Foam::cellMatcher::calcLocalFaces
|
||||
}
|
||||
|
||||
// Create local to global vertex mapping
|
||||
for
|
||||
(
|
||||
Map<label>::iterator iter = localPoint_.begin();
|
||||
iter != localPoint_.end();
|
||||
++iter
|
||||
)
|
||||
forAllConstIter(Map<label>, localPoint_, iter)
|
||||
{
|
||||
label fp = iter();
|
||||
const label fp = iter();
|
||||
pointMap_[fp] = iter.key();
|
||||
}
|
||||
|
||||
|
@ -107,7 +107,7 @@ inline faceList cellModel::faces(const labelList& pointLabels) const
|
||||
|
||||
curFace.setSize(curModelLabels.size());
|
||||
|
||||
forAll (curModelLabels, labelI)
|
||||
forAll(curModelLabels, labelI)
|
||||
{
|
||||
curFace[labelI] = pointLabels[curModelLabels[labelI]];
|
||||
}
|
||||
|
@ -322,7 +322,7 @@ int Foam::face::compare(const face& a, const face& b)
|
||||
const label firstA = a[0];
|
||||
label Bptr = -1;
|
||||
|
||||
forAll (b, i)
|
||||
forAll(b, i)
|
||||
{
|
||||
if (b[i] == firstA)
|
||||
{
|
||||
@ -621,7 +621,7 @@ Foam::label Foam::face::which(const label globalIndex) const
|
||||
label pointInFace = -1;
|
||||
const labelList& f = *this;
|
||||
|
||||
forAll (f, i)
|
||||
forAll(f, i)
|
||||
{
|
||||
if (f[i] == globalIndex)
|
||||
{
|
||||
@ -750,7 +750,7 @@ Foam::edgeList Foam::face::edges() const
|
||||
|
||||
int Foam::face::edgeDirection(const edge& e) const
|
||||
{
|
||||
forAll (*this, i)
|
||||
forAll(*this, i)
|
||||
{
|
||||
if (operator[](i) == e.start())
|
||||
{
|
||||
|
@ -43,7 +43,7 @@ Foam::scalar Foam::face::areaInContact
|
||||
|
||||
scalarField vertexValue(labels.size());
|
||||
|
||||
forAll (labels, i)
|
||||
forAll(labels, i)
|
||||
{
|
||||
vertexValue[i] = v[labels[i]];
|
||||
}
|
||||
@ -56,7 +56,7 @@ Foam::scalar Foam::face::areaInContact
|
||||
bool allPositive = true;
|
||||
bool allNegative = true;
|
||||
|
||||
forAll (vertexValue, vI)
|
||||
forAll(vertexValue, vI)
|
||||
{
|
||||
if (vertexValue[vI] > 0)
|
||||
{
|
||||
@ -147,7 +147,7 @@ Foam::scalar Foam::face::areaInContact
|
||||
// Make a labelList for the sub-face (points are ordered!)
|
||||
labelList sfl(newFacePoints.size());
|
||||
|
||||
forAll (sfl, sflI)
|
||||
forAll(sfl, sflI)
|
||||
{
|
||||
sfl[sflI] = sflI;
|
||||
}
|
||||
|
@ -73,7 +73,7 @@ public:
|
||||
{
|
||||
const pointBoundaryMesh& patches = mesh.boundary();
|
||||
|
||||
forAll (patches, patchI)
|
||||
forAll(patches, patchI)
|
||||
{
|
||||
set
|
||||
(
|
||||
|
@ -63,7 +63,7 @@ void Foam::pointMapper::calcAddressing() const
|
||||
|
||||
label nInsertedPoints = 0;
|
||||
|
||||
forAll (directAddr, pointI)
|
||||
forAll(directAddr, pointI)
|
||||
{
|
||||
if (directAddr[pointI] < 0)
|
||||
{
|
||||
@ -89,7 +89,7 @@ void Foam::pointMapper::calcAddressing() const
|
||||
// Points created from other points (i.e. points merged into it).
|
||||
const List<objectMap>& cfc = mpm_.pointsFromPointsMap();
|
||||
|
||||
forAll (cfc, cfcI)
|
||||
forAll(cfc, cfcI)
|
||||
{
|
||||
// Get addressing
|
||||
const labelList& mo = cfc[cfcI].masterObjects();
|
||||
@ -115,7 +115,7 @@ void Foam::pointMapper::calcAddressing() const
|
||||
|
||||
const labelList& cm = mpm_.pointMap();
|
||||
|
||||
forAll (cm, pointI)
|
||||
forAll(cm, pointI)
|
||||
{
|
||||
if (cm[pointI] > -1 && addr[pointI].empty())
|
||||
{
|
||||
@ -132,7 +132,7 @@ void Foam::pointMapper::calcAddressing() const
|
||||
|
||||
label nInsertedPoints = 0;
|
||||
|
||||
forAll (addr, pointI)
|
||||
forAll(addr, pointI)
|
||||
{
|
||||
if (addr[pointI].empty())
|
||||
{
|
||||
@ -198,7 +198,7 @@ Foam::pointMapper::pointMapper(const pointMesh& pMesh, const mapPolyMesh& mpm)
|
||||
|
||||
const List<objectMap>& cfc = mpm_.pointsFromPointsMap();
|
||||
|
||||
forAll (cfc, cfcI)
|
||||
forAll(cfc, cfcI)
|
||||
{
|
||||
cm[cfc[cfcI].index()] = 0;
|
||||
}
|
||||
|
@ -62,7 +62,7 @@ void Foam::processorPointPatch::initGeometry(PstreamBuffers& pBufs)
|
||||
|
||||
faceList masterFaces(pp.size());
|
||||
|
||||
forAll (pp, faceI)
|
||||
forAll(pp, faceI)
|
||||
{
|
||||
masterFaces[faceI] = pp[faceI].reverseFace();
|
||||
}
|
||||
|
@ -64,7 +64,7 @@ void Foam::globalMeshData::initProcAddr()
|
||||
|
||||
label nNeighbours = 0;
|
||||
|
||||
forAll (mesh_.boundaryMesh(), patchi)
|
||||
forAll(mesh_.boundaryMesh(), patchi)
|
||||
{
|
||||
if (isA<processorPolyPatch>(mesh_.boundaryMesh()[patchi]))
|
||||
{
|
||||
@ -78,7 +78,7 @@ void Foam::globalMeshData::initProcAddr()
|
||||
if (Pstream::parRun())
|
||||
{
|
||||
// Send indices of my processor patches to my neighbours
|
||||
forAll (processorPatches_, i)
|
||||
forAll(processorPatches_, i)
|
||||
{
|
||||
label patchi = processorPatches_[i];
|
||||
|
||||
|
@ -63,7 +63,7 @@ void Foam::cellMapper::calcAddressing() const
|
||||
|
||||
label nInsertedCells = 0;
|
||||
|
||||
forAll (directAddr, cellI)
|
||||
forAll(directAddr, cellI)
|
||||
{
|
||||
if (directAddr[cellI] < 0)
|
||||
{
|
||||
@ -88,7 +88,7 @@ void Foam::cellMapper::calcAddressing() const
|
||||
|
||||
const List<objectMap>& cfp = mpm_.cellsFromPointsMap();
|
||||
|
||||
forAll (cfp, cfpI)
|
||||
forAll(cfp, cfpI)
|
||||
{
|
||||
// Get addressing
|
||||
const labelList& mo = cfp[cfpI].masterObjects();
|
||||
@ -110,7 +110,7 @@ void Foam::cellMapper::calcAddressing() const
|
||||
|
||||
const List<objectMap>& cfe = mpm_.cellsFromEdgesMap();
|
||||
|
||||
forAll (cfe, cfeI)
|
||||
forAll(cfe, cfeI)
|
||||
{
|
||||
// Get addressing
|
||||
const labelList& mo = cfe[cfeI].masterObjects();
|
||||
@ -132,7 +132,7 @@ void Foam::cellMapper::calcAddressing() const
|
||||
|
||||
const List<objectMap>& cff = mpm_.cellsFromFacesMap();
|
||||
|
||||
forAll (cff, cffI)
|
||||
forAll(cff, cffI)
|
||||
{
|
||||
// Get addressing
|
||||
const labelList& mo = cff[cffI].masterObjects();
|
||||
@ -154,7 +154,7 @@ void Foam::cellMapper::calcAddressing() const
|
||||
|
||||
const List<objectMap>& cfc = mpm_.cellsFromCellsMap();
|
||||
|
||||
forAll (cfc, cfcI)
|
||||
forAll(cfc, cfcI)
|
||||
{
|
||||
// Get addressing
|
||||
const labelList& mo = cfc[cfcI].masterObjects();
|
||||
@ -180,7 +180,7 @@ void Foam::cellMapper::calcAddressing() const
|
||||
|
||||
const labelList& cm = mpm_.cellMap();
|
||||
|
||||
forAll (cm, cellI)
|
||||
forAll(cm, cellI)
|
||||
{
|
||||
if (cm[cellI] > -1 && addr[cellI].empty())
|
||||
{
|
||||
@ -197,7 +197,7 @@ void Foam::cellMapper::calcAddressing() const
|
||||
|
||||
label nInsertedCells = 0;
|
||||
|
||||
forAll (addr, cellI)
|
||||
forAll(addr, cellI)
|
||||
{
|
||||
if (addr[cellI].empty())
|
||||
{
|
||||
@ -270,28 +270,28 @@ Foam::cellMapper::cellMapper(const mapPolyMesh& mpm)
|
||||
|
||||
const List<objectMap>& cfp = mpm_.cellsFromPointsMap();
|
||||
|
||||
forAll (cfp, cfpI)
|
||||
forAll(cfp, cfpI)
|
||||
{
|
||||
cm[cfp[cfpI].index()] = 0;
|
||||
}
|
||||
|
||||
const List<objectMap>& cfe = mpm_.cellsFromEdgesMap();
|
||||
|
||||
forAll (cfe, cfeI)
|
||||
forAll(cfe, cfeI)
|
||||
{
|
||||
cm[cfe[cfeI].index()] = 0;
|
||||
}
|
||||
|
||||
const List<objectMap>& cff = mpm_.cellsFromFacesMap();
|
||||
|
||||
forAll (cff, cffI)
|
||||
forAll(cff, cffI)
|
||||
{
|
||||
cm[cff[cffI].index()] = 0;
|
||||
}
|
||||
|
||||
const List<objectMap>& cfc = mpm_.cellsFromCellsMap();
|
||||
|
||||
forAll (cfc, cfcI)
|
||||
forAll(cfc, cfcI)
|
||||
{
|
||||
cm[cfc[cfcI].index()] = 0;
|
||||
}
|
||||
|
@ -63,7 +63,7 @@ void Foam::faceMapper::calcAddressing() const
|
||||
|
||||
label nInsertedFaces = 0;
|
||||
|
||||
forAll (directAddr, faceI)
|
||||
forAll(directAddr, faceI)
|
||||
{
|
||||
if (directAddr[faceI] < 0)
|
||||
{
|
||||
@ -88,7 +88,7 @@ void Foam::faceMapper::calcAddressing() const
|
||||
|
||||
const List<objectMap>& ffp = mpm_.facesFromPointsMap();
|
||||
|
||||
forAll (ffp, ffpI)
|
||||
forAll(ffp, ffpI)
|
||||
{
|
||||
// Get addressing
|
||||
const labelList& mo = ffp[ffpI].masterObjects();
|
||||
@ -110,7 +110,7 @@ void Foam::faceMapper::calcAddressing() const
|
||||
|
||||
const List<objectMap>& ffe = mpm_.facesFromEdgesMap();
|
||||
|
||||
forAll (ffe, ffeI)
|
||||
forAll(ffe, ffeI)
|
||||
{
|
||||
// Get addressing
|
||||
const labelList& mo = ffe[ffeI].masterObjects();
|
||||
@ -132,7 +132,7 @@ void Foam::faceMapper::calcAddressing() const
|
||||
|
||||
const List<objectMap>& fff = mpm_.facesFromFacesMap();
|
||||
|
||||
forAll (fff, fffI)
|
||||
forAll(fff, fffI)
|
||||
{
|
||||
// Get addressing
|
||||
const labelList& mo = fff[fffI].masterObjects();
|
||||
@ -157,7 +157,7 @@ void Foam::faceMapper::calcAddressing() const
|
||||
// so check if addressing size still zero.
|
||||
const labelList& fm = mpm_.faceMap();
|
||||
|
||||
forAll (fm, faceI)
|
||||
forAll(fm, faceI)
|
||||
{
|
||||
if (fm[faceI] > -1 && addr[faceI].empty())
|
||||
{
|
||||
@ -175,7 +175,7 @@ void Foam::faceMapper::calcAddressing() const
|
||||
|
||||
label nInsertedFaces = 0;
|
||||
|
||||
forAll (addr, faceI)
|
||||
forAll(addr, faceI)
|
||||
{
|
||||
if (addr[faceI].empty())
|
||||
{
|
||||
@ -247,21 +247,21 @@ Foam::faceMapper::faceMapper(const mapPolyMesh& mpm)
|
||||
|
||||
const List<objectMap>& ffp = mpm_.facesFromPointsMap();
|
||||
|
||||
forAll (ffp, ffpI)
|
||||
forAll(ffp, ffpI)
|
||||
{
|
||||
fm[ffp[ffpI].index()] = 0;
|
||||
}
|
||||
|
||||
const List<objectMap>& ffe = mpm_.facesFromEdgesMap();
|
||||
|
||||
forAll (ffe, ffeI)
|
||||
forAll(ffe, ffeI)
|
||||
{
|
||||
fm[ffe[ffeI].index()] = 0;
|
||||
}
|
||||
|
||||
const List<objectMap>& fff = mpm_.facesFromFacesMap();
|
||||
|
||||
forAll (fff, fffI)
|
||||
forAll(fff, fffI)
|
||||
{
|
||||
fm[fff[fffI].index()] = 0;
|
||||
}
|
||||
|
@ -120,7 +120,7 @@ Foam::polyBoundaryMesh::~polyBoundaryMesh()
|
||||
|
||||
void Foam::polyBoundaryMesh::clearGeom()
|
||||
{
|
||||
forAll (*this, patchi)
|
||||
forAll(*this, patchi)
|
||||
{
|
||||
operator[](patchi).clearGeom();
|
||||
}
|
||||
@ -132,7 +132,7 @@ void Foam::polyBoundaryMesh::clearAddressing()
|
||||
neighbourEdgesPtr_.clear();
|
||||
patchIDPtr_.clear();
|
||||
|
||||
forAll (*this, patchi)
|
||||
forAll(*this, patchi)
|
||||
{
|
||||
operator[](patchi).clearAddressing();
|
||||
}
|
||||
@ -355,7 +355,7 @@ Foam::wordList Foam::polyBoundaryMesh::names() const
|
||||
|
||||
wordList t(patches.size());
|
||||
|
||||
forAll (patches, patchI)
|
||||
forAll(patches, patchI)
|
||||
{
|
||||
t[patchI] = patches[patchI].name();
|
||||
}
|
||||
@ -370,7 +370,7 @@ Foam::wordList Foam::polyBoundaryMesh::types() const
|
||||
|
||||
wordList t(patches.size());
|
||||
|
||||
forAll (patches, patchI)
|
||||
forAll(patches, patchI)
|
||||
{
|
||||
t[patchI] = patches[patchI].type();
|
||||
}
|
||||
@ -385,7 +385,7 @@ Foam::wordList Foam::polyBoundaryMesh::physicalTypes() const
|
||||
|
||||
wordList t(patches.size());
|
||||
|
||||
forAll (patches, patchI)
|
||||
forAll(patches, patchI)
|
||||
{
|
||||
t[patchI] = patches[patchI].physicalType();
|
||||
}
|
||||
@ -398,7 +398,7 @@ Foam::label Foam::polyBoundaryMesh::findPatchID(const word& patchName) const
|
||||
{
|
||||
const polyPatchList& patches = *this;
|
||||
|
||||
forAll (patches, patchI)
|
||||
forAll(patches, patchI)
|
||||
{
|
||||
if (patches[patchI].name() == patchName)
|
||||
{
|
||||
@ -440,7 +440,7 @@ Foam::label Foam::polyBoundaryMesh::whichPatch(const label faceIndex) const
|
||||
return -1;
|
||||
}
|
||||
|
||||
forAll (*this, patchI)
|
||||
forAll(*this, patchI)
|
||||
{
|
||||
const polyPatch& bp = operator[](patchI);
|
||||
|
||||
@ -518,7 +518,7 @@ bool Foam::polyBoundaryMesh::checkParallelSync(const bool report) const
|
||||
|
||||
label nonProcI = 0;
|
||||
|
||||
forAll (bm, patchI)
|
||||
forAll(bm, patchI)
|
||||
{
|
||||
if (!isA<processorPolyPatch>(bm[patchI]))
|
||||
{
|
||||
@ -594,7 +594,7 @@ bool Foam::polyBoundaryMesh::checkDefinition(const bool report) const
|
||||
|
||||
bool hasError = false;
|
||||
|
||||
forAll (bm, patchI)
|
||||
forAll(bm, patchI)
|
||||
{
|
||||
if (bm[patchI].start() != nextPatchStart && !hasError)
|
||||
{
|
||||
|
@ -438,7 +438,7 @@ Foam::polyMesh::polyMesh
|
||||
oldPointsPtr_(NULL)
|
||||
{
|
||||
// Check if the faces and cells are valid
|
||||
forAll (faces_, faceI)
|
||||
forAll(faces_, faceI)
|
||||
{
|
||||
const face& curFace = faces_[faceI];
|
||||
|
||||
@ -594,7 +594,7 @@ Foam::polyMesh::polyMesh
|
||||
oldPointsPtr_(NULL)
|
||||
{
|
||||
// Check if faces are valid
|
||||
forAll (faces_, faceI)
|
||||
forAll(faces_, faceI)
|
||||
{
|
||||
const face& curFace = faces_[faceI];
|
||||
|
||||
@ -619,7 +619,7 @@ Foam::polyMesh::polyMesh
|
||||
cellList cLst(cells);
|
||||
|
||||
// Check if cells are valid
|
||||
forAll (cLst, cellI)
|
||||
forAll(cLst, cellI)
|
||||
{
|
||||
const cell& curCell = cLst[cellI];
|
||||
|
||||
@ -701,7 +701,7 @@ void Foam::polyMesh::resetPrimitives
|
||||
setInstance(time().timeName());
|
||||
|
||||
// Check if the faces and cells are valid
|
||||
forAll (faces_, faceI)
|
||||
forAll(faces_, faceI)
|
||||
{
|
||||
const face& curFace = faces_[faceI];
|
||||
|
||||
@ -866,7 +866,7 @@ void Foam::polyMesh::addPatches
|
||||
boundary_.setSize(p.size());
|
||||
|
||||
// Copy the patch pointers
|
||||
forAll (p, pI)
|
||||
forAll(p, pI)
|
||||
{
|
||||
boundary_.set(pI, p[pI]);
|
||||
}
|
||||
@ -918,7 +918,7 @@ void Foam::polyMesh::addZones
|
||||
pointZones_.setSize(pz.size());
|
||||
|
||||
// Copy the zone pointers
|
||||
forAll (pz, pI)
|
||||
forAll(pz, pI)
|
||||
{
|
||||
pointZones_.set(pI, pz[pI]);
|
||||
}
|
||||
@ -932,7 +932,7 @@ void Foam::polyMesh::addZones
|
||||
faceZones_.setSize(fz.size());
|
||||
|
||||
// Copy the zone pointers
|
||||
forAll (fz, fI)
|
||||
forAll(fz, fI)
|
||||
{
|
||||
faceZones_.set(fI, fz[fI]);
|
||||
}
|
||||
@ -946,7 +946,7 @@ void Foam::polyMesh::addZones
|
||||
cellZones_.setSize(cz.size());
|
||||
|
||||
// Copy the zone pointers
|
||||
forAll (cz, cI)
|
||||
forAll(cz, cI)
|
||||
{
|
||||
cellZones_.set(cI, cz[cI]);
|
||||
}
|
||||
|
@ -62,7 +62,7 @@ void Foam::polyMesh::clearGeom()
|
||||
|
||||
primitiveMesh::clearGeom();
|
||||
|
||||
forAll (boundary_, patchI)
|
||||
forAll(boundary_, patchI)
|
||||
{
|
||||
boundary_[patchI].clearGeom();
|
||||
}
|
||||
|
@ -61,7 +61,7 @@ Foam::labelListList Foam::polyMesh::cellShapePointCells
|
||||
|
||||
labelListList pointCellAddr(pc.size());
|
||||
|
||||
forAll (pc, pointI)
|
||||
forAll(pc, pointI)
|
||||
{
|
||||
pointCellAddr[pointI].transfer(pc[pointI]);
|
||||
}
|
||||
@ -384,7 +384,7 @@ Foam::polyMesh::polyMesh
|
||||
label nextNei = -1;
|
||||
label minNei = cells.size();
|
||||
|
||||
forAll (neiCells, ncI)
|
||||
forAll(neiCells, ncI)
|
||||
{
|
||||
if (neiCells[ncI] > -1 && neiCells[ncI] < minNei)
|
||||
{
|
||||
@ -433,7 +433,7 @@ Foam::polyMesh::polyMesh
|
||||
labelList patchSizes(boundaryFaces.size(), -1);
|
||||
labelList patchStarts(boundaryFaces.size(), -1);
|
||||
|
||||
forAll (boundaryFaces, patchI)
|
||||
forAll(boundaryFaces, patchI)
|
||||
{
|
||||
const faceList& patchFaces = boundaryFaces[patchI];
|
||||
|
||||
@ -449,7 +449,7 @@ Foam::polyMesh::polyMesh
|
||||
// Grab the start label
|
||||
label curPatchStart = nFaces;
|
||||
|
||||
forAll (patchFaces, faceI)
|
||||
forAll(patchFaces, faceI)
|
||||
{
|
||||
const face& curFace = patchFaces[faceI];
|
||||
|
||||
@ -462,7 +462,7 @@ Foam::polyMesh::polyMesh
|
||||
|
||||
bool found = false;
|
||||
|
||||
forAll (facesOfCellInside, cellFaceI)
|
||||
forAll(facesOfCellInside, cellFaceI)
|
||||
{
|
||||
if (facesOfCellInside[cellFaceI] == curFace)
|
||||
{
|
||||
@ -541,7 +541,7 @@ Foam::polyMesh::polyMesh
|
||||
|
||||
// Warning: Patches can only be added once the face list is
|
||||
// completed, as they hold a subList of the face list
|
||||
forAll (boundaryFaces, patchI)
|
||||
forAll(boundaryFaces, patchI)
|
||||
{
|
||||
// add the patch to the list
|
||||
boundary_.set
|
||||
|
@ -185,7 +185,7 @@ Foam::polyMesh::readUpdateState Foam::polyMesh::readUpdate()
|
||||
wordList oldTypes = boundary_.types();
|
||||
wordList oldNames = boundary_.names();
|
||||
|
||||
forAll (oldTypes, patchI)
|
||||
forAll(oldTypes, patchI)
|
||||
{
|
||||
if
|
||||
(
|
||||
@ -208,14 +208,14 @@ Foam::polyMesh::readUpdateState Foam::polyMesh::readUpdate()
|
||||
boundary_.clear();
|
||||
boundary_.setSize(newBoundary.size());
|
||||
|
||||
forAll (newBoundary, patchI)
|
||||
forAll(newBoundary, patchI)
|
||||
{
|
||||
boundary_.set(patchI, newBoundary[patchI].clone(boundary_));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
forAll (boundary_, patchI)
|
||||
forAll(boundary_, patchI)
|
||||
{
|
||||
boundary_[patchI] = polyPatch
|
||||
(
|
||||
@ -296,7 +296,7 @@ Foam::polyMesh::readUpdateState Foam::polyMesh::readUpdate()
|
||||
}
|
||||
|
||||
// Reset existing ones
|
||||
forAll (pointZones_, czI)
|
||||
forAll(pointZones_, czI)
|
||||
{
|
||||
pointZones_[czI] = newPointZones[czI];
|
||||
}
|
||||
@ -333,7 +333,7 @@ Foam::polyMesh::readUpdateState Foam::polyMesh::readUpdate()
|
||||
}
|
||||
|
||||
// Reset existing ones
|
||||
forAll (faceZones_, fzI)
|
||||
forAll(faceZones_, fzI)
|
||||
{
|
||||
faceZones_[fzI].resetAddressing
|
||||
(
|
||||
@ -374,7 +374,7 @@ Foam::polyMesh::readUpdateState Foam::polyMesh::readUpdate()
|
||||
}
|
||||
|
||||
// Reset existing ones
|
||||
forAll (cellZones_, czI)
|
||||
forAll(cellZones_, czI)
|
||||
{
|
||||
cellZones_[czI] = newCellZones[czI];
|
||||
}
|
||||
|
@ -111,7 +111,7 @@ void Foam::polyMesh::initMesh(cellList& c)
|
||||
// get reference to face labels for current cell
|
||||
const labelList& cellfaces = c[cellI];
|
||||
|
||||
forAll (cellfaces, faceI)
|
||||
forAll(cellfaces, faceI)
|
||||
{
|
||||
if (!markedFaces[cellfaces[faceI]])
|
||||
{
|
||||
|
@ -308,7 +308,7 @@ void Foam::coupledPolyPatch::calcTransformTensors
|
||||
collocated_.setSize(Cf.size());
|
||||
collocated_ = false;
|
||||
|
||||
forAll (forwardT_, facei)
|
||||
forAll(forwardT_, facei)
|
||||
{
|
||||
forwardT_[facei] = rotationTensor(-nr[facei], nf[facei]);
|
||||
reverseT_[facei] = rotationTensor(nf[facei], -nr[facei]);
|
||||
|
@ -123,12 +123,7 @@ void Foam::genericPolyPatch::write(Ostream& os) const
|
||||
os.writeKeyword("nFaces") << size() << token::END_STATEMENT << nl;
|
||||
os.writeKeyword("startFace") << start() << token::END_STATEMENT << nl;
|
||||
|
||||
for
|
||||
(
|
||||
dictionary::const_iterator iter = dict_.begin();
|
||||
iter != dict_.end();
|
||||
++iter
|
||||
)
|
||||
forAllConstIter(dictionary, dict_, iter)
|
||||
{
|
||||
if
|
||||
(
|
||||
|
@ -275,7 +275,7 @@ Foam::tmp<Foam::vectorField> Foam::polyPatch::faceCellCentres() const
|
||||
|
||||
const unallocLabelList& faceCells = this->faceCells();
|
||||
|
||||
forAll (faceCells, facei)
|
||||
forAll(faceCells, facei)
|
||||
{
|
||||
cc[facei] = gcc[faceCells[facei]];
|
||||
}
|
||||
|
@ -50,7 +50,7 @@ void ZoneMesh<ZoneType, MeshType>::calcZoneMap() const
|
||||
// Count number of objects in all zones
|
||||
label nObjects = 0;
|
||||
|
||||
forAll (*this, zoneI)
|
||||
forAll(*this, zoneI)
|
||||
{
|
||||
nObjects += this->operator[](zoneI).size();
|
||||
}
|
||||
@ -60,11 +60,11 @@ void ZoneMesh<ZoneType, MeshType>::calcZoneMap() const
|
||||
|
||||
// Fill in objects of all zones into the map. The key is the global
|
||||
// object index and the result is the zone index
|
||||
forAll (*this, zoneI)
|
||||
forAll(*this, zoneI)
|
||||
{
|
||||
const labelList& zoneObjects = this->operator[](zoneI);
|
||||
|
||||
forAll (zoneObjects, objI)
|
||||
forAll(zoneObjects, objI)
|
||||
{
|
||||
zm.insert(zoneObjects[objI], zoneI);
|
||||
}
|
||||
@ -201,7 +201,7 @@ wordList ZoneMesh<ZoneType, MeshType>::types() const
|
||||
|
||||
wordList t(zones.size());
|
||||
|
||||
forAll (zones, zoneI)
|
||||
forAll(zones, zoneI)
|
||||
{
|
||||
t[zoneI] = zones[zoneI].type();
|
||||
}
|
||||
@ -218,7 +218,7 @@ wordList ZoneMesh<ZoneType, MeshType>::names() const
|
||||
|
||||
wordList t(zones.size());
|
||||
|
||||
forAll (zones, zoneI)
|
||||
forAll(zones, zoneI)
|
||||
{
|
||||
t[zoneI] = zones[zoneI].name();
|
||||
}
|
||||
@ -232,7 +232,7 @@ label ZoneMesh<ZoneType, MeshType>::findZoneID(const word& zoneName) const
|
||||
{
|
||||
const PtrList<ZoneType>& zones = *this;
|
||||
|
||||
forAll (zones, zoneI)
|
||||
forAll(zones, zoneI)
|
||||
{
|
||||
if (zones[zoneI].name() == zoneName)
|
||||
{
|
||||
@ -261,7 +261,7 @@ void ZoneMesh<ZoneType, MeshType>::clearAddressing()
|
||||
|
||||
PtrList<ZoneType>& zones = *this;
|
||||
|
||||
forAll (zones, zoneI)
|
||||
forAll(zones, zoneI)
|
||||
{
|
||||
zones[zoneI].clearAddressing();
|
||||
}
|
||||
@ -284,7 +284,7 @@ bool ZoneMesh<ZoneType, MeshType>::checkDefinition(const bool report) const
|
||||
|
||||
const PtrList<ZoneType>& zones = *this;
|
||||
|
||||
forAll (zones, zoneI)
|
||||
forAll(zones, zoneI)
|
||||
{
|
||||
inError |= zones[zoneI].checkDefinition(report);
|
||||
}
|
||||
@ -298,7 +298,7 @@ void ZoneMesh<ZoneType, MeshType>::movePoints(const pointField& p)
|
||||
{
|
||||
PtrList<ZoneType>& zones = *this;
|
||||
|
||||
forAll (zones, zoneI)
|
||||
forAll(zones, zoneI)
|
||||
{
|
||||
zones[zoneI].movePoints(p);
|
||||
}
|
||||
|
@ -77,7 +77,7 @@ void Foam::faceZone::calcFaceZonePatch() const
|
||||
const labelList& addr = *this;
|
||||
const boolList& flip = flipMap();
|
||||
|
||||
forAll (addr, faceI)
|
||||
forAll(addr, faceI)
|
||||
{
|
||||
if (flip[faceI])
|
||||
{
|
||||
@ -133,7 +133,7 @@ void Foam::faceZone::calcCellLayers() const
|
||||
slaveCellsPtr_ = new labelList(mf.size());
|
||||
labelList& sc = *slaveCellsPtr_;
|
||||
|
||||
forAll (mf, faceI)
|
||||
forAll(mf, faceI)
|
||||
{
|
||||
label ownCellI = own[mf[faceI]];
|
||||
label neiCellI =
|
||||
@ -346,7 +346,7 @@ const Foam::labelList& Foam::faceZone::meshEdges() const
|
||||
//
|
||||
//const labelList& faceLabels = *this;
|
||||
//
|
||||
//forAll (faceCells, faceI)
|
||||
//forAll(faceCells, faceI)
|
||||
//{
|
||||
// faceCells[faceI] = own[faceLabels[faceI]];
|
||||
//}
|
||||
|
@ -78,7 +78,7 @@ calcAddressing() const
|
||||
|
||||
// Guess the max number of edges and neighbours for a face
|
||||
label maxEdges = 0;
|
||||
forAll (locFcs, faceI)
|
||||
forAll(locFcs, faceI)
|
||||
{
|
||||
maxEdges += locFcs[faceI].size();
|
||||
}
|
||||
@ -103,14 +103,14 @@ calcAddressing() const
|
||||
// initialise the lists of subshapes for each face to avoid duplication
|
||||
edgeListList faceIntoEdges(locFcs.size());
|
||||
|
||||
forAll (locFcs, faceI)
|
||||
forAll(locFcs, faceI)
|
||||
{
|
||||
faceIntoEdges[faceI] = locFcs[faceI].edges();
|
||||
|
||||
labelList& curFaceEdges = faceEdges[faceI];
|
||||
curFaceEdges.setSize(faceIntoEdges[faceI].size());
|
||||
|
||||
forAll (curFaceEdges, faceEdgeI)
|
||||
forAll(curFaceEdges, faceEdgeI)
|
||||
{
|
||||
curFaceEdges[faceEdgeI] = -1;
|
||||
}
|
||||
@ -128,7 +128,7 @@ calcAddressing() const
|
||||
// in face (i.e. curEdges[0] is edge between f[0] and f[1])
|
||||
|
||||
// For all local faces ...
|
||||
forAll (locFcs, faceI)
|
||||
forAll(locFcs, faceI)
|
||||
{
|
||||
// Get reference to vertices of current face and corresponding edges.
|
||||
const Face& curF = locFcs[faceI];
|
||||
@ -141,7 +141,7 @@ calcAddressing() const
|
||||
label nNeighbours = 0;
|
||||
|
||||
// For all edges ...
|
||||
forAll (curEdges, edgeI)
|
||||
forAll(curEdges, edgeI)
|
||||
{
|
||||
// If the edge is already detected, skip
|
||||
if (faceEdges[faceI][edgeI] >= 0) continue;
|
||||
@ -155,7 +155,7 @@ calcAddressing() const
|
||||
|
||||
const labelList& nbrFaces = pf[e.start()];
|
||||
|
||||
forAll (nbrFaces, nbrFaceI)
|
||||
forAll(nbrFaces, nbrFaceI)
|
||||
{
|
||||
// set reference to the current neighbour
|
||||
label curNei = nbrFaces[nbrFaceI];
|
||||
@ -166,7 +166,7 @@ calcAddressing() const
|
||||
// get the reference to subshapes of the neighbour
|
||||
const edgeList& searchEdges = faceIntoEdges[curNei];
|
||||
|
||||
forAll (searchEdges, neiEdgeI)
|
||||
forAll(searchEdges, neiEdgeI)
|
||||
{
|
||||
if (searchEdges[neiEdgeI] == e)
|
||||
{
|
||||
@ -204,7 +204,7 @@ calcAddressing() const
|
||||
label nextNei = -1;
|
||||
label minNei = locFcs.size();
|
||||
|
||||
forAll (neiFaces, nfI)
|
||||
forAll(neiFaces, nfI)
|
||||
{
|
||||
if (neiFaces[nfI].size() && neiFaces[nfI][0] < minNei)
|
||||
{
|
||||
@ -229,7 +229,7 @@ calcAddressing() const
|
||||
curEf.setSize(cnf.size() + 1);
|
||||
curEf[0] = faceI;
|
||||
|
||||
forAll (cnf, cnfI)
|
||||
forAll(cnf, cnfI)
|
||||
{
|
||||
faceEdges[cnf[cnfI]][eonf[cnfI]] = nEdges;
|
||||
|
||||
@ -259,11 +259,11 @@ calcAddressing() const
|
||||
|
||||
// Do boundary faces
|
||||
|
||||
forAll (faceEdges, faceI)
|
||||
forAll(faceEdges, faceI)
|
||||
{
|
||||
labelList& curEdges = faceEdges[faceI];
|
||||
|
||||
forAll (curEdges, edgeI)
|
||||
forAll(curEdges, edgeI)
|
||||
{
|
||||
if (curEdges[edgeI] < 0)
|
||||
{
|
||||
@ -291,7 +291,7 @@ calcAddressing() const
|
||||
faceFacesPtr_ = new labelListList(locFcs.size());
|
||||
labelListList& faceFaces = *faceFacesPtr_;
|
||||
|
||||
forAll (faceFaces, faceI)
|
||||
forAll(faceFaces, faceI)
|
||||
{
|
||||
faceFaces[faceI].transfer(ff[faceI]);
|
||||
}
|
||||
|
@ -80,7 +80,7 @@ calcLocalPointOrder() const
|
||||
|
||||
label nPoints = 0;
|
||||
|
||||
forAll (lf, faceI)
|
||||
forAll(lf, faceI)
|
||||
{
|
||||
if (!visitedFace[faceI])
|
||||
{
|
||||
@ -99,7 +99,7 @@ calcLocalPointOrder() const
|
||||
const labelList& curPoints = lf[curFace];
|
||||
|
||||
// mark points
|
||||
forAll (curPoints, pointI)
|
||||
forAll(curPoints, pointI)
|
||||
{
|
||||
if (!visitedPoint[curPoints[pointI]])
|
||||
{
|
||||
@ -114,7 +114,7 @@ calcLocalPointOrder() const
|
||||
// add face neighbours to the list
|
||||
const labelList& nbrs = ff[curFace];
|
||||
|
||||
forAll (nbrs, nbrI)
|
||||
forAll(nbrs, nbrI)
|
||||
{
|
||||
if (!visitedFace[nbrs[nbrI]])
|
||||
{
|
||||
|
@ -67,7 +67,7 @@ meshEdges
|
||||
|
||||
// WARNING: Remember that local edges address into local point list;
|
||||
// local-to-global point label translation is necessary
|
||||
forAll (PatchEdges, edgeI)
|
||||
forAll(PatchEdges, edgeI)
|
||||
{
|
||||
const edge curEdge
|
||||
(pp[PatchEdges[edgeI].start()], pp[PatchEdges[edgeI].end()]);
|
||||
@ -77,7 +77,7 @@ meshEdges
|
||||
// get the patch faces sharing the edge
|
||||
const labelList& curFaces = EdgeFaces[edgeI];
|
||||
|
||||
forAll (curFaces, faceI)
|
||||
forAll(curFaces, faceI)
|
||||
{
|
||||
// get the cell next to the face
|
||||
label curCell = faceCells[curFaces[faceI]];
|
||||
@ -85,7 +85,7 @@ meshEdges
|
||||
// get reference to edges on the cell
|
||||
const labelList& ce = cellEdges[curCell];
|
||||
|
||||
forAll (ce, cellEdgeI)
|
||||
forAll(ce, cellEdgeI)
|
||||
{
|
||||
if (allEdges[ce[cellEdgeI]] == curEdge)
|
||||
{
|
||||
@ -139,14 +139,14 @@ meshEdges
|
||||
|
||||
// WARNING: Remember that local edges address into local point list;
|
||||
// local-to-global point label translation is necessary
|
||||
forAll (PatchEdges, edgeI)
|
||||
forAll(PatchEdges, edgeI)
|
||||
{
|
||||
const label globalPointI = pp[PatchEdges[edgeI].start()];
|
||||
const edge curEdge(globalPointI, pp[PatchEdges[edgeI].end()]);
|
||||
|
||||
const labelList& pe = pointEdges[globalPointI];
|
||||
|
||||
forAll (pe, i)
|
||||
forAll(pe, i)
|
||||
{
|
||||
if (allEdges[pe[i]] == curEdge)
|
||||
{
|
||||
@ -183,7 +183,7 @@ whichEdge
|
||||
{
|
||||
const labelList& pe = pointEdges()[e.start()];
|
||||
|
||||
forAll (pe, peI)
|
||||
forAll(pe, peI)
|
||||
{
|
||||
if (e == Edges[pe[peI]])
|
||||
{
|
||||
|
@ -67,7 +67,7 @@ calcPointEdges() const
|
||||
// set up storage for pointEdges
|
||||
List<SLList<label> > pointEdges(meshPoints().size());
|
||||
|
||||
forAll (e, edgeI)
|
||||
forAll(e, edgeI)
|
||||
{
|
||||
pointEdges[e[edgeI].start()].append(edgeI);
|
||||
pointEdges[e[edgeI].end()].append(edgeI);
|
||||
@ -78,19 +78,14 @@ calcPointEdges() const
|
||||
|
||||
labelListList& pe = *pointEdgesPtr_;
|
||||
|
||||
forAll (pointEdges, pointI)
|
||||
forAll(pointEdges, pointI)
|
||||
{
|
||||
pe[pointI].setSize(pointEdges[pointI].size());
|
||||
|
||||
label i = 0;
|
||||
for
|
||||
(
|
||||
SLList<label>::iterator curEdgesIter = pointEdges[pointI].begin();
|
||||
curEdgesIter != pointEdges[pointI].end();
|
||||
++curEdgesIter, ++i
|
||||
)
|
||||
forAllIter(SLList<label>, pointEdges[pointI], curEdgesIter)
|
||||
{
|
||||
pe[pointI][i] = curEdgesIter();
|
||||
pe[pointI][i++] = curEdgesIter();
|
||||
}
|
||||
}
|
||||
|
||||
@ -138,11 +133,11 @@ calcPointFaces() const
|
||||
// set up storage for pointFaces
|
||||
List<SLList<label> > pointFcs(meshPoints().size());
|
||||
|
||||
forAll (f, faceI)
|
||||
forAll(f, faceI)
|
||||
{
|
||||
const Face& curPoints = f[faceI];
|
||||
|
||||
forAll (curPoints, pointI)
|
||||
forAll(curPoints, pointI)
|
||||
{
|
||||
pointFcs[curPoints[pointI]].append(faceI);
|
||||
}
|
||||
@ -153,19 +148,14 @@ calcPointFaces() const
|
||||
|
||||
labelListList& pf = *pointFacesPtr_;
|
||||
|
||||
forAll (pointFcs, pointI)
|
||||
forAll(pointFcs, pointI)
|
||||
{
|
||||
pf[pointI].setSize(pointFcs[pointI].size());
|
||||
|
||||
label i = 0;
|
||||
for
|
||||
(
|
||||
SLList<label>::iterator curFacesIter = pointFcs[pointI].begin();
|
||||
curFacesIter != pointFcs[pointI].end();
|
||||
++curFacesIter, ++i
|
||||
)
|
||||
forAllIter(SLList<label>, pointFcs[pointI], curFacesIter)
|
||||
{
|
||||
pf[pointI][i] = curFacesIter();
|
||||
pf[pointI][i++] = curFacesIter();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -84,7 +84,7 @@ projectPoints
|
||||
// Estimate face centre of target side
|
||||
Field<PointType> masterFaceCentres(targetPatch.size());
|
||||
|
||||
forAll (masterFaceCentres, faceI)
|
||||
forAll(masterFaceCentres, faceI)
|
||||
{
|
||||
masterFaceCentres[faceI] =
|
||||
average(masterFaces[faceI].points(masterPoints));
|
||||
@ -101,7 +101,7 @@ projectPoints
|
||||
label curFace = 0;
|
||||
label nNSquaredSearches = 0;
|
||||
|
||||
forAll (slavePointOrder, pointI)
|
||||
forAll(slavePointOrder, pointI)
|
||||
{
|
||||
// Pick up slave point and direction
|
||||
const label curLocalPointLabel = slavePointOrder[pointI];
|
||||
@ -179,7 +179,7 @@ projectPoints
|
||||
sqrDistance =
|
||||
magSqr(missPlanePoint - masterFaceCentres[curFace]);
|
||||
|
||||
forAll (masterNbrs, nbrI)
|
||||
forAll(masterNbrs, nbrI)
|
||||
{
|
||||
if
|
||||
(
|
||||
@ -224,7 +224,7 @@ projectPoints
|
||||
result[curLocalPointLabel] = objectHit(false, -1);
|
||||
scalar minDistance = GREAT;
|
||||
|
||||
forAll (masterFaces, faceI)
|
||||
forAll(masterFaces, faceI)
|
||||
{
|
||||
PointHit<PointType> curHit =
|
||||
masterFaces[faceI].ray
|
||||
@ -325,7 +325,7 @@ projectFaceCentres
|
||||
|
||||
const typename ToPatch::PointFieldType& masterPoints = targetPatch.points();
|
||||
|
||||
forAll (masterFaceCentres, faceI)
|
||||
forAll(masterFaceCentres, faceI)
|
||||
{
|
||||
masterFaceCentres[faceI] =
|
||||
masterFaces[faceI].centre(masterPoints);
|
||||
@ -348,7 +348,7 @@ projectFaceCentres
|
||||
label curFace = 0;
|
||||
label nNSquaredSearches = 0;
|
||||
|
||||
forAll (slaveFaceOrder, faceI)
|
||||
forAll(slaveFaceOrder, faceI)
|
||||
{
|
||||
// pick up slave point and direction
|
||||
const label curLocalFaceLabel = slaveFaceOrder[faceI];
|
||||
@ -425,7 +425,7 @@ projectFaceCentres
|
||||
|
||||
const labelList& masterNbrs = masterFaceFaces[curFace];
|
||||
|
||||
forAll (masterNbrs, nbrI)
|
||||
forAll(masterNbrs, nbrI)
|
||||
{
|
||||
if
|
||||
(
|
||||
@ -467,7 +467,7 @@ projectFaceCentres
|
||||
result[curLocalFaceLabel] = objectHit(false, -1);
|
||||
scalar minDistance = GREAT;
|
||||
|
||||
forAll (masterFaces, faceI)
|
||||
forAll(masterFaces, faceI)
|
||||
{
|
||||
PointHit<PointType> curHit =
|
||||
masterFaces[faceI].ray
|
||||
|
@ -49,7 +49,7 @@ void Foam::primitiveMesh::calcCellShapes() const
|
||||
cellShapesPtr_ = new cellShapeList(nCells());
|
||||
cellShapeList& cellShapes = *cellShapesPtr_;
|
||||
|
||||
forAll (cellShapes, celli)
|
||||
forAll(cellShapes, celli)
|
||||
{
|
||||
cellShapes[celli] = degenerateMatcher::match(*this, celli);
|
||||
}
|
||||
|
@ -63,7 +63,7 @@ void Foam::primitiveMesh::calcCellCells() const
|
||||
const labelList& own = faceOwner();
|
||||
const labelList& nei = faceNeighbour();
|
||||
|
||||
forAll (nei, faceI)
|
||||
forAll(nei, faceI)
|
||||
{
|
||||
ncc[own[faceI]]++;
|
||||
ncc[nei[faceI]]++;
|
||||
@ -77,13 +77,13 @@ void Foam::primitiveMesh::calcCellCells() const
|
||||
|
||||
// 2. Size and fill cellFaceAddr
|
||||
|
||||
forAll (cellCellAddr, cellI)
|
||||
forAll(cellCellAddr, cellI)
|
||||
{
|
||||
cellCellAddr[cellI].setSize(ncc[cellI]);
|
||||
}
|
||||
ncc = 0;
|
||||
|
||||
forAll (nei, faceI)
|
||||
forAll(nei, faceI)
|
||||
{
|
||||
label ownCellI = own[faceI];
|
||||
label neiCellI = nei[faceI];
|
||||
|
@ -90,13 +90,13 @@ void Foam::primitiveMesh::makeCellCentresAndVols
|
||||
vectorField cEst(nCells(), vector::zero);
|
||||
labelField nCellFaces(nCells(), 0);
|
||||
|
||||
forAll (own, facei)
|
||||
forAll(own, facei)
|
||||
{
|
||||
cEst[own[facei]] += fCtrs[facei];
|
||||
nCellFaces[own[facei]] += 1;
|
||||
}
|
||||
|
||||
forAll (nei, facei)
|
||||
forAll(nei, facei)
|
||||
{
|
||||
cEst[nei[facei]] += fCtrs[facei];
|
||||
nCellFaces[nei[facei]] += 1;
|
||||
@ -107,7 +107,7 @@ void Foam::primitiveMesh::makeCellCentresAndVols
|
||||
cEst[celli] /= nCellFaces[celli];
|
||||
}
|
||||
|
||||
forAll (own, facei)
|
||||
forAll(own, facei)
|
||||
{
|
||||
// Calculate 3*face-pyramid volume
|
||||
scalar pyr3Vol =
|
||||
@ -123,7 +123,7 @@ void Foam::primitiveMesh::makeCellCentresAndVols
|
||||
cellVols[own[facei]] += pyr3Vol;
|
||||
}
|
||||
|
||||
forAll (nei, facei)
|
||||
forAll(nei, facei)
|
||||
{
|
||||
// Calculate 3*face-pyramid volume
|
||||
scalar pyr3Vol =
|
||||
|
@ -69,13 +69,13 @@ void Foam::primitiveMesh::calcCellEdges() const
|
||||
const labelListList& fe = faceEdges();
|
||||
|
||||
// loop through the list again and add edges; checking for duplicates
|
||||
forAll (own, faceI)
|
||||
forAll(own, faceI)
|
||||
{
|
||||
DynamicList<label, edgesPerCell_>& curCellEdges = ce[own[faceI]];
|
||||
|
||||
const labelList& curEdges = fe[faceI];
|
||||
|
||||
forAll (curEdges, edgeI)
|
||||
forAll(curEdges, edgeI)
|
||||
{
|
||||
if (findIndex(curCellEdges, curEdges[edgeI]) == -1)
|
||||
{
|
||||
@ -85,13 +85,13 @@ void Foam::primitiveMesh::calcCellEdges() const
|
||||
}
|
||||
}
|
||||
|
||||
forAll (nei, faceI)
|
||||
forAll(nei, faceI)
|
||||
{
|
||||
DynamicList<label, edgesPerCell_>& curCellEdges = ce[nei[faceI]];
|
||||
|
||||
const labelList& curEdges = fe[faceI];
|
||||
|
||||
forAll (curEdges, edgeI)
|
||||
forAll(curEdges, edgeI)
|
||||
{
|
||||
if (findIndex(curCellEdges, curEdges[edgeI]) == -1)
|
||||
{
|
||||
@ -105,7 +105,7 @@ void Foam::primitiveMesh::calcCellEdges() const
|
||||
labelListList& cellEdgeAddr = *cePtr_;
|
||||
|
||||
// reset the size
|
||||
forAll (ce, cellI)
|
||||
forAll(ce, cellI)
|
||||
{
|
||||
cellEdgeAddr[cellI].transfer(ce[cellI]);
|
||||
}
|
||||
|
@ -52,12 +52,12 @@ void Foam::primitiveMesh::calcCells
|
||||
|
||||
labelList ncf(nCells, 0);
|
||||
|
||||
forAll (own, faceI)
|
||||
forAll(own, faceI)
|
||||
{
|
||||
ncf[own[faceI]]++;
|
||||
}
|
||||
|
||||
forAll (nei, faceI)
|
||||
forAll(nei, faceI)
|
||||
{
|
||||
if (nei[faceI] >= 0)
|
||||
{
|
||||
@ -71,20 +71,20 @@ void Foam::primitiveMesh::calcCells
|
||||
|
||||
// 2. Size and fill cellFaceAddr
|
||||
|
||||
forAll (cellFaceAddr, cellI)
|
||||
forAll(cellFaceAddr, cellI)
|
||||
{
|
||||
cellFaceAddr[cellI].setSize(ncf[cellI]);
|
||||
}
|
||||
ncf = 0;
|
||||
|
||||
forAll (own, faceI)
|
||||
forAll(own, faceI)
|
||||
{
|
||||
label cellI = own[faceI];
|
||||
|
||||
cellFaceAddr[cellI][ncf[cellI]++] = faceI;
|
||||
}
|
||||
|
||||
forAll (nei, faceI)
|
||||
forAll(nei, faceI)
|
||||
{
|
||||
label cellI = nei[faceI];
|
||||
|
||||
|
@ -113,7 +113,7 @@ bool Foam::primitiveMesh::checkClosedCells
|
||||
|
||||
label nErrorClosed = 0;
|
||||
|
||||
forAll (c, cI)
|
||||
forAll(c, cI)
|
||||
{
|
||||
const cell& curCell = c[cI];
|
||||
|
||||
@ -149,14 +149,14 @@ bool Foam::primitiveMesh::checkClosedCells
|
||||
const labelList& nei = faceNeighbour();
|
||||
const vectorField& areas = faceAreas();
|
||||
|
||||
forAll (own, faceI)
|
||||
forAll(own, faceI)
|
||||
{
|
||||
// Add to owner
|
||||
sumClosed[own[faceI]] += areas[faceI];
|
||||
sumMagClosed[own[faceI]] += cmptMag(areas[faceI]);
|
||||
}
|
||||
|
||||
forAll (nei, faceI)
|
||||
forAll(nei, faceI)
|
||||
{
|
||||
// Subtract from neighbour
|
||||
sumClosed[nei[faceI]] -= areas[faceI];
|
||||
@ -172,7 +172,7 @@ bool Foam::primitiveMesh::checkClosedCells
|
||||
const scalarField& vols = cellVolumes();
|
||||
|
||||
// Check the sums
|
||||
forAll (sumClosed, cellI)
|
||||
forAll(sumClosed, cellI)
|
||||
{
|
||||
scalar maxOpenness = 0;
|
||||
|
||||
@ -281,7 +281,7 @@ bool Foam::primitiveMesh::checkFaceAreas
|
||||
scalar minArea = GREAT;
|
||||
scalar maxArea = -GREAT;
|
||||
|
||||
forAll (magFaceAreas, faceI)
|
||||
forAll(magFaceAreas, faceI)
|
||||
{
|
||||
if (magFaceAreas[faceI] < VSMALL)
|
||||
{
|
||||
@ -342,7 +342,7 @@ bool Foam::primitiveMesh::checkCellVolumes
|
||||
|
||||
label nNegVolCells = 0;
|
||||
|
||||
forAll (vols, cellI)
|
||||
forAll(vols, cellI)
|
||||
{
|
||||
if (vols[cellI] < VSMALL)
|
||||
{
|
||||
@ -421,7 +421,7 @@ bool Foam::primitiveMesh::checkFaceOrthogonality
|
||||
|
||||
label errorNonOrth = 0;
|
||||
|
||||
forAll (nei, faceI)
|
||||
forAll(nei, faceI)
|
||||
{
|
||||
vector d = centres[nei[faceI]] - centres[own[faceI]];
|
||||
const vector& s = areas[faceI];
|
||||
@ -534,7 +534,7 @@ bool Foam::primitiveMesh::checkFacePyramids
|
||||
|
||||
label nErrorPyrs = 0;
|
||||
|
||||
forAll (f, faceI)
|
||||
forAll(f, faceI)
|
||||
{
|
||||
// Create the owner pyramid - it will have negative volume
|
||||
scalar pyrVol = pyramidPointFaceRef(f[faceI], ctrs[own[faceI]]).mag(p);
|
||||
@ -619,7 +619,7 @@ bool Foam::primitiveMesh::checkFaceTets
|
||||
|
||||
label nErrorPyrs = 0;
|
||||
|
||||
forAll (fcs, faceI)
|
||||
forAll(fcs, faceI)
|
||||
{
|
||||
// Create the owner tets - they will have negative volume
|
||||
const face& f = fcs[faceI];
|
||||
@ -863,7 +863,7 @@ bool Foam::primitiveMesh::checkPoints
|
||||
|
||||
const labelListList& pf = pointFaces();
|
||||
|
||||
forAll (pf, pointI)
|
||||
forAll(pf, pointI)
|
||||
{
|
||||
if (pf[pointI].empty())
|
||||
{
|
||||
@ -877,7 +877,7 @@ bool Foam::primitiveMesh::checkPoints
|
||||
}
|
||||
|
||||
|
||||
forAll (pf, pointI)
|
||||
forAll(pf, pointI)
|
||||
{
|
||||
const labelList& pc = pointCells(pointI);
|
||||
|
||||
@ -1360,7 +1360,7 @@ bool Foam::primitiveMesh::checkUpperTriangular
|
||||
// and add it to the check list (upper triangular order).
|
||||
// Once the list is completed, check it against the faceCell list
|
||||
|
||||
forAll (c, cellI)
|
||||
forAll(c, cellI)
|
||||
{
|
||||
const labelList& curFaces = c[cellI];
|
||||
|
||||
@ -1498,7 +1498,7 @@ bool Foam::primitiveMesh::checkCellsZipUp
|
||||
const faceList& f = faces();
|
||||
const cellList& c = cells();
|
||||
|
||||
forAll (c, cellI)
|
||||
forAll(c, cellI)
|
||||
{
|
||||
const labelList& curFaces = c[cellI];
|
||||
|
||||
@ -1506,15 +1506,15 @@ bool Foam::primitiveMesh::checkCellsZipUp
|
||||
|
||||
labelList edgeUsage(cellEdges.size(), 0);
|
||||
|
||||
forAll (curFaces, faceI)
|
||||
forAll(curFaces, faceI)
|
||||
{
|
||||
edgeList curFaceEdges = f[curFaces[faceI]].edges();
|
||||
|
||||
forAll (curFaceEdges, faceEdgeI)
|
||||
forAll(curFaceEdges, faceEdgeI)
|
||||
{
|
||||
const edge& curEdge = curFaceEdges[faceEdgeI];
|
||||
|
||||
forAll (cellEdges, cellEdgeI)
|
||||
forAll(cellEdges, cellEdgeI)
|
||||
{
|
||||
if (cellEdges[cellEdgeI] == curEdge)
|
||||
{
|
||||
@ -1528,7 +1528,7 @@ bool Foam::primitiveMesh::checkCellsZipUp
|
||||
edgeList singleEdges(cellEdges.size());
|
||||
label nSingleEdges = 0;
|
||||
|
||||
forAll (edgeUsage, edgeI)
|
||||
forAll(edgeUsage, edgeI)
|
||||
{
|
||||
if (edgeUsage[edgeI] == 1)
|
||||
{
|
||||
@ -1599,7 +1599,7 @@ bool Foam::primitiveMesh::checkFaceVertices
|
||||
|
||||
label nErrorFaces = 0;
|
||||
|
||||
forAll (f, fI)
|
||||
forAll(f, fI)
|
||||
{
|
||||
const face& curFace = f[fI];
|
||||
|
||||
@ -1995,7 +1995,7 @@ bool Foam::primitiveMesh::checkCellDeterminant
|
||||
scalar sumDet = 0;
|
||||
label nSummed = 0;
|
||||
|
||||
forAll (c, cellI)
|
||||
forAll(c, cellI)
|
||||
{
|
||||
const labelList& curFaces = c[cellI];
|
||||
|
||||
@ -2114,7 +2114,7 @@ bool Foam::primitiveMesh::checkConcaveCells
|
||||
|
||||
label nConcaveCells = 0;
|
||||
|
||||
forAll (c, cellI)
|
||||
forAll(c, cellI)
|
||||
{
|
||||
const cell& cFaces = c[cellI];
|
||||
|
||||
|
@ -68,7 +68,7 @@ bool Foam::primitiveMesh::checkMeshMotion
|
||||
scalar minVolume = GREAT;
|
||||
label nNegVols = 0;
|
||||
|
||||
forAll (cellVols, cellI)
|
||||
forAll(cellVols, cellI)
|
||||
{
|
||||
if (cellVols[cellI] < VSMALL)
|
||||
{
|
||||
@ -108,7 +108,7 @@ bool Foam::primitiveMesh::checkMeshMotion
|
||||
label nPyrErrors = 0;
|
||||
label nDotProductErrors = 0;
|
||||
|
||||
forAll (f, faceI)
|
||||
forAll(f, faceI)
|
||||
{
|
||||
const scalar a = Foam::mag(fAreas[faceI]);
|
||||
|
||||
|
@ -79,7 +79,7 @@ void Foam::primitiveMesh::makeFaceCentresAndAreas
|
||||
{
|
||||
const faceList& fs = faces();
|
||||
|
||||
forAll (fs, facei)
|
||||
forAll(fs, facei)
|
||||
{
|
||||
const labelList& f = fs[facei];
|
||||
label nPoints = f.size();
|
||||
|
@ -42,7 +42,7 @@ bool Foam::primitiveMesh::pointInCellBB(const point& p, label celli) const
|
||||
vector bbmax = -GREAT*vector::one;
|
||||
vector bbmin = GREAT*vector::one;
|
||||
|
||||
forAll (cellVertices, vertexI)
|
||||
forAll(cellVertices, vertexI)
|
||||
{
|
||||
bbmax = max(bbmax, points[cellVertices[vertexI]]);
|
||||
bbmin = min(bbmin, points[cellVertices[vertexI]]);
|
||||
|
@ -63,11 +63,11 @@ void Foam::primitiveMesh::calcPointCells() const
|
||||
|
||||
labelList npc(nPoints(), 0);
|
||||
|
||||
forAll (cf, cellI)
|
||||
forAll(cf, cellI)
|
||||
{
|
||||
const labelList curPoints = cf[cellI].labels(faces());
|
||||
|
||||
forAll (curPoints, pointI)
|
||||
forAll(curPoints, pointI)
|
||||
{
|
||||
label ptI = curPoints[pointI];
|
||||
|
||||
@ -81,18 +81,18 @@ void Foam::primitiveMesh::calcPointCells() const
|
||||
pcPtr_ = new labelListList(npc.size());
|
||||
labelListList& pointCellAddr = *pcPtr_;
|
||||
|
||||
forAll (pointCellAddr, pointI)
|
||||
forAll(pointCellAddr, pointI)
|
||||
{
|
||||
pointCellAddr[pointI].setSize(npc[pointI]);
|
||||
}
|
||||
npc = 0;
|
||||
|
||||
|
||||
forAll (cf, cellI)
|
||||
forAll(cf, cellI)
|
||||
{
|
||||
const labelList curPoints = cf[cellI].labels(faces());
|
||||
|
||||
forAll (curPoints, pointI)
|
||||
forAll(curPoints, pointI)
|
||||
{
|
||||
label ptI = curPoints[pointI];
|
||||
|
||||
|
@ -60,11 +60,11 @@ void Foam::primitiveMesh::calcPointPoints() const
|
||||
ppPtr_ = new labelListList(pe.size());
|
||||
labelListList& pp = *ppPtr_;
|
||||
|
||||
forAll (pe, pointI)
|
||||
forAll(pe, pointI)
|
||||
{
|
||||
pp[pointI].setSize(pe[pointI].size());
|
||||
|
||||
forAll (pe[pointI], ppi)
|
||||
forAll(pe[pointI], ppi)
|
||||
{
|
||||
if (e[pe[pointI][ppi]].start() == pointI)
|
||||
{
|
||||
|
@ -79,7 +79,7 @@ Foam::ensightPartFaces::ensightPartFaces
|
||||
label nQuad = 0;
|
||||
label nPoly = 0;
|
||||
|
||||
forAll (pPatch, patchfaceI)
|
||||
forAll(pPatch, patchfaceI)
|
||||
{
|
||||
const face& f = pMesh.faces()[patchfaceI + offset_];
|
||||
|
||||
|
@ -127,7 +127,7 @@ void Foam::meshWriters::STARCD::getCellTable()
|
||||
// get the cellZone <-> cellTable correspondence
|
||||
Info<< "matching cellZones to cellTable" << endl;
|
||||
|
||||
forAll (mesh_.cellZones(), zoneI)
|
||||
forAll(mesh_.cellZones(), zoneI)
|
||||
{
|
||||
const cellZone& cZone = mesh_.cellZones()[zoneI];
|
||||
if (cZone.size())
|
||||
@ -144,7 +144,7 @@ void Foam::meshWriters::STARCD::getCellTable()
|
||||
tableId = cellTable_.append(dict);
|
||||
}
|
||||
|
||||
forAll (cZone, i)
|
||||
forAll(cZone, i)
|
||||
{
|
||||
cellTableId_[cZone[i]] = tableId;
|
||||
}
|
||||
@ -159,7 +159,7 @@ void Foam::meshWriters::STARCD::getCellTable()
|
||||
dict.add("MaterialType", "fluid");
|
||||
label tableId = cellTable_.append(dict);
|
||||
|
||||
forAll (cellTableId_, i)
|
||||
forAll(cellTableId_, i)
|
||||
{
|
||||
if (cellTableId_[i] < 0)
|
||||
{
|
||||
|
@ -112,7 +112,7 @@ void Foam::attachDetach::checkDefinition()
|
||||
|
||||
DynamicList<label> bouFacesInZone(addr.size());
|
||||
|
||||
forAll (addr, faceI)
|
||||
forAll(addr, faceI)
|
||||
{
|
||||
if (!mesh.isInternalFace(addr[faceI]))
|
||||
{
|
||||
@ -180,7 +180,7 @@ void Foam::attachDetach::checkDefinition()
|
||||
|
||||
DynamicList<label> zoneProblemFaces(addr.size());
|
||||
|
||||
forAll (addr, faceI)
|
||||
forAll(addr, faceI)
|
||||
{
|
||||
label facePatch =
|
||||
mesh.boundaryMesh().whichPatch(addr[faceI]);
|
||||
|
@ -76,7 +76,7 @@ void Foam::attachDetach::calcPointMatchMap() const
|
||||
|
||||
const label slavePatchStart = slavePatch.start();
|
||||
|
||||
forAll (reverseSlavePatch, faceI)
|
||||
forAll(reverseSlavePatch, faceI)
|
||||
{
|
||||
reverseSlavePatch[faceI] =
|
||||
faces[slavePatchStart + faceI].reverseFace();
|
||||
@ -92,12 +92,12 @@ void Foam::attachDetach::calcPointMatchMap() const
|
||||
pointMatchMapPtr_ = new Map<label>(2*slaveMeshPoints.size());
|
||||
Map<label>& removedPointMap = *pointMatchMapPtr_;
|
||||
|
||||
forAll (masterLocalFaces, faceI)
|
||||
forAll(masterLocalFaces, faceI)
|
||||
{
|
||||
const face& curMasterPoints = masterLocalFaces[faceI];
|
||||
const face& curSlavePoints = slaveLocalFaces[faceI];
|
||||
|
||||
forAll (curMasterPoints, pointI)
|
||||
forAll(curMasterPoints, pointI)
|
||||
{
|
||||
// If the master and slave point labels are the same, the
|
||||
// point remains. Otherwise, the slave point is removed and
|
||||
|
@ -81,7 +81,7 @@ void Foam::attachDetach::attachInterface
|
||||
|
||||
const labelList removedPoints = removedPointMap.toc();
|
||||
|
||||
forAll (removedPoints, pointI)
|
||||
forAll(removedPoints, pointI)
|
||||
{
|
||||
ref.setAction(polyRemovePoint(removedPoints[pointI]));
|
||||
}
|
||||
@ -100,7 +100,7 @@ void Foam::attachDetach::attachInterface
|
||||
|
||||
const boolList& mfFlip = mesh.faceZones()[faceZoneID_.index()].flipMap();
|
||||
|
||||
forAll (masterFaceCells, faceI)
|
||||
forAll(masterFaceCells, faceI)
|
||||
{
|
||||
// If slave neighbour is greater than master, face does not need
|
||||
// turning. Modify it to become internal
|
||||
@ -155,11 +155,11 @@ void Foam::attachDetach::attachInterface
|
||||
|
||||
// Grab all the faces off the points in the slave patch. If the face has
|
||||
// not been removed, add it to the map of faces to renumber
|
||||
forAll (slaveMeshPoints, pointI)
|
||||
forAll(slaveMeshPoints, pointI)
|
||||
{
|
||||
const labelList& curFaces = pf[slaveMeshPoints[pointI]];
|
||||
|
||||
forAll (curFaces, faceI)
|
||||
forAll(curFaces, faceI)
|
||||
{
|
||||
if (!ref.faceRemoved(curFaces[faceI]))
|
||||
{
|
||||
@ -171,7 +171,7 @@ void Foam::attachDetach::attachInterface
|
||||
// Grab the faces to be renumbered
|
||||
const labelList ftm = facesToModifyMap.toc();
|
||||
|
||||
forAll (ftm, faceI)
|
||||
forAll(ftm, faceI)
|
||||
{
|
||||
// For every face to modify, copy the face and re-map the vertices.
|
||||
// It is known all the faces will be changed since they hang off
|
||||
@ -180,7 +180,7 @@ void Foam::attachDetach::attachInterface
|
||||
|
||||
face newFace(faces[curFaceID]);
|
||||
|
||||
forAll (newFace, pointI)
|
||||
forAll(newFace, pointI)
|
||||
{
|
||||
Map<label>::const_iterator rpmIter =
|
||||
removedPointMap.find(newFace[pointI]);
|
||||
@ -267,7 +267,7 @@ void Foam::attachDetach::modifyMotionPoints
|
||||
// Calculate the difference in motion point positions
|
||||
scalar pointDiff = 0;
|
||||
|
||||
forAll (removedPoints, pointI)
|
||||
forAll(removedPoints, pointI)
|
||||
{
|
||||
pointDiff +=
|
||||
mag
|
||||
@ -284,7 +284,7 @@ void Foam::attachDetach::modifyMotionPoints
|
||||
}
|
||||
|
||||
// Put the slave point on top of the master point
|
||||
forAll (removedPoints, pointI)
|
||||
forAll(removedPoints, pointI)
|
||||
{
|
||||
motionPoints[removedPoints[pointI]] =
|
||||
motionPoints[removedPointMap.find(removedPoints[pointI])()];
|
||||
|
@ -127,7 +127,7 @@ void Foam::attachDetach::detachInterface
|
||||
|
||||
bool edgeIsInternal = true;
|
||||
|
||||
forAll (curFaces, faceI)
|
||||
forAll(curFaces, faceI)
|
||||
{
|
||||
if (!mesh.isInternalFace(curFaces[faceI]))
|
||||
{
|
||||
@ -149,7 +149,7 @@ void Foam::attachDetach::detachInterface
|
||||
// Pout << "addedPoints before point creation: " << addedPoints << endl;
|
||||
|
||||
// Create new points for face zone
|
||||
forAll (addedPoints, pointI)
|
||||
forAll(addedPoints, pointI)
|
||||
{
|
||||
if (addedPoints[pointI] < 0)
|
||||
{
|
||||
@ -181,7 +181,7 @@ void Foam::attachDetach::detachInterface
|
||||
const labelList& own = mesh.faceOwner();
|
||||
const labelList& nei = mesh.faceNeighbour();
|
||||
|
||||
forAll (mf, faceI)
|
||||
forAll(mf, faceI)
|
||||
{
|
||||
const label curFaceID = mf[faceI];
|
||||
|
||||
@ -190,7 +190,7 @@ void Foam::attachDetach::detachInterface
|
||||
|
||||
face newFace(oldFace.size());
|
||||
|
||||
forAll (oldFace, pointI)
|
||||
forAll(oldFace, pointI)
|
||||
{
|
||||
newFace[pointI] = addedPoints[oldFace[pointI]];
|
||||
}
|
||||
@ -313,11 +313,11 @@ void Foam::attachDetach::detachInterface
|
||||
|
||||
const cellList& cells = mesh.cells();
|
||||
|
||||
forAll (mc, cellI)
|
||||
forAll(mc, cellI)
|
||||
{
|
||||
const labelList& curFaces = cells[mc[cellI]];
|
||||
|
||||
forAll (curFaces, faceI)
|
||||
forAll(curFaces, faceI)
|
||||
{
|
||||
// Check if the face belongs to the master patch; if not add it
|
||||
if (zoneMesh.whichZone(curFaces[faceI]) != faceZoneID_.index())
|
||||
@ -333,7 +333,7 @@ void Foam::attachDetach::detachInterface
|
||||
// Make a map of master cells for quick reject
|
||||
labelHashSet mcMap(2*mc.size());
|
||||
|
||||
forAll (mc, mcI)
|
||||
forAll(mc, mcI)
|
||||
{
|
||||
mcMap.insert(mc[mcI]);
|
||||
}
|
||||
@ -343,7 +343,7 @@ void Foam::attachDetach::detachInterface
|
||||
// faces to the map
|
||||
const labelList mcf = masterCellFaceMap.toc();
|
||||
|
||||
forAll (mcf, mcfI)
|
||||
forAll(mcf, mcfI)
|
||||
{
|
||||
// Do the owner side
|
||||
const label ownCell = own[mcf[mcfI]];
|
||||
@ -353,7 +353,7 @@ void Foam::attachDetach::detachInterface
|
||||
// Cell not found. Add its faces to the map
|
||||
const cell& curFaces = cells[ownCell];
|
||||
|
||||
forAll (curFaces, faceI)
|
||||
forAll(curFaces, faceI)
|
||||
{
|
||||
masterCellFaceMap.insert(curFaces[faceI]);
|
||||
}
|
||||
@ -369,7 +369,7 @@ void Foam::attachDetach::detachInterface
|
||||
// Cell not found. Add its faces to the map
|
||||
const cell& curFaces = cells[neiCell];
|
||||
|
||||
forAll (curFaces, faceI)
|
||||
forAll(curFaces, faceI)
|
||||
{
|
||||
masterCellFaceMap.insert(curFaces[faceI]);
|
||||
}
|
||||
@ -381,7 +381,7 @@ void Foam::attachDetach::detachInterface
|
||||
// Create the master layer point map
|
||||
Map<label> masterLayerPointMap(2*mp.size());
|
||||
|
||||
forAll (mp, pointI)
|
||||
forAll(mp, pointI)
|
||||
{
|
||||
masterLayerPointMap.insert
|
||||
(
|
||||
@ -393,7 +393,7 @@ void Foam::attachDetach::detachInterface
|
||||
// Grab the list of faces of the master layer
|
||||
const labelList masterCellFaces = masterCellFaceMap.toc();
|
||||
|
||||
forAll (masterCellFaces, faceI)
|
||||
forAll(masterCellFaces, faceI)
|
||||
{
|
||||
// Attempt to renumber the face using the masterLayerPointMap.
|
||||
// Missing point remain the same
|
||||
@ -406,7 +406,7 @@ void Foam::attachDetach::detachInterface
|
||||
|
||||
bool changed = false;
|
||||
|
||||
forAll (oldFace, pointI)
|
||||
forAll(oldFace, pointI)
|
||||
{
|
||||
if (masterLayerPointMap.found(oldFace[pointI]))
|
||||
{
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user