Standardized cell, patch and face loop index names
This commit is contained in:
@ -104,12 +104,12 @@ int main(int argc, char *argv[])
|
||||
|
||||
Info<< "Setting boundary layer velocity" << nl << endl;
|
||||
scalar yblv = ybl.value();
|
||||
forAll(U, cellI)
|
||||
forAll(U, celli)
|
||||
{
|
||||
if (y[cellI] <= yblv)
|
||||
if (y[celli] <= yblv)
|
||||
{
|
||||
mask[cellI] = 1;
|
||||
U[cellI] *= ::pow(y[cellI]/yblv, (1.0/7.0));
|
||||
mask[celli] = 1;
|
||||
U[celli] *= ::pow(y[celli]/yblv, (1.0/7.0));
|
||||
}
|
||||
}
|
||||
mask.correctBoundaryConditions();
|
||||
|
||||
@ -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
|
||||
@ -39,17 +39,17 @@ static const scalar perturbFactor = 1e-6;
|
||||
// compatible with tracking.
|
||||
static label findCell(const Cloud<passiveParticle>& cloud, const point& pt)
|
||||
{
|
||||
label cellI = -1;
|
||||
label celli = -1;
|
||||
label tetFaceI = -1;
|
||||
label tetPtI = -1;
|
||||
|
||||
const polyMesh& mesh = cloud.pMesh();
|
||||
|
||||
mesh.findCellFacePt(pt, cellI, tetFaceI, tetPtI);
|
||||
mesh.findCellFacePt(pt, celli, tetFaceI, tetPtI);
|
||||
|
||||
if (cellI >= 0)
|
||||
if (celli >= 0)
|
||||
{
|
||||
return cellI;
|
||||
return celli;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -62,17 +62,17 @@ static label findCell(const Cloud<passiveParticle>& cloud, const point& pt)
|
||||
polyMesh::FACE_PLANES // no decomposition needed
|
||||
);
|
||||
|
||||
label faceI = meshSearcher.findNearestBoundaryFace(pt);
|
||||
label facei = meshSearcher.findNearestBoundaryFace(pt);
|
||||
|
||||
if (faceI >= 0)
|
||||
if (facei >= 0)
|
||||
{
|
||||
const point& cc = mesh.cellCentres()[mesh.faceOwner()[faceI]];
|
||||
const point& cc = mesh.cellCentres()[mesh.faceOwner()[facei]];
|
||||
|
||||
const point perturbPt = (1-perturbFactor)*pt+perturbFactor*cc;
|
||||
|
||||
mesh.findCellFacePt(perturbPt, cellI, tetFaceI, tetPtI);
|
||||
mesh.findCellFacePt(perturbPt, celli, tetFaceI, tetPtI);
|
||||
|
||||
return cellI;
|
||||
return celli;
|
||||
}
|
||||
}
|
||||
|
||||
@ -188,9 +188,9 @@ void mapLagrangian(const meshToMesh0& meshToMesh0Interp)
|
||||
);
|
||||
passiveParticle& newP = newPtr();
|
||||
|
||||
label faceI = newP.track(iter().position(), td);
|
||||
label facei = newP.track(iter().position(), td);
|
||||
|
||||
if (faceI < 0 && newP.cell() >= 0)
|
||||
if (facei < 0 && newP.cell() >= 0)
|
||||
{
|
||||
// Hit position.
|
||||
foundCell = true;
|
||||
|
||||
@ -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
|
||||
@ -39,17 +39,17 @@ static const scalar perturbFactor = 1e-6;
|
||||
// compatible with tracking.
|
||||
static label findCell(const Cloud<passiveParticle>& cloud, const point& pt)
|
||||
{
|
||||
label cellI = -1;
|
||||
label celli = -1;
|
||||
label tetFaceI = -1;
|
||||
label tetPtI = -1;
|
||||
|
||||
const polyMesh& mesh = cloud.pMesh();
|
||||
|
||||
mesh.findCellFacePt(pt, cellI, tetFaceI, tetPtI);
|
||||
mesh.findCellFacePt(pt, celli, tetFaceI, tetPtI);
|
||||
|
||||
if (cellI >= 0)
|
||||
if (celli >= 0)
|
||||
{
|
||||
return cellI;
|
||||
return celli;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -62,17 +62,17 @@ static label findCell(const Cloud<passiveParticle>& cloud, const point& pt)
|
||||
polyMesh::FACE_PLANES // no decomposition needed
|
||||
);
|
||||
|
||||
label faceI = meshSearcher.findNearestBoundaryFace(pt);
|
||||
label facei = meshSearcher.findNearestBoundaryFace(pt);
|
||||
|
||||
if (faceI >= 0)
|
||||
if (facei >= 0)
|
||||
{
|
||||
const point& cc = mesh.cellCentres()[mesh.faceOwner()[faceI]];
|
||||
const point& cc = mesh.cellCentres()[mesh.faceOwner()[facei]];
|
||||
|
||||
const point perturbPt = (1-perturbFactor)*pt+perturbFactor*cc;
|
||||
|
||||
mesh.findCellFacePt(perturbPt, cellI, tetFaceI, tetPtI);
|
||||
mesh.findCellFacePt(perturbPt, celli, tetFaceI, tetPtI);
|
||||
|
||||
return cellI;
|
||||
return celli;
|
||||
}
|
||||
}
|
||||
|
||||
@ -178,9 +178,9 @@ void mapLagrangian(const meshToMesh& interp)
|
||||
);
|
||||
passiveParticle& newP = newPtr();
|
||||
|
||||
label faceI = newP.track(iter().position(), td);
|
||||
label facei = newP.track(iter().position(), td);
|
||||
|
||||
if (faceI < 0 && newP.cell() >= 0)
|
||||
if (facei < 0 && newP.cell() >= 0)
|
||||
{
|
||||
// Hit position.
|
||||
foundCell = true;
|
||||
|
||||
@ -164,15 +164,15 @@ void writeRays
|
||||
|
||||
Pout<< "Dumping rays to " << str.name() << endl;
|
||||
|
||||
forAll(myFc, faceI)
|
||||
forAll(myFc, facei)
|
||||
{
|
||||
const labelList visFaces = visibleFaceFaces[faceI];
|
||||
const labelList visFaces = visibleFaceFaces[facei];
|
||||
forAll(visFaces, faceRemote)
|
||||
{
|
||||
label compactI = visFaces[faceRemote];
|
||||
const point& remoteFc = compactCf[compactI];
|
||||
|
||||
meshTools::writeOBJ(str, myFc[faceI]);
|
||||
meshTools::writeOBJ(str, myFc[facei]);
|
||||
vertI++;
|
||||
meshTools::writeOBJ(str, remoteFc);
|
||||
vertI++;
|
||||
@ -228,12 +228,12 @@ void insertMatrixElements
|
||||
scalarSquareMatrix& matrix
|
||||
)
|
||||
{
|
||||
forAll(viewFactors, faceI)
|
||||
forAll(viewFactors, facei)
|
||||
{
|
||||
const scalarList& vf = viewFactors[faceI];
|
||||
const labelList& globalFaces = globalFaceFaces[faceI];
|
||||
const scalarList& vf = viewFactors[facei];
|
||||
const labelList& globalFaces = globalFaceFaces[facei];
|
||||
|
||||
label globalI = globalNumbering.toGlobal(fromProcI, faceI);
|
||||
label globalI = globalNumbering.toGlobal(fromProcI, facei);
|
||||
forAll(globalFaces, i)
|
||||
{
|
||||
matrix[globalI][globalFaces[i]] = vf[i];
|
||||
@ -397,11 +397,11 @@ int main(int argc, char *argv[])
|
||||
labelHashSet includePatches;
|
||||
includePatches.insert(patchID);
|
||||
|
||||
forAll(coarseCf, faceI)
|
||||
forAll(coarseCf, facei)
|
||||
{
|
||||
point cf = coarseCf[faceI];
|
||||
point cf = coarseCf[facei];
|
||||
|
||||
const label coarseFaceI = coarsePatchFace[faceI];
|
||||
const label coarseFaceI = coarsePatchFace[facei];
|
||||
const labelList& fineFaces = coarseToFine[coarseFaceI];
|
||||
const label agglomI =
|
||||
agglom[fineFaces[0]] + coarsePatches[patchID].start();
|
||||
@ -445,7 +445,7 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
}
|
||||
|
||||
point sf = coarseSf[faceI];
|
||||
point sf = coarseSf[facei];
|
||||
localCoarseCf.append(cf);
|
||||
localCoarseSf.append(sf);
|
||||
localAgg.append(agglomI);
|
||||
@ -502,10 +502,10 @@ int main(int argc, char *argv[])
|
||||
labelListList visibleFaceFaces(nCoarseFaces);
|
||||
|
||||
label nViewFactors = 0;
|
||||
forAll(nVisibleFaceFaces, faceI)
|
||||
forAll(nVisibleFaceFaces, facei)
|
||||
{
|
||||
visibleFaceFaces[faceI].setSize(nVisibleFaceFaces[faceI]);
|
||||
nViewFactors += nVisibleFaceFaces[faceI];
|
||||
visibleFaceFaces[facei].setSize(nVisibleFaceFaces[facei]);
|
||||
nViewFactors += nVisibleFaceFaces[facei];
|
||||
}
|
||||
|
||||
|
||||
@ -574,9 +574,9 @@ int main(int argc, char *argv[])
|
||||
nVisibleFaceFaces = 0;
|
||||
forAll(rayStartFace, i)
|
||||
{
|
||||
label faceI = rayStartFace[i];
|
||||
label facei = rayStartFace[i];
|
||||
label compactI = rayEndFace[i];
|
||||
visibleFaceFaces[faceI][nVisibleFaceFaces[faceI]++] = compactI;
|
||||
visibleFaceFaces[facei][nVisibleFaceFaces[facei]++] = compactI;
|
||||
}
|
||||
|
||||
|
||||
@ -896,12 +896,12 @@ int main(int argc, char *argv[])
|
||||
|
||||
// Create globalFaceFaces needed to insert view factors
|
||||
// in F to the global matrix Fmatrix
|
||||
forAll(globalFaceFaces, faceI)
|
||||
forAll(globalFaceFaces, facei)
|
||||
{
|
||||
globalFaceFaces[faceI] = renumber
|
||||
globalFaceFaces[facei] = renumber
|
||||
(
|
||||
compactToGlobal,
|
||||
visibleFaceFaces[faceI]
|
||||
visibleFaceFaces[facei]
|
||||
);
|
||||
}
|
||||
|
||||
@ -923,12 +923,12 @@ int main(int argc, char *argv[])
|
||||
else
|
||||
{
|
||||
labelListList globalFaceFaces(visibleFaceFaces.size());
|
||||
forAll(globalFaceFaces, faceI)
|
||||
forAll(globalFaceFaces, facei)
|
||||
{
|
||||
globalFaceFaces[faceI] = renumber
|
||||
globalFaceFaces[facei] = renumber
|
||||
(
|
||||
compactToGlobal,
|
||||
visibleFaceFaces[faceI]
|
||||
visibleFaceFaces[facei]
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user