diff --git a/applications/solvers/compressible/rhoCentralFoam/BCs/U/maxwellSlipUFvPatchVectorField.C b/applications/solvers/compressible/rhoCentralFoam/BCs/U/maxwellSlipUFvPatchVectorField.C index ec8f777542..3b69386ed6 100644 --- a/applications/solvers/compressible/rhoCentralFoam/BCs/U/maxwellSlipUFvPatchVectorField.C +++ b/applications/solvers/compressible/rhoCentralFoam/BCs/U/maxwellSlipUFvPatchVectorField.C @@ -155,7 +155,7 @@ void maxwellSlipUFvPatchVectorField::updateCoeffs() refValue() = Uwall_; - if(thermalCreep_) + if (thermalCreep_) { const volScalarField& vsfT = this->db().objectRegistry::lookupObject("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("tauMC"); diff --git a/applications/solvers/incompressible/channelFoam/createGradP.H b/applications/solvers/incompressible/channelFoam/createGradP.H index 9bb9bb0ba2..643509c46f 100644 --- a/applications/solvers/incompressible/channelFoam/createGradP.H +++ b/applications/solvers/incompressible/channelFoam/createGradP.H @@ -11,7 +11,7 @@ runTime.path()/runTime.timeName()/"uniform"/"gradP.raw" ); - if(gradPFile.good()) + if (gradPFile.good()) { gradPFile >> gradP; Info<< "Reading average pressure gradient" < Foam::multiphaseMixture::rho() const tmp 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::multiphaseMixture::mu() const tmp 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::multiphaseMixture::muf() const tmp 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::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::iterator refPhaseIter = phases_.begin(); - for(label i=0; i 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 tKWenYu = 0.75*Cds*phaseb_.rho()*Ur*bp/phasea_.d(); volScalarField& KWenYu = tKWenYu(); diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/dragModels/GidaspowSchillerNaumann/GidaspowSchillerNaumann.C b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/dragModels/GidaspowSchillerNaumann/GidaspowSchillerNaumann.C index 256d0861c0..1be08abd3a 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/dragModels/GidaspowSchillerNaumann/GidaspowSchillerNaumann.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/dragModels/GidaspowSchillerNaumann/GidaspowSchillerNaumann.C @@ -77,7 +77,7 @@ Foam::tmp Foam::GidaspowSchillerNaumann::K forAll(Re, celli) { - if(Re[celli] > 1000.0) + if (Re[celli] > 1000.0) { Cds[celli] = 0.44; } diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/dragModels/SchillerNaumann/SchillerNaumann.C b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/dragModels/SchillerNaumann/SchillerNaumann.C index 707c269c24..59e7bed10e 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/dragModels/SchillerNaumann/SchillerNaumann.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/dragModels/SchillerNaumann/SchillerNaumann.C @@ -74,7 +74,7 @@ Foam::tmp Foam::SchillerNaumann::K forAll(Re, celli) { - if(Re[celli] > 1000.0) + if (Re[celli] > 1000.0) { Cds[celli] = 0.44; } diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/dragModels/WenYu/WenYu.C b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/dragModels/WenYu/WenYu.C index 7646506933..febe1d11f0 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/dragModels/WenYu/WenYu.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/dragModels/WenYu/WenYu.C @@ -77,7 +77,7 @@ Foam::tmp Foam::WenYu::K forAll(Re, celli) { - if(Re[celli] > 1000.0) + if (Re[celli] > 1000.0) { Cds[celli] = 0.44; } diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/pEqn.H b/applications/solvers/multiphase/twoPhaseEulerFoam/pEqn.H index ad48745519..57a25a299d 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/pEqn.H +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/pEqn.H @@ -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 ( diff --git a/applications/test/PackedList2/PackedListTest2.C b/applications/test/PackedList2/PackedListTest2.C index d6e8c93bc2..bb61f6e308 100644 --- a/applications/test/PackedList2/PackedListTest2.C +++ b/applications/test/PackedList2/PackedListTest2.C @@ -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]; } diff --git a/applications/test/extendedStencil/testExtendedStencil.C b/applications/test/extendedStencil/testExtendedStencil.C index 876576b29e..e8cde9051b 100644 --- a/applications/test/extendedStencil/testExtendedStencil.C +++ b/applications/test/extendedStencil/testExtendedStencil.C @@ -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 > 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]; diff --git a/applications/test/router/processorRouter.C b/applications/test/router/processorRouter.C index e94025ff2b..5f68822cf3 100644 --- a/applications/test/router/processorRouter.C +++ b/applications/test/router/processorRouter.C @@ -71,7 +71,7 @@ labelList procNeighbours(const polyMesh& mesh) { const polyPatch& patch = mesh.boundaryMesh()[patchI]; - const processorPolyPatch& procPatch = + const processorPolyPatch& procPatch = refCast(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 << ' ' diff --git a/applications/test/router/router.C b/applications/test/router/router.C index 1af001a81f..a474739696 100644 --- a/applications/test/router/router.C +++ b/applications/test/router/router.C @@ -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; } diff --git a/applications/utilities/mesh/conversion/ansysToFoam/ansysToFoam.L b/applications/utilities/mesh/conversion/ansysToFoam/ansysToFoam.L index c985d3ab4f..bcdf44f265 100644 --- a/applications/utilities/mesh/conversion/ansysToFoam/ansysToFoam.L +++ b/applications/utilities/mesh/conversion/ansysToFoam/ansysToFoam.L @@ -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; diff --git a/applications/utilities/mesh/conversion/fluent3DMeshToFoam/fluent3DMeshToFoam.L b/applications/utilities/mesh/conversion/fluent3DMeshToFoam/fluent3DMeshToFoam.L index 6ccb2697f4..cf46939eae 100644 --- a/applications/utilities/mesh/conversion/fluent3DMeshToFoam/fluent3DMeshToFoam.L +++ b/applications/utilities/mesh/conversion/fluent3DMeshToFoam/fluent3DMeshToFoam.L @@ -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; } diff --git a/applications/utilities/mesh/conversion/fluentMeshToFoam/fluentMeshToFoam.L b/applications/utilities/mesh/conversion/fluentMeshToFoam/fluentMeshToFoam.L index bcba234fe1..3460a213e8 100644 --- a/applications/utilities/mesh/conversion/fluentMeshToFoam/fluentMeshToFoam.L +++ b/applications/utilities/mesh/conversion/fluentMeshToFoam/fluentMeshToFoam.L @@ -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