mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Apply coding style recommendations:
- space between keyword and bracket in 'for(..)', 'if(..)', 'while(..)'
This commit is contained in:
@ -155,7 +155,7 @@ void maxwellSlipUFvPatchVectorField::updateCoeffs()
|
||||
|
||||
refValue() = Uwall_;
|
||||
|
||||
if(thermalCreep_)
|
||||
if (thermalCreep_)
|
||||
{
|
||||
const volScalarField& vsfT =
|
||||
this->db().objectRegistry::lookupObject<volScalarField>("T");
|
||||
@ -167,7 +167,7 @@ void maxwellSlipUFvPatchVectorField::updateCoeffs()
|
||||
refValue() -= 3.0*pnu/(4.0*pT)*transform(I - n*n, gradpT);
|
||||
}
|
||||
|
||||
if(curvature_)
|
||||
if (curvature_)
|
||||
{
|
||||
const fvPatchTensorField& ptauMC =
|
||||
patch().lookupPatchField<volTensorField, tensor>("tauMC");
|
||||
|
||||
@ -11,7 +11,7 @@
|
||||
runTime.path()/runTime.timeName()/"uniform"/"gradP.raw"
|
||||
);
|
||||
|
||||
if(gradPFile.good())
|
||||
if (gradPFile.good())
|
||||
{
|
||||
gradPFile >> gradP;
|
||||
Info<< "Reading average pressure gradient" <<endl
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
runTime.path()/runTime.timeName()/"uniform"/"gradP.raw"
|
||||
);
|
||||
|
||||
if(gradPFile.good())
|
||||
if (gradPFile.good())
|
||||
{
|
||||
gradPFile << gradP << endl;
|
||||
}
|
||||
|
||||
@ -29,7 +29,7 @@
|
||||
|
||||
for (label i=0; i<p.boundaryField().size(); i++)
|
||||
{
|
||||
if(p.boundaryField()[i].fixesValue())
|
||||
if (p.boundaryField()[i].fixesValue())
|
||||
{
|
||||
pcorrTypes[i] = fixedValueFvPatchScalarField::typeName;
|
||||
}
|
||||
@ -50,7 +50,7 @@
|
||||
pcorrTypes
|
||||
);
|
||||
|
||||
for(int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
||||
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
||||
{
|
||||
fvScalarMatrix pcorrEqn
|
||||
(
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
if(turbulence)
|
||||
if (turbulence)
|
||||
{
|
||||
if (mesh.changing())
|
||||
{
|
||||
|
||||
@ -34,7 +34,7 @@
|
||||
|
||||
surfaceScalarField Dp("(rho*(1|A(U)))", alphaf*rUaAf/rhoa + betaf*rUbAf/rhob);
|
||||
|
||||
for(int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
||||
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
||||
{
|
||||
fvScalarMatrix pEqn
|
||||
(
|
||||
|
||||
@ -42,7 +42,7 @@
|
||||
|
||||
adjustPhi(phi, U, pcorr);
|
||||
|
||||
for(int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
||||
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
||||
{
|
||||
fvScalarMatrix pcorrEqn
|
||||
(
|
||||
|
||||
@ -30,7 +30,7 @@
|
||||
+ fvc::interpolate(rho)*(g & mesh.Sf())
|
||||
)*rUAf;
|
||||
|
||||
for(int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
||||
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
||||
{
|
||||
fvScalarMatrix pEqnIncomp
|
||||
(
|
||||
|
||||
@ -42,7 +42,7 @@
|
||||
|
||||
adjustPhi(phi, U, pcorr);
|
||||
|
||||
for(int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
||||
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
||||
{
|
||||
fvScalarMatrix pcorrEqn
|
||||
(
|
||||
|
||||
@ -18,7 +18,7 @@
|
||||
+ fvc::interpolate(rho)*(g & mesh.Sf())
|
||||
)*rAUf;
|
||||
|
||||
for(int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
||||
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
||||
{
|
||||
fvScalarMatrix pEqn
|
||||
(
|
||||
|
||||
@ -34,7 +34,7 @@
|
||||
|
||||
adjustPhi(phi, U, pcorr);
|
||||
|
||||
for(int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
||||
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
||||
{
|
||||
fvScalarMatrix pcorrEqn
|
||||
(
|
||||
|
||||
@ -19,7 +19,7 @@
|
||||
+ fvc::interpolate(rho)*(g & mesh.Sf())
|
||||
)*rUAf;
|
||||
|
||||
for(int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
||||
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
||||
{
|
||||
fvScalarMatrix pEqn
|
||||
(
|
||||
|
||||
@ -34,7 +34,7 @@
|
||||
|
||||
adjustPhi(phi, U, pcorr);
|
||||
|
||||
for(int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
||||
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
||||
{
|
||||
fvScalarMatrix pcorrEqn
|
||||
(
|
||||
|
||||
@ -23,7 +23,7 @@
|
||||
const volScalarField& vDotcP = vDotP[0]();
|
||||
const volScalarField& vDotvP = vDotP[1]();
|
||||
|
||||
for(int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
||||
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
||||
{
|
||||
fvScalarMatrix pEqn
|
||||
(
|
||||
|
||||
@ -125,7 +125,7 @@ Foam::tmp<Foam::volScalarField> Foam::multiphaseMixture::rho() const
|
||||
|
||||
tmp<volScalarField> trho = iter()*iter().rho();
|
||||
|
||||
for(++iter; iter != phases_.end(); ++iter)
|
||||
for (++iter; iter != phases_.end(); ++iter)
|
||||
{
|
||||
trho() += iter()*iter().rho();
|
||||
}
|
||||
@ -140,7 +140,7 @@ Foam::tmp<Foam::volScalarField> Foam::multiphaseMixture::mu() const
|
||||
|
||||
tmp<volScalarField> tmu = iter()*iter().rho()*iter().nu();
|
||||
|
||||
for(++iter; iter != phases_.end(); ++iter)
|
||||
for (++iter; iter != phases_.end(); ++iter)
|
||||
{
|
||||
tmu() += iter()*iter().rho()*iter().nu();
|
||||
}
|
||||
@ -156,7 +156,7 @@ Foam::tmp<Foam::surfaceScalarField> Foam::multiphaseMixture::muf() const
|
||||
tmp<surfaceScalarField> tmuf =
|
||||
fvc::interpolate(iter())*iter().rho()*fvc::interpolate(iter().nu());
|
||||
|
||||
for(++iter; iter != phases_.end(); ++iter)
|
||||
for (++iter; iter != phases_.end(); ++iter)
|
||||
{
|
||||
tmuf() +=
|
||||
fvc::interpolate(iter())*iter().rho()*fvc::interpolate(iter().nu());
|
||||
@ -210,7 +210,7 @@ Foam::multiphaseMixture::surfaceTensionForce() const
|
||||
PtrDictionary<phase>::const_iterator iter2 = iter1;
|
||||
++iter2;
|
||||
|
||||
for(; iter2 != phases_.end(); ++iter2)
|
||||
for (; iter2 != phases_.end(); ++iter2)
|
||||
{
|
||||
const phase& alpha2 = iter2();
|
||||
|
||||
@ -489,7 +489,7 @@ void Foam::multiphaseMixture::solveAlphas
|
||||
if (cycleAlpha)
|
||||
{
|
||||
PtrDictionary<phase>::iterator refPhaseIter = phases_.begin();
|
||||
for(label i=0; i<nSolves%phases_.size(); i++)
|
||||
for (label i=0; i<nSolves%phases_.size(); i++)
|
||||
{
|
||||
++refPhaseIter;
|
||||
}
|
||||
|
||||
@ -18,7 +18,7 @@
|
||||
+ fvc::interpolate(rho)*(g & mesh.Sf())
|
||||
)*rUAf;
|
||||
|
||||
for(int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
||||
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
||||
{
|
||||
fvScalarMatrix pEqn
|
||||
(
|
||||
|
||||
@ -17,7 +17,7 @@ phi =
|
||||
surfaceScalarField phiU("phiU", phi);
|
||||
phi += fvc::interpolate(rho)*(g & mesh.Sf())*rUAf;
|
||||
|
||||
for(int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
||||
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
||||
{
|
||||
fvScalarMatrix pEqn
|
||||
(
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
|
||||
phi = phiU + fvc::interpolate(rho)*(g & mesh.Sf())*rUAf;
|
||||
|
||||
for(int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
||||
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
||||
{
|
||||
fvScalarMatrix pEqn
|
||||
(
|
||||
|
||||
@ -78,12 +78,12 @@ Foam::tmp<Foam::volScalarField> Foam::GidaspowErgunWenYu::K
|
||||
|
||||
forAll(Re, celli)
|
||||
{
|
||||
if(Re[celli] > 1000.0)
|
||||
if (Re[celli] > 1000.0)
|
||||
{
|
||||
Cds[celli] = 0.44;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Wen and Yu (1966)
|
||||
tmp<volScalarField> tKWenYu = 0.75*Cds*phaseb_.rho()*Ur*bp/phasea_.d();
|
||||
volScalarField& KWenYu = tKWenYu();
|
||||
|
||||
@ -77,7 +77,7 @@ Foam::tmp<Foam::volScalarField> Foam::GidaspowSchillerNaumann::K
|
||||
|
||||
forAll(Re, celli)
|
||||
{
|
||||
if(Re[celli] > 1000.0)
|
||||
if (Re[celli] > 1000.0)
|
||||
{
|
||||
Cds[celli] = 0.44;
|
||||
}
|
||||
|
||||
@ -74,7 +74,7 @@ Foam::tmp<Foam::volScalarField> Foam::SchillerNaumann::K
|
||||
|
||||
forAll(Re, celli)
|
||||
{
|
||||
if(Re[celli] > 1000.0)
|
||||
if (Re[celli] > 1000.0)
|
||||
{
|
||||
Cds[celli] = 0.44;
|
||||
}
|
||||
|
||||
@ -77,7 +77,7 @@ Foam::tmp<Foam::volScalarField> Foam::WenYu::K
|
||||
|
||||
forAll(Re, celli)
|
||||
{
|
||||
if(Re[celli] > 1000.0)
|
||||
if (Re[celli] > 1000.0)
|
||||
{
|
||||
Cds[celli] = 0.44;
|
||||
}
|
||||
|
||||
@ -47,7 +47,7 @@
|
||||
|
||||
surfaceScalarField Dp("(rho*(1|A(U)))", alphaf*rUaAf/rhoa + betaf*rUbAf/rhob);
|
||||
|
||||
for(int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
||||
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
||||
{
|
||||
fvScalarMatrix pEqn
|
||||
(
|
||||
|
||||
@ -135,7 +135,7 @@ int main(int argc, char *argv[])
|
||||
sum = 0;
|
||||
for (label iter = 0; iter < nIters; ++iter)
|
||||
{
|
||||
for(unsigned int i = 0; i < stlVector.size(); i++)
|
||||
for (unsigned int i = 0; i < stlVector.size(); i++)
|
||||
{
|
||||
sum += stlVector[i];
|
||||
}
|
||||
|
||||
@ -188,11 +188,11 @@ int main(int argc, char *argv[])
|
||||
// (
|
||||
// mesh
|
||||
// );
|
||||
//
|
||||
//
|
||||
// Info<< "cellFaceCell:" << endl;
|
||||
// writeStencilStats(addressing.stencil());
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
// //// Do some interpolation.
|
||||
// //{
|
||||
// // const labelListList& stencil = addressing.stencil();
|
||||
@ -226,7 +226,7 @@ int main(int argc, char *argv[])
|
||||
// mesh.C(),
|
||||
// stencilPoints
|
||||
// );
|
||||
//
|
||||
//
|
||||
// forAll(stencilPoints, faceI)
|
||||
// {
|
||||
// if (stencilPoints[faceI].size() >= 15)
|
||||
@ -443,10 +443,10 @@ int main(int argc, char *argv[])
|
||||
(
|
||||
mesh
|
||||
);
|
||||
|
||||
|
||||
Info<< "cellFaceCell:" << endl;
|
||||
writeStencilStats(addressing.stencil());
|
||||
|
||||
|
||||
// Collect stencil face centres
|
||||
List<List<point> > stencilPoints(mesh.nCells());
|
||||
addressing.collectData
|
||||
@ -454,7 +454,7 @@ int main(int argc, char *argv[])
|
||||
mesh.Cf(),
|
||||
stencilPoints
|
||||
);
|
||||
|
||||
|
||||
forAll(stencilPoints, cellI)
|
||||
{
|
||||
writeStencilOBJ
|
||||
@ -477,7 +477,7 @@ int main(int argc, char *argv[])
|
||||
// vf,
|
||||
// stencilData
|
||||
// );
|
||||
// for(label faci = 0; faci < mesh.nInternalFaces(); faci++)
|
||||
// for (label faci = 0; faci < mesh.nInternalFaces(); faci++)
|
||||
// {
|
||||
// const scalarList& stData = stencilData[faceI];
|
||||
// const scalarList& stWeight = fit[faceI];
|
||||
|
||||
@ -71,7 +71,7 @@ labelList procNeighbours(const polyMesh& mesh)
|
||||
{
|
||||
const polyPatch& patch = mesh.boundaryMesh()[patchI];
|
||||
|
||||
const processorPolyPatch& procPatch =
|
||||
const processorPolyPatch& procPatch =
|
||||
refCast<const processorPolyPatch>(patch);
|
||||
|
||||
label procId = procPatch.neighbProcNo() - Pstream::firstSlave() + 1;
|
||||
@ -96,7 +96,7 @@ point meshCentre(const polyMesh& mesh)
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
# include "setRootCase.H"
|
||||
# include "setRootCase.H"
|
||||
# include "createTime.H"
|
||||
# include "createMesh.H"
|
||||
|
||||
@ -230,7 +230,7 @@ int main(int argc, char *argv[])
|
||||
// Dump route as lines.
|
||||
labelList route(cellRouter.getRoute(-(pathI + 1)));
|
||||
|
||||
for(label elemI = 1; elemI < route.size(); elemI++)
|
||||
for (label elemI = 1; elemI < route.size(); elemI++)
|
||||
{
|
||||
objFile
|
||||
<< "l " << route[elemI-1]+1 << ' '
|
||||
|
||||
@ -38,7 +38,7 @@ Foam::label Foam::router::count(const label weight) const
|
||||
{
|
||||
cnt += weights_[nodeI];
|
||||
}
|
||||
|
||||
|
||||
return cnt;
|
||||
}
|
||||
|
||||
@ -315,7 +315,7 @@ bool Foam::router::route(const labelList& path, const label pathValue)
|
||||
setWeights(0, path[0]);
|
||||
|
||||
// Check if all endPoints can be reached
|
||||
for(label leafI = 1; leafI < path.size(); leafI++)
|
||||
for (label leafI = 1; leafI < path.size(); leafI++)
|
||||
{
|
||||
if (weights_[path[leafI]] == labelMax)
|
||||
{
|
||||
@ -329,7 +329,7 @@ bool Foam::router::route(const labelList& path, const label pathValue)
|
||||
}
|
||||
|
||||
// Search back from all endpoints to start and fix weights
|
||||
for(label leafI = 1; leafI < path.size(); leafI++)
|
||||
for (label leafI = 1; leafI < path.size(); leafI++)
|
||||
{
|
||||
fixWeights
|
||||
(
|
||||
@ -370,7 +370,7 @@ bool Foam::router::route(const labelList& path, const label pathValue)
|
||||
{
|
||||
weights_[nodeI] = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -264,7 +264,7 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
|
||||
yyFlexLexer lexer(&ansysStream);
|
||||
while(lexer.yylex() != 0)
|
||||
while (lexer.yylex() != 0)
|
||||
{}
|
||||
|
||||
Info<< "Creating points" << endl;
|
||||
|
||||
@ -813,7 +813,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
yyFlexLexer lexer(&fluentStream.stdStream());
|
||||
|
||||
while(lexer.yylex() != 0)
|
||||
while (lexer.yylex() != 0)
|
||||
{}
|
||||
|
||||
Info<< "\nFINISHED LEXING\n\n";
|
||||
@ -973,7 +973,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
// Set the owner of these faces to -1 so that they do not get
|
||||
// added to the mesh
|
||||
for(label facei = start; facei <= end; facei++)
|
||||
for (label facei = start; facei <= end; facei++)
|
||||
{
|
||||
owner[facei] = -1;
|
||||
}
|
||||
|
||||
@ -898,7 +898,7 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
|
||||
yyFlexLexer lexer(&fluentStream);
|
||||
while(lexer.yylex() != 0)
|
||||
while (lexer.yylex() != 0)
|
||||
{}
|
||||
|
||||
Info<< "\n\nFINISHED LEXING\n\n\n";
|
||||
@ -1388,7 +1388,7 @@ int main(int argc, char *argv[])
|
||||
meshFaces[j] = cMeshFace;
|
||||
pFaceSet.insert(cMeshFace);
|
||||
}
|
||||
if(writeSets)
|
||||
if (writeSets)
|
||||
{
|
||||
Info<< "Writing patch " << patchNames[patchI]
|
||||
<< " of size " << sz << " to faceSet." << endl;
|
||||
@ -1404,7 +1404,11 @@ int main(int argc, char *argv[])
|
||||
//it will be put in a default wall boundary
|
||||
//internal boundaries are simply ignored
|
||||
|
||||
if(patchTypes[patchI] != "internal" && !pShapeMesh.isInternalFace(meshFaces[0]))
|
||||
if
|
||||
(
|
||||
patchTypes[patchI] != "internal"
|
||||
&& !pShapeMesh.isInternalFace(meshFaces[0])
|
||||
)
|
||||
{
|
||||
//first face is external and has valid non-internal type
|
||||
|
||||
@ -1423,7 +1427,7 @@ int main(int argc, char *argv[])
|
||||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
if(facePatchID[faceI - pShapeMesh.nInternalFaces()]!= -1)
|
||||
if (facePatchID[faceI - pShapeMesh.nInternalFaces()]!= -1)
|
||||
{
|
||||
FatalErrorIn(args.executable())
|
||||
<< "Face " << faceI << " on new patch "
|
||||
@ -1475,7 +1479,7 @@ int main(int argc, char *argv[])
|
||||
DynamicList<label> defaultBoundaryFaces(facePatchID.size());
|
||||
forAll(facePatchID, idI)
|
||||
{
|
||||
if(facePatchID[idI] == -1)
|
||||
if (facePatchID[idI] == -1)
|
||||
{
|
||||
defaultBoundaryFaces.append(idI);
|
||||
facePatchID[idI] = nBoundaries;
|
||||
@ -1575,50 +1579,50 @@ int main(int argc, char *argv[])
|
||||
boundaryZones[pI].append(bPatches[pI].name());
|
||||
}
|
||||
|
||||
label cnt=0;
|
||||
SLList<label>::iterator cg = cellGroupZoneID.begin();
|
||||
SLList<label>::iterator start = cellGroupStartIndex.begin();
|
||||
SLList<label>::iterator end = cellGroupEndIndex.begin();
|
||||
label cnt=0;
|
||||
SLList<label>::iterator cg = cellGroupZoneID.begin();
|
||||
SLList<label>::iterator start = cellGroupStartIndex.begin();
|
||||
SLList<label>::iterator end = cellGroupEndIndex.begin();
|
||||
|
||||
for (; cg != cellGroupZoneID.end(); ++cg, ++start, ++end)
|
||||
{
|
||||
const word& name = patchNameIDs[cg()];
|
||||
const word& type = patchTypeIDs[cg()];
|
||||
for (; cg != cellGroupZoneID.end(); ++cg, ++start, ++end)
|
||||
{
|
||||
const word& name = patchNameIDs[cg()];
|
||||
const word& type = patchTypeIDs[cg()];
|
||||
|
||||
Info<< "Writing cell zone: " << name
|
||||
Info<< "Writing cell zone: " << name
|
||||
<< " of type " << type << " starting at " << start() - 1
|
||||
<< " ending at " << end() - 1 << " to cellSet." << endl;
|
||||
|
||||
labelList cls(end() - start() + 1);
|
||||
labelList cls(end() - start() + 1);
|
||||
|
||||
// Mark zone cells, used for finding faces
|
||||
boolList zoneCell(pShapeMesh.nCells(), false);
|
||||
|
||||
// shift cell indizes by 1
|
||||
label nr=0;
|
||||
for (label celli = (start() - 1); celli < end(); celli++)
|
||||
// shift cell indizes by 1
|
||||
label nr=0;
|
||||
for (label celli = (start() - 1); celli < end(); celli++)
|
||||
{
|
||||
cls[nr]=celli;
|
||||
zoneCell[celli] = true;
|
||||
nr++;
|
||||
}
|
||||
}
|
||||
|
||||
cz[cnt] = new cellZone
|
||||
(
|
||||
cz[cnt] = new cellZone
|
||||
(
|
||||
name,
|
||||
cls,
|
||||
cnt,
|
||||
pShapeMesh.cellZones()
|
||||
);
|
||||
);
|
||||
|
||||
DynamicList<label> zoneFaces(pShapeMesh.nFaces());
|
||||
forAll(pShapeMesh.faceNeighbour(), faceI)
|
||||
{
|
||||
label nei = pShapeMesh.faceNeighbour()[faceI];
|
||||
label own = pShapeMesh.faceOwner()[faceI];
|
||||
if(nei != -1)
|
||||
if (nei != -1)
|
||||
{
|
||||
if(zoneCell[nei] && zoneCell[own])
|
||||
if (zoneCell[nei] && zoneCell[own])
|
||||
{
|
||||
zoneFaces.append(faceI);
|
||||
}
|
||||
@ -1641,7 +1645,7 @@ int main(int argc, char *argv[])
|
||||
const labelList& faceCells = bPatches[pI].faceCells();
|
||||
forAll(faceCells, fcI)
|
||||
{
|
||||
if(zoneCell[faceCells[fcI] ])
|
||||
if (zoneCell[faceCells[fcI] ])
|
||||
{
|
||||
boundaryZones[pI].append(name);
|
||||
break;
|
||||
@ -1649,8 +1653,8 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
}
|
||||
|
||||
cnt++;
|
||||
}
|
||||
cnt++;
|
||||
}
|
||||
|
||||
pShapeMesh.addZones(pz, fz, cz);
|
||||
|
||||
@ -1715,7 +1719,7 @@ int main(int argc, char *argv[])
|
||||
cellSet internal(pShapeMesh, name, end() - start());
|
||||
|
||||
// shift cell indizes by 1
|
||||
for(label celli=start() - 1; celli<=end() - 1; celli++)
|
||||
for (label celli = start() - 1; celli <= end() - 1; celli++)
|
||||
{
|
||||
internal.insert(celli);
|
||||
}
|
||||
|
||||
@ -665,7 +665,7 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
|
||||
yyFlexLexer lexer(&gambitStream);
|
||||
while(lexer.yylex() != 0)
|
||||
while (lexer.yylex() != 0)
|
||||
{}
|
||||
|
||||
Info<< "Finished lexing" << endl;
|
||||
|
||||
@ -314,14 +314,14 @@ void readPhysNames(IFstream& inFile, Map<word>& physicalNames)
|
||||
IStringStream lineStr(line);
|
||||
label nSpaces = lineStr.str().count(' ');
|
||||
|
||||
if(nSpaces == 1)
|
||||
if (nSpaces == 1)
|
||||
{
|
||||
lineStr >> regionI >> regionName;
|
||||
|
||||
Info<< " " << regionI << '\t'
|
||||
<< string::validate<word>(regionName) << endl;
|
||||
}
|
||||
else if(nSpaces == 2)
|
||||
else if (nSpaces == 2)
|
||||
{
|
||||
// >= Gmsh2.4 physical types has tag in front.
|
||||
label physType;
|
||||
|
||||
@ -412,7 +412,7 @@ void readPatches
|
||||
Sout<< "Starting reading patches at line " << is.lineNumber() << '.'
|
||||
<< endl;
|
||||
|
||||
while(true)
|
||||
while (true)
|
||||
{
|
||||
string line;
|
||||
is.getLine(line);
|
||||
|
||||
@ -20,7 +20,7 @@ pointField points(nPoints);
|
||||
label i4;
|
||||
labelList idface(nPoints), fv(nPoints);
|
||||
|
||||
for(label i=0; i<nPoints; i++)
|
||||
for (label i=0; i<nPoints; i++)
|
||||
{
|
||||
scalar ffv;
|
||||
kivaFile
|
||||
@ -44,7 +44,7 @@ labelList i1tab(nPoints), i3tab(nPoints), i8tab(nPoints), idreg(nPoints),
|
||||
|
||||
label nBfaces = 0;
|
||||
|
||||
for(label i=0; i<nPoints; i++)
|
||||
for (label i=0; i<nPoints; i++)
|
||||
{
|
||||
label i1, i3, i8;
|
||||
scalar ff, fbcl, fbcf, fbcb;
|
||||
@ -85,7 +85,7 @@ if (mTable == 0)
|
||||
|
||||
labelList imtab(nPoints), jmtab(nPoints), kmtab(nPoints);
|
||||
|
||||
for(label i=0; i<nPoints; i++)
|
||||
for (label i=0; i<nPoints; i++)
|
||||
{
|
||||
label im, jm, km;
|
||||
kivaFile >> i4 >> im >> jm >> km;
|
||||
@ -115,7 +115,7 @@ forAll (pointMap, i)
|
||||
}
|
||||
|
||||
// Initialise all cells to hex and search and set map for collocated points
|
||||
for(label i=0; i<nPoints; i++)
|
||||
for (label i=0; i<nPoints; i++)
|
||||
{
|
||||
if (f[i] > 0.0)
|
||||
{
|
||||
@ -237,7 +237,7 @@ List<SLList<face> > pFaces[nBCs];
|
||||
face quadFace(4);
|
||||
face triFace(3);
|
||||
|
||||
for(label i=0; i<nPoints; i++)
|
||||
for (label i=0; i<nPoints; i++)
|
||||
{
|
||||
if (f[i] > 0)
|
||||
{
|
||||
|
||||
@ -1410,7 +1410,7 @@ void Foam::meshDualiser::setRefinement
|
||||
meshMod
|
||||
);
|
||||
}
|
||||
while(fp != 0);
|
||||
while (fp != 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -545,7 +545,7 @@ void starMesh::createCoupleMatches()
|
||||
points_[masterEdges[masterEdgeI].start()];
|
||||
|
||||
// loop until the next label to add is -1
|
||||
for(;;)
|
||||
for (;;)
|
||||
{
|
||||
label nextPointLabel = -1;
|
||||
label usedI = -1;
|
||||
@ -739,7 +739,7 @@ void starMesh::createCoupleMatches()
|
||||
points_[slaveEdges[slaveEdgeI].start()];
|
||||
|
||||
// loop until the next label to add is -1
|
||||
for(;;)
|
||||
for (;;)
|
||||
{
|
||||
label nextPointLabel = -1;
|
||||
label usedI = -1;
|
||||
|
||||
@ -96,7 +96,7 @@ void Foam::printMeshStats(const polyMesh& mesh, const bool allTopology)
|
||||
label nTetWedge = 0;
|
||||
label nUnknown = 0;
|
||||
|
||||
for(label cellI = 0; cellI < mesh.nCells(); cellI++)
|
||||
for (label cellI = 0; cellI < mesh.nCells(); cellI++)
|
||||
{
|
||||
if (hex.isA(mesh, cellI))
|
||||
{
|
||||
|
||||
@ -75,7 +75,7 @@ void writeBytes(char* start, int nBytes)
|
||||
|
||||
cout<< start << " : ";
|
||||
|
||||
for(int i = 0; i < nBytes; i++)
|
||||
for (int i = 0; i < nBytes; i++)
|
||||
{
|
||||
cout<< " " << start[i];
|
||||
}
|
||||
|
||||
@ -423,7 +423,7 @@ int main()
|
||||
|
||||
fwrite(ibuf, sizeof(int), 3, outfp);
|
||||
|
||||
for(i = 0; i < num_faces_trim_cell; ++i) /* loop over the faces */
|
||||
for (i = 0; i < num_faces_trim_cell; ++i) /* loop over the faces */
|
||||
fwrite(trim_cell_face[i], sizeof(int), trim_cell_face[i][0] + 1,
|
||||
outfp);
|
||||
|
||||
@ -433,7 +433,7 @@ int main()
|
||||
|
||||
fwrite(ibuf, sizeof(int), 3, outfp);
|
||||
|
||||
for(i = 0; i < num_faces_hang_cell; ++i) /* loop over the faces */
|
||||
for (i = 0; i < num_faces_hang_cell; ++i) /* loop over the faces */
|
||||
fwrite(hang_cell_face[i], sizeof(int), hang_cell_face[i][0] + 1,
|
||||
outfp);
|
||||
|
||||
@ -519,7 +519,7 @@ int main()
|
||||
ibuf[0] = A_WALL; /* wall value */
|
||||
ibuf[1] = 0; /* number of hanging nodes */
|
||||
|
||||
for(i = 0; i < num_faces_trim_cell; ++i) /* write out face info */
|
||||
for (i = 0; i < num_faces_trim_cell; ++i) /* write out face info */
|
||||
{
|
||||
fwrite(ibuf, sizeof(int), 1, outfp); /* write wall value */
|
||||
fwrite(trim_cell_face[i], sizeof(int), trim_cell_face[i][0] + 1,
|
||||
@ -541,7 +541,7 @@ int main()
|
||||
ibuf[2] = 1; /* number of hanging nodes for face 3 */
|
||||
ibuf[3] = 31; /* the node number for the hanging node on face 3*/
|
||||
|
||||
for(i = 0; i < 2; ++i) /* write out face info for first 2 faces */
|
||||
for (i = 0; i < 2; ++i) /* write out face info for first 2 faces */
|
||||
{
|
||||
fwrite(ibuf, sizeof(int), 1, outfp); /* write wall value */
|
||||
fwrite(hang_cell_face[i], sizeof(int), hang_cell_face[i][0] + 1,
|
||||
@ -555,7 +555,7 @@ int main()
|
||||
fwrite(&ibuf[2], sizeof(int), 2, outfp);
|
||||
|
||||
/* write out face info for last 3 faces */
|
||||
for(i = 3; i < num_faces_hang_cell; ++i)
|
||||
for (i = 3; i < num_faces_hang_cell; ++i)
|
||||
{
|
||||
fwrite(ibuf, sizeof(int), 1, outfp); /* write wall value */
|
||||
fwrite(hang_cell_face[i], sizeof(int), hang_cell_face[i][0] + 1,
|
||||
|
||||
@ -65,7 +65,7 @@ int main(int argc, char *argv[])
|
||||
Info<< TimeList << endl;
|
||||
label nTimes = TimeList.size();
|
||||
|
||||
for(label n=1; n < nTimes; n++)
|
||||
for (label n=1; n < nTimes; n++)
|
||||
{
|
||||
if (TimeList[n].value() > startTime)
|
||||
{
|
||||
|
||||
@ -24,7 +24,7 @@ for (label i=0; i < nTypes; i++)
|
||||
{
|
||||
volScalarField gmvScalarField(fieldObject, mesh);
|
||||
gmvFile << fieldName << " 0" << nl;
|
||||
for(label indx=0;indx<mesh.nCells();indx++)
|
||||
for (label indx=0;indx<mesh.nCells();indx++)
|
||||
{
|
||||
gmvFile << gmvScalarField[indx] << " ";
|
||||
}
|
||||
|
||||
@ -4,29 +4,29 @@ const cellShapeList& cells = mesh.cellShapes();
|
||||
|
||||
gmvFile << "gmvinput " << format << nl;
|
||||
gmvFile << "nodes " << nPoints << nl;
|
||||
for(label indx=0;indx<nPoints;indx++)
|
||||
for (label indx=0;indx<nPoints;indx++)
|
||||
{
|
||||
gmvFile << points[indx].x() << " ";
|
||||
}
|
||||
gmvFile << nl;
|
||||
for(label indx=0;indx<nPoints;indx++)
|
||||
for (label indx=0;indx<nPoints;indx++)
|
||||
{
|
||||
gmvFile << points[indx].y() << " ";
|
||||
}
|
||||
gmvFile << nl;
|
||||
for(label indx=0;indx<nPoints;indx++)
|
||||
for (label indx=0;indx<nPoints;indx++)
|
||||
{
|
||||
gmvFile << points[indx].z() << " ";
|
||||
}
|
||||
gmvFile << nl;
|
||||
gmvFile << "cells " << cells.size() << nl;
|
||||
for(label indx=0;indx<cells.size();indx++)
|
||||
for (label indx=0;indx<cells.size();indx++)
|
||||
{
|
||||
label nNodes = cells[indx].size();
|
||||
if (nNodes == 8)
|
||||
{
|
||||
gmvFile << "hex " << 8 << " ";
|
||||
for(label ip=0; ip<nNodes; ip++)
|
||||
for (label ip=0; ip<nNodes; ip++)
|
||||
{
|
||||
gmvFile << cells[indx][ip] + 1 << " ";
|
||||
}
|
||||
@ -35,7 +35,7 @@ for(label indx=0;indx<cells.size();indx++)
|
||||
else if (nNodes == 4)
|
||||
{
|
||||
gmvFile << "tet " << 4 << " ";
|
||||
for(label ip=0; ip<nNodes; ip++)
|
||||
for (label ip=0; ip<nNodes; ip++)
|
||||
{
|
||||
gmvFile << cells[indx][ip] + 1 << " ";
|
||||
}
|
||||
@ -44,7 +44,7 @@ for(label indx=0;indx<cells.size();indx++)
|
||||
else if (nNodes == 6)
|
||||
{
|
||||
gmvFile << "prism " << 6 << " ";
|
||||
for(label ip=0; ip<nNodes; ip++)
|
||||
for (label ip=0; ip<nNodes; ip++)
|
||||
{
|
||||
gmvFile << cells[indx][ip] + 1 << " ";
|
||||
}
|
||||
|
||||
@ -44,7 +44,7 @@ word itoa(const label n)
|
||||
|
||||
label leftOfN = n;
|
||||
|
||||
for(label i=0; i<length; i++)
|
||||
for (label i=0; i<length; i++)
|
||||
{
|
||||
label j = label(leftOfN/pow(10, length-i-1));
|
||||
leftOfN -= j*pow(10,length-i-1);
|
||||
|
||||
@ -32,7 +32,7 @@ int USERD_get_gold_part_build_info
|
||||
|
||||
strncpy(part_descriptions[0], meshName, Z_BUFL);
|
||||
|
||||
for(label i=0; i<nPatches; i++)
|
||||
for (label i=0; i<nPatches; i++)
|
||||
{
|
||||
word patchName(meshPtr->boundary()[i].name());
|
||||
strncpy(part_descriptions[i+1], patchName.c_str(), Z_BUFL);
|
||||
@ -104,7 +104,7 @@ int USERD_get_gold_part_build_info
|
||||
|
||||
const polyBoundaryMesh& bMesh = meshPtr->boundaryMesh();
|
||||
|
||||
for(label i=0; i<nPatches; i++)
|
||||
for (label i=0; i<nPatches; i++)
|
||||
{
|
||||
label nTri03 = 0;
|
||||
label nQuad04 = 0;
|
||||
|
||||
@ -36,11 +36,11 @@ int USERD_get_nfaced_conn
|
||||
{}
|
||||
else
|
||||
{
|
||||
for(label i=0; i<nFacesInCell; i++)
|
||||
for (label i=0; i<nFacesInCell; i++)
|
||||
{
|
||||
label facei = cells[n][i];
|
||||
label nPoints = faces[facei].size();
|
||||
for(label j=0; j<nPoints; j++)
|
||||
for (label j=0; j<nPoints; j++)
|
||||
{
|
||||
nfaced_conn_array[nPoint++] = faces[facei][j] + 1;
|
||||
}
|
||||
@ -49,11 +49,11 @@ int USERD_get_nfaced_conn
|
||||
}
|
||||
else
|
||||
{
|
||||
for(label i=0; i<nFacesInCell; i++)
|
||||
for (label i=0; i<nFacesInCell; i++)
|
||||
{
|
||||
label facei = cells[n][i];
|
||||
label nPoints = faces[facei].size();
|
||||
for(label j=0; j<nPoints; j++)
|
||||
for (label j=0; j<nPoints; j++)
|
||||
{
|
||||
nfaced_conn_array[nPoint++] = faces[facei][j] + 1;
|
||||
}
|
||||
|
||||
@ -38,7 +38,7 @@ int USERD_get_nfaced_nodes_per_face
|
||||
{}
|
||||
else
|
||||
{
|
||||
for(label i=0; i<nFacesInCell; i++)
|
||||
for (label i=0; i<nFacesInCell; i++)
|
||||
{
|
||||
label facei = cells[n][i];
|
||||
label nFacePoints = faces[facei].size();
|
||||
@ -48,7 +48,7 @@ int USERD_get_nfaced_nodes_per_face
|
||||
}
|
||||
else
|
||||
{
|
||||
for(label i=0; i<nFacesInCell; i++)
|
||||
for (label i=0; i<nFacesInCell; i++)
|
||||
{
|
||||
label facei = cells[n][i];
|
||||
label nFacePoints = faces[facei].size();
|
||||
|
||||
@ -30,7 +30,7 @@ int USERD_get_nsided_conn
|
||||
label nPoints = bMesh[patchi][facei].size();
|
||||
if ((nPoints != 3) && (nPoints != 4))
|
||||
{
|
||||
for(label i=0; i<nPoints; i++)
|
||||
for (label i=0; i<nPoints; i++)
|
||||
{
|
||||
nsided_conn_array[np++] = bMesh[patchi][facei][i] + 1;
|
||||
}
|
||||
|
||||
@ -193,7 +193,7 @@ int USERD_get_part_elements_by_type
|
||||
label nPoints = bMesh[patchi][n].size();
|
||||
if (nPoints == 3)
|
||||
{
|
||||
for(label i=0; i<nPoints; i++)
|
||||
for (label i=0; i<nPoints; i++)
|
||||
{
|
||||
label ip = bMesh[patchi][n][i];
|
||||
conn_array[nTri03][i] = ip + 1;
|
||||
@ -209,7 +209,7 @@ int USERD_get_part_elements_by_type
|
||||
label nPoints = bMesh[patchi][n].size();
|
||||
if (nPoints == 4)
|
||||
{
|
||||
for(label i=0; i<nPoints; i++)
|
||||
for (label i=0; i<nPoints; i++)
|
||||
{
|
||||
label ip = bMesh[patchi][n][i];
|
||||
conn_array[nQuad04][i] = ip + 1;
|
||||
|
||||
@ -314,7 +314,7 @@ static void storeScalarField
|
||||
Info<< "Storing " << nTotPoints << " of dummy values of " << fieldName
|
||||
<< endl;
|
||||
|
||||
for(label i = 0; i < nPoints; i++)
|
||||
for (label i = 0; i < nPoints; i++)
|
||||
{
|
||||
vars[pointI++] = 0.0;
|
||||
}
|
||||
@ -388,7 +388,7 @@ static void storeVectorField
|
||||
|
||||
for (direction d = 0; d < vector::nComponents; d++)
|
||||
{
|
||||
for(label i = 0; i < nPoints; i++)
|
||||
for (label i = 0; i < nPoints; i++)
|
||||
{
|
||||
vars[pointI++] = 0.0;
|
||||
}
|
||||
|
||||
@ -550,7 +550,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
fileName surfFileNameBase(surfFileName.name());
|
||||
|
||||
for(label zone = 0; zone < numZones; zone++)
|
||||
for (label zone = 0; zone < numZones; zone++)
|
||||
{
|
||||
boolList includeMap(surf.size(), false);
|
||||
|
||||
|
||||
@ -131,19 +131,19 @@ int main(int argc, char *argv[])
|
||||
|
||||
// rearrange the vertex list
|
||||
::List< ::Vector> temp_list;
|
||||
for(int i=0;i<vert.num;i++)
|
||||
for (int i=0;i<vert.num;i++)
|
||||
{
|
||||
temp_list.Add(vert[i]);
|
||||
}
|
||||
for(int i=0;i<vert.num;i++)
|
||||
for (int i=0;i<vert.num;i++)
|
||||
{
|
||||
vert[permutation[i]]=temp_list[i];
|
||||
}
|
||||
|
||||
// update the changes in the entries in the triangle list
|
||||
for(int i=0;i<tri.num;i++)
|
||||
for (int i=0;i<tri.num;i++)
|
||||
{
|
||||
for(int j=0;j<3;j++)
|
||||
for (int j=0;j<3;j++)
|
||||
{
|
||||
tri[i].v[j] = permutation[tri[i].v[j]];
|
||||
}
|
||||
@ -181,7 +181,7 @@ int main(int argc, char *argv[])
|
||||
// Convert vert into pointField.
|
||||
pointField newPoints(vert.num);
|
||||
|
||||
for(int i=0; i<vert.num; i++)
|
||||
for (int i=0; i<vert.num; i++)
|
||||
{
|
||||
const ::Vector & v = vert[i];
|
||||
|
||||
|
||||
@ -65,7 +65,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
triSurface cleanSurf(surf1);
|
||||
|
||||
while(true)
|
||||
while (true)
|
||||
{
|
||||
label nOldVert = cleanSurf.nPoints();
|
||||
|
||||
|
||||
@ -78,7 +78,7 @@ int main(int argc, char *argv[])
|
||||
const labelListList& pointEdges = surf1.pointEdges();
|
||||
|
||||
|
||||
for(label iter = 0; iter < iters; iter++)
|
||||
for (label iter = 0; iter < iters; iter++)
|
||||
{
|
||||
forAll(pointEdges, vertI)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user