mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Standardized cell, patch, face and processor loop index names
This commit is contained in:
@ -71,7 +71,7 @@ void modifyOrAddFace
|
||||
const label facei,
|
||||
const label own,
|
||||
const bool flipFaceFlux,
|
||||
const label newPatchI,
|
||||
const label newPatchi,
|
||||
const label zoneID,
|
||||
const bool zoneFlip,
|
||||
|
||||
@ -90,7 +90,7 @@ void modifyOrAddFace
|
||||
own, // owner
|
||||
-1, // neighbour
|
||||
flipFaceFlux, // face flip
|
||||
newPatchI, // patch for face
|
||||
newPatchi, // patch for face
|
||||
false, // remove from zone
|
||||
zoneID, // zone for face
|
||||
zoneFlip // face flip in zone
|
||||
@ -112,7 +112,7 @@ void modifyOrAddFace
|
||||
-1, // master edge
|
||||
facei, // master face
|
||||
flipFaceFlux, // face flip
|
||||
newPatchI, // patch for face
|
||||
newPatchi, // patch for face
|
||||
zoneID, // zone for face
|
||||
zoneFlip // face flip in zone
|
||||
)
|
||||
@ -160,9 +160,9 @@ void subsetVolFields
|
||||
|
||||
label newStart = fld.patch().patch().start();
|
||||
|
||||
label oldPatchI = subsetter.patchMap()[patchi];
|
||||
label oldPatchi = subsetter.patchMap()[patchi];
|
||||
|
||||
if (oldPatchI == -1)
|
||||
if (oldPatchi == -1)
|
||||
{
|
||||
// New patch. Reset whole value.
|
||||
fld = exposedValue;
|
||||
@ -171,17 +171,17 @@ void subsetVolFields
|
||||
{
|
||||
// Reset those faces that originate from different patch
|
||||
// or internal faces.
|
||||
label oldSize = volField.boundaryField()[oldPatchI].size();
|
||||
label oldSize = volField.boundaryField()[oldPatchi].size();
|
||||
label oldStart = volField.boundaryField()
|
||||
[
|
||||
oldPatchI
|
||||
oldPatchi
|
||||
].patch().patch().start();
|
||||
|
||||
forAll(fld, j)
|
||||
{
|
||||
label oldFaceI = subsetter.faceMap()[newStart+j];
|
||||
label oldFacei = subsetter.faceMap()[newStart+j];
|
||||
|
||||
if (oldFaceI < oldStart || oldFaceI >= oldStart+oldSize)
|
||||
if (oldFacei < oldStart || oldFacei >= oldStart+oldSize)
|
||||
{
|
||||
fld[j] = exposedValue;
|
||||
}
|
||||
@ -233,9 +233,9 @@ void subsetSurfaceFields
|
||||
|
||||
label newStart = fld.patch().patch().start();
|
||||
|
||||
label oldPatchI = subsetter.patchMap()[patchi];
|
||||
label oldPatchi = subsetter.patchMap()[patchi];
|
||||
|
||||
if (oldPatchI == -1)
|
||||
if (oldPatchi == -1)
|
||||
{
|
||||
// New patch. Reset whole value.
|
||||
fld = exposedValue;
|
||||
@ -244,17 +244,17 @@ void subsetSurfaceFields
|
||||
{
|
||||
// Reset those faces that originate from different patch
|
||||
// or internal faces.
|
||||
label oldSize = volField.boundaryField()[oldPatchI].size();
|
||||
label oldSize = volField.boundaryField()[oldPatchi].size();
|
||||
label oldStart = volField.boundaryField()
|
||||
[
|
||||
oldPatchI
|
||||
oldPatchi
|
||||
].patch().patch().start();
|
||||
|
||||
forAll(fld, j)
|
||||
{
|
||||
label oldFaceI = subsetter.faceMap()[newStart+j];
|
||||
label oldFacei = subsetter.faceMap()[newStart+j];
|
||||
|
||||
if (oldFaceI < oldStart || oldFaceI >= oldStart+oldSize)
|
||||
if (oldFacei < oldStart || oldFacei >= oldStart+oldSize)
|
||||
{
|
||||
fld[j] = exposedValue;
|
||||
}
|
||||
@ -706,7 +706,7 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
|
||||
// Exposed faces patch
|
||||
label defaultPatchI = findPatch(mesh.boundaryMesh(), defaultPatch);
|
||||
label defaultPatchi = findPatch(mesh.boundaryMesh(), defaultPatch);
|
||||
|
||||
|
||||
//
|
||||
@ -725,7 +725,7 @@ int main(int argc, char *argv[])
|
||||
blockedCells.invert(mesh.nCells());
|
||||
|
||||
// Create subsetted mesh.
|
||||
subsetter.setLargeCellSubset(blockedCells, defaultPatchI, true);
|
||||
subsetter.setLargeCellSubset(blockedCells, defaultPatchi, true);
|
||||
}
|
||||
|
||||
|
||||
@ -783,7 +783,7 @@ int main(int argc, char *argv[])
|
||||
(
|
||||
subsetter,
|
||||
objects,
|
||||
defaultPatchI,
|
||||
defaultPatchi,
|
||||
scalar(Zero),
|
||||
volScalarField::typeName,
|
||||
scalarFlds
|
||||
@ -795,7 +795,7 @@ int main(int argc, char *argv[])
|
||||
(
|
||||
subsetter,
|
||||
objects,
|
||||
defaultPatchI,
|
||||
defaultPatchi,
|
||||
vector(Zero),
|
||||
volVectorField::typeName,
|
||||
vectorFlds
|
||||
@ -813,7 +813,7 @@ int main(int argc, char *argv[])
|
||||
(
|
||||
subsetter,
|
||||
objects,
|
||||
defaultPatchI,
|
||||
defaultPatchi,
|
||||
sphericalTensor(Zero),
|
||||
volSphericalTensorField::typeName,
|
||||
sphericalTensorFlds
|
||||
@ -825,7 +825,7 @@ int main(int argc, char *argv[])
|
||||
(
|
||||
subsetter,
|
||||
objects,
|
||||
defaultPatchI,
|
||||
defaultPatchi,
|
||||
symmTensor(Zero),
|
||||
volSymmTensorField::typeName,
|
||||
symmTensorFlds
|
||||
@ -837,7 +837,7 @@ int main(int argc, char *argv[])
|
||||
(
|
||||
subsetter,
|
||||
objects,
|
||||
defaultPatchI,
|
||||
defaultPatchi,
|
||||
tensor(Zero),
|
||||
volTensorField::typeName,
|
||||
tensorFlds
|
||||
@ -851,7 +851,7 @@ int main(int argc, char *argv[])
|
||||
(
|
||||
subsetter,
|
||||
objects,
|
||||
defaultPatchI,
|
||||
defaultPatchi,
|
||||
scalar(Zero),
|
||||
surfaceScalarField::typeName,
|
||||
surfScalarFlds
|
||||
@ -863,7 +863,7 @@ int main(int argc, char *argv[])
|
||||
(
|
||||
subsetter,
|
||||
objects,
|
||||
defaultPatchI,
|
||||
defaultPatchi,
|
||||
vector(Zero),
|
||||
surfaceVectorField::typeName,
|
||||
surfVectorFlds
|
||||
@ -881,7 +881,7 @@ int main(int argc, char *argv[])
|
||||
(
|
||||
subsetter,
|
||||
objects,
|
||||
defaultPatchI,
|
||||
defaultPatchi,
|
||||
sphericalTensor(Zero),
|
||||
surfaceSphericalTensorField::typeName,
|
||||
surfSphericalTensorFlds
|
||||
@ -901,7 +901,7 @@ int main(int argc, char *argv[])
|
||||
(
|
||||
subsetter,
|
||||
objects,
|
||||
defaultPatchI,
|
||||
defaultPatchi,
|
||||
symmTensor(Zero),
|
||||
surfaceSymmTensorField::typeName,
|
||||
surfSymmTensorFlds
|
||||
@ -913,7 +913,7 @@ int main(int argc, char *argv[])
|
||||
(
|
||||
subsetter,
|
||||
objects,
|
||||
defaultPatchI,
|
||||
defaultPatchi,
|
||||
tensor(Zero),
|
||||
surfaceTensorField::typeName,
|
||||
surfTensorFlds
|
||||
|
||||
@ -458,15 +458,15 @@ void doRefinement
|
||||
|
||||
const labelListList& addedCells = multiRef.addedCells();
|
||||
|
||||
forAll(addedCells, oldCellI)
|
||||
forAll(addedCells, oldCelli)
|
||||
{
|
||||
const labelList& added = addedCells[oldCellI];
|
||||
const labelList& added = addedCells[oldCelli];
|
||||
|
||||
if (added.size())
|
||||
{
|
||||
// Give all cells resulting from split the refinement level
|
||||
// of the master.
|
||||
label masterLevel = ++refLevel[oldCellI];
|
||||
label masterLevel = ++refLevel[oldCelli];
|
||||
|
||||
forAll(added, i)
|
||||
{
|
||||
@ -629,7 +629,7 @@ int main(int argc, char *argv[])
|
||||
#include "createPolyMesh.H"
|
||||
|
||||
// If nessecary add oldInternalFaces patch
|
||||
label newPatchI = addPatch(mesh, "oldInternalFaces");
|
||||
label newPatchi = addPatch(mesh, "oldInternalFaces");
|
||||
|
||||
|
||||
//
|
||||
@ -854,7 +854,7 @@ int main(int argc, char *argv[])
|
||||
{
|
||||
// Subset mesh to remove inside cells altogether. Updates cutCells,
|
||||
// refLevel.
|
||||
subsetMesh(mesh, writeMesh, newPatchI, inside, cutCells, refLevel);
|
||||
subsetMesh(mesh, writeMesh, newPatchi, inside, cutCells, refLevel);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -208,7 +208,7 @@ void Foam::cellSplitter::setRefinement
|
||||
// Add other pyramids
|
||||
for (label i = 1; i < cFaces.size(); i++)
|
||||
{
|
||||
label addedCellI =
|
||||
label addedCelli =
|
||||
meshMod.setAction
|
||||
(
|
||||
polyAddCell
|
||||
@ -221,7 +221,7 @@ void Foam::cellSplitter::setRefinement
|
||||
)
|
||||
);
|
||||
|
||||
newCells[i] = addedCellI;
|
||||
newCells[i] = addedCelli;
|
||||
}
|
||||
|
||||
cellToCells.insert(celli, newCells);
|
||||
@ -469,17 +469,17 @@ void Foam::cellSplitter::updateMesh(const mapPolyMesh& morphMap)
|
||||
|
||||
forAllConstIter(Map<label>, addedPoints_, iter)
|
||||
{
|
||||
label oldCellI = iter.key();
|
||||
label oldCelli = iter.key();
|
||||
|
||||
label newCellI = morphMap.reverseCellMap()[oldCellI];
|
||||
label newCelli = morphMap.reverseCellMap()[oldCelli];
|
||||
|
||||
label oldPointI = iter();
|
||||
|
||||
label newPointI = morphMap.reversePointMap()[oldPointI];
|
||||
|
||||
if (newCellI >= 0 && newPointI >= 0)
|
||||
if (newCelli >= 0 && newPointI >= 0)
|
||||
{
|
||||
newAddedPoints.insert(newCellI, newPointI);
|
||||
newAddedPoints.insert(newCelli, newPointI);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -223,9 +223,9 @@ label findFace
|
||||
scalar almostMinDist = GREAT;
|
||||
label almostMinI = -1;
|
||||
|
||||
forAll(pp, patchFaceI)
|
||||
forAll(pp, patchFacei)
|
||||
{
|
||||
pointHit pHit(pp[patchFaceI].nearestPoint(nearPoint, points));
|
||||
pointHit pHit(pp[patchFacei].nearestPoint(nearPoint, points));
|
||||
|
||||
if (pHit.hit())
|
||||
{
|
||||
@ -235,12 +235,12 @@ label findFace
|
||||
almostMinI = minI;
|
||||
|
||||
minDist = pHit.distance();
|
||||
minI = patchFaceI + mesh.nInternalFaces();
|
||||
minI = patchFacei + mesh.nInternalFaces();
|
||||
}
|
||||
else if (pHit.distance() < almostMinDist)
|
||||
{
|
||||
almostMinDist = pHit.distance();
|
||||
almostMinI = patchFaceI + mesh.nInternalFaces();
|
||||
almostMinI = patchFacei + mesh.nInternalFaces();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -120,9 +120,9 @@ int main(int argc, char *argv[])
|
||||
|
||||
const labelList& pCells = mesh.pointCells()[meshPointI];
|
||||
|
||||
forAll(pCells, pCellI)
|
||||
forAll(pCells, pCelli)
|
||||
{
|
||||
cutCells.insert(pCells[pCellI]);
|
||||
cutCells.insert(pCells[pCelli]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user