mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
pedantic changes: 'forAll (' -> 'forAll(' in applications/
- to match coding guidelines
This commit is contained in:
@ -88,7 +88,7 @@ volScalarField DpDt =
|
|||||||
|
|
||||||
multivariateSurfaceInterpolationScheme<scalar>::fieldTable fields;
|
multivariateSurfaceInterpolationScheme<scalar>::fieldTable fields;
|
||||||
|
|
||||||
forAll (Y, i)
|
forAll(Y, i)
|
||||||
{
|
{
|
||||||
fields.add(Y[i]);
|
fields.add(Y[i]);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -77,7 +77,7 @@ volScalarField DpDt =
|
|||||||
|
|
||||||
multivariateSurfaceInterpolationScheme<scalar>::fieldTable fields;
|
multivariateSurfaceInterpolationScheme<scalar>::fieldTable fields;
|
||||||
|
|
||||||
forAll (Y, i)
|
forAll(Y, i)
|
||||||
{
|
{
|
||||||
fields.add(Y[i]);
|
fields.add(Y[i]);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -77,7 +77,7 @@ volScalarField DpDt =
|
|||||||
|
|
||||||
multivariateSurfaceInterpolationScheme<scalar>::fieldTable fields;
|
multivariateSurfaceInterpolationScheme<scalar>::fieldTable fields;
|
||||||
|
|
||||||
forAll (Y, i)
|
forAll(Y, i)
|
||||||
{
|
{
|
||||||
fields.add(Y[i]);
|
fields.add(Y[i]);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -28,7 +28,7 @@
|
|||||||
|
|
||||||
multivariateSurfaceInterpolationScheme<scalar>::fieldTable fields;
|
multivariateSurfaceInterpolationScheme<scalar>::fieldTable fields;
|
||||||
|
|
||||||
forAll (Y, i)
|
forAll(Y, i)
|
||||||
{
|
{
|
||||||
fields.add(Y[i]);
|
fields.add(Y[i]);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -84,7 +84,7 @@
|
|||||||
Info<< "Creating multi-variate interpolation scheme\n" << endl;
|
Info<< "Creating multi-variate interpolation scheme\n" << endl;
|
||||||
multivariateSurfaceInterpolationScheme<scalar>::fieldTable fields;
|
multivariateSurfaceInterpolationScheme<scalar>::fieldTable fields;
|
||||||
|
|
||||||
forAll (Y, i)
|
forAll(Y, i)
|
||||||
{
|
{
|
||||||
fields.add(Y[i]);
|
fields.add(Y[i]);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -90,7 +90,7 @@
|
|||||||
|
|
||||||
multivariateSurfaceInterpolationScheme<scalar>::fieldTable fields;
|
multivariateSurfaceInterpolationScheme<scalar>::fieldTable fields;
|
||||||
|
|
||||||
forAll (Y, i)
|
forAll(Y, i)
|
||||||
{
|
{
|
||||||
fields.add(Y[i]);
|
fields.add(Y[i]);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -89,7 +89,7 @@ Foam::tmp<Foam::volScalarField> Foam::GidaspowErgunWenYu::K
|
|||||||
volScalarField& KWenYu = tKWenYu();
|
volScalarField& KWenYu = tKWenYu();
|
||||||
|
|
||||||
// Ergun
|
// Ergun
|
||||||
forAll (beta, cellj)
|
forAll(beta, cellj)
|
||||||
{
|
{
|
||||||
if (beta[cellj] <= 0.8)
|
if (beta[cellj] <= 0.8)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -73,7 +73,7 @@ Foam::tmp<Foam::volScalarField> Foam::SyamlalOBrien::K
|
|||||||
volScalarField A = pow(beta, 4.14);
|
volScalarField A = pow(beta, 4.14);
|
||||||
volScalarField B = 0.8*pow(beta, 1.28);
|
volScalarField B = 0.8*pow(beta, 1.28);
|
||||||
|
|
||||||
forAll (beta, celli)
|
forAll(beta, celli)
|
||||||
{
|
{
|
||||||
if (beta[celli] > 0.85)
|
if (beta[celli] > 0.85)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -125,7 +125,7 @@ Foam::tmp<Foam::volScalarField> Foam::SchaefferFrictionalStress::muf
|
|||||||
|
|
||||||
volScalarField& muff = tmuf();
|
volScalarField& muff = tmuf();
|
||||||
|
|
||||||
forAll (D, celli)
|
forAll(D, celli)
|
||||||
{
|
{
|
||||||
if (alpha[celli] > alphaMax.value()-5e-2)
|
if (alpha[celli] > alphaMax.value()-5e-2)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -7,20 +7,20 @@
|
|||||||
labelListList neighbour = mesh.cellCells();
|
labelListList neighbour = mesh.cellCells();
|
||||||
scalarField cellVolumes = mesh.cellVolumes();
|
scalarField cellVolumes = mesh.cellVolumes();
|
||||||
|
|
||||||
forAll (alphaEx, celli)
|
forAll(alphaEx, celli)
|
||||||
{
|
{
|
||||||
// Finding the labels of the neighbouring cells
|
// Finding the labels of the neighbouring cells
|
||||||
labelList neighbourCell = neighbour[celli];
|
labelList neighbourCell = neighbour[celli];
|
||||||
|
|
||||||
// Initializing neighbouring cells contribution
|
// Initializing neighbouring cells contribution
|
||||||
scalar neighboursEx = 0.0;
|
scalar neighboursEx = 0.0;
|
||||||
|
|
||||||
forAll (neighbourCell, cellj)
|
forAll(neighbourCell, cellj)
|
||||||
{
|
{
|
||||||
labelList neighboursNeighbour = neighbour[neighbourCell[cellj]];
|
labelList neighboursNeighbour = neighbour[neighbourCell[cellj]];
|
||||||
scalar neighboursNeighbourCellVolumes = 0.0;
|
scalar neighboursNeighbourCellVolumes = 0.0;
|
||||||
|
|
||||||
forAll (neighboursNeighbour, cellk)
|
forAll(neighboursNeighbour, cellk)
|
||||||
{
|
{
|
||||||
neighboursNeighbourCellVolumes +=
|
neighboursNeighbourCellVolumes +=
|
||||||
cellVolumes[neighboursNeighbour[cellk]];
|
cellVolumes[neighboursNeighbour[cellk]];
|
||||||
|
|||||||
@ -73,7 +73,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
// Count walls
|
// Count walls
|
||||||
label nWalls = 0;
|
label nWalls = 0;
|
||||||
forAll (mesh.boundary(), patchI)
|
forAll(mesh.boundary(), patchI)
|
||||||
{
|
{
|
||||||
const fvPatch& patch = mesh.boundary()[patchI];
|
const fvPatch& patch = mesh.boundary()[patchI];
|
||||||
|
|
||||||
@ -87,13 +87,13 @@ int main(int argc, char *argv[])
|
|||||||
labelList changedFaces(nWalls);
|
labelList changedFaces(nWalls);
|
||||||
|
|
||||||
label nChangedFaces = 0;
|
label nChangedFaces = 0;
|
||||||
forAll (mesh.boundary(), patchI)
|
forAll(mesh.boundary(), patchI)
|
||||||
{
|
{
|
||||||
const fvPatch& patch = mesh.boundary()[patchI];
|
const fvPatch& patch = mesh.boundary()[patchI];
|
||||||
|
|
||||||
if (isA<wallFvPatch>(patch))
|
if (isA<wallFvPatch>(patch))
|
||||||
{
|
{
|
||||||
forAll (patch.Cf(), patchFaceI)
|
forAll(patch.Cf(), patchFaceI)
|
||||||
{
|
{
|
||||||
const polyPatch& polyPatch = mesh.boundaryMesh()[patchI];
|
const polyPatch& polyPatch = mesh.boundaryMesh()[patchI];
|
||||||
|
|
||||||
@ -170,7 +170,7 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Copy boundary values
|
// Copy boundary values
|
||||||
forAll (wallDistUncorrected.boundaryField(), patchI)
|
forAll(wallDistUncorrected.boundaryField(), patchI)
|
||||||
{
|
{
|
||||||
fvPatchScalarField& patchField =
|
fvPatchScalarField& patchField =
|
||||||
wallDistUncorrected.boundaryField()[patchI];
|
wallDistUncorrected.boundaryField()[patchI];
|
||||||
|
|||||||
@ -72,7 +72,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
PtrList<gasReaction> testReactions(nReactions);
|
PtrList<gasReaction> testReactions(nReactions);
|
||||||
|
|
||||||
forAll (testReactions, i)
|
forAll(testReactions, i)
|
||||||
{
|
{
|
||||||
testReactions.set
|
testReactions.set
|
||||||
(
|
(
|
||||||
|
|||||||
@ -53,7 +53,7 @@ labelList procNeighbours(const polyMesh& mesh)
|
|||||||
|
|
||||||
label nNeighbours = 0;
|
label nNeighbours = 0;
|
||||||
|
|
||||||
forAll (mesh.boundaryMesh(), patchI)
|
forAll(mesh.boundaryMesh(), patchI)
|
||||||
{
|
{
|
||||||
if (isA<processorPolyPatch>(mesh.boundaryMesh()[patchI]))
|
if (isA<processorPolyPatch>(mesh.boundaryMesh()[patchI]))
|
||||||
{
|
{
|
||||||
@ -65,7 +65,7 @@ labelList procNeighbours(const polyMesh& mesh)
|
|||||||
|
|
||||||
nNeighbours = 0;
|
nNeighbours = 0;
|
||||||
|
|
||||||
forAll (mesh.boundaryMesh(), patchI)
|
forAll(mesh.boundaryMesh(), patchI)
|
||||||
{
|
{
|
||||||
if (isA<processorPolyPatch>(mesh.boundaryMesh()[patchI]))
|
if (isA<processorPolyPatch>(mesh.boundaryMesh()[patchI]))
|
||||||
{
|
{
|
||||||
|
|||||||
@ -216,7 +216,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
List<polyPatch*> p(patches.size());
|
List<polyPatch*> p(patches.size());
|
||||||
|
|
||||||
forAll (p, patchI)
|
forAll(p, patchI)
|
||||||
{
|
{
|
||||||
p[patchI] = patches[patchI].clone(fMesh.boundaryMesh()).ptr();
|
p[patchI] = patches[patchI].clone(fMesh.boundaryMesh()).ptr();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -81,7 +81,7 @@ int main(int argc, char *argv[])
|
|||||||
word blockName;
|
word blockName;
|
||||||
label nx, ny, nz;
|
label nx, ny, nz;
|
||||||
|
|
||||||
forAll (blocks, blockI)
|
forAll(blocks, blockI)
|
||||||
{
|
{
|
||||||
cfxFile >> blockName;
|
cfxFile >> blockName;
|
||||||
cfxFile >> nx >> ny >> nz;
|
cfxFile >> nx >> ny >> nz;
|
||||||
@ -101,7 +101,7 @@ int main(int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
label no, blkNo, patchLabel;
|
label no, blkNo, patchLabel;
|
||||||
|
|
||||||
forAll (cfxPatchTypes, patchI)
|
forAll(cfxPatchTypes, patchI)
|
||||||
{
|
{
|
||||||
// Grab patch type and name
|
// Grab patch type and name
|
||||||
cfxFile >> cfxPatchTypes[patchI] >> cfxPatchNames[patchI] >> no;
|
cfxFile >> cfxPatchTypes[patchI] >> cfxPatchNames[patchI] >> no;
|
||||||
@ -110,7 +110,7 @@ int main(int argc, char *argv[])
|
|||||||
patchRanges[patchI].setSize(6);
|
patchRanges[patchI].setSize(6);
|
||||||
labelList& curRange = patchRanges[patchI];
|
labelList& curRange = patchRanges[patchI];
|
||||||
|
|
||||||
forAll (curRange, rI)
|
forAll(curRange, rI)
|
||||||
{
|
{
|
||||||
cfxFile >> curRange[rI];
|
cfxFile >> curRange[rI];
|
||||||
}
|
}
|
||||||
@ -147,7 +147,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
Info<< "Reading block points" << endl;
|
Info<< "Reading block points" << endl;
|
||||||
|
|
||||||
forAll (blocks, blockI)
|
forAll(blocks, blockI)
|
||||||
{
|
{
|
||||||
Info<< "block " << blockI << " is a ";
|
Info<< "block " << blockI << " is a ";
|
||||||
blocks[blockI].readPoints(cfxFile);
|
blocks[blockI].readPoints(cfxFile);
|
||||||
@ -176,7 +176,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
faceListList rawPatches(npatch);
|
faceListList rawPatches(npatch);
|
||||||
|
|
||||||
forAll (rawPatches, patchI)
|
forAll(rawPatches, patchI)
|
||||||
{
|
{
|
||||||
const word& patchType = cfxPatchTypes[patchI];
|
const word& patchType = cfxPatchTypes[patchI];
|
||||||
|
|
||||||
@ -214,7 +214,7 @@ int main(int argc, char *argv[])
|
|||||||
// For efficiency, create merge pairs in the first pass
|
// For efficiency, create merge pairs in the first pass
|
||||||
labelListListList glueMergePairs(glueMasterPatches.size());
|
labelListListList glueMergePairs(glueMasterPatches.size());
|
||||||
|
|
||||||
forAll (glueMasterPatches, glueI)
|
forAll(glueMasterPatches, glueI)
|
||||||
{
|
{
|
||||||
const label masterPatch = glueMasterPatches[glueI];
|
const label masterPatch = glueMasterPatches[glueI];
|
||||||
const label slavePatch = glueSlavePatches[glueI];
|
const label slavePatch = glueSlavePatches[glueI];
|
||||||
@ -247,14 +247,14 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
scalar sqrMergeTol = GREAT;
|
scalar sqrMergeTol = GREAT;
|
||||||
|
|
||||||
forAll (blockPFaces, blockPFaceLabel)
|
forAll(blockPFaces, blockPFaceLabel)
|
||||||
{
|
{
|
||||||
const labelList& blockPFacePoints =
|
const labelList& blockPFacePoints =
|
||||||
blockPFaces[blockPFaceLabel];
|
blockPFaces[blockPFaceLabel];
|
||||||
|
|
||||||
forAll (blockPFacePoints, blockPFacePointI)
|
forAll(blockPFacePoints, blockPFacePointI)
|
||||||
{
|
{
|
||||||
forAll (blockPFacePoints, blockPFacePointI2)
|
forAll(blockPFacePoints, blockPFacePointI2)
|
||||||
{
|
{
|
||||||
if (blockPFacePointI != blockPFacePointI2)
|
if (blockPFacePointI != blockPFacePointI2)
|
||||||
{
|
{
|
||||||
@ -281,7 +281,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
// N-squared point search over all points of all faces of
|
// N-squared point search over all points of all faces of
|
||||||
// master block over all point of all faces of slave block
|
// master block over all point of all faces of slave block
|
||||||
forAll (blockPFaces, blockPFaceLabel)
|
forAll(blockPFaces, blockPFaceLabel)
|
||||||
{
|
{
|
||||||
const labelList& blockPFacePoints =
|
const labelList& blockPFacePoints =
|
||||||
blockPFaces[blockPFaceLabel];
|
blockPFaces[blockPFaceLabel];
|
||||||
@ -289,16 +289,16 @@ int main(int argc, char *argv[])
|
|||||||
labelList& cp = curPairs[blockPFaceLabel];
|
labelList& cp = curPairs[blockPFaceLabel];
|
||||||
cp.setSize(blockPFacePoints.size());
|
cp.setSize(blockPFacePoints.size());
|
||||||
|
|
||||||
forAll (blockPFacePoints, blockPFacePointI)
|
forAll(blockPFacePoints, blockPFacePointI)
|
||||||
{
|
{
|
||||||
found = false;
|
found = false;
|
||||||
|
|
||||||
forAll (blockNFaces, blockNFaceLabel)
|
forAll(blockNFaces, blockNFaceLabel)
|
||||||
{
|
{
|
||||||
const labelList& blockNFacePoints =
|
const labelList& blockNFacePoints =
|
||||||
blockNFaces[blockNFaceLabel];
|
blockNFaces[blockNFaceLabel];
|
||||||
|
|
||||||
forAll (blockNFacePoints, blockNFacePointI)
|
forAll(blockNFacePoints, blockNFacePointI)
|
||||||
{
|
{
|
||||||
if
|
if
|
||||||
(
|
(
|
||||||
@ -360,7 +360,7 @@ int main(int argc, char *argv[])
|
|||||||
changedPointMerge = false;
|
changedPointMerge = false;
|
||||||
nPasses++;
|
nPasses++;
|
||||||
|
|
||||||
forAll (glueMasterPatches, glueI)
|
forAll(glueMasterPatches, glueI)
|
||||||
{
|
{
|
||||||
const label masterPatch = glueMasterPatches[glueI];
|
const label masterPatch = glueMasterPatches[glueI];
|
||||||
const label slavePatch = glueSlavePatches[glueI];
|
const label slavePatch = glueSlavePatches[glueI];
|
||||||
@ -372,14 +372,14 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
const labelListList& curPairs = glueMergePairs[glueI];
|
const labelListList& curPairs = glueMergePairs[glueI];
|
||||||
|
|
||||||
forAll (blockPFaces, blockPFaceLabel)
|
forAll(blockPFaces, blockPFaceLabel)
|
||||||
{
|
{
|
||||||
const labelList& blockPFacePoints =
|
const labelList& blockPFacePoints =
|
||||||
blockPFaces[blockPFaceLabel];
|
blockPFaces[blockPFaceLabel];
|
||||||
|
|
||||||
const labelList& cp = curPairs[blockPFaceLabel];
|
const labelList& cp = curPairs[blockPFaceLabel];
|
||||||
|
|
||||||
forAll (cp, blockPFacePointI)
|
forAll(cp, blockPFacePointI)
|
||||||
{
|
{
|
||||||
label PpointLabel =
|
label PpointLabel =
|
||||||
blockPFacePoints[blockPFacePointI]
|
blockPFacePoints[blockPFacePointI]
|
||||||
@ -421,7 +421,7 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
forAll (glueMasterPatches, glueI)
|
forAll(glueMasterPatches, glueI)
|
||||||
{
|
{
|
||||||
const label masterPatch = glueMasterPatches[glueI];
|
const label masterPatch = glueMasterPatches[glueI];
|
||||||
const label slavePatch = glueSlavePatches[glueI];
|
const label slavePatch = glueSlavePatches[glueI];
|
||||||
@ -433,12 +433,12 @@ int main(int argc, char *argv[])
|
|||||||
const faceList& blockNFaces = rawPatches[slavePatch];
|
const faceList& blockNFaces = rawPatches[slavePatch];
|
||||||
|
|
||||||
|
|
||||||
forAll (blockPFaces, blockPFaceLabel)
|
forAll(blockPFaces, blockPFaceLabel)
|
||||||
{
|
{
|
||||||
const labelList& blockPFacePoints
|
const labelList& blockPFacePoints
|
||||||
= blockPFaces[blockPFaceLabel];
|
= blockPFaces[blockPFaceLabel];
|
||||||
|
|
||||||
forAll (blockPFacePoints, blockPFacePointI)
|
forAll(blockPFacePoints, blockPFacePointI)
|
||||||
{
|
{
|
||||||
label PpointLabel =
|
label PpointLabel =
|
||||||
blockPFacePoints[blockPFacePointI]
|
blockPFacePoints[blockPFacePointI]
|
||||||
@ -455,12 +455,12 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
forAll (blockNFaces, blockNFaceLabel)
|
forAll(blockNFaces, blockNFaceLabel)
|
||||||
{
|
{
|
||||||
const labelList& blockNFacePoints
|
const labelList& blockNFacePoints
|
||||||
= blockNFaces[blockNFaceLabel];
|
= blockNFaces[blockNFaceLabel];
|
||||||
|
|
||||||
forAll (blockNFacePoints, blockNFacePointI)
|
forAll(blockNFacePoints, blockNFacePointI)
|
||||||
{
|
{
|
||||||
label NpointLabel =
|
label NpointLabel =
|
||||||
blockNFacePoints[blockNFacePointI]
|
blockNFacePoints[blockNFacePointI]
|
||||||
@ -483,7 +483,7 @@ int main(int argc, char *argv[])
|
|||||||
// given old point label
|
// given old point label
|
||||||
label nNewPoints = 0;
|
label nNewPoints = 0;
|
||||||
|
|
||||||
forAll (pointMergeList, pointLabel)
|
forAll(pointMergeList, pointLabel)
|
||||||
{
|
{
|
||||||
if (pointMergeList[pointLabel] > pointLabel)
|
if (pointMergeList[pointLabel] > pointLabel)
|
||||||
{
|
{
|
||||||
@ -513,11 +513,11 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
pointField points(nMeshPoints);
|
pointField points(nMeshPoints);
|
||||||
|
|
||||||
forAll (blocks, blockI)
|
forAll(blocks, blockI)
|
||||||
{
|
{
|
||||||
const pointField& blockPoints = blocks[blockI].points();
|
const pointField& blockPoints = blocks[blockI].points();
|
||||||
|
|
||||||
forAll (blockPoints, blockPointLabel)
|
forAll(blockPoints, blockPointLabel)
|
||||||
{
|
{
|
||||||
points
|
points
|
||||||
[
|
[
|
||||||
@ -544,15 +544,15 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
label nCreatedCells = 0;
|
label nCreatedCells = 0;
|
||||||
|
|
||||||
forAll (blocks, blockI)
|
forAll(blocks, blockI)
|
||||||
{
|
{
|
||||||
labelListList curBlockCells = blocks[blockI].blockCells();
|
labelListList curBlockCells = blocks[blockI].blockCells();
|
||||||
|
|
||||||
forAll (curBlockCells, blockCellI)
|
forAll(curBlockCells, blockCellI)
|
||||||
{
|
{
|
||||||
labelList cellPoints(curBlockCells[blockCellI].size());
|
labelList cellPoints(curBlockCells[blockCellI].size());
|
||||||
|
|
||||||
forAll (cellPoints, pointI)
|
forAll(cellPoints, pointI)
|
||||||
{
|
{
|
||||||
cellPoints[pointI] =
|
cellPoints[pointI] =
|
||||||
pointMergeList
|
pointMergeList
|
||||||
@ -579,7 +579,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
label nCreatedPatches = 0;
|
label nCreatedPatches = 0;
|
||||||
|
|
||||||
forAll (rawPatches, patchI)
|
forAll(rawPatches, patchI)
|
||||||
{
|
{
|
||||||
if (rawPatches[patchI].size() && cfxPatchTypes[patchI] != "BLKBDY")
|
if (rawPatches[patchI].size() && cfxPatchTypes[patchI] != "BLKBDY")
|
||||||
{
|
{
|
||||||
@ -610,14 +610,14 @@ int main(int argc, char *argv[])
|
|||||||
label oldSize = renumberedPatch.size();
|
label oldSize = renumberedPatch.size();
|
||||||
renumberedPatch.setSize(oldSize + curRawPatch.size());
|
renumberedPatch.setSize(oldSize + curRawPatch.size());
|
||||||
|
|
||||||
forAll (curRawPatch, faceI)
|
forAll(curRawPatch, faceI)
|
||||||
{
|
{
|
||||||
const face& oldFace = curRawPatch[faceI];
|
const face& oldFace = curRawPatch[faceI];
|
||||||
|
|
||||||
face& newFace = renumberedPatch[oldSize + faceI];
|
face& newFace = renumberedPatch[oldSize + faceI];
|
||||||
newFace.setSize(oldFace.size());
|
newFace.setSize(oldFace.size());
|
||||||
|
|
||||||
forAll (oldFace, pointI)
|
forAll(oldFace, pointI)
|
||||||
{
|
{
|
||||||
newFace[pointI] =
|
newFace[pointI] =
|
||||||
pointMergeList
|
pointMergeList
|
||||||
@ -634,14 +634,14 @@ int main(int argc, char *argv[])
|
|||||||
faceList& renumberedPatch = boundary[nCreatedPatches];
|
faceList& renumberedPatch = boundary[nCreatedPatches];
|
||||||
renumberedPatch.setSize(curRawPatch.size());
|
renumberedPatch.setSize(curRawPatch.size());
|
||||||
|
|
||||||
forAll (curRawPatch, faceI)
|
forAll(curRawPatch, faceI)
|
||||||
{
|
{
|
||||||
const face& oldFace = curRawPatch[faceI];
|
const face& oldFace = curRawPatch[faceI];
|
||||||
|
|
||||||
face& newFace = renumberedPatch[faceI];
|
face& newFace = renumberedPatch[faceI];
|
||||||
newFace.setSize(oldFace.size());
|
newFace.setSize(oldFace.size());
|
||||||
|
|
||||||
forAll (oldFace, pointI)
|
forAll(oldFace, pointI)
|
||||||
{
|
{
|
||||||
newFace[pointI] =
|
newFace[pointI] =
|
||||||
pointMergeList
|
pointMergeList
|
||||||
|
|||||||
@ -58,7 +58,7 @@ hexBlock::hexBlock(const label nx, const label ny, const label nz)
|
|||||||
|
|
||||||
void hexBlock::readPoints(Istream& is)
|
void hexBlock::readPoints(Istream& is)
|
||||||
{
|
{
|
||||||
forAll (points_, i)
|
forAll(points_, i)
|
||||||
{
|
{
|
||||||
is >> points_[i].x() >> points_[i].y() >> points_[i].z();
|
is >> points_[i].x() >> points_[i].y() >> points_[i].z();
|
||||||
}
|
}
|
||||||
@ -376,7 +376,7 @@ faceList hexBlock::patchFaces(const label direc, const labelList& range) const
|
|||||||
else if (blockHandedness_ == left)
|
else if (blockHandedness_ == left)
|
||||||
{
|
{
|
||||||
// turn all faces inside out
|
// turn all faces inside out
|
||||||
forAll (result, faceI)
|
forAll(result, faceI)
|
||||||
{
|
{
|
||||||
result[faceI] = result[faceI].reverseFace();
|
result[faceI] = result[faceI].reverseFace();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -473,7 +473,7 @@ endOfSection {space}")"{space}
|
|||||||
// set size of label list
|
// set size of label list
|
||||||
curFaceLabels.setSize(strtol(YYText(), &endPtr, 16));
|
curFaceLabels.setSize(strtol(YYText(), &endPtr, 16));
|
||||||
|
|
||||||
forAll (curFaceLabels, i)
|
forAll(curFaceLabels, i)
|
||||||
{
|
{
|
||||||
curFaceLabels[i] = strtol(endPtr, &endPtr, 16) - 1;
|
curFaceLabels[i] = strtol(endPtr, &endPtr, 16) - 1;
|
||||||
}
|
}
|
||||||
@ -837,7 +837,7 @@ int main(int argc, char *argv[])
|
|||||||
// faces and move to neighbour
|
// faces and move to neighbour
|
||||||
|
|
||||||
boolList fm(faces.size(), false);
|
boolList fm(faces.size(), false);
|
||||||
forAll (faces, facei)
|
forAll(faces, facei)
|
||||||
{
|
{
|
||||||
if
|
if
|
||||||
(
|
(
|
||||||
|
|||||||
@ -155,7 +155,7 @@ cellShape create3DCellShape
|
|||||||
|
|
||||||
bool found = false;
|
bool found = false;
|
||||||
|
|
||||||
forAll (localFaces, meshFaceI)
|
forAll(localFaces, meshFaceI)
|
||||||
{
|
{
|
||||||
if (localFaces[meshFaceI].size() == firstModelFace.size())
|
if (localFaces[meshFaceI].size() == firstModelFace.size())
|
||||||
{
|
{
|
||||||
@ -166,7 +166,7 @@ cellShape create3DCellShape
|
|||||||
|
|
||||||
meshFaceUsed[meshFaceI] = true;
|
meshFaceUsed[meshFaceI] = true;
|
||||||
|
|
||||||
forAll (curMeshFace, pointI)
|
forAll(curMeshFace, pointI)
|
||||||
{
|
{
|
||||||
pointLabels[firstModelFace[pointI]] = curMeshFace[pointI];
|
pointLabels[firstModelFace[pointI]] = curMeshFace[pointI];
|
||||||
}
|
}
|
||||||
@ -199,7 +199,7 @@ cellShape create3DCellShape
|
|||||||
found = false;
|
found = false;
|
||||||
|
|
||||||
// Loop through mesh faces until a match is found
|
// Loop through mesh faces until a match is found
|
||||||
forAll (localFaces, meshFaceI)
|
forAll(localFaces, meshFaceI)
|
||||||
{
|
{
|
||||||
if
|
if
|
||||||
(
|
(
|
||||||
@ -220,7 +220,7 @@ cellShape create3DCellShape
|
|||||||
// try matching the face
|
// try matching the face
|
||||||
label nMatchedLabels = 0;
|
label nMatchedLabels = 0;
|
||||||
|
|
||||||
forAll (meshFaceLabels, pointI)
|
forAll(meshFaceLabels, pointI)
|
||||||
{
|
{
|
||||||
if
|
if
|
||||||
(
|
(
|
||||||
@ -241,7 +241,7 @@ cellShape create3DCellShape
|
|||||||
if (found)
|
if (found)
|
||||||
{
|
{
|
||||||
// match found. Insert mesh face
|
// match found. Insert mesh face
|
||||||
forAll (meshFaceLabels, pointI)
|
forAll(meshFaceLabels, pointI)
|
||||||
{
|
{
|
||||||
pointLabels[curModelFace[pointI]] =
|
pointLabels[curModelFace[pointI]] =
|
||||||
meshFaceLabels[pointI];
|
meshFaceLabels[pointI];
|
||||||
|
|||||||
@ -73,7 +73,7 @@ cellShape extrudedQuadCellShape
|
|||||||
// make a list of outward-pointing faces
|
// make a list of outward-pointing faces
|
||||||
labelListList localFaces(4);
|
labelListList localFaces(4);
|
||||||
|
|
||||||
forAll (faceLabels, faceI)
|
forAll(faceLabels, faceI)
|
||||||
{
|
{
|
||||||
const label curFaceLabel = faceLabels[faceI];
|
const label curFaceLabel = faceLabels[faceI];
|
||||||
|
|
||||||
@ -100,7 +100,7 @@ cellShape extrudedQuadCellShape
|
|||||||
{
|
{
|
||||||
// Reverse the face. Note: it is necessary to reverse by
|
// Reverse the face. Note: it is necessary to reverse by
|
||||||
// hand to preserve connectivity of a 2-D mesh.
|
// hand to preserve connectivity of a 2-D mesh.
|
||||||
//
|
//
|
||||||
localFaces[faceI].setSize(curFace.size());
|
localFaces[faceI].setSize(curFace.size());
|
||||||
|
|
||||||
forAllReverse(curFace, i)
|
forAllReverse(curFace, i)
|
||||||
|
|||||||
@ -75,7 +75,7 @@ cellShape extrudedTriangleCellShape
|
|||||||
// make a list of outward-pointing faces
|
// make a list of outward-pointing faces
|
||||||
labelListList localFaces(3);
|
labelListList localFaces(3);
|
||||||
|
|
||||||
forAll (faceLabels, faceI)
|
forAll(faceLabels, faceI)
|
||||||
{
|
{
|
||||||
const label curFaceLabel = faceLabels[faceI];
|
const label curFaceLabel = faceLabels[faceI];
|
||||||
|
|
||||||
@ -102,7 +102,7 @@ cellShape extrudedTriangleCellShape
|
|||||||
{
|
{
|
||||||
// Reverse the face. Note: it is necessary to reverse by
|
// Reverse the face. Note: it is necessary to reverse by
|
||||||
// hand to preserve connectivity of a 2-D mesh.
|
// hand to preserve connectivity of a 2-D mesh.
|
||||||
//
|
//
|
||||||
localFaces[faceI].setSize(curFace.size());
|
localFaces[faceI].setSize(curFace.size());
|
||||||
|
|
||||||
forAllReverse(curFace, i)
|
forAllReverse(curFace, i)
|
||||||
|
|||||||
@ -490,7 +490,7 @@ endOfSection {space}")"{space}
|
|||||||
// set size of label list
|
// set size of label list
|
||||||
curFaceLabels.setSize(readLabel(mixedFaceStream));
|
curFaceLabels.setSize(readLabel(mixedFaceStream));
|
||||||
|
|
||||||
forAll (curFaceLabels, i)
|
forAll(curFaceLabels, i)
|
||||||
{
|
{
|
||||||
curFaceLabels[i] = readHexLabel(mixedFaceStream) - 1;
|
curFaceLabels[i] = readHexLabel(mixedFaceStream) - 1;
|
||||||
}
|
}
|
||||||
@ -511,7 +511,7 @@ endOfSection {space}")"{space}
|
|||||||
// for edge is 2, for triangle is 3 and for quad is 4
|
// for edge is 2, for triangle is 3 and for quad is 4
|
||||||
curFaceLabels.setSize(faceGroupElementType);
|
curFaceLabels.setSize(faceGroupElementType);
|
||||||
|
|
||||||
forAll (curFaceLabels, i)
|
forAll(curFaceLabels, i)
|
||||||
{
|
{
|
||||||
curFaceLabels[i] = readHexLabel(mixedFaceStream) - 1;
|
curFaceLabels[i] = readHexLabel(mixedFaceStream) - 1;
|
||||||
}
|
}
|
||||||
@ -915,14 +915,14 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
labelList nFacesInCell(nCells, 0);
|
labelList nFacesInCell(nCells, 0);
|
||||||
|
|
||||||
forAll (cellFaces, celli)
|
forAll(cellFaces, celli)
|
||||||
{
|
{
|
||||||
cellFaces[celli].setSize(fluentModelNFaces[fluentCellModelID[celli] ]);
|
cellFaces[celli].setSize(fluentModelNFaces[fluentCellModelID[celli] ]);
|
||||||
}
|
}
|
||||||
|
|
||||||
// fill in owner and neighbour
|
// fill in owner and neighbour
|
||||||
|
|
||||||
forAll (owner, faceI)
|
forAll(owner, faceI)
|
||||||
{
|
{
|
||||||
if (owner[faceI] > -1)
|
if (owner[faceI] > -1)
|
||||||
{
|
{
|
||||||
@ -933,7 +933,7 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
forAll (neighbour, faceI)
|
forAll(neighbour, faceI)
|
||||||
{
|
{
|
||||||
if (neighbour[faceI] > -1)
|
if (neighbour[faceI] > -1)
|
||||||
{
|
{
|
||||||
@ -976,7 +976,7 @@ int main(int argc, char *argv[])
|
|||||||
// points given by Fluent need to represent the FRONT plane of the
|
// points given by Fluent need to represent the FRONT plane of the
|
||||||
// geometry. Therefore, the extrusion will be in -z direction
|
// geometry. Therefore, the extrusion will be in -z direction
|
||||||
//
|
//
|
||||||
forAll (oldPoints, pointI)
|
forAll(oldPoints, pointI)
|
||||||
{
|
{
|
||||||
points[nNewPoints] = oldPoints[pointI];
|
points[nNewPoints] = oldPoints[pointI];
|
||||||
|
|
||||||
@ -985,7 +985,7 @@ int main(int argc, char *argv[])
|
|||||||
nNewPoints++;
|
nNewPoints++;
|
||||||
}
|
}
|
||||||
|
|
||||||
forAll (oldPoints, pointI)
|
forAll(oldPoints, pointI)
|
||||||
{
|
{
|
||||||
points[nNewPoints] = oldPoints[pointI];
|
points[nNewPoints] = oldPoints[pointI];
|
||||||
|
|
||||||
@ -1000,7 +1000,7 @@ int main(int argc, char *argv[])
|
|||||||
// Set the number of empty faces
|
// Set the number of empty faces
|
||||||
frontAndBackFaces.setSize(2*nCells);
|
frontAndBackFaces.setSize(2*nCells);
|
||||||
|
|
||||||
forAll (fluentCellModelID, celli)
|
forAll(fluentCellModelID, celli)
|
||||||
{
|
{
|
||||||
switch (fluentCellModelID[celli])
|
switch (fluentCellModelID[celli])
|
||||||
{
|
{
|
||||||
@ -1053,7 +1053,7 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Create new faces
|
// Create new faces
|
||||||
forAll (faces, faceI)
|
forAll(faces, faceI)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (faces[faceI].size() != 2)
|
if (faces[faceI].size() != 2)
|
||||||
@ -1078,7 +1078,7 @@ int main(int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
// 3-D shape recognition
|
// 3-D shape recognition
|
||||||
Info<< "Creating shapes for 3-D cells"<< endl;
|
Info<< "Creating shapes for 3-D cells"<< endl;
|
||||||
forAll (fluentCellModelID, celli)
|
forAll(fluentCellModelID, celli)
|
||||||
{
|
{
|
||||||
if
|
if
|
||||||
(
|
(
|
||||||
@ -1116,7 +1116,7 @@ int main(int argc, char *argv[])
|
|||||||
// area vector points into the domain. Turn them round before making patches
|
// area vector points into the domain. Turn them round before making patches
|
||||||
// for Foam compatibility
|
// for Foam compatibility
|
||||||
|
|
||||||
forAll (faces, faceI)
|
forAll(faces, faceI)
|
||||||
{
|
{
|
||||||
if (owner[faceI] == -1)
|
if (owner[faceI] == -1)
|
||||||
{
|
{
|
||||||
@ -1232,7 +1232,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
faceList patchFaces(faceGroupEndIndexIter() - faceLabel);
|
faceList patchFaces(faceGroupEndIndexIter() - faceLabel);
|
||||||
|
|
||||||
forAll (patchFaces, faceI)
|
forAll(patchFaces, faceI)
|
||||||
{
|
{
|
||||||
if
|
if
|
||||||
(
|
(
|
||||||
|
|||||||
@ -113,7 +113,7 @@ void Foam::fluentFvMesh::writeFluentMesh() const
|
|||||||
|
|
||||||
const pointField& p = points();
|
const pointField& p = points();
|
||||||
|
|
||||||
forAll (p, pointI)
|
forAll(p, pointI)
|
||||||
{
|
{
|
||||||
fluentMeshFile
|
fluentMeshFile
|
||||||
<< " "
|
<< " "
|
||||||
@ -135,7 +135,7 @@ void Foam::fluentFvMesh::writeFluentMesh() const
|
|||||||
<< "(13 (2 1 "
|
<< "(13 (2 1 "
|
||||||
<< own.size() << " 2 0)" << std::endl << "(" << std::endl;
|
<< own.size() << " 2 0)" << std::endl << "(" << std::endl;
|
||||||
|
|
||||||
forAll (own, faceI)
|
forAll(own, faceI)
|
||||||
{
|
{
|
||||||
const labelList& l = fcs[faceI];
|
const labelList& l = fcs[faceI];
|
||||||
|
|
||||||
@ -143,7 +143,7 @@ void Foam::fluentFvMesh::writeFluentMesh() const
|
|||||||
|
|
||||||
fluentMeshFile << l.size() << " ";
|
fluentMeshFile << l.size() << " ";
|
||||||
|
|
||||||
forAll (l, lI)
|
forAll(l, lI)
|
||||||
{
|
{
|
||||||
fluentMeshFile << l[lI] + 1 << " ";
|
fluentMeshFile << l[lI] + 1 << " ";
|
||||||
}
|
}
|
||||||
@ -157,7 +157,7 @@ void Foam::fluentFvMesh::writeFluentMesh() const
|
|||||||
label nWrittenFaces = own.size();
|
label nWrittenFaces = own.size();
|
||||||
|
|
||||||
// Writing boundary faces
|
// Writing boundary faces
|
||||||
forAll (boundary(), patchI)
|
forAll(boundary(), patchI)
|
||||||
{
|
{
|
||||||
const unallocFaceList& patchFaces = boundaryMesh()[patchI];
|
const unallocFaceList& patchFaces = boundaryMesh()[patchI];
|
||||||
|
|
||||||
@ -190,7 +190,7 @@ void Foam::fluentFvMesh::writeFluentMesh() const
|
|||||||
fluentMeshFile
|
fluentMeshFile
|
||||||
<<" 0)" << std::endl << "(" << std::endl;
|
<<" 0)" << std::endl << "(" << std::endl;
|
||||||
|
|
||||||
forAll (patchFaces, faceI)
|
forAll(patchFaces, faceI)
|
||||||
{
|
{
|
||||||
const labelList& l = patchFaces[faceI];
|
const labelList& l = patchFaces[faceI];
|
||||||
|
|
||||||
@ -225,7 +225,7 @@ void Foam::fluentFvMesh::writeFluentMesh() const
|
|||||||
|
|
||||||
bool hasWarned = false;
|
bool hasWarned = false;
|
||||||
|
|
||||||
forAll (cells, cellI)
|
forAll(cells, cellI)
|
||||||
{
|
{
|
||||||
if (cells[cellI].model() == tet)
|
if (cells[cellI].model() == tet)
|
||||||
{
|
{
|
||||||
@ -270,7 +270,7 @@ void Foam::fluentFvMesh::writeFluentMesh() const
|
|||||||
fluentMeshFile << "(39 (2 interior interior-1)())" << std::endl;
|
fluentMeshFile << "(39 (2 interior interior-1)())" << std::endl;
|
||||||
|
|
||||||
// Writing boundary patch types
|
// Writing boundary patch types
|
||||||
forAll (boundary(), patchI)
|
forAll(boundary(), patchI)
|
||||||
{
|
{
|
||||||
fluentMeshFile
|
fluentMeshFile
|
||||||
<< "(39 (" << patchI + 10 << " ";
|
<< "(39 (" << patchI + 10 << " ";
|
||||||
|
|||||||
@ -583,7 +583,7 @@ mtype {space}"MTYPE:"{space}
|
|||||||
{
|
{
|
||||||
scalarList patchFaceValues(nValuesForPatchFaces);
|
scalarList patchFaceValues(nValuesForPatchFaces);
|
||||||
|
|
||||||
forAll (patchFaceValues, fI)
|
forAll(patchFaceValues, fI)
|
||||||
{
|
{
|
||||||
patchFaceValues[fI] = readScalar(patchFacesStream);
|
patchFaceValues[fI] = readScalar(patchFacesStream);
|
||||||
}
|
}
|
||||||
@ -673,7 +673,7 @@ int main(int argc, char *argv[])
|
|||||||
// make a point mapping array
|
// make a point mapping array
|
||||||
label maxPointIndex = 0;
|
label maxPointIndex = 0;
|
||||||
|
|
||||||
forAll (pointMap, pointI)
|
forAll(pointMap, pointI)
|
||||||
{
|
{
|
||||||
if (pointMap[pointI] > maxPointIndex)
|
if (pointMap[pointI] > maxPointIndex)
|
||||||
{
|
{
|
||||||
@ -684,7 +684,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
labelList pointLookup(maxPointIndex + 1, -1);
|
labelList pointLookup(maxPointIndex + 1, -1);
|
||||||
|
|
||||||
forAll (pointMap, pointI)
|
forAll(pointMap, pointI)
|
||||||
{
|
{
|
||||||
pointLookup[pointMap[pointI] ] = pointI;
|
pointLookup[pointMap[pointI] ] = pointI;
|
||||||
}
|
}
|
||||||
@ -692,7 +692,7 @@ int main(int argc, char *argv[])
|
|||||||
// make a cell mapping array
|
// make a cell mapping array
|
||||||
label maxCellIndex = 0;
|
label maxCellIndex = 0;
|
||||||
|
|
||||||
forAll (cellMap, cellI)
|
forAll(cellMap, cellI)
|
||||||
{
|
{
|
||||||
if (cellMap[cellI] > maxCellIndex)
|
if (cellMap[cellI] > maxCellIndex)
|
||||||
{
|
{
|
||||||
@ -702,7 +702,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
labelList cellLookup(maxCellIndex + 1);
|
labelList cellLookup(maxCellIndex + 1);
|
||||||
|
|
||||||
forAll (cellMap, cellI)
|
forAll(cellMap, cellI)
|
||||||
{
|
{
|
||||||
cellLookup[cellMap[cellI] ] = cellI;
|
cellLookup[cellMap[cellI] ] = cellI;
|
||||||
}
|
}
|
||||||
@ -719,7 +719,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
cellShapeList cells(cellLabels.size());
|
cellShapeList cells(cellLabels.size());
|
||||||
|
|
||||||
forAll (cellTypes, cellI)
|
forAll(cellTypes, cellI)
|
||||||
{
|
{
|
||||||
const labelList& curCellLabels = cellLabels[cellI];
|
const labelList& curCellLabels = cellLabels[cellI];
|
||||||
|
|
||||||
@ -798,7 +798,7 @@ int main(int argc, char *argv[])
|
|||||||
faceList& patchFaces = boundary[patchI];
|
faceList& patchFaces = boundary[patchI];
|
||||||
patchFaces.setSize(curCells.size());
|
patchFaces.setSize(curCells.size());
|
||||||
|
|
||||||
forAll (curCells, faceI)
|
forAll(curCells, faceI)
|
||||||
{
|
{
|
||||||
patchFaces[faceI] =
|
patchFaces[faceI] =
|
||||||
cells[cellLookup[curCells[faceI] ] ].faces()
|
cells[cellLookup[curCells[faceI] ] ].faces()
|
||||||
|
|||||||
@ -68,14 +68,14 @@
|
|||||||
quadFace[3] = pointMap[quadFace[3]];
|
quadFace[3] = pointMap[quadFace[3]];
|
||||||
|
|
||||||
label ti = 0;
|
label ti = 0;
|
||||||
forAll (quadFace, i)
|
forAll(quadFace, i)
|
||||||
{
|
{
|
||||||
if (quadFace[i] != quadFace[(i+1)%4])
|
if (quadFace[i] != quadFace[(i+1)%4])
|
||||||
{
|
{
|
||||||
triFace[(ti++)%3] = quadFace[i];
|
triFace[(ti++)%3] = quadFace[i];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ti == 4)
|
if (ti == 4)
|
||||||
{
|
{
|
||||||
pFaces[bcIndex][regionIndex].append(quadFace);
|
pFaces[bcIndex][regionIndex].append(quadFace);
|
||||||
|
|||||||
@ -109,7 +109,7 @@ label activeCells = 0;
|
|||||||
// Create and set the collocated point collapse map
|
// Create and set the collocated point collapse map
|
||||||
labelList pointMap(nPoints);
|
labelList pointMap(nPoints);
|
||||||
|
|
||||||
forAll (pointMap, i)
|
forAll(pointMap, i)
|
||||||
{
|
{
|
||||||
pointMap[i] = i;
|
pointMap[i] = i;
|
||||||
}
|
}
|
||||||
@ -132,7 +132,7 @@ for (label i=0; i<nPoints; i++)
|
|||||||
|
|
||||||
edgeList edges = cellShapes[activeCells].edges();
|
edgeList edges = cellShapes[activeCells].edges();
|
||||||
|
|
||||||
forAll (edges, ei)
|
forAll(edges, ei)
|
||||||
{
|
{
|
||||||
if (edges[ei].mag(points) < SMALL)
|
if (edges[ei].mag(points) < SMALL)
|
||||||
{
|
{
|
||||||
@ -167,11 +167,11 @@ cellZoning.setSize(activeCells);
|
|||||||
|
|
||||||
// Map collocated points to refer to the same point and collapse cell shape
|
// Map collocated points to refer to the same point and collapse cell shape
|
||||||
// to the corresponding hex-degenerate.
|
// to the corresponding hex-degenerate.
|
||||||
forAll (cellShapes, celli)
|
forAll(cellShapes, celli)
|
||||||
{
|
{
|
||||||
cellShape& cs = cellShapes[celli];
|
cellShape& cs = cellShapes[celli];
|
||||||
|
|
||||||
forAll (cs, i)
|
forAll(cs, i)
|
||||||
{
|
{
|
||||||
cs[i] = pointMap[cs[i]];
|
cs[i] = pointMap[cs[i]];
|
||||||
}
|
}
|
||||||
@ -336,7 +336,7 @@ if
|
|||||||
{
|
{
|
||||||
const face& pf = iter();
|
const face& pf = iter();
|
||||||
|
|
||||||
forAll (pf, pfi)
|
forAll(pf, pfi)
|
||||||
{
|
{
|
||||||
minz = min(minz, points[pf[pfi]].z());
|
minz = min(minz, points[pf[pfi]].z());
|
||||||
}
|
}
|
||||||
@ -356,7 +356,7 @@ if
|
|||||||
const face& pf = iter();
|
const face& pf = iter();
|
||||||
|
|
||||||
scalar minfz = GREAT;
|
scalar minfz = GREAT;
|
||||||
forAll (pf, pfi)
|
forAll(pf, pfi)
|
||||||
{
|
{
|
||||||
minfz = min(minfz, points[pf[pfi]].z());
|
minfz = min(minfz, points[pf[pfi]].z());
|
||||||
}
|
}
|
||||||
@ -390,7 +390,7 @@ if
|
|||||||
const face& pf = iter();
|
const face& pf = iter();
|
||||||
|
|
||||||
scalar minfz = GREAT;
|
scalar minfz = GREAT;
|
||||||
forAll (pf, pfi)
|
forAll(pf, pfi)
|
||||||
{
|
{
|
||||||
minfz = min(minfz, points[pf[pfi]].z());
|
minfz = min(minfz, points[pf[pfi]].z());
|
||||||
}
|
}
|
||||||
@ -417,7 +417,7 @@ if
|
|||||||
label nPatches = 0;
|
label nPatches = 0;
|
||||||
for (int bci=0; bci<nBCs; bci++)
|
for (int bci=0; bci<nBCs; bci++)
|
||||||
{
|
{
|
||||||
forAll (pFaces[bci], rgi)
|
forAll(pFaces[bci], rgi)
|
||||||
{
|
{
|
||||||
if (pFaces[bci][rgi].size())
|
if (pFaces[bci][rgi].size())
|
||||||
{
|
{
|
||||||
@ -485,7 +485,7 @@ label nAddedPatches = 0;
|
|||||||
|
|
||||||
for (int bci=0; bci<nBCs; bci++)
|
for (int bci=0; bci<nBCs; bci++)
|
||||||
{
|
{
|
||||||
forAll (pFaces[bci], rgi)
|
forAll(pFaces[bci], rgi)
|
||||||
{
|
{
|
||||||
if (pFaces[bci][rgi].size())
|
if (pFaces[bci][rgi].size())
|
||||||
{
|
{
|
||||||
@ -510,9 +510,9 @@ for (int bci=0; bci<nBCs; bci++)
|
|||||||
labelList pointLabels(nPoints, -1);
|
labelList pointLabels(nPoints, -1);
|
||||||
|
|
||||||
// Scan cells for used points
|
// Scan cells for used points
|
||||||
forAll (cellShapes, celli)
|
forAll(cellShapes, celli)
|
||||||
{
|
{
|
||||||
forAll (cellShapes[celli], i)
|
forAll(cellShapes[celli], i)
|
||||||
{
|
{
|
||||||
pointLabels[cellShapes[celli][i]] = 1;
|
pointLabels[cellShapes[celli][i]] = 1;
|
||||||
}
|
}
|
||||||
@ -520,7 +520,7 @@ forAll (cellShapes, celli)
|
|||||||
|
|
||||||
// Create addressing for used points and pack points array
|
// Create addressing for used points and pack points array
|
||||||
label newPointi = 0;
|
label newPointi = 0;
|
||||||
forAll (pointLabels, pointi)
|
forAll(pointLabels, pointi)
|
||||||
{
|
{
|
||||||
if (pointLabels[pointi] != -1)
|
if (pointLabels[pointi] != -1)
|
||||||
{
|
{
|
||||||
@ -531,24 +531,24 @@ forAll (pointLabels, pointi)
|
|||||||
points.setSize(newPointi);
|
points.setSize(newPointi);
|
||||||
|
|
||||||
// Reset cell point labels
|
// Reset cell point labels
|
||||||
forAll (cellShapes, celli)
|
forAll(cellShapes, celli)
|
||||||
{
|
{
|
||||||
cellShape& cs = cellShapes[celli];
|
cellShape& cs = cellShapes[celli];
|
||||||
|
|
||||||
forAll (cs, i)
|
forAll(cs, i)
|
||||||
{
|
{
|
||||||
cs[i] = pointLabels[cs[i]];
|
cs[i] = pointLabels[cs[i]];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Reset boundary-face point labels
|
// Reset boundary-face point labels
|
||||||
forAll (boundary, patchi)
|
forAll(boundary, patchi)
|
||||||
{
|
{
|
||||||
forAll (boundary[patchi], facei)
|
forAll(boundary[patchi], facei)
|
||||||
{
|
{
|
||||||
face& f = boundary[patchi][facei];
|
face& f = boundary[patchi][facei];
|
||||||
|
|
||||||
forAll (f, i)
|
forAll(f, i)
|
||||||
{
|
{
|
||||||
f[i] = pointLabels[f[i]];
|
f[i] = pointLabels[f[i]];
|
||||||
}
|
}
|
||||||
|
|||||||
@ -471,7 +471,7 @@ faceList hexBlock::patchFaces(const label direc, const labelList& range) const
|
|||||||
else if (blockHandedness_ == left)
|
else if (blockHandedness_ == left)
|
||||||
{
|
{
|
||||||
// turn all faces inside out
|
// turn all faces inside out
|
||||||
forAll (result, faceI)
|
forAll(result, faceI)
|
||||||
{
|
{
|
||||||
result[faceI] = result[faceI].reverseFace();
|
result[faceI] = result[faceI].reverseFace();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -108,7 +108,7 @@ int main(int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
label nx, ny, nz;
|
label nx, ny, nz;
|
||||||
|
|
||||||
forAll (blocks, blockI)
|
forAll(blocks, blockI)
|
||||||
{
|
{
|
||||||
if (twoDThickness > 0)
|
if (twoDThickness > 0)
|
||||||
{
|
{
|
||||||
@ -132,7 +132,7 @@ int main(int argc, char *argv[])
|
|||||||
label sumPoints(0);
|
label sumPoints(0);
|
||||||
label nMeshCells(0);
|
label nMeshCells(0);
|
||||||
|
|
||||||
forAll (blocks, blockI)
|
forAll(blocks, blockI)
|
||||||
{
|
{
|
||||||
Info<< "block " << blockI << ":" << nl;
|
Info<< "block " << blockI << ":" << nl;
|
||||||
blocks[blockI].readPoints(readBlank, twoDThickness, plot3dFile);
|
blocks[blockI].readPoints(readBlank, twoDThickness, plot3dFile);
|
||||||
@ -144,11 +144,11 @@ int main(int argc, char *argv[])
|
|||||||
pointField points(sumPoints);
|
pointField points(sumPoints);
|
||||||
labelList blockOffsets(blocks.size());
|
labelList blockOffsets(blocks.size());
|
||||||
sumPoints = 0;
|
sumPoints = 0;
|
||||||
forAll (blocks, blockI)
|
forAll(blocks, blockI)
|
||||||
{
|
{
|
||||||
const pointField& blockPoints = blocks[blockI].points();
|
const pointField& blockPoints = blocks[blockI].points();
|
||||||
blockOffsets[blockI] = sumPoints;
|
blockOffsets[blockI] = sumPoints;
|
||||||
forAll (blockPoints, i)
|
forAll(blockPoints, i)
|
||||||
{
|
{
|
||||||
points[sumPoints++] = blockPoints[i];
|
points[sumPoints++] = blockPoints[i];
|
||||||
}
|
}
|
||||||
@ -186,15 +186,15 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
label nCreatedCells = 0;
|
label nCreatedCells = 0;
|
||||||
|
|
||||||
forAll (blocks, blockI)
|
forAll(blocks, blockI)
|
||||||
{
|
{
|
||||||
labelListList curBlockCells = blocks[blockI].blockCells();
|
labelListList curBlockCells = blocks[blockI].blockCells();
|
||||||
|
|
||||||
forAll (curBlockCells, blockCellI)
|
forAll(curBlockCells, blockCellI)
|
||||||
{
|
{
|
||||||
labelList cellPoints(curBlockCells[blockCellI].size());
|
labelList cellPoints(curBlockCells[blockCellI].size());
|
||||||
|
|
||||||
forAll (cellPoints, pointI)
|
forAll(cellPoints, pointI)
|
||||||
{
|
{
|
||||||
cellPoints[pointI] =
|
cellPoints[pointI] =
|
||||||
oldToNew
|
oldToNew
|
||||||
|
|||||||
@ -67,14 +67,14 @@ void sammMesh::calcPointCells() const
|
|||||||
// do not come from the cell shape, but from the slaves of the coupled
|
// do not come from the cell shape, but from the slaves of the coupled
|
||||||
// match. It is also adventageous to remove the duplicates from the
|
// match. It is also adventageous to remove the duplicates from the
|
||||||
// point-cell addressing, because this removes a lot of waste later.
|
// point-cell addressing, because this removes a lot of waste later.
|
||||||
//
|
//
|
||||||
|
|
||||||
// For each cell
|
// For each cell
|
||||||
forAll(cellShapes_, cellI)
|
forAll(cellShapes_, cellI)
|
||||||
{
|
{
|
||||||
const faceList& faces = cellFaces_[cellI];
|
const faceList& faces = cellFaces_[cellI];
|
||||||
|
|
||||||
forAll (faces, i)
|
forAll(faces, i)
|
||||||
{
|
{
|
||||||
// For each vertex
|
// For each vertex
|
||||||
const labelList& labels = faces[i];
|
const labelList& labels = faces[i];
|
||||||
|
|||||||
@ -45,11 +45,11 @@ bool sammMesh::sammEqualFace
|
|||||||
// considered equal if three of the vertices are the same.
|
// considered equal if three of the vertices are the same.
|
||||||
label nEqual = 0;
|
label nEqual = 0;
|
||||||
|
|
||||||
forAll (cellFace, cellFaceLabelI)
|
forAll(cellFace, cellFaceLabelI)
|
||||||
{
|
{
|
||||||
const label curCellFaceLabel = cellFace[cellFaceLabelI];
|
const label curCellFaceLabel = cellFace[cellFaceLabelI];
|
||||||
|
|
||||||
forAll (boundaryFace, bouFaceLabelI)
|
forAll(boundaryFace, bouFaceLabelI)
|
||||||
{
|
{
|
||||||
if (boundaryFace[bouFaceLabelI] == curCellFaceLabel)
|
if (boundaryFace[bouFaceLabelI] == curCellFaceLabel)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -42,13 +42,13 @@ void sammMesh::createPolyBoundary()
|
|||||||
|
|
||||||
const labelListList& PointCells = pointCells();
|
const labelListList& PointCells = pointCells();
|
||||||
|
|
||||||
forAll (boundary_, patchI)
|
forAll(boundary_, patchI)
|
||||||
{
|
{
|
||||||
const faceList& curShapePatch = boundary_[patchI];
|
const faceList& curShapePatch = boundary_[patchI];
|
||||||
|
|
||||||
polyBoundaryPatchStartIndices_[patchI] = nCreatedFaces;
|
polyBoundaryPatchStartIndices_[patchI] = nCreatedFaces;
|
||||||
|
|
||||||
forAll (curShapePatch, faceI)
|
forAll(curShapePatch, faceI)
|
||||||
{
|
{
|
||||||
bool found = false;
|
bool found = false;
|
||||||
|
|
||||||
@ -120,7 +120,7 @@ List<polyPatch* > sammMesh::polyBoundaryPatches(const polyMesh& pMesh)
|
|||||||
{
|
{
|
||||||
List<polyPatch* > p(boundary_.size());
|
List<polyPatch* > p(boundary_.size());
|
||||||
|
|
||||||
forAll (boundary_, patchI)
|
forAll(boundary_, patchI)
|
||||||
{
|
{
|
||||||
const faceList& curShapePatch = boundary_[patchI];
|
const faceList& curShapePatch = boundary_[patchI];
|
||||||
|
|
||||||
|
|||||||
@ -41,13 +41,13 @@ void sammMesh::createPolyCells()
|
|||||||
|
|
||||||
label maxFaces = 0;
|
label maxFaces = 0;
|
||||||
|
|
||||||
forAll (cellPolys_, cellI)
|
forAll(cellPolys_, cellI)
|
||||||
{
|
{
|
||||||
cell& curCell = cellPolys_[cellI];
|
cell& curCell = cellPolys_[cellI];
|
||||||
|
|
||||||
curCell.setSize(cellFaces_[cellI].size());
|
curCell.setSize(cellFaces_[cellI].size());
|
||||||
|
|
||||||
forAll (curCell, fI)
|
forAll(curCell, fI)
|
||||||
{
|
{
|
||||||
curCell[fI] = -1;
|
curCell[fI] = -1;
|
||||||
}
|
}
|
||||||
@ -145,7 +145,7 @@ void sammMesh::createPolyCells()
|
|||||||
label nextNei = -1;
|
label nextNei = -1;
|
||||||
label minNei = cellPolys_.size();
|
label minNei = cellPolys_.size();
|
||||||
|
|
||||||
forAll (neiCells, ncI)
|
forAll(neiCells, ncI)
|
||||||
{
|
{
|
||||||
if (neiCells[ncI] > -1 && neiCells[ncI] < minNei)
|
if (neiCells[ncI] > -1 && neiCells[ncI] < minNei)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -35,7 +35,7 @@ void sammMesh::fixCollapsedEdges()
|
|||||||
{
|
{
|
||||||
cellFaces_.setSize(cellShapes_.size());
|
cellFaces_.setSize(cellShapes_.size());
|
||||||
|
|
||||||
forAll (cellShapes_, cellI)
|
forAll(cellShapes_, cellI)
|
||||||
{
|
{
|
||||||
cellFaces_[cellI] = cellShapes_[cellI].faces();
|
cellFaces_[cellI] = cellShapes_[cellI].faces();
|
||||||
}
|
}
|
||||||
@ -43,23 +43,23 @@ void sammMesh::fixCollapsedEdges()
|
|||||||
// go through the faces and find if there exist faces with duplicate
|
// go through the faces and find if there exist faces with duplicate
|
||||||
// vertices. If so, purge the duplicates and mark the mesh as a polyMesh
|
// vertices. If so, purge the duplicates and mark the mesh as a polyMesh
|
||||||
|
|
||||||
forAll (cellFaces_, cellI)
|
forAll(cellFaces_, cellI)
|
||||||
{
|
{
|
||||||
faceList& curFaces = cellFaces_[cellI];
|
faceList& curFaces = cellFaces_[cellI];
|
||||||
|
|
||||||
forAll (curFaces, faceI)
|
forAll(curFaces, faceI)
|
||||||
{
|
{
|
||||||
face& vertexLabels = curFaces[faceI];
|
face& vertexLabels = curFaces[faceI];
|
||||||
|
|
||||||
bool duplicatesFound = false;
|
bool duplicatesFound = false;
|
||||||
|
|
||||||
forAll (vertexLabels, vI)
|
forAll(vertexLabels, vI)
|
||||||
{
|
{
|
||||||
label curLabel = vertexLabels[vI];
|
label curLabel = vertexLabels[vI];
|
||||||
|
|
||||||
label nFound = 0;
|
label nFound = 0;
|
||||||
|
|
||||||
forAll (vertexLabels, searchI)
|
forAll(vertexLabels, searchI)
|
||||||
{
|
{
|
||||||
if (vertexLabels[searchI] == curLabel)
|
if (vertexLabels[searchI] == curLabel)
|
||||||
{
|
{
|
||||||
@ -84,14 +84,14 @@ void sammMesh::fixCollapsedEdges()
|
|||||||
// here as the shape is still needed to determine which face
|
// here as the shape is still needed to determine which face
|
||||||
// of the shape is used in potential couple matches. This
|
// of the shape is used in potential couple matches. This
|
||||||
// will be done in the end using the purgeShapes()
|
// will be done in the end using the purgeShapes()
|
||||||
//
|
//
|
||||||
|
|
||||||
// create a new face without duplicates and replace original
|
// create a new face without duplicates and replace original
|
||||||
face newFace(vertexLabels.size());
|
face newFace(vertexLabels.size());
|
||||||
|
|
||||||
label nNewVertices = 0;
|
label nNewVertices = 0;
|
||||||
|
|
||||||
forAll (vertexLabels, vI)
|
forAll(vertexLabels, vI)
|
||||||
{
|
{
|
||||||
// In order for a face to be a valid entity, duplicate
|
// In order for a face to be a valid entity, duplicate
|
||||||
// vertices can only be consecutive (othervise, the
|
// vertices can only be consecutive (othervise, the
|
||||||
|
|||||||
@ -33,18 +33,18 @@ Description
|
|||||||
|
|
||||||
void sammMesh::purgeCellShapes()
|
void sammMesh::purgeCellShapes()
|
||||||
{
|
{
|
||||||
forAll (cellFaces_, cellI)
|
forAll(cellFaces_, cellI)
|
||||||
{
|
{
|
||||||
const faceList& curFaces = cellFaces_[cellI];
|
const faceList& curFaces = cellFaces_[cellI];
|
||||||
|
|
||||||
// Get model faces
|
// Get model faces
|
||||||
faceList shapeFaces = cellShapes_[cellI].faces();
|
faceList shapeFaces = cellShapes_[cellI].faces();
|
||||||
|
|
||||||
forAll (shapeFaces, faceI)
|
forAll(shapeFaces, faceI)
|
||||||
{
|
{
|
||||||
bool found = false;
|
bool found = false;
|
||||||
|
|
||||||
forAll (curFaces, i)
|
forAll(curFaces, i)
|
||||||
{
|
{
|
||||||
if (shapeFaces[faceI] == curFaces[i])
|
if (shapeFaces[faceI] == curFaces[i])
|
||||||
{
|
{
|
||||||
|
|||||||
@ -163,7 +163,7 @@ void sammMesh::addSAMMcell
|
|||||||
// make a list of labels
|
// make a list of labels
|
||||||
labelList sammCellLabels(curModel.nPoints(), -1);
|
labelList sammCellLabels(curModel.nPoints(), -1);
|
||||||
|
|
||||||
forAll (sammCellLabels, labelI)
|
forAll(sammCellLabels, labelI)
|
||||||
{
|
{
|
||||||
sammCellLabels[labelI] = globalLabels[addressing[labelI]];
|
sammCellLabels[labelI] = globalLabels[addressing[labelI]];
|
||||||
}
|
}
|
||||||
@ -221,7 +221,7 @@ void sammMesh::readCells()
|
|||||||
starCellLabelLookup_.setSize(maxLabel+1);
|
starCellLabelLookup_.setSize(maxLabel+1);
|
||||||
|
|
||||||
// reset point labels to invalid value
|
// reset point labels to invalid value
|
||||||
forAll (starCellLabelLookup_, i)
|
forAll(starCellLabelLookup_, i)
|
||||||
{
|
{
|
||||||
starCellLabelLookup_[i] = -1;
|
starCellLabelLookup_[i] = -1;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -128,13 +128,13 @@ void sammMesh::readCouples()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Once all couples are read, remove zero size faces from all cells
|
// Once all couples are read, remove zero size faces from all cells
|
||||||
forAll (cellFaces_, cellI)
|
forAll(cellFaces_, cellI)
|
||||||
{
|
{
|
||||||
faceList& curFaces = cellFaces_[cellI];
|
faceList& curFaces = cellFaces_[cellI];
|
||||||
|
|
||||||
label zeroSizeFound = 0;
|
label zeroSizeFound = 0;
|
||||||
|
|
||||||
forAll (curFaces, faceI)
|
forAll(curFaces, faceI)
|
||||||
{
|
{
|
||||||
if (curFaces[faceI].empty())
|
if (curFaces[faceI].empty())
|
||||||
{
|
{
|
||||||
@ -151,7 +151,7 @@ void sammMesh::readCouples()
|
|||||||
|
|
||||||
label nFaces = 0;
|
label nFaces = 0;
|
||||||
|
|
||||||
forAll (oldFaces, faceI)
|
forAll(oldFaces, faceI)
|
||||||
{
|
{
|
||||||
if (oldFaces[faceI].size())
|
if (oldFaces[faceI].size())
|
||||||
{
|
{
|
||||||
|
|||||||
@ -116,11 +116,11 @@ void sammMesh::createPolyMeshData()
|
|||||||
label nProblemCells = 0;
|
label nProblemCells = 0;
|
||||||
|
|
||||||
// check that there is no zeros in the cellPolys_
|
// check that there is no zeros in the cellPolys_
|
||||||
forAll (cellPolys_, cellI)
|
forAll(cellPolys_, cellI)
|
||||||
{
|
{
|
||||||
const labelList& curFaceLabels = cellPolys_[cellI];
|
const labelList& curFaceLabels = cellPolys_[cellI];
|
||||||
|
|
||||||
forAll (curFaceLabels, faceI)
|
forAll(curFaceLabels, faceI)
|
||||||
{
|
{
|
||||||
if (curFaceLabels[faceI] == -1)
|
if (curFaceLabels[faceI] == -1)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -67,14 +67,14 @@ void starMesh::calcPointCells() const
|
|||||||
// do not come from the cell shape, but from the slaves of the coupled
|
// do not come from the cell shape, but from the slaves of the coupled
|
||||||
// match. It is also adventageous to remove the duplicates from the
|
// match. It is also adventageous to remove the duplicates from the
|
||||||
// point-cell addressing, because this removes a lot of waste later.
|
// point-cell addressing, because this removes a lot of waste later.
|
||||||
//
|
//
|
||||||
|
|
||||||
// For each cell
|
// For each cell
|
||||||
forAll(cellShapes_, cellI)
|
forAll(cellShapes_, cellI)
|
||||||
{
|
{
|
||||||
const faceList& faces = cellFaces_[cellI];
|
const faceList& faces = cellFaces_[cellI];
|
||||||
|
|
||||||
forAll (faces, i)
|
forAll(faces, i)
|
||||||
{
|
{
|
||||||
// For each vertex
|
// For each vertex
|
||||||
const labelList& labels = faces[i];
|
const labelList& labels = faces[i];
|
||||||
|
|||||||
@ -47,11 +47,11 @@ bool starMesh::starEqualFace
|
|||||||
|
|
||||||
label nEqual = 0;
|
label nEqual = 0;
|
||||||
|
|
||||||
forAll (cellFace, cellFaceLabelI)
|
forAll(cellFace, cellFaceLabelI)
|
||||||
{
|
{
|
||||||
const label curCellFaceLabel = cellFace[cellFaceLabelI];
|
const label curCellFaceLabel = cellFace[cellFaceLabelI];
|
||||||
|
|
||||||
forAll (boundaryFace, bouFaceLabelI)
|
forAll(boundaryFace, bouFaceLabelI)
|
||||||
{
|
{
|
||||||
if (boundaryFace[bouFaceLabelI] == curCellFaceLabel)
|
if (boundaryFace[bouFaceLabelI] == curCellFaceLabel)
|
||||||
{
|
{
|
||||||
@ -70,13 +70,13 @@ bool starMesh::starEqualFace
|
|||||||
// Boundary face is happy if all of its vertices are recognised
|
// Boundary face is happy if all of its vertices are recognised
|
||||||
bool boundaryFaceHappy = true;
|
bool boundaryFaceHappy = true;
|
||||||
|
|
||||||
forAll (boundaryFace, bouFaceLabelI)
|
forAll(boundaryFace, bouFaceLabelI)
|
||||||
{
|
{
|
||||||
const label curBouFaceLabel = boundaryFace[bouFaceLabelI];
|
const label curBouFaceLabel = boundaryFace[bouFaceLabelI];
|
||||||
|
|
||||||
bool found = false;
|
bool found = false;
|
||||||
|
|
||||||
forAll (cellFace, cellFaceLabelI)
|
forAll(cellFace, cellFaceLabelI)
|
||||||
{
|
{
|
||||||
if (curBouFaceLabel == cellFace[cellFaceLabelI])
|
if (curBouFaceLabel == cellFace[cellFaceLabelI])
|
||||||
{
|
{
|
||||||
@ -155,7 +155,7 @@ void starMesh::markBoundaryFaces()
|
|||||||
<< " Face : " << endl << curFace << endl
|
<< " Face : " << endl << curFace << endl
|
||||||
<< "PROSTAR Command: vset,news,vlis";
|
<< "PROSTAR Command: vset,news,vlis";
|
||||||
|
|
||||||
forAll (curFace, spI)
|
forAll(curFace, spI)
|
||||||
{
|
{
|
||||||
if (curFace[spI] > -1 && curFace[spI] < starPointID_.size())
|
if (curFace[spI] > -1 && curFace[spI] < starPointID_.size())
|
||||||
{
|
{
|
||||||
@ -185,7 +185,7 @@ void starMesh::collectBoundaryFaces()
|
|||||||
const labelList& curBoundaryCellIDs = boundaryCellIDs_[patchI];
|
const labelList& curBoundaryCellIDs = boundaryCellIDs_[patchI];
|
||||||
const labelList& curBoundaryCellFaceIDs = boundaryCellFaceIDs_[patchI];
|
const labelList& curBoundaryCellFaceIDs = boundaryCellFaceIDs_[patchI];
|
||||||
|
|
||||||
forAll (curBoundaryCellIDs, faceI)
|
forAll(curBoundaryCellIDs, faceI)
|
||||||
{
|
{
|
||||||
patchFaces[faceI] =
|
patchFaces[faceI] =
|
||||||
cellFaces_[curBoundaryCellIDs[faceI]]
|
cellFaces_[curBoundaryCellIDs[faceI]]
|
||||||
|
|||||||
@ -63,7 +63,7 @@ void starMesh::createCoupleMatches()
|
|||||||
|
|
||||||
const label infoJump = max(1000, couples_.size()/20);
|
const label infoJump = max(1000, couples_.size()/20);
|
||||||
|
|
||||||
forAll (couples_, coupleI)
|
forAll(couples_, coupleI)
|
||||||
{
|
{
|
||||||
if (coupleI % infoJump == 0)
|
if (coupleI % infoJump == 0)
|
||||||
{
|
{
|
||||||
@ -168,7 +168,7 @@ void starMesh::createCoupleMatches()
|
|||||||
|
|
||||||
// Loop through all edges of the master face. For every edge,
|
// Loop through all edges of the master face. For every edge,
|
||||||
// intersect it with all edges of the cutting face.
|
// intersect it with all edges of the cutting face.
|
||||||
forAll (masterEdges, masterEdgeI)
|
forAll(masterEdges, masterEdgeI)
|
||||||
{
|
{
|
||||||
const edge& curMasterEdge = masterEdges[masterEdgeI];
|
const edge& curMasterEdge = masterEdges[masterEdgeI];
|
||||||
|
|
||||||
@ -186,7 +186,7 @@ void starMesh::createCoupleMatches()
|
|||||||
// go through all slave edges and try to get an intersection.
|
// go through all slave edges and try to get an intersection.
|
||||||
// The point is created along the original master edge rather
|
// The point is created along the original master edge rather
|
||||||
// than its corrected direction.
|
// than its corrected direction.
|
||||||
forAll (slaveEdges, slaveEdgeI)
|
forAll(slaveEdges, slaveEdgeI)
|
||||||
{
|
{
|
||||||
const edge& curSlaveEdge = slaveEdges[slaveEdgeI];
|
const edge& curSlaveEdge = slaveEdges[slaveEdgeI];
|
||||||
|
|
||||||
@ -464,7 +464,7 @@ void starMesh::createCoupleMatches()
|
|||||||
|
|
||||||
# ifdef DEBUG_COUPLE_INTERSECTION
|
# ifdef DEBUG_COUPLE_INTERSECTION
|
||||||
Info<< "additional slave edge points: " << endl;
|
Info<< "additional slave edge points: " << endl;
|
||||||
forAll (slaveEdgePoints, edgeI)
|
forAll(slaveEdgePoints, edgeI)
|
||||||
{
|
{
|
||||||
Info<< "edge: " << edgeI << ": " << slaveEdgePoints[edgeI]
|
Info<< "edge: " << edgeI << ": " << slaveEdgePoints[edgeI]
|
||||||
<< endl;
|
<< endl;
|
||||||
@ -498,7 +498,7 @@ void starMesh::createCoupleMatches()
|
|||||||
// count the number of additional points for face
|
// count the number of additional points for face
|
||||||
label nAdditionalMasterPoints = 0;
|
label nAdditionalMasterPoints = 0;
|
||||||
|
|
||||||
forAll (masterEdgePoints, edgeI)
|
forAll(masterEdgePoints, edgeI)
|
||||||
{
|
{
|
||||||
nAdditionalMasterPoints += masterEdgePoints[edgeI].size();
|
nAdditionalMasterPoints += masterEdgePoints[edgeI].size();
|
||||||
}
|
}
|
||||||
@ -516,7 +516,7 @@ void starMesh::createCoupleMatches()
|
|||||||
<< endl;
|
<< endl;
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
forAll (masterEdges, masterEdgeI)
|
forAll(masterEdges, masterEdgeI)
|
||||||
{
|
{
|
||||||
// Insert the starting point of the edge
|
// Insert the starting point of the edge
|
||||||
tmpMasterFace[nTmpMasterLabels] =
|
tmpMasterFace[nTmpMasterLabels] =
|
||||||
@ -637,7 +637,7 @@ void starMesh::createCoupleMatches()
|
|||||||
scalar masterTol =
|
scalar masterTol =
|
||||||
cpMergePointTol_*boundBox(tmpMasterFace.points(points_)).mag();
|
cpMergePointTol_*boundBox(tmpMasterFace.points(points_)).mag();
|
||||||
|
|
||||||
forAll (mstEdgesToCollapse, edgeI)
|
forAll(mstEdgesToCollapse, edgeI)
|
||||||
{
|
{
|
||||||
# ifdef DEBUG_FACE_ORDERING
|
# ifdef DEBUG_FACE_ORDERING
|
||||||
Info<< "edgeI: " << edgeI << " curEdge: "
|
Info<< "edgeI: " << edgeI << " curEdge: "
|
||||||
@ -693,7 +693,7 @@ void starMesh::createCoupleMatches()
|
|||||||
// count the number of additional points for face
|
// count the number of additional points for face
|
||||||
label nAdditionalSlavePoints = 0;
|
label nAdditionalSlavePoints = 0;
|
||||||
|
|
||||||
forAll (slaveEdgePoints, edgeI)
|
forAll(slaveEdgePoints, edgeI)
|
||||||
{
|
{
|
||||||
nAdditionalSlavePoints += slaveEdgePoints[edgeI].size();
|
nAdditionalSlavePoints += slaveEdgePoints[edgeI].size();
|
||||||
}
|
}
|
||||||
@ -710,7 +710,7 @@ void starMesh::createCoupleMatches()
|
|||||||
<< "nAdditionalSlavePoints: " << nAdditionalSlavePoints << endl;
|
<< "nAdditionalSlavePoints: " << nAdditionalSlavePoints << endl;
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
forAll (slaveEdges, slaveEdgeI)
|
forAll(slaveEdges, slaveEdgeI)
|
||||||
{
|
{
|
||||||
// Insert the starting point of the edge
|
// Insert the starting point of the edge
|
||||||
tmpSlaveFace[nTmpSlaveLabels] =
|
tmpSlaveFace[nTmpSlaveLabels] =
|
||||||
@ -894,7 +894,7 @@ void starMesh::createCoupleMatches()
|
|||||||
|
|
||||||
vector masterProjDir = -newMasterFace.normal(points_);
|
vector masterProjDir = -newMasterFace.normal(points_);
|
||||||
|
|
||||||
forAll (newSlaveEdges, edgeI)
|
forAll(newSlaveEdges, edgeI)
|
||||||
{
|
{
|
||||||
// Take the slave edge points and project into the master.
|
// Take the slave edge points and project into the master.
|
||||||
// In order to create a good intersection, move the
|
// In order to create a good intersection, move the
|
||||||
@ -937,7 +937,7 @@ void starMesh::createCoupleMatches()
|
|||||||
{
|
{
|
||||||
vector slaveProjDir = -newSlaveFace.normal(points_);
|
vector slaveProjDir = -newSlaveFace.normal(points_);
|
||||||
|
|
||||||
forAll (newMasterEdges, edgeI)
|
forAll(newMasterEdges, edgeI)
|
||||||
{
|
{
|
||||||
// Take the edge master points and project into the slave.
|
// Take the edge master points and project into the slave.
|
||||||
// In order to create a good intersection, move the
|
// In order to create a good intersection, move the
|
||||||
@ -1053,7 +1053,7 @@ void starMesh::createCoupleMatches()
|
|||||||
SLList<edge> edgesToConsider;
|
SLList<edge> edgesToConsider;
|
||||||
|
|
||||||
// collect master edges
|
// collect master edges
|
||||||
forAll (newMasterEdges, edgeI)
|
forAll(newMasterEdges, edgeI)
|
||||||
{
|
{
|
||||||
const edge& cme = newMasterEdges[edgeI];
|
const edge& cme = newMasterEdges[edgeI];
|
||||||
|
|
||||||
@ -1072,7 +1072,7 @@ void starMesh::createCoupleMatches()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// collect slave edges
|
// collect slave edges
|
||||||
forAll (newSlaveEdges, edgeI)
|
forAll(newSlaveEdges, edgeI)
|
||||||
{
|
{
|
||||||
const edge& cse = newSlaveEdges[edgeI];
|
const edge& cse = newSlaveEdges[edgeI];
|
||||||
|
|
||||||
@ -1260,7 +1260,7 @@ void starMesh::createCoupleMatches()
|
|||||||
# endif
|
# endif
|
||||||
|
|
||||||
// check the intersection face for duplicate points
|
// check the intersection face for duplicate points
|
||||||
forAll (intersectedFace, checkI)
|
forAll(intersectedFace, checkI)
|
||||||
{
|
{
|
||||||
for
|
for
|
||||||
(
|
(
|
||||||
@ -1312,7 +1312,7 @@ void starMesh::createCoupleMatches()
|
|||||||
// onto the master face to ensure closedness
|
// onto the master face to ensure closedness
|
||||||
vector pointProjectionNormal = -masterFace.normal(points_);
|
vector pointProjectionNormal = -masterFace.normal(points_);
|
||||||
|
|
||||||
forAll (intersectedFace, intPointI)
|
forAll(intersectedFace, intPointI)
|
||||||
{
|
{
|
||||||
# ifdef DEBUG_COUPLE_PROJECTION
|
# ifdef DEBUG_COUPLE_PROJECTION
|
||||||
Info<< "Proj: old point: "
|
Info<< "Proj: old point: "
|
||||||
@ -1424,7 +1424,7 @@ void starMesh::createCoupleMatches()
|
|||||||
// Loop through all cells and reset faces for removal to zero size
|
// Loop through all cells and reset faces for removal to zero size
|
||||||
const labelList crfToc = cellRemovedFaces.toc();
|
const labelList crfToc = cellRemovedFaces.toc();
|
||||||
|
|
||||||
forAll (crfToc, cellI)
|
forAll(crfToc, cellI)
|
||||||
{
|
{
|
||||||
const label curCell = crfToc[cellI];
|
const label curCell = crfToc[cellI];
|
||||||
|
|
||||||
@ -1451,7 +1451,7 @@ void starMesh::createCoupleMatches()
|
|||||||
const labelList cafToc = cellAddedFaces.toc();
|
const labelList cafToc = cellAddedFaces.toc();
|
||||||
|
|
||||||
// Insert the new faces into the list
|
// Insert the new faces into the list
|
||||||
forAll (cafToc, cellI)
|
forAll(cafToc, cellI)
|
||||||
{
|
{
|
||||||
const label curCell = cafToc[cellI];
|
const label curCell = cafToc[cellI];
|
||||||
|
|
||||||
@ -1465,7 +1465,7 @@ void starMesh::createCoupleMatches()
|
|||||||
label nNewFaces = 0;
|
label nNewFaces = 0;
|
||||||
|
|
||||||
// copy original faces that have not been removed
|
// copy original faces that have not been removed
|
||||||
forAll (oldFaces, faceI)
|
forAll(oldFaces, faceI)
|
||||||
{
|
{
|
||||||
if (oldFaces[faceI].size())
|
if (oldFaces[faceI].size())
|
||||||
{
|
{
|
||||||
|
|||||||
@ -42,13 +42,13 @@ void starMesh::createPolyBoundary()
|
|||||||
|
|
||||||
const labelListList& PointCells = pointCells();
|
const labelListList& PointCells = pointCells();
|
||||||
|
|
||||||
forAll (boundary_, patchI)
|
forAll(boundary_, patchI)
|
||||||
{
|
{
|
||||||
const faceList& curShapePatch = boundary_[patchI];
|
const faceList& curShapePatch = boundary_[patchI];
|
||||||
|
|
||||||
polyBoundaryPatchStartIndices_[patchI] = nCreatedFaces;
|
polyBoundaryPatchStartIndices_[patchI] = nCreatedFaces;
|
||||||
|
|
||||||
forAll (curShapePatch, faceI)
|
forAll(curShapePatch, faceI)
|
||||||
{
|
{
|
||||||
bool found = false;
|
bool found = false;
|
||||||
|
|
||||||
@ -100,7 +100,7 @@ void starMesh::createPolyBoundary()
|
|||||||
<< endl;
|
<< endl;
|
||||||
|
|
||||||
Info<< "PROSTAR Command: vset,news,vlis";
|
Info<< "PROSTAR Command: vset,news,vlis";
|
||||||
forAll (curCellFaces[cellFaceI], spI)
|
forAll(curCellFaces[cellFaceI], spI)
|
||||||
{
|
{
|
||||||
// check if the point is given by STAR
|
// check if the point is given by STAR
|
||||||
// or created locally
|
// or created locally
|
||||||
@ -136,7 +136,7 @@ void starMesh::createPolyBoundary()
|
|||||||
<< endl;
|
<< endl;
|
||||||
|
|
||||||
Info<< "PROSTAR Command: vset,news,vlis";
|
Info<< "PROSTAR Command: vset,news,vlis";
|
||||||
forAll (curCellFaces[cellFaceI], spI)
|
forAll(curCellFaces[cellFaceI], spI)
|
||||||
{
|
{
|
||||||
// check if the point is given by STAR
|
// check if the point is given by STAR
|
||||||
// or created locally
|
// or created locally
|
||||||
@ -181,11 +181,11 @@ void starMesh::createPolyBoundary()
|
|||||||
// check all cellPolys_ to see if there are any missing faces
|
// check all cellPolys_ to see if there are any missing faces
|
||||||
label nMissingFaceFound = 0;
|
label nMissingFaceFound = 0;
|
||||||
|
|
||||||
forAll (cellPolys_, cellI)
|
forAll(cellPolys_, cellI)
|
||||||
{
|
{
|
||||||
const labelList& curFaces = cellPolys_[cellI];
|
const labelList& curFaces = cellPolys_[cellI];
|
||||||
|
|
||||||
forAll (curFaces, faceI)
|
forAll(curFaces, faceI)
|
||||||
{
|
{
|
||||||
if (curFaces[faceI] < 0)
|
if (curFaces[faceI] < 0)
|
||||||
{
|
{
|
||||||
@ -200,7 +200,7 @@ void starMesh::createPolyBoundary()
|
|||||||
nMissingFaceFound++;
|
nMissingFaceFound++;
|
||||||
|
|
||||||
Info<< "PROSTAR Command: vset,news,vlis";
|
Info<< "PROSTAR Command: vset,news,vlis";
|
||||||
forAll (missingFace, spI)
|
forAll(missingFace, spI)
|
||||||
{
|
{
|
||||||
// check if the point is given by STAR or created locally
|
// check if the point is given by STAR or created locally
|
||||||
if
|
if
|
||||||
@ -233,11 +233,11 @@ void starMesh::createPolyBoundary()
|
|||||||
// (faces addressed once or more than twice)
|
// (faces addressed once or more than twice)
|
||||||
labelList markupFaces(meshFaces_.size(), 0);
|
labelList markupFaces(meshFaces_.size(), 0);
|
||||||
|
|
||||||
forAll (cellPolys_, cellI)
|
forAll(cellPolys_, cellI)
|
||||||
{
|
{
|
||||||
const labelList& curFaces = cellPolys_[cellI];
|
const labelList& curFaces = cellPolys_[cellI];
|
||||||
|
|
||||||
forAll (curFaces, faceI)
|
forAll(curFaces, faceI)
|
||||||
{
|
{
|
||||||
markupFaces[curFaces[faceI]]++;
|
markupFaces[curFaces[faceI]]++;
|
||||||
}
|
}
|
||||||
@ -250,7 +250,7 @@ void starMesh::createPolyBoundary()
|
|||||||
|
|
||||||
label nProblemFacesFound = 0;
|
label nProblemFacesFound = 0;
|
||||||
|
|
||||||
forAll (markupFaces, faceI)
|
forAll(markupFaces, faceI)
|
||||||
{
|
{
|
||||||
if (markupFaces[faceI] != 2)
|
if (markupFaces[faceI] != 2)
|
||||||
{
|
{
|
||||||
@ -264,7 +264,7 @@ void starMesh::createPolyBoundary()
|
|||||||
nProblemFacesFound++;
|
nProblemFacesFound++;
|
||||||
|
|
||||||
Info<< "PROSTAR Command: vset,news,vlis";
|
Info<< "PROSTAR Command: vset,news,vlis";
|
||||||
forAll (problemFace, spI)
|
forAll(problemFace, spI)
|
||||||
{
|
{
|
||||||
// check if the point is given by STAR or created locally
|
// check if the point is given by STAR or created locally
|
||||||
if
|
if
|
||||||
@ -299,7 +299,7 @@ List<polyPatch*> starMesh::polyBoundaryPatches(const polyMesh& pMesh)
|
|||||||
{
|
{
|
||||||
List<polyPatch*> p(boundary_.size());
|
List<polyPatch*> p(boundary_.size());
|
||||||
|
|
||||||
forAll (boundary_, patchI)
|
forAll(boundary_, patchI)
|
||||||
{
|
{
|
||||||
p[patchI] = polyPatch::New
|
p[patchI] = polyPatch::New
|
||||||
(
|
(
|
||||||
|
|||||||
@ -41,13 +41,13 @@ void starMesh::createPolyCells()
|
|||||||
|
|
||||||
label maxFaces = 0;
|
label maxFaces = 0;
|
||||||
|
|
||||||
forAll (cellPolys_, cellI)
|
forAll(cellPolys_, cellI)
|
||||||
{
|
{
|
||||||
cell& curCell = cellPolys_[cellI];
|
cell& curCell = cellPolys_[cellI];
|
||||||
|
|
||||||
curCell.setSize(cellFaces_[cellI].size());
|
curCell.setSize(cellFaces_[cellI].size());
|
||||||
|
|
||||||
forAll (curCell, fI)
|
forAll(curCell, fI)
|
||||||
{
|
{
|
||||||
curCell[fI] = -1;
|
curCell[fI] = -1;
|
||||||
}
|
}
|
||||||
@ -145,7 +145,7 @@ void starMesh::createPolyCells()
|
|||||||
label nextNei = -1;
|
label nextNei = -1;
|
||||||
label minNei = cellPolys_.size();
|
label minNei = cellPolys_.size();
|
||||||
|
|
||||||
forAll (neiCells, ncI)
|
forAll(neiCells, ncI)
|
||||||
{
|
{
|
||||||
if (neiCells[ncI] > -1 && neiCells[ncI] < minNei)
|
if (neiCells[ncI] > -1 && neiCells[ncI] < minNei)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -35,7 +35,7 @@ void starMesh::fixCollapsedEdges()
|
|||||||
{
|
{
|
||||||
cellFaces_.setSize(cellShapes_.size());
|
cellFaces_.setSize(cellShapes_.size());
|
||||||
|
|
||||||
forAll (cellShapes_, cellI)
|
forAll(cellShapes_, cellI)
|
||||||
{
|
{
|
||||||
cellFaces_[cellI] = cellShapes_[cellI].faces();
|
cellFaces_[cellI] = cellShapes_[cellI].faces();
|
||||||
}
|
}
|
||||||
@ -43,23 +43,23 @@ void starMesh::fixCollapsedEdges()
|
|||||||
// go through the faces and find if there exist faces with duplicate
|
// go through the faces and find if there exist faces with duplicate
|
||||||
// vertices. If so, purge the duplicates and mark the mesh as a polyMesh
|
// vertices. If so, purge the duplicates and mark the mesh as a polyMesh
|
||||||
|
|
||||||
forAll (cellFaces_, cellI)
|
forAll(cellFaces_, cellI)
|
||||||
{
|
{
|
||||||
faceList& curFaces = cellFaces_[cellI];
|
faceList& curFaces = cellFaces_[cellI];
|
||||||
|
|
||||||
forAll (curFaces, faceI)
|
forAll(curFaces, faceI)
|
||||||
{
|
{
|
||||||
face& vertexLabels = curFaces[faceI];
|
face& vertexLabels = curFaces[faceI];
|
||||||
|
|
||||||
bool duplicatesFound = false;
|
bool duplicatesFound = false;
|
||||||
|
|
||||||
forAll (vertexLabels, vI)
|
forAll(vertexLabels, vI)
|
||||||
{
|
{
|
||||||
label curLabel = vertexLabels[vI];
|
label curLabel = vertexLabels[vI];
|
||||||
|
|
||||||
label nFound = 0;
|
label nFound = 0;
|
||||||
|
|
||||||
forAll (vertexLabels, searchI)
|
forAll(vertexLabels, searchI)
|
||||||
{
|
{
|
||||||
if (vertexLabels[searchI] == curLabel)
|
if (vertexLabels[searchI] == curLabel)
|
||||||
{
|
{
|
||||||
@ -84,13 +84,13 @@ void starMesh::fixCollapsedEdges()
|
|||||||
// here as the shape is still needed to determine which face
|
// here as the shape is still needed to determine which face
|
||||||
// of the shape is used in potential couple matches. This
|
// of the shape is used in potential couple matches. This
|
||||||
// will be done in the end using the purgeShapes()
|
// will be done in the end using the purgeShapes()
|
||||||
//
|
//
|
||||||
|
|
||||||
// create a new face without duplicates and replace original
|
// create a new face without duplicates and replace original
|
||||||
face newFace(vertexLabels.size());
|
face newFace(vertexLabels.size());
|
||||||
label nNewVertices = 0;
|
label nNewVertices = 0;
|
||||||
|
|
||||||
forAll (vertexLabels, vI)
|
forAll(vertexLabels, vI)
|
||||||
{
|
{
|
||||||
// In order for a face to be a valid entity, duplicate
|
// In order for a face to be a valid entity, duplicate
|
||||||
// vertices can only be consecutive (othervise, the
|
// vertices can only be consecutive (othervise, the
|
||||||
|
|||||||
@ -63,7 +63,7 @@ void starMesh::mergeCoupleFacePoints()
|
|||||||
|
|
||||||
label nMergeSets = 0;
|
label nMergeSets = 0;
|
||||||
|
|
||||||
forAll (cellFaces_, cellI)
|
forAll(cellFaces_, cellI)
|
||||||
{
|
{
|
||||||
const faceList& curFaces = cellFaces_[cellI];
|
const faceList& curFaces = cellFaces_[cellI];
|
||||||
|
|
||||||
@ -74,13 +74,13 @@ void starMesh::mergeCoupleFacePoints()
|
|||||||
|
|
||||||
scalar pointMergeTol = GREAT;
|
scalar pointMergeTol = GREAT;
|
||||||
|
|
||||||
forAll (curFaces, faceI)
|
forAll(curFaces, faceI)
|
||||||
{
|
{
|
||||||
nPointsInCell += curFaces[faceI].size();
|
nPointsInCell += curFaces[faceI].size();
|
||||||
|
|
||||||
edgeList curEdges = curFaces[faceI].edges();
|
edgeList curEdges = curFaces[faceI].edges();
|
||||||
|
|
||||||
forAll (curEdges, edgeI)
|
forAll(curEdges, edgeI)
|
||||||
{
|
{
|
||||||
scalar length = curEdges[edgeI].mag(points_);
|
scalar length = curEdges[edgeI].mag(points_);
|
||||||
|
|
||||||
@ -98,11 +98,11 @@ void starMesh::mergeCoupleFacePoints()
|
|||||||
labelList cellPoints(nPointsInCell);
|
labelList cellPoints(nPointsInCell);
|
||||||
label nAddedPoints = 0;
|
label nAddedPoints = 0;
|
||||||
|
|
||||||
forAll (curFaces, faceI)
|
forAll(curFaces, faceI)
|
||||||
{
|
{
|
||||||
const face& f = curFaces[faceI];
|
const face& f = curFaces[faceI];
|
||||||
|
|
||||||
forAll (f, fI)
|
forAll(f, fI)
|
||||||
{
|
{
|
||||||
cellPoints[nAddedPoints] = f[fI];
|
cellPoints[nAddedPoints] = f[fI];
|
||||||
nAddedPoints++;
|
nAddedPoints++;
|
||||||
@ -210,7 +210,7 @@ void starMesh::mergeCoupleFacePoints()
|
|||||||
<< minMerge << " and " << maxMerge << endl;
|
<< minMerge << " and " << maxMerge << endl;
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
forAll (renumberPoints, elimI)
|
forAll(renumberPoints, elimI)
|
||||||
{
|
{
|
||||||
if (renumberPoints[elimI] == maxMerge)
|
if (renumberPoints[elimI] == maxMerge)
|
||||||
{
|
{
|
||||||
@ -235,7 +235,7 @@ void starMesh::mergeCoupleFacePoints()
|
|||||||
|
|
||||||
// Insert the primary point renumbering into the list
|
// Insert the primary point renumbering into the list
|
||||||
// Take care of possibly unused points in the list
|
// Take care of possibly unused points in the list
|
||||||
forAll (renumberPoints, pointI)
|
forAll(renumberPoints, pointI)
|
||||||
{
|
{
|
||||||
if (renumberPoints[pointI] < 0)
|
if (renumberPoints[pointI] < 0)
|
||||||
{
|
{
|
||||||
@ -253,17 +253,17 @@ void starMesh::mergeCoupleFacePoints()
|
|||||||
// renumbering of all faces. This will only be used to see which
|
// renumbering of all faces. This will only be used to see which
|
||||||
// points are still used!
|
// points are still used!
|
||||||
|
|
||||||
forAll (cellFaces_, cellI)
|
forAll(cellFaces_, cellI)
|
||||||
{
|
{
|
||||||
faceList& prelimFaces = cellFaces_[cellI];
|
faceList& prelimFaces = cellFaces_[cellI];
|
||||||
|
|
||||||
forAll (prelimFaces, faceI)
|
forAll(prelimFaces, faceI)
|
||||||
{
|
{
|
||||||
face oldFacePoints = prelimFaces[faceI];
|
face oldFacePoints = prelimFaces[faceI];
|
||||||
|
|
||||||
face& prelimFacePoints = prelimFaces[faceI];
|
face& prelimFacePoints = prelimFaces[faceI];
|
||||||
|
|
||||||
forAll (prelimFacePoints, pointI)
|
forAll(prelimFacePoints, pointI)
|
||||||
{
|
{
|
||||||
if (renumberPoints[oldFacePoints[pointI]] < 0)
|
if (renumberPoints[oldFacePoints[pointI]] < 0)
|
||||||
{
|
{
|
||||||
@ -284,26 +284,26 @@ void starMesh::mergeCoupleFacePoints()
|
|||||||
// re-create the point list and renumber the whole lot
|
// re-create the point list and renumber the whole lot
|
||||||
renumberPoints = 0;
|
renumberPoints = 0;
|
||||||
|
|
||||||
forAll (cellFaces_, cellI)
|
forAll(cellFaces_, cellI)
|
||||||
{
|
{
|
||||||
const faceList& curFaces = cellFaces_[cellI];
|
const faceList& curFaces = cellFaces_[cellI];
|
||||||
|
|
||||||
forAll (curFaces, faceI)
|
forAll(curFaces, faceI)
|
||||||
{
|
{
|
||||||
const face& curFacePoints = curFaces[faceI];
|
const face& curFacePoints = curFaces[faceI];
|
||||||
|
|
||||||
forAll (curFacePoints, pointI)
|
forAll(curFacePoints, pointI)
|
||||||
{
|
{
|
||||||
renumberPoints[curFacePoints[pointI]]++;
|
renumberPoints[curFacePoints[pointI]]++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
forAll (cellShapes_, cellI)
|
forAll(cellShapes_, cellI)
|
||||||
{
|
{
|
||||||
const labelList& curLabels = cellShapes_[cellI];
|
const labelList& curLabels = cellShapes_[cellI];
|
||||||
|
|
||||||
forAll (curLabels, pointI)
|
forAll(curLabels, pointI)
|
||||||
{
|
{
|
||||||
if (renumberPoints[curLabels[pointI]] == 0)
|
if (renumberPoints[curLabels[pointI]] == 0)
|
||||||
{
|
{
|
||||||
@ -320,7 +320,7 @@ void starMesh::mergeCoupleFacePoints()
|
|||||||
|
|
||||||
label nUsedPoints = 0;
|
label nUsedPoints = 0;
|
||||||
|
|
||||||
forAll (renumberPoints, pointI)
|
forAll(renumberPoints, pointI)
|
||||||
{
|
{
|
||||||
if (renumberPoints[pointI] > 0)
|
if (renumberPoints[pointI] > 0)
|
||||||
{
|
{
|
||||||
@ -347,17 +347,17 @@ void starMesh::mergeCoupleFacePoints()
|
|||||||
|
|
||||||
Info<< "Renumbering all faces" << endl;
|
Info<< "Renumbering all faces" << endl;
|
||||||
|
|
||||||
forAll (cellFaces_, cellI)
|
forAll(cellFaces_, cellI)
|
||||||
{
|
{
|
||||||
faceList& newFaces = cellFaces_[cellI];
|
faceList& newFaces = cellFaces_[cellI];
|
||||||
|
|
||||||
forAll (newFaces, faceI)
|
forAll(newFaces, faceI)
|
||||||
{
|
{
|
||||||
face oldFacePoints = newFaces[faceI];
|
face oldFacePoints = newFaces[faceI];
|
||||||
|
|
||||||
face& newFacePoints = newFaces[faceI];
|
face& newFacePoints = newFaces[faceI];
|
||||||
|
|
||||||
forAll (newFacePoints, pointI)
|
forAll(newFacePoints, pointI)
|
||||||
{
|
{
|
||||||
if (renumberPoints[oldFacePoints[pointI]] < 0)
|
if (renumberPoints[oldFacePoints[pointI]] < 0)
|
||||||
{
|
{
|
||||||
@ -376,13 +376,13 @@ void starMesh::mergeCoupleFacePoints()
|
|||||||
|
|
||||||
Info<< "Renumbering all cell shapes" << endl;
|
Info<< "Renumbering all cell shapes" << endl;
|
||||||
|
|
||||||
forAll (cellShapes_, cellI)
|
forAll(cellShapes_, cellI)
|
||||||
{
|
{
|
||||||
labelList oldLabels = cellShapes_[cellI];
|
labelList oldLabels = cellShapes_[cellI];
|
||||||
|
|
||||||
labelList& curLabels = cellShapes_[cellI];
|
labelList& curLabels = cellShapes_[cellI];
|
||||||
|
|
||||||
forAll (curLabels, pointI)
|
forAll(curLabels, pointI)
|
||||||
{
|
{
|
||||||
if (renumberPoints[curLabels[pointI]] < 0)
|
if (renumberPoints[curLabels[pointI]] < 0)
|
||||||
{
|
{
|
||||||
@ -408,7 +408,7 @@ void starMesh::mergeCoupleFacePoints()
|
|||||||
|
|
||||||
starPointID_ = -1;
|
starPointID_ = -1;
|
||||||
|
|
||||||
forAll (starPointID_, pointI)
|
forAll(starPointID_, pointI)
|
||||||
{
|
{
|
||||||
if (renumberPoints[pointI] > -1)
|
if (renumberPoints[pointI] > -1)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -33,18 +33,18 @@ Description
|
|||||||
|
|
||||||
void starMesh::purgeCellShapes()
|
void starMesh::purgeCellShapes()
|
||||||
{
|
{
|
||||||
forAll (cellFaces_, cellI)
|
forAll(cellFaces_, cellI)
|
||||||
{
|
{
|
||||||
const faceList& curFaces = cellFaces_[cellI];
|
const faceList& curFaces = cellFaces_[cellI];
|
||||||
|
|
||||||
// Get model faces
|
// Get model faces
|
||||||
faceList shapeFaces = cellShapes_[cellI].faces();
|
faceList shapeFaces = cellShapes_[cellI].faces();
|
||||||
|
|
||||||
forAll (shapeFaces, faceI)
|
forAll(shapeFaces, faceI)
|
||||||
{
|
{
|
||||||
bool found = false;
|
bool found = false;
|
||||||
|
|
||||||
forAll (curFaces, i)
|
forAll(curFaces, i)
|
||||||
{
|
{
|
||||||
if (shapeFaces[faceI] == curFaces[i])
|
if (shapeFaces[faceI] == curFaces[i])
|
||||||
{
|
{
|
||||||
|
|||||||
@ -108,7 +108,7 @@ void starMesh::addRegularCell
|
|||||||
// get reference to the addressing list
|
// get reference to the addressing list
|
||||||
const label* addressing = regularAddressingTable[regularTypeFlag];
|
const label* addressing = regularAddressingTable[regularTypeFlag];
|
||||||
|
|
||||||
forAll (regularCellLabels, labelI)
|
forAll(regularCellLabels, labelI)
|
||||||
{
|
{
|
||||||
regularCellLabels[labelI] = labels[addressing[labelI]];
|
regularCellLabels[labelI] = labels[addressing[labelI]];
|
||||||
}
|
}
|
||||||
@ -125,7 +125,7 @@ void starMesh::addSAMMcell
|
|||||||
{
|
{
|
||||||
// get type, reg and permutation flag
|
// get type, reg and permutation flag
|
||||||
label typeFlag = labels[21];
|
label typeFlag = labels[21];
|
||||||
// label regularityFlag = labels[22]; // Not used.
|
// label regularityFlag = labels[22]; // Not used.
|
||||||
label permutationFlag = labels[23];
|
label permutationFlag = labels[23];
|
||||||
|
|
||||||
// grab the shape from the table
|
// grab the shape from the table
|
||||||
@ -194,7 +194,7 @@ void starMesh::addSAMMcell
|
|||||||
// get reference to the addressing list
|
// get reference to the addressing list
|
||||||
const label* addressing = sammAddressingTable[sammTypeFlag];
|
const label* addressing = sammAddressingTable[sammTypeFlag];
|
||||||
|
|
||||||
forAll (sammCellLabels, labelI)
|
forAll(sammCellLabels, labelI)
|
||||||
{
|
{
|
||||||
sammCellLabels[labelI] = labels[addressing[labelI]];
|
sammCellLabels[labelI] = labels[addressing[labelI]];
|
||||||
}
|
}
|
||||||
@ -239,7 +239,7 @@ void starMesh::readCells()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// backward compatibility: number of trailing rubbish in
|
// backward compatibility: number of trailing rubbish in
|
||||||
// STAR is unknown.
|
// STAR is unknown.
|
||||||
// Fixed to cope with missing \n on last line.
|
// Fixed to cope with missing \n on last line.
|
||||||
readToNl(cellsFile);
|
readToNl(cellsFile);
|
||||||
}
|
}
|
||||||
@ -259,15 +259,15 @@ void starMesh::readCells()
|
|||||||
starCellPermutation_.setSize(nCells);
|
starCellPermutation_.setSize(nCells);
|
||||||
|
|
||||||
// reset permutation to invalid value
|
// reset permutation to invalid value
|
||||||
forAll (starCellPermutation_, i)
|
forAll(starCellPermutation_, i)
|
||||||
{
|
{
|
||||||
starCellPermutation_[i] = -1;
|
starCellPermutation_[i] = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
starCellLabelLookup_.setSize(maxLabel+1);
|
starCellLabelLookup_.setSize(maxLabel+1);
|
||||||
|
|
||||||
// reset point labels to invalid value
|
// reset point labels to invalid value
|
||||||
forAll (starCellLabelLookup_, i)
|
forAll(starCellLabelLookup_, i)
|
||||||
{
|
{
|
||||||
starCellLabelLookup_[i] = -1;
|
starCellLabelLookup_[i] = -1;
|
||||||
}
|
}
|
||||||
@ -285,8 +285,8 @@ void starMesh::readCells()
|
|||||||
|
|
||||||
label addOnToCell = 0;
|
label addOnToCell = 0;
|
||||||
|
|
||||||
// reset the labels to -1. Debugging.
|
// reset the labels to -1. Debugging.
|
||||||
forAll (labels, i)
|
forAll(labels, i)
|
||||||
{
|
{
|
||||||
labels[i] = -1;
|
labels[i] = -1;
|
||||||
}
|
}
|
||||||
@ -342,7 +342,7 @@ void starMesh::readCells()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// backward compatibility: number of trailing rubbish in
|
// backward compatibility: number of trailing rubbish in
|
||||||
// STAR is unknown.
|
// STAR is unknown.
|
||||||
readToNl(cellsFile);
|
readToNl(cellsFile);
|
||||||
|
|
||||||
addOnToCell--;
|
addOnToCell--;
|
||||||
@ -367,13 +367,13 @@ void starMesh::readCells()
|
|||||||
// check cell labels
|
// check cell labels
|
||||||
const labelList& curShapeLabels = cellShapes_[cellI];
|
const labelList& curShapeLabels = cellShapes_[cellI];
|
||||||
|
|
||||||
forAll (curShapeLabels, i)
|
forAll(curShapeLabels, i)
|
||||||
{
|
{
|
||||||
if (curShapeLabels[i] < 0)
|
if (curShapeLabels[i] < 0)
|
||||||
{
|
{
|
||||||
FatalErrorIn("starMesh::readCells()")
|
FatalErrorIn("starMesh::readCells()")
|
||||||
<< "Invalid vertex found in cell " << cellI
|
<< "Invalid vertex found in cell " << cellI
|
||||||
<< ". STAR cell no: " << lineLabel
|
<< ". STAR cell no: " << lineLabel
|
||||||
<< " labels: " << curShapeLabels
|
<< " labels: " << curShapeLabels
|
||||||
<< abort(FatalError);
|
<< abort(FatalError);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -7,7 +7,7 @@
|
|||||||
List<faceZone*> fz(3*mergePatchPairs.size());
|
List<faceZone*> fz(3*mergePatchPairs.size());
|
||||||
List<cellZone*> cz(0);
|
List<cellZone*> cz(0);
|
||||||
|
|
||||||
forAll (mergePatchPairs, pairI)
|
forAll(mergePatchPairs, pairI)
|
||||||
{
|
{
|
||||||
const word mergeName
|
const word mergeName
|
||||||
(
|
(
|
||||||
@ -34,7 +34,7 @@
|
|||||||
|
|
||||||
labelList isf(masterPatch.size());
|
labelList isf(masterPatch.size());
|
||||||
|
|
||||||
forAll (isf, i)
|
forAll(isf, i)
|
||||||
{
|
{
|
||||||
isf[i] = masterPatch.start() + i;
|
isf[i] = masterPatch.start() + i;
|
||||||
}
|
}
|
||||||
@ -58,7 +58,7 @@
|
|||||||
|
|
||||||
labelList osf(slavePatch.size());
|
labelList osf(slavePatch.size());
|
||||||
|
|
||||||
forAll (osf, i)
|
forAll(osf, i)
|
||||||
{
|
{
|
||||||
osf[i] = slavePatch.start() + i;
|
osf[i] = slavePatch.start() + i;
|
||||||
}
|
}
|
||||||
@ -91,7 +91,7 @@
|
|||||||
attachPolyTopoChanger polyMeshAttacher(mesh);
|
attachPolyTopoChanger polyMeshAttacher(mesh);
|
||||||
polyMeshAttacher.setSize(mergePatchPairs.size());
|
polyMeshAttacher.setSize(mergePatchPairs.size());
|
||||||
|
|
||||||
forAll (mergePatchPairs, pairI)
|
forAll(mergePatchPairs, pairI)
|
||||||
{
|
{
|
||||||
const word mergeName
|
const word mergeName
|
||||||
(
|
(
|
||||||
|
|||||||
@ -48,7 +48,7 @@ Foam::label Foam::mergePolyMesh::patchIndex(const polyPatch& p)
|
|||||||
|
|
||||||
bool nameFound = false;
|
bool nameFound = false;
|
||||||
|
|
||||||
forAll (patchNames_, patchI)
|
forAll(patchNames_, patchI)
|
||||||
{
|
{
|
||||||
if (patchNames_[patchI] == pName)
|
if (patchNames_[patchI] == pName)
|
||||||
{
|
{
|
||||||
@ -98,7 +98,7 @@ Foam::label Foam::mergePolyMesh::zoneIndex
|
|||||||
const word& curName
|
const word& curName
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
forAll (names, zoneI)
|
forAll(names, zoneI)
|
||||||
{
|
{
|
||||||
if (names[zoneI] == curName)
|
if (names[zoneI] == curName)
|
||||||
{
|
{
|
||||||
@ -129,7 +129,7 @@ Foam::mergePolyMesh::mergePolyMesh(const IOobject& io)
|
|||||||
wordList curPatchTypes = boundaryMesh().types();
|
wordList curPatchTypes = boundaryMesh().types();
|
||||||
wordList curPatchNames = boundaryMesh().names();
|
wordList curPatchNames = boundaryMesh().names();
|
||||||
|
|
||||||
forAll (curPatchTypes, patchI)
|
forAll(curPatchTypes, patchI)
|
||||||
{
|
{
|
||||||
patchTypes_.append(curPatchTypes[patchI]);
|
patchTypes_.append(curPatchTypes[patchI]);
|
||||||
patchNames_.append(curPatchNames[patchI]);
|
patchNames_.append(curPatchNames[patchI]);
|
||||||
@ -144,7 +144,7 @@ Foam::mergePolyMesh::mergePolyMesh(const IOobject& io)
|
|||||||
pointZoneNames_.setCapacity(2*curPointZoneNames.size());
|
pointZoneNames_.setCapacity(2*curPointZoneNames.size());
|
||||||
}
|
}
|
||||||
|
|
||||||
forAll (curPointZoneNames, zoneI)
|
forAll(curPointZoneNames, zoneI)
|
||||||
{
|
{
|
||||||
pointZoneNames_.append(curPointZoneNames[zoneI]);
|
pointZoneNames_.append(curPointZoneNames[zoneI]);
|
||||||
}
|
}
|
||||||
@ -156,7 +156,7 @@ Foam::mergePolyMesh::mergePolyMesh(const IOobject& io)
|
|||||||
{
|
{
|
||||||
faceZoneNames_.setCapacity(2*curFaceZoneNames.size());
|
faceZoneNames_.setCapacity(2*curFaceZoneNames.size());
|
||||||
}
|
}
|
||||||
forAll (curFaceZoneNames, zoneI)
|
forAll(curFaceZoneNames, zoneI)
|
||||||
{
|
{
|
||||||
faceZoneNames_.append(curFaceZoneNames[zoneI]);
|
faceZoneNames_.append(curFaceZoneNames[zoneI]);
|
||||||
}
|
}
|
||||||
@ -168,7 +168,7 @@ Foam::mergePolyMesh::mergePolyMesh(const IOobject& io)
|
|||||||
{
|
{
|
||||||
cellZoneNames_.setCapacity(2*curCellZoneNames.size());
|
cellZoneNames_.setCapacity(2*curCellZoneNames.size());
|
||||||
}
|
}
|
||||||
forAll (curCellZoneNames, zoneI)
|
forAll(curCellZoneNames, zoneI)
|
||||||
{
|
{
|
||||||
cellZoneNames_.append(curCellZoneNames[zoneI]);
|
cellZoneNames_.append(curCellZoneNames[zoneI]);
|
||||||
}
|
}
|
||||||
@ -194,12 +194,12 @@ void Foam::mergePolyMesh::addMesh(const polyMesh& m)
|
|||||||
const pointZoneMesh& pz = m.pointZones();
|
const pointZoneMesh& pz = m.pointZones();
|
||||||
labelList pointZoneIndices(pz.size());
|
labelList pointZoneIndices(pz.size());
|
||||||
|
|
||||||
forAll (pz, zoneI)
|
forAll(pz, zoneI)
|
||||||
{
|
{
|
||||||
pointZoneIndices[zoneI] = zoneIndex(pointZoneNames_, pz[zoneI].name());
|
pointZoneIndices[zoneI] = zoneIndex(pointZoneNames_, pz[zoneI].name());
|
||||||
}
|
}
|
||||||
|
|
||||||
forAll (p, pointI)
|
forAll(p, pointI)
|
||||||
{
|
{
|
||||||
// Grab zone ID. If a point is not in a zone, it will return -1
|
// Grab zone ID. If a point is not in a zone, it will return -1
|
||||||
zoneID = pz.whichZone(pointI);
|
zoneID = pz.whichZone(pointI);
|
||||||
@ -231,12 +231,12 @@ void Foam::mergePolyMesh::addMesh(const polyMesh& m)
|
|||||||
const cellZoneMesh& cz = m.cellZones();
|
const cellZoneMesh& cz = m.cellZones();
|
||||||
labelList cellZoneIndices(cz.size());
|
labelList cellZoneIndices(cz.size());
|
||||||
|
|
||||||
forAll (cz, zoneI)
|
forAll(cz, zoneI)
|
||||||
{
|
{
|
||||||
cellZoneIndices[zoneI] = zoneIndex(cellZoneNames_, cz[zoneI].name());
|
cellZoneIndices[zoneI] = zoneIndex(cellZoneNames_, cz[zoneI].name());
|
||||||
}
|
}
|
||||||
|
|
||||||
forAll (c, cellI)
|
forAll(c, cellI)
|
||||||
{
|
{
|
||||||
// Grab zone ID. If a cell is not in a zone, it will return -1
|
// Grab zone ID. If a cell is not in a zone, it will return -1
|
||||||
zoneID = cz.whichZone(cellI);
|
zoneID = cz.whichZone(cellI);
|
||||||
@ -267,7 +267,7 @@ void Foam::mergePolyMesh::addMesh(const polyMesh& m)
|
|||||||
// Gather the patch indices
|
// Gather the patch indices
|
||||||
labelList patchIndices(bm.size());
|
labelList patchIndices(bm.size());
|
||||||
|
|
||||||
forAll (patchIndices, patchI)
|
forAll(patchIndices, patchI)
|
||||||
{
|
{
|
||||||
patchIndices[patchI] = patchIndex(bm[patchI]);
|
patchIndices[patchI] = patchIndex(bm[patchI]);
|
||||||
}
|
}
|
||||||
@ -281,7 +281,7 @@ void Foam::mergePolyMesh::addMesh(const polyMesh& m)
|
|||||||
const faceZoneMesh& fz = m.faceZones();
|
const faceZoneMesh& fz = m.faceZones();
|
||||||
labelList faceZoneIndices(fz.size());
|
labelList faceZoneIndices(fz.size());
|
||||||
|
|
||||||
forAll (fz, zoneI)
|
forAll(fz, zoneI)
|
||||||
{
|
{
|
||||||
faceZoneIndices[zoneI] = zoneIndex(faceZoneNames_, fz[zoneI].name());
|
faceZoneIndices[zoneI] = zoneIndex(faceZoneNames_, fz[zoneI].name());
|
||||||
}
|
}
|
||||||
@ -295,13 +295,13 @@ void Foam::mergePolyMesh::addMesh(const polyMesh& m)
|
|||||||
label newOwn, newNei, newPatch, newZone;
|
label newOwn, newNei, newPatch, newZone;
|
||||||
bool newZoneFlip;
|
bool newZoneFlip;
|
||||||
|
|
||||||
forAll (f, faceI)
|
forAll(f, faceI)
|
||||||
{
|
{
|
||||||
const face& curFace = f[faceI];
|
const face& curFace = f[faceI];
|
||||||
|
|
||||||
face newFace(curFace.size());
|
face newFace(curFace.size());
|
||||||
|
|
||||||
forAll (curFace, pointI)
|
forAll(curFace, pointI)
|
||||||
{
|
{
|
||||||
newFace[pointI] = renumberPoints[curFace[pointI]];
|
newFace[pointI] = renumberPoints[curFace[pointI]];
|
||||||
}
|
}
|
||||||
|
|||||||
@ -82,13 +82,13 @@ Foam::mirrorFvMesh::mirrorFvMesh(const IOobject& io)
|
|||||||
labelList mirrorPointLookup(oldPoints.size(), -1);
|
labelList mirrorPointLookup(oldPoints.size(), -1);
|
||||||
|
|
||||||
// Grab the old points
|
// Grab the old points
|
||||||
forAll (oldPoints, pointI)
|
forAll(oldPoints, pointI)
|
||||||
{
|
{
|
||||||
newPoints[nNewPoints] = oldPoints[pointI];
|
newPoints[nNewPoints] = oldPoints[pointI];
|
||||||
nNewPoints++;
|
nNewPoints++;
|
||||||
}
|
}
|
||||||
|
|
||||||
forAll (oldPoints, pointI)
|
forAll(oldPoints, pointI)
|
||||||
{
|
{
|
||||||
scalar alpha =
|
scalar alpha =
|
||||||
mirrorPlane.normalIntersect
|
mirrorPlane.normalIntersect
|
||||||
@ -145,7 +145,7 @@ Foam::mirrorFvMesh::mirrorFvMesh(const IOobject& io)
|
|||||||
|
|
||||||
const unallocLabelList& oldOwnerStart = lduAddr().ownerStartAddr();
|
const unallocLabelList& oldOwnerStart = lduAddr().ownerStartAddr();
|
||||||
|
|
||||||
forAll (newCellFaces, cellI)
|
forAll(newCellFaces, cellI)
|
||||||
{
|
{
|
||||||
labelList& curFaces = newCellFaces[cellI];
|
labelList& curFaces = newCellFaces[cellI];
|
||||||
|
|
||||||
@ -154,7 +154,7 @@ Foam::mirrorFvMesh::mirrorFvMesh(const IOobject& io)
|
|||||||
|
|
||||||
curFaces.setSize(e - s);
|
curFaces.setSize(e - s);
|
||||||
|
|
||||||
forAll (curFaces, i)
|
forAll(curFaces, i)
|
||||||
{
|
{
|
||||||
curFaces[i] = s + i;
|
curFaces[i] = s + i;
|
||||||
}
|
}
|
||||||
@ -164,7 +164,7 @@ Foam::mirrorFvMesh::mirrorFvMesh(const IOobject& io)
|
|||||||
// as internal
|
// as internal
|
||||||
boolListList insertedBouFace(oldPatches.size());
|
boolListList insertedBouFace(oldPatches.size());
|
||||||
|
|
||||||
forAll (oldPatches, patchI)
|
forAll(oldPatches, patchI)
|
||||||
{
|
{
|
||||||
const polyPatch& curPatch = oldPatches[patchI];
|
const polyPatch& curPatch = oldPatches[patchI];
|
||||||
|
|
||||||
@ -186,7 +186,7 @@ Foam::mirrorFvMesh::mirrorFvMesh(const IOobject& io)
|
|||||||
const unallocLabelList& curFaceCells = curPatch.faceCells();
|
const unallocLabelList& curFaceCells = curPatch.faceCells();
|
||||||
const label curStart = curPatch.start();
|
const label curStart = curPatch.start();
|
||||||
|
|
||||||
forAll (curPatch, faceI)
|
forAll(curPatch, faceI)
|
||||||
{
|
{
|
||||||
// Find out if the mirrored face is identical to the
|
// Find out if the mirrored face is identical to the
|
||||||
// original. If so, the face needs to become internal and
|
// original. If so, the face needs to become internal and
|
||||||
@ -194,7 +194,7 @@ Foam::mirrorFvMesh::mirrorFvMesh(const IOobject& io)
|
|||||||
const face& origFace = curPatch[faceI];
|
const face& origFace = curPatch[faceI];
|
||||||
|
|
||||||
face mirrorFace(origFace.size());
|
face mirrorFace(origFace.size());
|
||||||
forAll (mirrorFace, pointI)
|
forAll(mirrorFace, pointI)
|
||||||
{
|
{
|
||||||
mirrorFace[pointI] = mirrorPointLookup[origFace[pointI]];
|
mirrorFace[pointI] = mirrorPointLookup[origFace[pointI]];
|
||||||
}
|
}
|
||||||
@ -225,11 +225,11 @@ Foam::mirrorFvMesh::mirrorFvMesh(const IOobject& io)
|
|||||||
label nNewFaces = 0;
|
label nNewFaces = 0;
|
||||||
|
|
||||||
// Insert original (internal) faces
|
// Insert original (internal) faces
|
||||||
forAll (newCellFaces, cellI)
|
forAll(newCellFaces, cellI)
|
||||||
{
|
{
|
||||||
const labelList& curCellFaces = newCellFaces[cellI];
|
const labelList& curCellFaces = newCellFaces[cellI];
|
||||||
|
|
||||||
forAll (curCellFaces, cfI)
|
forAll(curCellFaces, cfI)
|
||||||
{
|
{
|
||||||
newFaces[nNewFaces] = oldFaces[curCellFaces[cfI]];
|
newFaces[nNewFaces] = oldFaces[curCellFaces[cfI]];
|
||||||
masterFaceLookup[curCellFaces[cfI]] = nNewFaces;
|
masterFaceLookup[curCellFaces[cfI]] = nNewFaces;
|
||||||
@ -264,7 +264,7 @@ Foam::mirrorFvMesh::mirrorFvMesh(const IOobject& io)
|
|||||||
labelList newPatchStarts(boundary().size(), -1);
|
labelList newPatchStarts(boundary().size(), -1);
|
||||||
label nNewPatches = 0;
|
label nNewPatches = 0;
|
||||||
|
|
||||||
forAll (boundaryMesh(), patchI)
|
forAll(boundaryMesh(), patchI)
|
||||||
{
|
{
|
||||||
const label curPatchSize = boundaryMesh()[patchI].size();
|
const label curPatchSize = boundaryMesh()[patchI].size();
|
||||||
const label curPatchStart = boundaryMesh()[patchI].start();
|
const label curPatchStart = boundaryMesh()[patchI].start();
|
||||||
@ -346,14 +346,14 @@ Foam::mirrorFvMesh::mirrorFvMesh(const IOobject& io)
|
|||||||
label nNewCells = 0;
|
label nNewCells = 0;
|
||||||
|
|
||||||
// Grab the original cells. Take care of face renumbering.
|
// Grab the original cells. Take care of face renumbering.
|
||||||
forAll (oldCells, cellI)
|
forAll(oldCells, cellI)
|
||||||
{
|
{
|
||||||
const cell& oc = oldCells[cellI];
|
const cell& oc = oldCells[cellI];
|
||||||
|
|
||||||
cell& nc = newCells[nNewCells];
|
cell& nc = newCells[nNewCells];
|
||||||
nc.setSize(oc.size());
|
nc.setSize(oc.size());
|
||||||
|
|
||||||
forAll (oc, i)
|
forAll(oc, i)
|
||||||
{
|
{
|
||||||
nc[i] = masterFaceLookup[oc[i]];
|
nc[i] = masterFaceLookup[oc[i]];
|
||||||
}
|
}
|
||||||
@ -362,14 +362,14 @@ Foam::mirrorFvMesh::mirrorFvMesh(const IOobject& io)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Mirror the cells
|
// Mirror the cells
|
||||||
forAll (oldCells, cellI)
|
forAll(oldCells, cellI)
|
||||||
{
|
{
|
||||||
const cell& oc = oldCells[cellI];
|
const cell& oc = oldCells[cellI];
|
||||||
|
|
||||||
cell& nc = newCells[nNewCells];
|
cell& nc = newCells[nNewCells];
|
||||||
nc.setSize(oc.size());
|
nc.setSize(oc.size());
|
||||||
|
|
||||||
forAll (oc, i)
|
forAll(oc, i)
|
||||||
{
|
{
|
||||||
nc[i] = mirrorFaceLookup[oc[i]];
|
nc[i] = mirrorFaceLookup[oc[i]];
|
||||||
}
|
}
|
||||||
@ -394,7 +394,7 @@ Foam::mirrorFvMesh::mirrorFvMesh(const IOobject& io)
|
|||||||
// Add the boundary patches
|
// Add the boundary patches
|
||||||
List<polyPatch*> p(newPatchTypes.size());
|
List<polyPatch*> p(newPatchTypes.size());
|
||||||
|
|
||||||
forAll (p, patchI)
|
forAll(p, patchI)
|
||||||
{
|
{
|
||||||
p[patchI] = polyPatch::New
|
p[patchI] = polyPatch::New
|
||||||
(
|
(
|
||||||
|
|||||||
@ -125,7 +125,7 @@ labelList regionFaceOrder
|
|||||||
|
|
||||||
label prevRegion = -1;
|
label prevRegion = -1;
|
||||||
|
|
||||||
forAll (cellOrder, newCellI)
|
forAll(cellOrder, newCellI)
|
||||||
{
|
{
|
||||||
label oldCellI = cellOrder[newCellI];
|
label oldCellI = cellOrder[newCellI];
|
||||||
|
|
||||||
|
|||||||
@ -284,7 +284,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
labelList osf(slavePatch.size());
|
labelList osf(slavePatch.size());
|
||||||
|
|
||||||
forAll (osf, i)
|
forAll(osf, i)
|
||||||
{
|
{
|
||||||
osf[i] = slavePatch.start() + i;
|
osf[i] = slavePatch.start() + i;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -65,7 +65,7 @@ int main(int argc, char *argv[])
|
|||||||
# include "createTime.H"
|
# include "createTime.H"
|
||||||
Foam::instantList timeDirs = Foam::timeSelector::select0(runTime, args);
|
Foam::instantList timeDirs = Foam::timeSelector::select0(runTime, args);
|
||||||
|
|
||||||
forAll (timeDirs, timeI)
|
forAll(timeDirs, timeI)
|
||||||
{
|
{
|
||||||
runTime.setTime(timeDirs[timeI], timeI);
|
runTime.setTime(timeDirs[timeI], timeI);
|
||||||
Info<< "Time = " << runTime.timeName() << endl;
|
Info<< "Time = " << runTime.timeName() << endl;
|
||||||
|
|||||||
@ -56,7 +56,7 @@ int main(int argc, char *argv[])
|
|||||||
Foam::Time::findTimes(args.rootPath()/args.caseName())
|
Foam::Time::findTimes(args.rootPath()/args.caseName())
|
||||||
);
|
);
|
||||||
|
|
||||||
forAll (times, i)
|
forAll(times, i)
|
||||||
{
|
{
|
||||||
Info<< times[i].name() << endl;
|
Info<< times[i].name() << endl;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -118,7 +118,7 @@ bool Foam::domainDecomposition::writeDecomposition()
|
|||||||
// Make a lookup map for globally shared points
|
// Make a lookup map for globally shared points
|
||||||
Map<label> sharedPointLookup(2*globallySharedPoints_.size());
|
Map<label> sharedPointLookup(2*globallySharedPoints_.size());
|
||||||
|
|
||||||
forAll (globallySharedPoints_, pointi)
|
forAll(globallySharedPoints_, pointi)
|
||||||
{
|
{
|
||||||
sharedPointLookup.insert(globallySharedPoints_[pointi], pointi);
|
sharedPointLookup.insert(globallySharedPoints_[pointi], pointi);
|
||||||
}
|
}
|
||||||
@ -174,7 +174,7 @@ bool Foam::domainDecomposition::writeDecomposition()
|
|||||||
|
|
||||||
pointField procPoints(curPointLabels.size());
|
pointField procPoints(curPointLabels.size());
|
||||||
|
|
||||||
forAll (curPointLabels, pointi)
|
forAll(curPointLabels, pointi)
|
||||||
{
|
{
|
||||||
procPoints[pointi] = meshPoints[curPointLabels[pointi]];
|
procPoints[pointi] = meshPoints[curPointLabels[pointi]];
|
||||||
|
|
||||||
@ -190,7 +190,7 @@ bool Foam::domainDecomposition::writeDecomposition()
|
|||||||
|
|
||||||
faceList procFaces(curFaceLabels.size());
|
faceList procFaces(curFaceLabels.size());
|
||||||
|
|
||||||
forAll (curFaceLabels, facei)
|
forAll(curFaceLabels, facei)
|
||||||
{
|
{
|
||||||
// Mark the original face as used
|
// Mark the original face as used
|
||||||
// Remember to decrement the index by one (turning index)
|
// Remember to decrement the index by one (turning index)
|
||||||
@ -217,7 +217,7 @@ bool Foam::domainDecomposition::writeDecomposition()
|
|||||||
|
|
||||||
procFaceLabels.setSize(origFaceLabels.size());
|
procFaceLabels.setSize(origFaceLabels.size());
|
||||||
|
|
||||||
forAll (origFaceLabels, pointi)
|
forAll(origFaceLabels, pointi)
|
||||||
{
|
{
|
||||||
procFaceLabels[pointi] = pointLookup[origFaceLabels[pointi]];
|
procFaceLabels[pointi] = pointLookup[origFaceLabels[pointi]];
|
||||||
}
|
}
|
||||||
@ -230,7 +230,7 @@ bool Foam::domainDecomposition::writeDecomposition()
|
|||||||
|
|
||||||
cellList procCells(curCellLabels.size());
|
cellList procCells(curCellLabels.size());
|
||||||
|
|
||||||
forAll (curCellLabels, celli)
|
forAll(curCellLabels, celli)
|
||||||
{
|
{
|
||||||
const labelList& origCellLabels = meshCells[curCellLabels[celli]];
|
const labelList& origCellLabels = meshCells[curCellLabels[celli]];
|
||||||
|
|
||||||
@ -238,7 +238,7 @@ bool Foam::domainDecomposition::writeDecomposition()
|
|||||||
|
|
||||||
curCell.setSize(origCellLabels.size());
|
curCell.setSize(origCellLabels.size());
|
||||||
|
|
||||||
forAll (origCellLabels, cellFaceI)
|
forAll(origCellLabels, cellFaceI)
|
||||||
{
|
{
|
||||||
curCell[cellFaceI] = faceLookup[origCellLabels[cellFaceI]];
|
curCell[cellFaceI] = faceLookup[origCellLabels[cellFaceI]];
|
||||||
}
|
}
|
||||||
@ -305,7 +305,7 @@ bool Foam::domainDecomposition::writeDecomposition()
|
|||||||
|
|
||||||
label nPatches = 0;
|
label nPatches = 0;
|
||||||
|
|
||||||
forAll (curPatchSizes, patchi)
|
forAll(curPatchSizes, patchi)
|
||||||
{
|
{
|
||||||
// Get the face labels consistent with the field mapping
|
// Get the face labels consistent with the field mapping
|
||||||
// (reuse the patch field mappers)
|
// (reuse the patch field mappers)
|
||||||
@ -336,7 +336,7 @@ bool Foam::domainDecomposition::writeDecomposition()
|
|||||||
nPatches++;
|
nPatches++;
|
||||||
}
|
}
|
||||||
|
|
||||||
forAll (curProcessorPatchSizes, procPatchI)
|
forAll(curProcessorPatchSizes, procPatchI)
|
||||||
{
|
{
|
||||||
procPatches[nPatches] =
|
procPatches[nPatches] =
|
||||||
new processorPolyPatch
|
new processorPolyPatch
|
||||||
@ -377,7 +377,7 @@ bool Foam::domainDecomposition::writeDecomposition()
|
|||||||
|
|
||||||
// Use the pointToZone map to find out the single zone (if any),
|
// Use the pointToZone map to find out the single zone (if any),
|
||||||
// use slow search only for shared points.
|
// use slow search only for shared points.
|
||||||
forAll (curPointLabels, pointi)
|
forAll(curPointLabels, pointi)
|
||||||
{
|
{
|
||||||
label curPoint = curPointLabels[pointi];
|
label curPoint = curPointLabels[pointi];
|
||||||
|
|
||||||
@ -448,7 +448,7 @@ bool Foam::domainDecomposition::writeDecomposition()
|
|||||||
// Go through all the zoned faces and find out if they
|
// Go through all the zoned faces and find out if they
|
||||||
// belong to a zone. If so, add it to the zone as
|
// belong to a zone. If so, add it to the zone as
|
||||||
// necessary
|
// necessary
|
||||||
forAll (curFaceLabels, facei)
|
forAll(curFaceLabels, facei)
|
||||||
{
|
{
|
||||||
// Remember to decrement the index by one (turning index)
|
// Remember to decrement the index by one (turning index)
|
||||||
//
|
//
|
||||||
@ -535,7 +535,7 @@ bool Foam::domainDecomposition::writeDecomposition()
|
|||||||
zoneCells[zoneI].setCapacity(cz[zoneI].size() / nProcs_);
|
zoneCells[zoneI].setCapacity(cz[zoneI].size() / nProcs_);
|
||||||
}
|
}
|
||||||
|
|
||||||
forAll (curCellLabels, celli)
|
forAll(curCellLabels, celli)
|
||||||
{
|
{
|
||||||
label curCellI = curCellLabels[celli];
|
label curCellI = curCellLabels[celli];
|
||||||
|
|
||||||
@ -598,7 +598,7 @@ bool Foam::domainDecomposition::writeDecomposition()
|
|||||||
label nProcPatches = 0;
|
label nProcPatches = 0;
|
||||||
label nProcFaces = 0;
|
label nProcFaces = 0;
|
||||||
|
|
||||||
forAll (procMesh.boundaryMesh(), patchi)
|
forAll(procMesh.boundaryMesh(), patchi)
|
||||||
{
|
{
|
||||||
if
|
if
|
||||||
(
|
(
|
||||||
|
|||||||
@ -65,7 +65,7 @@ void Foam::domainDecomposition::decomposeMesh(const bool filterEmptyPatches)
|
|||||||
{
|
{
|
||||||
List<SLList<label> > procCellList(nProcs_);
|
List<SLList<label> > procCellList(nProcs_);
|
||||||
|
|
||||||
forAll (cellToProc_, celli)
|
forAll(cellToProc_, celli)
|
||||||
{
|
{
|
||||||
if (cellToProc_[celli] >= nProcs_)
|
if (cellToProc_[celli] >= nProcs_)
|
||||||
{
|
{
|
||||||
@ -81,7 +81,7 @@ void Foam::domainDecomposition::decomposeMesh(const bool filterEmptyPatches)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Convert linked lists into normal lists
|
// Convert linked lists into normal lists
|
||||||
forAll (procCellList, procI)
|
forAll(procCellList, procI)
|
||||||
{
|
{
|
||||||
procCellAddressing_[procI] = procCellList[procI];
|
procCellAddressing_[procI] = procCellList[procI];
|
||||||
}
|
}
|
||||||
@ -98,7 +98,7 @@ void Foam::domainDecomposition::decomposeMesh(const bool filterEmptyPatches)
|
|||||||
{
|
{
|
||||||
List<SLList<label> > procFaceList(nProcs_);
|
List<SLList<label> > procFaceList(nProcs_);
|
||||||
|
|
||||||
forAll (neighbour, facei)
|
forAll(neighbour, facei)
|
||||||
{
|
{
|
||||||
if (cellToProc_[owner[facei]] == cellToProc_[neighbour[facei]])
|
if (cellToProc_[owner[facei]] == cellToProc_[neighbour[facei]])
|
||||||
{
|
{
|
||||||
@ -117,7 +117,7 @@ void Foam::domainDecomposition::decomposeMesh(const bool filterEmptyPatches)
|
|||||||
|
|
||||||
List<SLList<label> > procPatchIndex(nProcs_);
|
List<SLList<label> > procPatchIndex(nProcs_);
|
||||||
|
|
||||||
forAll (neighbour, facei)
|
forAll(neighbour, facei)
|
||||||
{
|
{
|
||||||
if (cellToProc_[owner[facei]] != cellToProc_[neighbour[facei]])
|
if (cellToProc_[owner[facei]] != cellToProc_[neighbour[facei]])
|
||||||
{
|
{
|
||||||
@ -225,16 +225,16 @@ void Foam::domainDecomposition::decomposeMesh(const bool filterEmptyPatches)
|
|||||||
|
|
||||||
// for all processors, set the size of start index and patch size
|
// for all processors, set the size of start index and patch size
|
||||||
// lists to the number of patches in the mesh
|
// lists to the number of patches in the mesh
|
||||||
forAll (procPatchSize_, procI)
|
forAll(procPatchSize_, procI)
|
||||||
{
|
{
|
||||||
procPatchSize_[procI].setSize(patches.size());
|
procPatchSize_[procI].setSize(patches.size());
|
||||||
procPatchStartIndex_[procI].setSize(patches.size());
|
procPatchStartIndex_[procI].setSize(patches.size());
|
||||||
}
|
}
|
||||||
|
|
||||||
forAll (patches, patchi)
|
forAll(patches, patchi)
|
||||||
{
|
{
|
||||||
// Reset size and start index for all processors
|
// Reset size and start index for all processors
|
||||||
forAll (procPatchSize_, procI)
|
forAll(procPatchSize_, procI)
|
||||||
{
|
{
|
||||||
procPatchSize_[procI][patchi] = 0;
|
procPatchSize_[procI][patchi] = 0;
|
||||||
procPatchStartIndex_[procI][patchi] =
|
procPatchStartIndex_[procI][patchi] =
|
||||||
@ -251,7 +251,7 @@ void Foam::domainDecomposition::decomposeMesh(const bool filterEmptyPatches)
|
|||||||
const unallocLabelList& patchFaceCells =
|
const unallocLabelList& patchFaceCells =
|
||||||
patches[patchi].faceCells();
|
patches[patchi].faceCells();
|
||||||
|
|
||||||
forAll (patchFaceCells, facei)
|
forAll(patchFaceCells, facei)
|
||||||
{
|
{
|
||||||
const label curProc = cellToProc_[patchFaceCells[facei]];
|
const label curProc = cellToProc_[patchFaceCells[facei]];
|
||||||
|
|
||||||
@ -284,7 +284,7 @@ void Foam::domainDecomposition::decomposeMesh(const bool filterEmptyPatches)
|
|||||||
cycOffset
|
cycOffset
|
||||||
);
|
);
|
||||||
|
|
||||||
forAll (firstFaceCells, facei)
|
forAll(firstFaceCells, facei)
|
||||||
{
|
{
|
||||||
if
|
if
|
||||||
(
|
(
|
||||||
@ -439,7 +439,7 @@ void Foam::domainDecomposition::decomposeMesh(const bool filterEmptyPatches)
|
|||||||
// Ordering in cyclic boundaries is important.
|
// Ordering in cyclic boundaries is important.
|
||||||
// Add the other half of cyclic faces for cyclic boundaries
|
// Add the other half of cyclic faces for cyclic boundaries
|
||||||
// that remain on the processor
|
// that remain on the processor
|
||||||
forAll (secondFaceCells, facei)
|
forAll(secondFaceCells, facei)
|
||||||
{
|
{
|
||||||
if
|
if
|
||||||
(
|
(
|
||||||
@ -463,7 +463,7 @@ void Foam::domainDecomposition::decomposeMesh(const bool filterEmptyPatches)
|
|||||||
|
|
||||||
// Convert linked lists into normal lists
|
// Convert linked lists into normal lists
|
||||||
// Add inter-processor boundaries and remember start indices
|
// Add inter-processor boundaries and remember start indices
|
||||||
forAll (procFaceList, procI)
|
forAll(procFaceList, procI)
|
||||||
{
|
{
|
||||||
// Get internal and regular boundary processor faces
|
// Get internal and regular boundary processor faces
|
||||||
SLList<label>& curProcFaces = procFaceList[procI];
|
SLList<label>& curProcFaces = procFaceList[procI];
|
||||||
@ -604,7 +604,7 @@ void Foam::domainDecomposition::decomposeMesh(const bool filterEmptyPatches)
|
|||||||
// are omitted. For processor patches, set index to -1.
|
// are omitted. For processor patches, set index to -1.
|
||||||
// At the same time, filter the procPatchSize_ and procPatchStartIndex_
|
// At the same time, filter the procPatchSize_ and procPatchStartIndex_
|
||||||
// lists to exclude zero-size patches
|
// lists to exclude zero-size patches
|
||||||
forAll (procPatchSize_, procI)
|
forAll(procPatchSize_, procI)
|
||||||
{
|
{
|
||||||
// Make a local copy of old lists
|
// Make a local copy of old lists
|
||||||
const labelList oldPatchSizes = procPatchSize_[procI];
|
const labelList oldPatchSizes = procPatchSize_[procI];
|
||||||
@ -628,7 +628,7 @@ void Foam::domainDecomposition::decomposeMesh(const bool filterEmptyPatches)
|
|||||||
|
|
||||||
label nPatches = 0;
|
label nPatches = 0;
|
||||||
|
|
||||||
forAll (oldPatchSizes, patchi)
|
forAll(oldPatchSizes, patchi)
|
||||||
{
|
{
|
||||||
if (!filterEmptyPatches || oldPatchSizes[patchi] > 0)
|
if (!filterEmptyPatches || oldPatchSizes[patchi] > 0)
|
||||||
{
|
{
|
||||||
@ -646,7 +646,7 @@ void Foam::domainDecomposition::decomposeMesh(const bool filterEmptyPatches)
|
|||||||
curPatchSizes.setSize(nPatches);
|
curPatchSizes.setSize(nPatches);
|
||||||
curPatchStarts.setSize(nPatches);
|
curPatchStarts.setSize(nPatches);
|
||||||
|
|
||||||
forAll (curProcessorPatchSizes, procPatchI)
|
forAll(curProcessorPatchSizes, procPatchI)
|
||||||
{
|
{
|
||||||
curBoundaryAddressing[nPatches] = -1;
|
curBoundaryAddressing[nPatches] = -1;
|
||||||
|
|
||||||
@ -662,19 +662,19 @@ void Foam::domainDecomposition::decomposeMesh(const bool filterEmptyPatches)
|
|||||||
// used for the processor. Collect the list of used points for the
|
// used for the processor. Collect the list of used points for the
|
||||||
// processor.
|
// processor.
|
||||||
|
|
||||||
forAll (procPointAddressing_, procI)
|
forAll(procPointAddressing_, procI)
|
||||||
{
|
{
|
||||||
boolList pointLabels(nPoints(), false);
|
boolList pointLabels(nPoints(), false);
|
||||||
|
|
||||||
// Get reference to list of used faces
|
// Get reference to list of used faces
|
||||||
const labelList& procFaceLabels = procFaceAddressing_[procI];
|
const labelList& procFaceLabels = procFaceAddressing_[procI];
|
||||||
|
|
||||||
forAll (procFaceLabels, facei)
|
forAll(procFaceLabels, facei)
|
||||||
{
|
{
|
||||||
// Because of the turning index, some labels may be negative
|
// Because of the turning index, some labels may be negative
|
||||||
const labelList& facePoints = fcs[mag(procFaceLabels[facei]) - 1];
|
const labelList& facePoints = fcs[mag(procFaceLabels[facei]) - 1];
|
||||||
|
|
||||||
forAll (facePoints, pointi)
|
forAll(facePoints, pointi)
|
||||||
{
|
{
|
||||||
// Mark the point as used
|
// Mark the point as used
|
||||||
pointLabels[facePoints[pointi]] = true;
|
pointLabels[facePoints[pointi]] = true;
|
||||||
@ -688,7 +688,7 @@ void Foam::domainDecomposition::decomposeMesh(const bool filterEmptyPatches)
|
|||||||
|
|
||||||
label nUsedPoints = 0;
|
label nUsedPoints = 0;
|
||||||
|
|
||||||
forAll (pointLabels, pointi)
|
forAll(pointLabels, pointi)
|
||||||
{
|
{
|
||||||
if (pointLabels[pointi])
|
if (pointLabels[pointi])
|
||||||
{
|
{
|
||||||
@ -734,7 +734,7 @@ void Foam::domainDecomposition::decomposeMesh(const bool filterEmptyPatches)
|
|||||||
// Reset the lookup list
|
// Reset the lookup list
|
||||||
pointsUsage = 0;
|
pointsUsage = 0;
|
||||||
|
|
||||||
forAll (curProcessorPatchStarts, patchi)
|
forAll(curProcessorPatchStarts, patchi)
|
||||||
{
|
{
|
||||||
const label curStart = curProcessorPatchStarts[patchi];
|
const label curStart = curProcessorPatchStarts[patchi];
|
||||||
const label curEnd = curStart + curProcessorPatchSizes[patchi];
|
const label curEnd = curStart + curProcessorPatchSizes[patchi];
|
||||||
@ -753,7 +753,7 @@ void Foam::domainDecomposition::decomposeMesh(const bool filterEmptyPatches)
|
|||||||
|
|
||||||
const face& f = fcs[curF];
|
const face& f = fcs[curF];
|
||||||
|
|
||||||
forAll (f, pointi)
|
forAll(f, pointi)
|
||||||
{
|
{
|
||||||
if (pointsUsage[f[pointi]] == 0)
|
if (pointsUsage[f[pointi]] == 0)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -43,7 +43,7 @@ Foam::fvFieldDecomposer::decomposeField
|
|||||||
// Create and map the patch field values
|
// Create and map the patch field values
|
||||||
PtrList<fvPatchField<Type> > patchFields(boundaryAddressing_.size());
|
PtrList<fvPatchField<Type> > patchFields(boundaryAddressing_.size());
|
||||||
|
|
||||||
forAll (boundaryAddressing_, patchi)
|
forAll(boundaryAddressing_, patchi)
|
||||||
{
|
{
|
||||||
if (boundaryAddressing_[patchi] >= 0)
|
if (boundaryAddressing_[patchi] >= 0)
|
||||||
{
|
{
|
||||||
@ -115,7 +115,7 @@ Foam::fvFieldDecomposer::decomposeField
|
|||||||
procMesh_.nInternalFaces()
|
procMesh_.nInternalFaces()
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
forAll (mapAddr, i)
|
forAll(mapAddr, i)
|
||||||
{
|
{
|
||||||
mapAddr[i] -= 1;
|
mapAddr[i] -= 1;
|
||||||
}
|
}
|
||||||
@ -134,18 +134,18 @@ Foam::fvFieldDecomposer::decomposeField
|
|||||||
// (i.e. using slices)
|
// (i.e. using slices)
|
||||||
Field<Type> allFaceField(field.mesh().nFaces());
|
Field<Type> allFaceField(field.mesh().nFaces());
|
||||||
|
|
||||||
forAll (field.internalField(), i)
|
forAll(field.internalField(), i)
|
||||||
{
|
{
|
||||||
allFaceField[i] = field.internalField()[i];
|
allFaceField[i] = field.internalField()[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
forAll (field.boundaryField(), patchi)
|
forAll(field.boundaryField(), patchi)
|
||||||
{
|
{
|
||||||
const Field<Type> & p = field.boundaryField()[patchi];
|
const Field<Type> & p = field.boundaryField()[patchi];
|
||||||
|
|
||||||
const label patchStart = field.mesh().boundaryMesh()[patchi].start();
|
const label patchStart = field.mesh().boundaryMesh()[patchi].start();
|
||||||
|
|
||||||
forAll (p, i)
|
forAll(p, i)
|
||||||
{
|
{
|
||||||
allFaceField[patchStart + i] = p[i];
|
allFaceField[patchStart + i] = p[i];
|
||||||
}
|
}
|
||||||
@ -154,7 +154,7 @@ Foam::fvFieldDecomposer::decomposeField
|
|||||||
// Create and map the patch field values
|
// Create and map the patch field values
|
||||||
PtrList<fvsPatchField<Type> > patchFields(boundaryAddressing_.size());
|
PtrList<fvsPatchField<Type> > patchFields(boundaryAddressing_.size());
|
||||||
|
|
||||||
forAll (boundaryAddressing_, patchi)
|
forAll(boundaryAddressing_, patchi)
|
||||||
{
|
{
|
||||||
if (boundaryAddressing_[patchi] >= 0)
|
if (boundaryAddressing_[patchi] >= 0)
|
||||||
{
|
{
|
||||||
@ -217,7 +217,7 @@ void Foam::fvFieldDecomposer::decomposeFields
|
|||||||
const PtrList<GeoField>& fields
|
const PtrList<GeoField>& fields
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
forAll (fields, fieldI)
|
forAll(fields, fieldI)
|
||||||
{
|
{
|
||||||
decomposeField(fields[fieldI])().write();
|
decomposeField(fields[fieldI])().write();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -104,7 +104,7 @@ void Foam::lagrangianFieldDecomposer::decomposeFields
|
|||||||
{
|
{
|
||||||
if (particleIndices_.size())
|
if (particleIndices_.size())
|
||||||
{
|
{
|
||||||
forAll (fields, fieldI)
|
forAll(fields, fieldI)
|
||||||
{
|
{
|
||||||
decomposeField(cloudName, fields[fieldI])().write();
|
decomposeField(cloudName, fields[fieldI])().write();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -48,7 +48,7 @@ Foam::pointFieldDecomposer::decomposeField
|
|||||||
);
|
);
|
||||||
|
|
||||||
// Create and map the patch field values
|
// Create and map the patch field values
|
||||||
forAll (boundaryAddressing_, patchi)
|
forAll(boundaryAddressing_, patchi)
|
||||||
{
|
{
|
||||||
if (patchFieldDecomposerPtrs_[patchi])
|
if (patchFieldDecomposerPtrs_[patchi])
|
||||||
{
|
{
|
||||||
@ -117,7 +117,7 @@ void Foam::pointFieldDecomposer::decomposeFields
|
|||||||
const PtrList<GeoField>& fields
|
const PtrList<GeoField>& fields
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
forAll (fields, fieldI)
|
forAll(fields, fieldI)
|
||||||
{
|
{
|
||||||
decomposeField(fields[fieldI])().write();
|
decomposeField(fields[fieldI])().write();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -8,11 +8,11 @@
|
|||||||
|
|
||||||
PtrList<labelIOList>& faceProcAddressing = procMeshes.faceProcAddressing();
|
PtrList<labelIOList>& faceProcAddressing = procMeshes.faceProcAddressing();
|
||||||
|
|
||||||
forAll (faceProcAddressing, procI)
|
forAll(faceProcAddressing, procI)
|
||||||
{
|
{
|
||||||
const labelList& curFaceAddr = faceProcAddressing[procI];
|
const labelList& curFaceAddr = faceProcAddressing[procI];
|
||||||
|
|
||||||
forAll (curFaceAddr, faceI)
|
forAll(curFaceAddr, faceI)
|
||||||
{
|
{
|
||||||
if (mag(curFaceAddr[faceI]) < minFaceIndex)
|
if (mag(curFaceAddr[faceI]) < minFaceIndex)
|
||||||
{
|
{
|
||||||
@ -33,11 +33,11 @@
|
|||||||
<< "the current version fo decomposePar"
|
<< "the current version fo decomposePar"
|
||||||
<< endl;
|
<< endl;
|
||||||
|
|
||||||
forAll (faceProcAddressing, procI)
|
forAll(faceProcAddressing, procI)
|
||||||
{
|
{
|
||||||
labelList& curFaceAddr = faceProcAddressing[procI];
|
labelList& curFaceAddr = faceProcAddressing[procI];
|
||||||
|
|
||||||
forAll (curFaceAddr, faceI)
|
forAll(curFaceAddr, faceI)
|
||||||
{
|
{
|
||||||
curFaceAddr[faceI] += sign(curFaceAddr[faceI]);
|
curFaceAddr[faceI] += sign(curFaceAddr[faceI]);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -81,7 +81,7 @@ int main(int argc, char *argv[])
|
|||||||
// Create the processor databases
|
// Create the processor databases
|
||||||
PtrList<Time> databases(nProcs);
|
PtrList<Time> databases(nProcs);
|
||||||
|
|
||||||
forAll (databases, procI)
|
forAll(databases, procI)
|
||||||
{
|
{
|
||||||
databases.set
|
databases.set
|
||||||
(
|
(
|
||||||
@ -118,7 +118,7 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Set all times on processor meshes equal to reconstructed mesh
|
// Set all times on processor meshes equal to reconstructed mesh
|
||||||
forAll (databases, procI)
|
forAll(databases, procI)
|
||||||
{
|
{
|
||||||
databases[procI].setTime(runTime.timeName(), runTime.timeIndex());
|
databases[procI].setTime(runTime.timeName(), runTime.timeIndex());
|
||||||
}
|
}
|
||||||
@ -132,7 +132,7 @@ int main(int argc, char *argv[])
|
|||||||
# include "checkFaceAddressingComp.H"
|
# include "checkFaceAddressingComp.H"
|
||||||
|
|
||||||
// Loop over all times
|
// Loop over all times
|
||||||
forAll (timeDirs, timeI)
|
forAll(timeDirs, timeI)
|
||||||
{
|
{
|
||||||
// Set time for global database
|
// Set time for global database
|
||||||
runTime.setTime(timeDirs[timeI], timeI);
|
runTime.setTime(timeDirs[timeI], timeI);
|
||||||
@ -140,7 +140,7 @@ int main(int argc, char *argv[])
|
|||||||
Info<< "Time = " << runTime.timeName() << endl << endl;
|
Info<< "Time = " << runTime.timeName() << endl << endl;
|
||||||
|
|
||||||
// Set time for all databases
|
// Set time for all databases
|
||||||
forAll (databases, procI)
|
forAll(databases, procI)
|
||||||
{
|
{
|
||||||
databases[procI].setTime(timeDirs[timeI], timeI);
|
databases[procI].setTime(timeDirs[timeI], timeI);
|
||||||
}
|
}
|
||||||
@ -247,7 +247,7 @@ int main(int argc, char *argv[])
|
|||||||
pointMesh pMesh(mesh);
|
pointMesh pMesh(mesh);
|
||||||
PtrList<pointMesh> pMeshes(procMeshes.meshes().size());
|
PtrList<pointMesh> pMeshes(procMeshes.meshes().size());
|
||||||
|
|
||||||
forAll (pMeshes, procI)
|
forAll(pMeshes, procI)
|
||||||
{
|
{
|
||||||
pMeshes.set(procI, new pointMesh(procMeshes.meshes()[procI]));
|
pMeshes.set(procI, new pointMesh(procMeshes.meshes()[procI]));
|
||||||
}
|
}
|
||||||
@ -283,7 +283,7 @@ int main(int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
HashTable<IOobjectList> cloudObjects;
|
HashTable<IOobjectList> cloudObjects;
|
||||||
|
|
||||||
forAll (databases, procI)
|
forAll(databases, procI)
|
||||||
{
|
{
|
||||||
fileNameList cloudDirs
|
fileNameList cloudDirs
|
||||||
(
|
(
|
||||||
@ -294,7 +294,7 @@ int main(int argc, char *argv[])
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
forAll (cloudDirs, i)
|
forAll(cloudDirs, i)
|
||||||
{
|
{
|
||||||
// Check if we already have cloud objects for this cloudname
|
// Check if we already have cloud objects for this cloudname
|
||||||
HashTable<IOobjectList>::const_iterator iter =
|
HashTable<IOobjectList>::const_iterator iter =
|
||||||
|
|||||||
@ -371,7 +371,7 @@ int main(int argc, char *argv[])
|
|||||||
// Read all databases.
|
// Read all databases.
|
||||||
PtrList<Time> databases(nProcs);
|
PtrList<Time> databases(nProcs);
|
||||||
|
|
||||||
forAll (databases, procI)
|
forAll(databases, procI)
|
||||||
{
|
{
|
||||||
Info<< "Reading database "
|
Info<< "Reading database "
|
||||||
<< args.caseName()/fileName(word("processor") + name(procI))
|
<< args.caseName()/fileName(word("processor") + name(procI))
|
||||||
|
|||||||
@ -79,7 +79,7 @@ int main(int argc, char *argv[])
|
|||||||
// Writing number of faces
|
// Writing number of faces
|
||||||
label nFaces = mesh.nFaces();
|
label nFaces = mesh.nFaces();
|
||||||
|
|
||||||
forAll (mesh.boundary(), patchI)
|
forAll(mesh.boundary(), patchI)
|
||||||
{
|
{
|
||||||
nFaces += mesh.boundary()[patchI].size();
|
nFaces += mesh.boundary()[patchI].size();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -59,7 +59,7 @@ void writeFluentField
|
|||||||
<< "1 " << phiInternal.size() // Start and end of list
|
<< "1 " << phiInternal.size() // Start and end of list
|
||||||
<< ")(" << endl;
|
<< ")(" << endl;
|
||||||
|
|
||||||
forAll (phiInternal, cellI)
|
forAll(phiInternal, cellI)
|
||||||
{
|
{
|
||||||
stream << phiInternal[cellI] << endl;
|
stream << phiInternal[cellI] << endl;
|
||||||
}
|
}
|
||||||
@ -70,7 +70,7 @@ void writeFluentField
|
|||||||
label nWrittenFaces = phiInternal.size();
|
label nWrittenFaces = phiInternal.size();
|
||||||
|
|
||||||
// Writing boundary faces
|
// Writing boundary faces
|
||||||
forAll (phi.boundaryField(), patchI)
|
forAll(phi.boundaryField(), patchI)
|
||||||
{
|
{
|
||||||
if (isType<emptyFvPatchScalarField>(phi.boundaryField()[patchI]))
|
if (isType<emptyFvPatchScalarField>(phi.boundaryField()[patchI]))
|
||||||
{
|
{
|
||||||
@ -95,7 +95,7 @@ void writeFluentField
|
|||||||
|
|
||||||
nWrittenFaces += emptyFaceCells.size();
|
nWrittenFaces += emptyFaceCells.size();
|
||||||
|
|
||||||
forAll (emptyFaceCells, faceI)
|
forAll(emptyFaceCells, faceI)
|
||||||
{
|
{
|
||||||
stream << phiInternal[emptyFaceCells[faceI]] << endl;
|
stream << phiInternal[emptyFaceCells[faceI]] << endl;
|
||||||
}
|
}
|
||||||
@ -123,7 +123,7 @@ void writeFluentField
|
|||||||
|
|
||||||
nWrittenFaces += patchPhi.size();
|
nWrittenFaces += patchPhi.size();
|
||||||
|
|
||||||
forAll (patchPhi, faceI)
|
forAll(patchPhi, faceI)
|
||||||
{
|
{
|
||||||
stream << patchPhi[faceI] << endl;
|
stream << patchPhi[faceI] << endl;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -58,7 +58,7 @@ void writeFluentField
|
|||||||
<< "1 " << phiInternal.size() // Start and end of list
|
<< "1 " << phiInternal.size() // Start and end of list
|
||||||
<< ")(" << endl;
|
<< ")(" << endl;
|
||||||
|
|
||||||
forAll (phiInternal, cellI)
|
forAll(phiInternal, cellI)
|
||||||
{
|
{
|
||||||
stream
|
stream
|
||||||
<< phiInternal[cellI].x() << " "
|
<< phiInternal[cellI].x() << " "
|
||||||
@ -73,7 +73,7 @@ void writeFluentField
|
|||||||
label nWrittenFaces = phiInternal.size();
|
label nWrittenFaces = phiInternal.size();
|
||||||
|
|
||||||
// Writing boundary faces
|
// Writing boundary faces
|
||||||
forAll (phi.boundaryField(), patchI)
|
forAll(phi.boundaryField(), patchI)
|
||||||
{
|
{
|
||||||
const vectorField& patchPhi = phi.boundaryField()[patchI];
|
const vectorField& patchPhi = phi.boundaryField()[patchI];
|
||||||
|
|
||||||
@ -90,7 +90,7 @@ void writeFluentField
|
|||||||
|
|
||||||
nWrittenFaces += patchPhi.size();
|
nWrittenFaces += patchPhi.size();
|
||||||
|
|
||||||
forAll (patchPhi, faceI)
|
forAll(patchPhi, faceI)
|
||||||
{
|
{
|
||||||
stream
|
stream
|
||||||
<< patchPhi[faceI].x() << " "
|
<< patchPhi[faceI].x() << " "
|
||||||
|
|||||||
@ -199,7 +199,7 @@ void writeAllFaceData
|
|||||||
{
|
{
|
||||||
writeData(map(pf, prims, cmpt), ensightFile);
|
writeData(map(pf, prims, cmpt), ensightFile);
|
||||||
|
|
||||||
forAll (patchProcessors, i)
|
forAll(patchProcessors, i)
|
||||||
{
|
{
|
||||||
if (patchProcessors[i] != 0)
|
if (patchProcessors[i] != 0)
|
||||||
{
|
{
|
||||||
@ -245,7 +245,7 @@ void writeAllFaceDataBinary
|
|||||||
{
|
{
|
||||||
writeEnsDataBinary(map(pf, prims, cmpt), ensightFile);
|
writeEnsDataBinary(map(pf, prims, cmpt), ensightFile);
|
||||||
|
|
||||||
forAll (patchProcessors, i)
|
forAll(patchProcessors, i)
|
||||||
{
|
{
|
||||||
if (patchProcessors[i] != 0)
|
if (patchProcessors[i] != 0)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -112,7 +112,7 @@ Foam::ensightMesh::ensightMesh
|
|||||||
|
|
||||||
allPatchProcs_.setSize(allPatchNames_.size());
|
allPatchProcs_.setSize(allPatchNames_.size());
|
||||||
|
|
||||||
forAll (allPatchProcs_, patchi)
|
forAll(allPatchProcs_, patchi)
|
||||||
{
|
{
|
||||||
if (mesh_.boundary()[patchi].size())
|
if (mesh_.boundary()[patchi].size())
|
||||||
{
|
{
|
||||||
@ -132,7 +132,7 @@ Foam::ensightMesh::ensightMesh
|
|||||||
patchNameList = allPatchNames_;
|
patchNameList = allPatchNames_;
|
||||||
}
|
}
|
||||||
|
|
||||||
forAll (patchNameList, i)
|
forAll(patchNameList, i)
|
||||||
{
|
{
|
||||||
patchNames_.insert(patchNameList[i]);
|
patchNames_.insert(patchNameList[i]);
|
||||||
}
|
}
|
||||||
@ -217,7 +217,7 @@ Foam::ensightMesh::ensightMesh
|
|||||||
|
|
||||||
if (!args.optionFound("noPatches"))
|
if (!args.optionFound("noPatches"))
|
||||||
{
|
{
|
||||||
forAll (mesh.boundary(), patchi)
|
forAll(mesh.boundary(), patchi)
|
||||||
{
|
{
|
||||||
if (mesh.boundary()[patchi].size())
|
if (mesh.boundary()[patchi].size())
|
||||||
{
|
{
|
||||||
@ -945,7 +945,7 @@ Foam::faceList Foam::ensightMesh::map
|
|||||||
{
|
{
|
||||||
faceList ppf(prims.size());
|
faceList ppf(prims.size());
|
||||||
|
|
||||||
forAll (prims, i)
|
forAll(prims, i)
|
||||||
{
|
{
|
||||||
ppf[i] = patchFaces[prims[i]];
|
ppf[i] = patchFaces[prims[i]];
|
||||||
}
|
}
|
||||||
@ -981,7 +981,7 @@ void Foam::ensightMesh::writeAllFacePrims
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
forAll (patchProcessors, i)
|
forAll(patchProcessors, i)
|
||||||
{
|
{
|
||||||
if (patchProcessors[i] != 0)
|
if (patchProcessors[i] != 0)
|
||||||
{
|
{
|
||||||
@ -1067,7 +1067,7 @@ void Foam::ensightMesh::writeAllNSided
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
forAll (patchProcessors, i)
|
forAll(patchProcessors, i)
|
||||||
{
|
{
|
||||||
if (patchProcessors[i] != 0)
|
if (patchProcessors[i] != 0)
|
||||||
{
|
{
|
||||||
@ -1102,7 +1102,7 @@ void Foam::ensightMesh::writeAllNSided
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
forAll (patchProcessors, i)
|
forAll(patchProcessors, i)
|
||||||
{
|
{
|
||||||
if (patchProcessors[i] != 0)
|
if (patchProcessors[i] != 0)
|
||||||
{
|
{
|
||||||
@ -1191,7 +1191,7 @@ void Foam::ensightMesh::writeAllNSidedBinary
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
forAll (patchProcessors, i)
|
forAll(patchProcessors, i)
|
||||||
{
|
{
|
||||||
if (patchProcessors[i] != 0)
|
if (patchProcessors[i] != 0)
|
||||||
{
|
{
|
||||||
@ -1226,7 +1226,7 @@ void Foam::ensightMesh::writeAllNSidedBinary
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
forAll (patchProcessors, i)
|
forAll(patchProcessors, i)
|
||||||
{
|
{
|
||||||
if (patchProcessors[i] != 0)
|
if (patchProcessors[i] != 0)
|
||||||
{
|
{
|
||||||
@ -1280,7 +1280,7 @@ void Foam::ensightMesh::writeAllFacePrimsBinary
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
forAll (patchProcessors, i)
|
forAll(patchProcessors, i)
|
||||||
{
|
{
|
||||||
if (patchProcessors[i] != 0)
|
if (patchProcessors[i] != 0)
|
||||||
{
|
{
|
||||||
@ -1531,7 +1531,7 @@ void Foam::ensightMesh::writeAscii
|
|||||||
|
|
||||||
patchPointOffsets = 0;
|
patchPointOffsets = 0;
|
||||||
|
|
||||||
forAll (patchProcessors, i)
|
forAll(patchProcessors, i)
|
||||||
{
|
{
|
||||||
if (patchProcessors[i] != 0)
|
if (patchProcessors[i] != 0)
|
||||||
{
|
{
|
||||||
@ -1820,7 +1820,7 @@ void Foam::ensightMesh::writeBinary
|
|||||||
patchPointOffsets = 0;
|
patchPointOffsets = 0;
|
||||||
|
|
||||||
|
|
||||||
forAll (patchProcessors, i)
|
forAll(patchProcessors, i)
|
||||||
{
|
{
|
||||||
if (patchProcessors[i] != 0)
|
if (patchProcessors[i] != 0)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -144,7 +144,7 @@ if (fieldTimesUsed.size())
|
|||||||
<< "filename numbers:" << nl;
|
<< "filename numbers:" << nl;
|
||||||
|
|
||||||
label count = 0;
|
label count = 0;
|
||||||
forAll (fieldTimesUsed, i)
|
forAll(fieldTimesUsed, i)
|
||||||
{
|
{
|
||||||
caseFile
|
caseFile
|
||||||
<< " " << setw(12) << fieldTimesUsed[i];
|
<< " " << setw(12) << fieldTimesUsed[i];
|
||||||
@ -159,7 +159,7 @@ if (fieldTimesUsed.size())
|
|||||||
<< nl << "time values:" << nl;
|
<< nl << "time values:" << nl;
|
||||||
|
|
||||||
count = 0;
|
count = 0;
|
||||||
forAll (fieldTimesUsed, i)
|
forAll(fieldTimesUsed, i)
|
||||||
{
|
{
|
||||||
caseFile
|
caseFile
|
||||||
<< " " << setw(12)
|
<< " " << setw(12)
|
||||||
@ -188,7 +188,7 @@ forAllConstIter(HashTable<DynamicList<label> >, cloudTimesUsed, cloudIter)
|
|||||||
<< "filename numbers:" << nl;
|
<< "filename numbers:" << nl;
|
||||||
|
|
||||||
label count = 0;
|
label count = 0;
|
||||||
forAll (timesUsed, i)
|
forAll(timesUsed, i)
|
||||||
{
|
{
|
||||||
caseFile
|
caseFile
|
||||||
<< " " << setw(12) << timesUsed[i];
|
<< " " << setw(12) << timesUsed[i];
|
||||||
@ -203,7 +203,7 @@ forAllConstIter(HashTable<DynamicList<label> >, cloudTimesUsed, cloudIter)
|
|||||||
<< nl << "time values:" << nl;
|
<< nl << "time values:" << nl;
|
||||||
|
|
||||||
count = 0;
|
count = 0;
|
||||||
forAll (timesUsed, i)
|
forAll(timesUsed, i)
|
||||||
{
|
{
|
||||||
caseFile
|
caseFile
|
||||||
<< " " << setw(12)
|
<< " " << setw(12)
|
||||||
|
|||||||
@ -117,12 +117,12 @@ void Foam::ensightParticlePositions
|
|||||||
// binary write is Ensight6 - first ids, then positions
|
// binary write is Ensight6 - first ids, then positions
|
||||||
if (format == IOstream::BINARY)
|
if (format == IOstream::BINARY)
|
||||||
{
|
{
|
||||||
forAll (parcels, i)
|
forAll(parcels, i)
|
||||||
{
|
{
|
||||||
os.write(i+1);
|
os.write(i+1);
|
||||||
}
|
}
|
||||||
|
|
||||||
forAllIter(Cloud<passiveParticle>, parcels, elmnt)
|
forAllConstIter(Cloud<passiveParticle>, parcels, elmnt)
|
||||||
{
|
{
|
||||||
const vector& p = elmnt().position();
|
const vector& p = elmnt().position();
|
||||||
|
|
||||||
@ -135,7 +135,7 @@ void Foam::ensightParticlePositions
|
|||||||
{
|
{
|
||||||
label nParcels = 0;
|
label nParcels = 0;
|
||||||
|
|
||||||
forAllIter(Cloud<passiveParticle>, parcels, elmnt)
|
forAllConstIter(Cloud<passiveParticle>, parcels, elmnt)
|
||||||
{
|
{
|
||||||
const vector& p = elmnt().position();
|
const vector& p = elmnt().position();
|
||||||
|
|
||||||
|
|||||||
@ -52,7 +52,7 @@ Foam::labelList Foam::fieldviewTopology::calcFaceAddressing
|
|||||||
const label cellI
|
const label cellI
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
// return value.
|
// return value.
|
||||||
labelList shapeToMesh(shape.nFaces(), -1);
|
labelList shapeToMesh(shape.nFaces(), -1);
|
||||||
|
|
||||||
const faceList modelFaces(shape.faces());
|
const faceList modelFaces(shape.faces());
|
||||||
@ -122,10 +122,10 @@ Foam::fieldviewTopology::fieldviewTopology
|
|||||||
|
|
||||||
if (setWallInfo)
|
if (setWallInfo)
|
||||||
{
|
{
|
||||||
forAll (mesh.boundaryMesh(), patchI)
|
forAll(mesh.boundaryMesh(), patchI)
|
||||||
{
|
{
|
||||||
const polyPatch& currPatch = mesh.boundaryMesh()[patchI];
|
const polyPatch& currPatch = mesh.boundaryMesh()[patchI];
|
||||||
if
|
if
|
||||||
(
|
(
|
||||||
isA<wallPolyPatch>(currPatch)
|
isA<wallPolyPatch>(currPatch)
|
||||||
|| isA<symmetryPolyPatch>(currPatch)
|
|| isA<symmetryPolyPatch>(currPatch)
|
||||||
@ -424,7 +424,7 @@ Foam::fieldviewTopology::fieldviewTopology
|
|||||||
faceLabels[labelI++] = patchFace[1] + 1;
|
faceLabels[labelI++] = patchFace[1] + 1;
|
||||||
faceLabels[labelI++] = patchFace[2] + 1;
|
faceLabels[labelI++] = patchFace[2] + 1;
|
||||||
faceLabels[labelI++] = patchFace[3] + 1;
|
faceLabels[labelI++] = patchFace[3] + 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
faceLabels.setSize(labelI);
|
faceLabels.setSize(labelI);
|
||||||
|
|||||||
@ -379,7 +379,7 @@ int main(int argc, char *argv[])
|
|||||||
// num patches
|
// num patches
|
||||||
writeInt(fvFile, mesh.boundary().size());
|
writeInt(fvFile, mesh.boundary().size());
|
||||||
|
|
||||||
forAll (mesh.boundary(), patchI)
|
forAll(mesh.boundary(), patchI)
|
||||||
{
|
{
|
||||||
const fvPatch& currPatch = mesh.boundary()[patchI];
|
const fvPatch& currPatch = mesh.boundary()[patchI];
|
||||||
|
|
||||||
@ -694,7 +694,7 @@ int main(int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
const volScalarField& vsf = *volFieldPtrs[fieldI];
|
const volScalarField& vsf = *volFieldPtrs[fieldI];
|
||||||
|
|
||||||
forAll (mesh.boundary(), patchI)
|
forAll(mesh.boundary(), patchI)
|
||||||
{
|
{
|
||||||
writeFaceData
|
writeFaceData
|
||||||
(
|
(
|
||||||
@ -709,7 +709,7 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
forAll (mesh.boundaryMesh(), patchI)
|
forAll(mesh.boundaryMesh(), patchI)
|
||||||
{
|
{
|
||||||
// Dummy value.
|
// Dummy value.
|
||||||
floatField fField
|
floatField fField
|
||||||
@ -735,7 +735,7 @@ int main(int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
const surfaceScalarField& ssf = *surfFieldPtrs[fieldI];
|
const surfaceScalarField& ssf = *surfFieldPtrs[fieldI];
|
||||||
|
|
||||||
forAll (mesh.boundary(), patchI)
|
forAll(mesh.boundary(), patchI)
|
||||||
{
|
{
|
||||||
writeFaceData
|
writeFaceData
|
||||||
(
|
(
|
||||||
@ -750,7 +750,7 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
forAll (mesh.boundaryMesh(), patchI)
|
forAll(mesh.boundaryMesh(), patchI)
|
||||||
{
|
{
|
||||||
// Dummy value.
|
// Dummy value.
|
||||||
floatField fField
|
floatField fField
|
||||||
@ -784,7 +784,7 @@ int main(int argc, char *argv[])
|
|||||||
const volScalarField& vsf = *volFieldPtrs[fieldI];
|
const volScalarField& vsf = *volFieldPtrs[fieldI];
|
||||||
|
|
||||||
// All non-empty patches
|
// All non-empty patches
|
||||||
forAll (mesh.boundary(), patchI)
|
forAll(mesh.boundary(), patchI)
|
||||||
{
|
{
|
||||||
writeFaceData
|
writeFaceData
|
||||||
(
|
(
|
||||||
@ -799,7 +799,7 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
forAll (mesh.boundary(), patchI)
|
forAll(mesh.boundary(), patchI)
|
||||||
{
|
{
|
||||||
// Dummy value.
|
// Dummy value.
|
||||||
floatField fField(topo.nPolyFaces()[patchI], 0.0);
|
floatField fField(topo.nPolyFaces()[patchI], 0.0);
|
||||||
@ -836,7 +836,7 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
forAll (mesh.boundaryMesh(), patchI)
|
forAll(mesh.boundaryMesh(), patchI)
|
||||||
{
|
{
|
||||||
// Dummy value.
|
// Dummy value.
|
||||||
floatField fField
|
floatField fField
|
||||||
|
|||||||
@ -49,7 +49,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
fileNameList fieldNames = readDir(runTime.timePath(), fileName::FILE);
|
fileNameList fieldNames = readDir(runTime.timePath(), fileName::FILE);
|
||||||
dictionary fieldNameDict;
|
dictionary fieldNameDict;
|
||||||
forAll (fieldNames, i)
|
forAll(fieldNames, i)
|
||||||
{
|
{
|
||||||
fieldNameDict.add(fieldNames[i], word(fieldNames[i]));
|
fieldNameDict.add(fieldNames[i], word(fieldNames[i]));
|
||||||
}
|
}
|
||||||
@ -168,7 +168,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
label cell;
|
label cell;
|
||||||
scalar value;
|
scalar value;
|
||||||
forAll (mesh.cells(), celli)
|
forAll(mesh.cells(), celli)
|
||||||
{
|
{
|
||||||
if (celli > 0)
|
if (celli > 0)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -101,7 +101,7 @@ int main(int argc, char *argv[])
|
|||||||
);
|
);
|
||||||
|
|
||||||
labelList visitedPoint(mesh.nPoints());
|
labelList visitedPoint(mesh.nPoints());
|
||||||
forAll (visitedPoint, pointI)
|
forAll(visitedPoint, pointI)
|
||||||
{
|
{
|
||||||
visitedPoint[pointI] = 0;
|
visitedPoint[pointI] = 0;
|
||||||
}
|
}
|
||||||
@ -128,13 +128,13 @@ int main(int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
found = false;
|
found = false;
|
||||||
|
|
||||||
forAll (patches, patchI)
|
forAll(patches, patchI)
|
||||||
{
|
{
|
||||||
const primitivePatch& bouFaces = patches[patchI];
|
const primitivePatch& bouFaces = patches[patchI];
|
||||||
|
|
||||||
if (!isType<emptyPolyPatch>(patches[patchI]))
|
if (!isType<emptyPolyPatch>(patches[patchI]))
|
||||||
{
|
{
|
||||||
forAll (bouFaces, faceI)
|
forAll(bouFaces, faceI)
|
||||||
{
|
{
|
||||||
if
|
if
|
||||||
(
|
(
|
||||||
@ -147,7 +147,7 @@ int main(int argc, char *argv[])
|
|||||||
// Zero flux face found
|
// Zero flux face found
|
||||||
found = true;
|
found = true;
|
||||||
|
|
||||||
forAll (zeroPoints, pointI)
|
forAll(zeroPoints, pointI)
|
||||||
{
|
{
|
||||||
if (visitedPoint[zeroPoints[pointI]] == 1)
|
if (visitedPoint[zeroPoints[pointI]] == 1)
|
||||||
{
|
{
|
||||||
@ -161,7 +161,7 @@ int main(int argc, char *argv[])
|
|||||||
Info<< "Zero face: patch: " << patchI
|
Info<< "Zero face: patch: " << patchI
|
||||||
<< " face: " << faceI << endl;
|
<< " face: " << faceI << endl;
|
||||||
|
|
||||||
forAll (zeroPoints, pointI)
|
forAll(zeroPoints, pointI)
|
||||||
{
|
{
|
||||||
streamFunction[zeroPoints[pointI]] = 0;
|
streamFunction[zeroPoints[pointI]] = 0;
|
||||||
visitedPoint[zeroPoints[pointI]] = 1;
|
visitedPoint[zeroPoints[pointI]] = 1;
|
||||||
@ -185,13 +185,13 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
const cellList& c = mesh.cells();
|
const cellList& c = mesh.cells();
|
||||||
|
|
||||||
forAll (c, cI)
|
forAll(c, cI)
|
||||||
{
|
{
|
||||||
labelList zeroPoints = c[cI].labels(mesh.faces());
|
labelList zeroPoints = c[cI].labels(mesh.faces());
|
||||||
|
|
||||||
bool found = true;
|
bool found = true;
|
||||||
|
|
||||||
forAll (zeroPoints, pointI)
|
forAll(zeroPoints, pointI)
|
||||||
{
|
{
|
||||||
if (visitedPoint[zeroPoints[pointI]] == 1)
|
if (visitedPoint[zeroPoints[pointI]] == 1)
|
||||||
{
|
{
|
||||||
@ -202,7 +202,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
if (found)
|
if (found)
|
||||||
{
|
{
|
||||||
forAll (zeroPoints, pointI)
|
forAll(zeroPoints, pointI)
|
||||||
{
|
{
|
||||||
streamFunction[zeroPoints[pointI]] = 0.0;
|
streamFunction[zeroPoints[pointI]] = 0.0;
|
||||||
visitedPoint[zeroPoints[pointI]] = 1;
|
visitedPoint[zeroPoints[pointI]] = 1;
|
||||||
@ -242,7 +242,7 @@ int main(int argc, char *argv[])
|
|||||||
scalar currentBStream = 0.0;
|
scalar currentBStream = 0.0;
|
||||||
vector currentBStreamPoint(0, 0, 0);
|
vector currentBStreamPoint(0, 0, 0);
|
||||||
|
|
||||||
forAll (curBPoints, pointI)
|
forAll(curBPoints, pointI)
|
||||||
{
|
{
|
||||||
// Check if the point has been visited
|
// Check if the point has been visited
|
||||||
if (visitedPoint[curBPoints[pointI]] == 1)
|
if (visitedPoint[curBPoints[pointI]] == 1)
|
||||||
@ -262,7 +262,7 @@ int main(int argc, char *argv[])
|
|||||||
if (bPointFound)
|
if (bPointFound)
|
||||||
{
|
{
|
||||||
// Sort out other points on the face
|
// Sort out other points on the face
|
||||||
forAll (curBPoints, pointI)
|
forAll(curBPoints, pointI)
|
||||||
{
|
{
|
||||||
// Check if the point has been visited
|
// Check if the point has been visited
|
||||||
if (visitedPoint[curBPoints[pointI]] == 0)
|
if (visitedPoint[curBPoints[pointI]] == 0)
|
||||||
@ -367,7 +367,7 @@ int main(int argc, char *argv[])
|
|||||||
scalar currentStream = 0.0;
|
scalar currentStream = 0.0;
|
||||||
point currentStreamPoint(0, 0, 0);
|
point currentStreamPoint(0, 0, 0);
|
||||||
|
|
||||||
forAll (curPoints, pointI)
|
forAll(curPoints, pointI)
|
||||||
{
|
{
|
||||||
// Check if the point has been visited
|
// Check if the point has been visited
|
||||||
if (visitedPoint[curPoints[pointI]] == 1)
|
if (visitedPoint[curPoints[pointI]] == 1)
|
||||||
@ -386,7 +386,7 @@ int main(int argc, char *argv[])
|
|||||||
if (pointFound)
|
if (pointFound)
|
||||||
{
|
{
|
||||||
// Sort out other points on the face
|
// Sort out other points on the face
|
||||||
forAll (curPoints, pointI)
|
forAll(curPoints, pointI)
|
||||||
{
|
{
|
||||||
// Check if the point has been visited
|
// Check if the point has been visited
|
||||||
if (visitedPoint[curPoints[pointI]] == 0)
|
if (visitedPoint[curPoints[pointI]] == 0)
|
||||||
|
|||||||
@ -194,12 +194,12 @@ wordList addProcessorPatches
|
|||||||
{
|
{
|
||||||
// Add the processor patches to the cutting list
|
// Add the processor patches to the cutting list
|
||||||
HashTable<label> cuttingPatchTable;
|
HashTable<label> cuttingPatchTable;
|
||||||
forAll (cuttingPatches, i)
|
forAll(cuttingPatches, i)
|
||||||
{
|
{
|
||||||
cuttingPatchTable.insert(cuttingPatches[i], i);
|
cuttingPatchTable.insert(cuttingPatches[i], i);
|
||||||
}
|
}
|
||||||
|
|
||||||
forAll (meshTarget.boundary(), patchi)
|
forAll(meshTarget.boundary(), patchi)
|
||||||
{
|
{
|
||||||
if (isA<processorFvPatch>(meshTarget.boundary()[patchi]))
|
if (isA<processorFvPatch>(meshTarget.boundary()[patchi]))
|
||||||
{
|
{
|
||||||
|
|||||||
@ -223,7 +223,7 @@ void mapLagrangian(const meshToMesh& meshToMeshInterp)
|
|||||||
{
|
{
|
||||||
unmappedSource.erase(sourceParticleI);
|
unmappedSource.erase(sourceParticleI);
|
||||||
addParticles.append(sourceParticleI);
|
addParticles.append(sourceParticleI);
|
||||||
iter().cell()=targetCell;
|
iter().cell() = targetCell;
|
||||||
targetParcels.addParticle
|
targetParcels.addParticle
|
||||||
(
|
(
|
||||||
sourceParcels.remove(&iter())
|
sourceParcels.remove(&iter())
|
||||||
|
|||||||
@ -121,7 +121,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
// pick up cells sharing the point
|
// pick up cells sharing the point
|
||||||
|
|
||||||
forAll (markedPoints, pointI)
|
forAll(markedPoints, pointI)
|
||||||
{
|
{
|
||||||
if
|
if
|
||||||
(
|
(
|
||||||
@ -140,7 +140,7 @@ int main(int argc, char *argv[])
|
|||||||
const labelList& curFaces =
|
const labelList& curFaces =
|
||||||
surf1.pointFaces()[markedPoints[pointI]];
|
surf1.pointFaces()[markedPoints[pointI]];
|
||||||
|
|
||||||
forAll (curFaces, i)
|
forAll(curFaces, i)
|
||||||
{
|
{
|
||||||
facesToSubset[curFaces[i]] = true;
|
facesToSubset[curFaces[i]] = true;
|
||||||
}
|
}
|
||||||
@ -159,7 +159,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
// pick up cells sharing the edge
|
// pick up cells sharing the edge
|
||||||
|
|
||||||
forAll (markedEdges, edgeI)
|
forAll(markedEdges, edgeI)
|
||||||
{
|
{
|
||||||
if
|
if
|
||||||
(
|
(
|
||||||
@ -177,7 +177,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
const labelList& curFaces = surf1.edgeFaces()[markedEdges[edgeI]];
|
const labelList& curFaces = surf1.edgeFaces()[markedEdges[edgeI]];
|
||||||
|
|
||||||
forAll (curFaces, i)
|
forAll(curFaces, i)
|
||||||
{
|
{
|
||||||
facesToSubset[curFaces[i]] = true;
|
facesToSubset[curFaces[i]] = true;
|
||||||
}
|
}
|
||||||
@ -298,7 +298,7 @@ int main(int argc, char *argv[])
|
|||||||
Info<< "Found " << markedFaces.size() << " marked face(s)." << endl;
|
Info<< "Found " << markedFaces.size() << " marked face(s)." << endl;
|
||||||
|
|
||||||
// Check and mark faces to pick up
|
// Check and mark faces to pick up
|
||||||
forAll (markedFaces, faceI)
|
forAll(markedFaces, faceI)
|
||||||
{
|
{
|
||||||
if
|
if
|
||||||
(
|
(
|
||||||
@ -322,7 +322,7 @@ int main(int argc, char *argv[])
|
|||||||
const labelList& curFaces =
|
const labelList& curFaces =
|
||||||
surf1.faceFaces()[markedFaces[faceI]];
|
surf1.faceFaces()[markedFaces[faceI]];
|
||||||
|
|
||||||
forAll (curFaces, i)
|
forAll(curFaces, i)
|
||||||
{
|
{
|
||||||
label faceI = curFaces[i];
|
label faceI = curFaces[i];
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user