diff --git a/README b/README index 390dd8edb5..df56c9c9a4 100644 --- a/README +++ b/README @@ -2,7 +2,7 @@ # #+TITLE: OpenFOAM README for version 1.6 #+AUTHOR: OpenCFD Ltd. -#+DATE: July 2009 +#+DATE: November 2009 #+LINK: http://www.opencfd.co.uk #+OPTIONS: author:nil ^:{} @@ -99,7 +99,7 @@ and a csh/tcsh example: + setenv FOAM_INST_DIR /data/app/OpenFOAM - + foamDotFile=$FOAM_INST_DIR/OpenFOAM-1.6/etc/bashrc + + foamDotFile=$FOAM_INST_DIR/OpenFOAM-1.6/etc/cshrc + if ( -f $foamDotFile ) source $foamDotFile The value set in '$FOAM_INST_DIR' will be used to locate the remaining parts @@ -168,9 +168,9 @@ + rm -rf paraview-3.6.1/platforms + ./makeParaView - The PV3FoamReader module is an OpenFOAM utility that can be compiled in the - usual manner as follows: - + cd $FOAM_UTILITIES/postProcessing/graphics/PV3FoamReader + The PV3blockMeshReader and the PV3FoamReader ParaView plugins are compiled + as usual for OpenFOAM utilities: + + cd $FOAM_UTILITIES/postProcessing/graphics/PV3Readers/ + ./Allwclean + ./Allwmake @@ -180,14 +180,15 @@ downloads a supported version of Qt /e.g./ 4.3.5 as described in the section on "Qt". The user should unpack the source pack in the $WM_THIRD_PARTY_DIR. Then the user can build Qt by executing from within $WM_THIRD_PARTY_DIR: - + makeQt + + ./makeQt The user should then compile ParaView using the local version of Qt by executing makeParaView with the -qmake option, giving the full path of the newly built qmake as an argument: - + makeParaView -qmake + + ./makeParaView -qmake - The user must then recompile the PV3FoamReader module as normal (see above). + The user must then recompile the PV3blockMeshReader and the + PV3FoamReader plugins as usual (see above). * Documentation http://www.OpenFOAM.org/doc diff --git a/applications/solvers/combustion/dieselEngineFoam/dieselEngineFoam.C b/applications/solvers/combustion/dieselEngineFoam/dieselEngineFoam.C index ce80690224..6507c117a0 100644 --- a/applications/solvers/combustion/dieselEngineFoam/dieselEngineFoam.C +++ b/applications/solvers/combustion/dieselEngineFoam/dieselEngineFoam.C @@ -64,7 +64,7 @@ int main(int argc, char *argv[]) // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - Info << "\nStarting time loop\n" << endl; + Info<< "\nStarting time loop\n" << endl; while (runTime.run()) { @@ -85,7 +85,7 @@ int main(int argc, char *argv[]) dieselSpray.evolve(); - Info << "Solving chemistry" << endl; + Info<< "Solving chemistry" << endl; chemistry.solve ( diff --git a/applications/solvers/combustion/dieselFoam/dieselFoam.C b/applications/solvers/combustion/dieselFoam/dieselFoam.C index 42d9534654..4769a00c77 100644 --- a/applications/solvers/combustion/dieselFoam/dieselFoam.C +++ b/applications/solvers/combustion/dieselFoam/dieselFoam.C @@ -61,7 +61,7 @@ int main(int argc, char *argv[]) // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - Info << "\nStarting time loop\n" << endl; + Info<< "\nStarting time loop\n" << endl; while (runTime.run()) { @@ -72,11 +72,11 @@ int main(int argc, char *argv[]) runTime++; Info<< "Time = " << runTime.timeName() << nl << endl; - Info << "Evolving Spray" << endl; + Info<< "Evolving Spray" << endl; dieselSpray.evolve(); - Info << "Solving chemistry" << endl; + Info<< "Solving chemistry" << endl; chemistry.solve ( diff --git a/applications/solvers/combustion/engineFoam/engineFoam.C b/applications/solvers/combustion/engineFoam/engineFoam.C index dd584d03e2..5895c82b92 100644 --- a/applications/solvers/combustion/engineFoam/engineFoam.C +++ b/applications/solvers/combustion/engineFoam/engineFoam.C @@ -78,7 +78,7 @@ int main(int argc, char *argv[]) // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - Info << "\nStarting time loop\n" << endl; + Info<< "\nStarting time loop\n" << endl; while (runTime.run()) { diff --git a/applications/solvers/combustion/reactingFoam/chemistry.H b/applications/solvers/combustion/reactingFoam/chemistry.H index 691b6dcb92..a1a978210d 100644 --- a/applications/solvers/combustion/reactingFoam/chemistry.H +++ b/applications/solvers/combustion/reactingFoam/chemistry.H @@ -1,5 +1,5 @@ { - Info << "Solving chemistry" << endl; + Info<< "Solving chemistry" << endl; chemistry.solve ( diff --git a/applications/solvers/combustion/reactingFoam/reactingFoam.C b/applications/solvers/combustion/reactingFoam/reactingFoam.C index 875191eea4..2d4ae7589a 100644 --- a/applications/solvers/combustion/reactingFoam/reactingFoam.C +++ b/applications/solvers/combustion/reactingFoam/reactingFoam.C @@ -54,7 +54,7 @@ int main(int argc, char *argv[]) // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - Info << "\nStarting time loop\n" << endl; + Info<< "\nStarting time loop\n" << endl; while (runTime.run()) { diff --git a/applications/solvers/combustion/rhoReactingFoam/chemistry.H b/applications/solvers/combustion/rhoReactingFoam/chemistry.H index 691b6dcb92..a1a978210d 100644 --- a/applications/solvers/combustion/rhoReactingFoam/chemistry.H +++ b/applications/solvers/combustion/rhoReactingFoam/chemistry.H @@ -1,5 +1,5 @@ { - Info << "Solving chemistry" << endl; + Info<< "Solving chemistry" << endl; chemistry.solve ( diff --git a/applications/solvers/combustion/rhoReactingFoam/rhoReactingFoam.C b/applications/solvers/combustion/rhoReactingFoam/rhoReactingFoam.C index 777718b3ea..cc37dd09c1 100644 --- a/applications/solvers/combustion/rhoReactingFoam/rhoReactingFoam.C +++ b/applications/solvers/combustion/rhoReactingFoam/rhoReactingFoam.C @@ -55,7 +55,7 @@ int main(int argc, char *argv[]) // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - Info << "\nStarting time loop\n" << endl; + Info<< "\nStarting time loop\n" << endl; while (runTime.run()) { 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/compressible/rhoSimpleFoam/pEqn.H b/applications/solvers/compressible/rhoSimpleFoam/pEqn.H index f6a433fd61..38922c99c9 100644 --- a/applications/solvers/compressible/rhoSimpleFoam/pEqn.H +++ b/applications/solvers/compressible/rhoSimpleFoam/pEqn.H @@ -27,7 +27,7 @@ if (transonic) pEqn.setReference(pRefCell, pRefValue); - // retain the residual from the first iteration + // Retain the residual from the first iteration if (nonOrth == 0) { eqnResidual = pEqn.solve().initialResidual(); diff --git a/applications/solvers/compressible/rhoSimplecFoam/Make/files b/applications/solvers/compressible/rhoSimplecFoam/Make/files new file mode 100644 index 0000000000..6637e49aa3 --- /dev/null +++ b/applications/solvers/compressible/rhoSimplecFoam/Make/files @@ -0,0 +1,3 @@ +rhoSimplecFoam.C + +EXE = $(FOAM_APPBIN)/rhoSimplecFoam diff --git a/applications/solvers/compressible/rhoSimplecFoam/Make/options b/applications/solvers/compressible/rhoSimplecFoam/Make/options new file mode 100644 index 0000000000..9d578f011a --- /dev/null +++ b/applications/solvers/compressible/rhoSimplecFoam/Make/options @@ -0,0 +1,14 @@ +EXE_INC = \ + -I../rhoSimpleFoam \ + -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ + -I$(LIB_SRC)/turbulenceModels \ + -I$(LIB_SRC)/turbulenceModels/compressible/RAS/RASModel \ + -I$(LIB_SRC)/finiteVolume/cfdTools \ + -I$(LIB_SRC)/finiteVolume/lnInclude + +EXE_LIBS = \ + -lbasicThermophysicalModels \ + -lspecie \ + -lcompressibleRASModels \ + -lfiniteVolume \ + -lmeshTools diff --git a/applications/solvers/compressible/rhoSimplecFoam/UEqn.H b/applications/solvers/compressible/rhoSimplecFoam/UEqn.H new file mode 100644 index 0000000000..c41bc9b6c7 --- /dev/null +++ b/applications/solvers/compressible/rhoSimplecFoam/UEqn.H @@ -0,0 +1,17 @@ + // Solve the Momentum equation + + tmp UEqn + ( + fvm::div(phi, U) + - fvm::Sp(fvc::div(phi), U) + + turbulence->divDevRhoReff(U) + ); + + UEqn().relax(); + + eqnResidual = solve + ( + UEqn() == -fvc::grad(p) + ).initialResidual(); + + maxResidual = max(eqnResidual, maxResidual); diff --git a/applications/solvers/compressible/rhoSimplecFoam/createFields.H b/applications/solvers/compressible/rhoSimplecFoam/createFields.H new file mode 100644 index 0000000000..d97ee4705b --- /dev/null +++ b/applications/solvers/compressible/rhoSimplecFoam/createFields.H @@ -0,0 +1,63 @@ + Info<< "Reading thermophysical properties\n" << endl; + + autoPtr pThermo + ( + basicPsiThermo::New(mesh) + ); + basicPsiThermo& thermo = pThermo(); + + volScalarField rho + ( + IOobject + ( + "rho", + runTime.timeName(), + mesh, + IOobject::READ_IF_PRESENT, + IOobject::AUTO_WRITE + ), + thermo.rho() + ); + + volScalarField& p = thermo.p(); + volScalarField& h = thermo.h(); + const volScalarField& psi = thermo.psi(); + + Info<< "Reading field U\n" << endl; + volVectorField U + ( + IOobject + ( + "U", + runTime.timeName(), + mesh, + IOobject::MUST_READ, + IOobject::AUTO_WRITE + ), + mesh + ); + + #include "compressibleCreatePhi.H" + + label pRefCell = 0; + scalar pRefValue = 0.0; + setRefCell(p, mesh.solutionDict().subDict("SIMPLE"), pRefCell, pRefValue); + + dimensionedScalar pMin + ( + mesh.solutionDict().subDict("SIMPLE").lookup("pMin") + ); + + Info<< "Creating turbulence model\n" << endl; + autoPtr turbulence + ( + compressible::RASModel::New + ( + rho, + U, + phi, + thermo + ) + ); + + dimensionedScalar initialMass = fvc::domainIntegrate(rho); diff --git a/applications/solvers/compressible/rhoSimplecFoam/hEqn.H b/applications/solvers/compressible/rhoSimplecFoam/hEqn.H new file mode 100644 index 0000000000..8ac1c9f510 --- /dev/null +++ b/applications/solvers/compressible/rhoSimplecFoam/hEqn.H @@ -0,0 +1,29 @@ +{ + fvScalarMatrix hEqn + ( + fvm::div(phi, h) + - fvm::Sp(fvc::div(phi), h) + - fvm::laplacian(turbulence->alphaEff(), h) + == + fvc::div(phi/fvc::interpolate(rho)*fvc::interpolate(p, "div(U,p)")) + - p*fvc::div(phi/fvc::interpolate(rho)) + ); + + hEqn.relax(); + + eqnResidual = hEqn.solve().initialResidual(); + maxResidual = max(eqnResidual, maxResidual); + + thermo.correct(); + + rho = thermo.rho(); + + if (!transonic) + { + rho.relax(); + } + + Info<< "rho max/min : " + << max(rho).value() << " " + << min(rho).value() << endl; +} diff --git a/applications/solvers/compressible/rhoSimplecFoam/pEqn.H b/applications/solvers/compressible/rhoSimplecFoam/pEqn.H new file mode 100644 index 0000000000..cd3ae5ff1f --- /dev/null +++ b/applications/solvers/compressible/rhoSimplecFoam/pEqn.H @@ -0,0 +1,123 @@ +volScalarField p0 = p; + +volScalarField AU = UEqn().A(); +volScalarField AtU = AU - UEqn().H1(); +U = UEqn().H()/AU; +UEqn.clear(); + +bool closedVolume = false; + +if (transonic) +{ + for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++) + { + surfaceScalarField phid + ( + "phid", + fvc::interpolate(psi*U) & mesh.Sf() + ); + + surfaceScalarField phic + ( + "phic", + fvc::interpolate(rho/AtU - rho/AU)*fvc::snGrad(p)*mesh.magSf() + + phid*(fvc::interpolate(p) - fvc::interpolate(p, "UD")) + ); + + refCast(p.boundaryField()[1]).refValue() + = p.boundaryField()[1]; + + fvScalarMatrix pEqn + ( + fvm::div(phid, p) + + fvc::div(phic) + - fvm::Sp(fvc::div(phid), p) + + fvc::div(phid)*p + - fvm::laplacian(rho/AtU, p) + ); + + pEqn.setReference(pRefCell, pRefValue); + + // Retain the residual from the first iteration + if (nonOrth == 0) + { + eqnResidual = pEqn.solve().initialResidual(); + maxResidual = max(eqnResidual, maxResidual); + } + else + { + pEqn.solve(); + } + + if (nonOrth == nNonOrthCorr) + { + phi == phic + pEqn.flux(); + } + } +} +else +{ + for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++) + { + phi = fvc::interpolate(rho*U) & mesh.Sf(); + closedVolume = adjustPhi(phi, U, p); + phi += fvc::interpolate(rho/AtU - rho/AU)*fvc::snGrad(p)*mesh.magSf(); + + fvScalarMatrix pEqn + ( + fvc::div(phi) + //- fvm::laplacian(rho/AU, p) + - fvm::laplacian(rho/AtU, p) + ); + + pEqn.setReference(pRefCell, pRefValue); + + // Retain the residual from the first iteration + if (nonOrth == 0) + { + eqnResidual = pEqn.solve().initialResidual(); + maxResidual = max(eqnResidual, maxResidual); + } + else + { + pEqn.solve(); + } + + + if (nonOrth == nNonOrthCorr) + { + phi += pEqn.flux(); + } + } +} + +// The incompressibe for of the continuity error check is appropriate for +// steady-state compressible also. +#include "incompressible/continuityErrs.H" + +// Explicitly relax pressure for momentum corrector +p.relax(); + +U -= (fvc::grad(p0)*(1.0/AU - 1.0/AtU) + fvc::grad(p)/AtU); +//U -= fvc::grad(p)/AU; + +U.correctBoundaryConditions(); + +bound(p, pMin); + +// For closed-volume cases adjust the pressure and density levels +// to obey overall mass continuity +if (closedVolume) +{ + p += (initialMass - fvc::domainIntegrate(psi*p)) + /fvc::domainIntegrate(psi); +} + +rho = thermo.rho(); + +if (!transonic) +{ + rho.relax(); +} + +Info<< "rho max/min : " << max(rho).value() << " " << min(rho).value() << endl; diff --git a/applications/solvers/compressible/rhoSimplecFoam/rhoSimplecFoam.C b/applications/solvers/compressible/rhoSimplecFoam/rhoSimplecFoam.C new file mode 100644 index 0000000000..8f706182b5 --- /dev/null +++ b/applications/solvers/compressible/rhoSimplecFoam/rhoSimplecFoam.C @@ -0,0 +1,92 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the + Free Software Foundation; either version 2 of the License, or (at your + option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM; if not, write to the Free Software Foundation, + Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +Application + rhoSimplecFoam + +Description + Steady-state SIMPLEC solver for laminar or turbulent RANS flow of + compressible fluids. + +\*---------------------------------------------------------------------------*/ + +#include "fvCFD.H" +#include "basicPsiThermo.H" +#include "RASModel.H" +#include "mixedFvPatchFields.H" +#include "bound.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +int main(int argc, char *argv[]) +{ + #include "setRootCase.H" + #include "createTime.H" + #include "createMesh.H" + #include "createFields.H" + #include "initContinuityErrs.H" + + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + + Info<< "\nStarting time loop\n" << endl; + + for (runTime++; !runTime.end(); runTime++) + { + Info<< "Time = " << runTime.timeName() << nl << endl; + + #include "readSIMPLEControls.H" + #include "initConvergenceCheck.H" + + p.storePrevIter(); + + if (!transonic) + { + rho.storePrevIter(); + } + + // Velocity-pressure-enthalpy SIMPLEC corrector + { + #include "UEqn.H" + #include "pEqn.H" + #include "hEqn.H" + } + + turbulence->correct(); + + runTime.write(); + + Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s" + << " ClockTime = " << runTime.elapsedClockTime() << " s" + << nl << endl; + + #include "convergenceCheck.H" + } + + Info<< "End\n" << endl; + + return 0; +} + + +// ************************************************************************* // diff --git a/applications/solvers/discreteMethods/molecularDynamics/mdEquilibrationFoam/mdEquilibrationFoam.C b/applications/solvers/discreteMethods/molecularDynamics/mdEquilibrationFoam/mdEquilibrationFoam.C index 66619cfc67..8869f52a27 100644 --- a/applications/solvers/discreteMethods/molecularDynamics/mdEquilibrationFoam/mdEquilibrationFoam.C +++ b/applications/solvers/discreteMethods/molecularDynamics/mdEquilibrationFoam/mdEquilibrationFoam.C @@ -50,14 +50,14 @@ int main(int argc, char *argv[]) label nAveragingSteps = 0; - Info << "\nStarting time loop\n" << endl; + Info<< "\nStarting time loop\n" << endl; while (runTime.loop()) { nAveragingSteps++; - Info << "Time = " << runTime.timeName() << endl; + Info<< "Time = " << runTime.timeName() << endl; molecules.evolve(); @@ -74,12 +74,12 @@ int main(int argc, char *argv[]) nAveragingSteps = 0; } - Info << "ExecutionTime = " << runTime.elapsedCpuTime() << " s" + Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s" << " ClockTime = " << runTime.elapsedClockTime() << " s" << nl << endl; } - Info << "End\n" << endl; + Info<< "End\n" << endl; return 0; } diff --git a/applications/solvers/discreteMethods/molecularDynamics/mdFoam/mdFoam.C b/applications/solvers/discreteMethods/molecularDynamics/mdFoam/mdFoam.C index 4f2eea1ccc..0bd07d0330 100644 --- a/applications/solvers/discreteMethods/molecularDynamics/mdFoam/mdFoam.C +++ b/applications/solvers/discreteMethods/molecularDynamics/mdFoam/mdFoam.C @@ -48,14 +48,14 @@ int main(int argc, char *argv[]) label nAveragingSteps = 0; - Info << "\nStarting time loop\n" << endl; + Info<< "\nStarting time loop\n" << endl; while (runTime.loop()) { nAveragingSteps++; - Info << "Time = " << runTime.timeName() << endl; + Info<< "Time = " << runTime.timeName() << endl; molecules.evolve(); @@ -70,12 +70,12 @@ int main(int argc, char *argv[]) nAveragingSteps = 0; } - Info << "ExecutionTime = " << runTime.elapsedCpuTime() << " s" + Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s" << " ClockTime = " << runTime.elapsedClockTime() << " s" << nl << endl; } - Info << "End\n" << endl; + Info<< "End\n" << endl; return 0; } diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionFoam.C b/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionFoam.C index 54e1c8cb18..5a56c2709f 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionFoam.C +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionFoam.C @@ -117,7 +117,7 @@ int main(int argc, char *argv[]) << nl << endl; } - Info << "End\n" << endl; + Info<< "End\n" << endl; return 0; } 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/interfacialModels/dragModels/dragModel/newDragModel.C b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/dragModels/dragModel/newDragModel.C index 582fa4cdd3..8fb79ad403 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/dragModels/dragModel/newDragModel.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/dragModels/dragModel/newDragModel.C @@ -41,7 +41,7 @@ Foam::autoPtr Foam::dragModel::New interfaceDict.lookup("dragModel" + phasea.name()) ); - Info << "Selecting dragModel for phase " + Info<< "Selecting dragModel for phase " << phasea.name() << ": " << dragModelType << endl; @@ -57,7 +57,7 @@ Foam::autoPtr Foam::dragModel::New << dragModelType << ", constructor not in hash table" << endl << endl << " Valid dragModel types are : " << endl; - Info << dictionaryConstructorTablePtr_->sortedToc() << abort(FatalError); + Info<< dictionaryConstructorTablePtr_->sortedToc() << abort(FatalError); } return cstrIter()(interfaceDict, alpha, phasea, phaseb); 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/Dictionary/DictionaryTest.C b/applications/test/Dictionary/DictionaryTest.C index 0af4dab661..0f09f4f4a6 100644 --- a/applications/test/Dictionary/DictionaryTest.C +++ b/applications/test/Dictionary/DictionaryTest.C @@ -84,7 +84,7 @@ public: ~Scalar() { - Info <<"delete Scalar: " << data_ << endl; + Info<<"delete Scalar: " << data_ << endl; } friend Ostream& operator<<(Ostream& os, const Scalar& val) @@ -169,7 +169,7 @@ int main(int argc, char *argv[]) { Info<< " = " << iter() << endl; } - + PtrDictionary scalarDict2; for (int i = 8; i<15; i++) { @@ -186,22 +186,22 @@ int main(int argc, char *argv[]) { Info<< "elem = " << *iter << endl; } - + scalarDict.transfer(scalarDict2); - + Scalar* p = scalarDict.lookupPtr("ent8"); - + // This does not (yet) work // Scalar* q = scalarDict.remove("ent10"); if (p) { - Info << "found: " << *p << endl; + Info<< "found: " << *p << endl; } else { - Info << "no p: " << endl; + Info<< "no p: " << endl; } scalarDict.clear(); diff --git a/applications/test/IndirectList/IndirectListTest.C b/applications/test/IndirectList/IndirectListTest.C index 365c58a383..b8abff9773 100644 --- a/applications/test/IndirectList/IndirectListTest.C +++ b/applications/test/IndirectList/IndirectListTest.C @@ -72,7 +72,7 @@ int main(int argc, char *argv[]) << "list: " << idl() << nl << endl; - Info << "End\n" << endl; + Info<< "End\n" << endl; return 0; } diff --git a/applications/test/LduMatrix/LduMatrixTest.C b/applications/test/LduMatrix/LduMatrixTest.C index 91a6dfb68d..bc244ff525 100644 --- a/applications/test/LduMatrix/LduMatrixTest.C +++ b/applications/test/LduMatrix/LduMatrixTest.C @@ -155,7 +155,7 @@ int main(int argc, char *argv[]) Info<< psi << endl; - Info << "End\n" << endl; + Info<< "End\n" << endl; return 0; } diff --git a/applications/test/LduMatrix/LduMatrixTest2.C b/applications/test/LduMatrix/LduMatrixTest2.C index 02db866ae5..5e47df1daf 100644 --- a/applications/test/LduMatrix/LduMatrixTest2.C +++ b/applications/test/LduMatrix/LduMatrixTest2.C @@ -155,7 +155,7 @@ int main(int argc, char *argv[]) Info<< psi << endl; - Info << "End\n" << endl; + Info<< "End\n" << endl; return 0; } diff --git a/applications/test/Map/MapTest.C b/applications/test/Map/MapTest.C index 7fb05e76a5..117f4337b6 100644 --- a/applications/test/Map/MapTest.C +++ b/applications/test/Map/MapTest.C @@ -53,15 +53,15 @@ int main(int argc, char *argv[]) if (bananaIter == banana.end()) { - Info << "not found" << endl; + Info<< "not found" << endl; } else { - Info << "5 is " << bananaIter() << endl; + Info<< "5 is " << bananaIter() << endl; } // Same with STL - Info << "Same with STL" << endl; + Info<< "Same with STL" << endl; std::map STLbanana; STLbanana[5] = true; @@ -69,11 +69,11 @@ int main(int argc, char *argv[]) if (STLbananaIter == STLbanana.end()) { - Info << "not found" << endl; + Info<< "not found" << endl; } else { - Info << "5 is " << STLbananaIter->second << endl; + Info<< "5 is " << STLbananaIter->second << endl; } diff --git a/applications/test/Matrix/MatrixTest.C b/applications/test/Matrix/MatrixTest.C index 5576291fd5..fabbb5c5f9 100644 --- a/applications/test/Matrix/MatrixTest.C +++ b/applications/test/Matrix/MatrixTest.C @@ -71,7 +71,7 @@ int main(int argc, char *argv[]) hmm4 = hmm5; Info<< hmm5 << endl; - Info << "End\n" << endl; + Info<< "End\n" << endl; return 0; } diff --git a/applications/test/NamedEnum/namedEnumTest.C b/applications/test/NamedEnum/namedEnumTest.C index 918e3b63b2..728d54ecb8 100644 --- a/applications/test/NamedEnum/namedEnumTest.C +++ b/applications/test/NamedEnum/namedEnumTest.C @@ -68,7 +68,7 @@ int main(int argc, char *argv[]) namedEnumTest::options hmm(namedEnumTest::namedEnum.read(Sin)); Info<< namedEnumTest::namedEnum[hmm] << endl; - Info << "End\n" << endl; + Info<< "End\n" << endl; return 0; } diff --git a/applications/test/ODETest/ODETest.C b/applications/test/ODETest/ODETest.C index 2d8cecfa9a..acb444a0a5 100644 --- a/applications/test/ODETest/ODETest.C +++ b/applications/test/ODETest/ODETest.C @@ -167,7 +167,7 @@ int main(int argc, char *argv[]) Info<< nl << "Analytical: y(2.0) = " << yEnd << endl; Info << "Numerical: y(2.0) = " << y << ", hEst = " << hEst << endl; - Info << "\nEnd\n" << endl; + Info<< "\nEnd\n" << endl; return 0; } diff --git a/applications/test/POSIX/POSIXTest.C b/applications/test/POSIX/POSIXTest.C index 86679c2c90..08052ecba9 100644 --- a/applications/test/POSIX/POSIXTest.C +++ b/applications/test/POSIX/POSIXTest.C @@ -37,7 +37,7 @@ int main(int argc, char *argv[]) { rmDir("hmm"); - Info << "End\n" << endl; + Info<< "End\n" << endl; return 0; } diff --git a/applications/test/PackedList2/PackedListTest2.C b/applications/test/PackedList2/PackedListTest2.C index ef027fee2e..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]; } @@ -386,7 +386,7 @@ int main(int argc, char *argv[]) << " s" << endl; - Info << "End\n" << endl; + Info<< "End\n" << endl; return 0; } diff --git a/applications/test/PtrList/PtrListTest.C b/applications/test/PtrList/PtrListTest.C index 7fbff08d11..61f0985ea3 100644 --- a/applications/test/PtrList/PtrListTest.C +++ b/applications/test/PtrList/PtrListTest.C @@ -54,7 +54,7 @@ public: ~Scalar() { - Info <<"delete Scalar: " << data_ << endl; + Info<<"delete Scalar: " << data_ << endl; } autoPtr clone() const; diff --git a/applications/test/Tuple2/Tuple2Test.C b/applications/test/Tuple2/Tuple2Test.C index d770b4f839..b535f6a45c 100644 --- a/applications/test/Tuple2/Tuple2Test.C +++ b/applications/test/Tuple2/Tuple2Test.C @@ -44,7 +44,7 @@ int main() Info<< t2 << " " << t2.first() << " " << t2.second() << endl; - Info << "End\n" << endl; + Info<< "End\n" << endl; return 0; } diff --git a/applications/test/UIndirectListTest/UIndirectListTest.C b/applications/test/UIndirectListTest/UIndirectListTest.C index 67943b7d94..120217b673 100644 --- a/applications/test/UIndirectListTest/UIndirectListTest.C +++ b/applications/test/UIndirectListTest/UIndirectListTest.C @@ -100,7 +100,7 @@ int main(int argc, char *argv[]) dynList.append(UIndirectList(completeList, addresses)); Info<< "DynamicList::append(UIndirectList): " << dynList << endl; - Info << "\nEnd\n" << endl; + Info<< "\nEnd\n" << endl; return 0; } diff --git a/applications/test/callback/callbackTest.C b/applications/test/callback/callbackTest.C index dc34424678..f9d35dd023 100644 --- a/applications/test/callback/callbackTest.C +++ b/applications/test/callback/callbackTest.C @@ -118,7 +118,7 @@ int main(int argc, char *argv[]) cbr.testCallbackFunction(); - Info << "End\n" << endl; + Info<< "End\n" << endl; return 0; } diff --git a/applications/test/dimensionedType/dimensionedTypeTest.C b/applications/test/dimensionedType/dimensionedTypeTest.C index d87391ab6d..400d9a5d21 100644 --- a/applications/test/dimensionedType/dimensionedTypeTest.C +++ b/applications/test/dimensionedType/dimensionedTypeTest.C @@ -42,7 +42,7 @@ int main(int argc, char *argv[]) Info<< ds*dt << " " << dt*ds << endl; - Info << "End\n" << endl; + Info<< "End\n" << endl; return 0; } 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/fileName/fileNameTest.C b/applications/test/fileName/fileNameTest.C index c4791f6f38..81ebd5c255 100644 --- a/applications/test/fileName/fileNameTest.C +++ b/applications/test/fileName/fileNameTest.C @@ -108,8 +108,7 @@ int main() Info<< " badName(die) => " << findEtcFile("badName", true) << nl << endl; - Info<< "\nEnd" << endl; - + Info<< "\nEnd\n" << endl; return 0; } diff --git a/applications/test/fileNameClean/fileNameCleanTest.C b/applications/test/fileNameClean/fileNameCleanTest.C index b41cc434ca..2d791439e9 100644 --- a/applications/test/fileNameClean/fileNameCleanTest.C +++ b/applications/test/fileNameClean/fileNameCleanTest.C @@ -95,8 +95,7 @@ int main(int argc, char *argv[]) printCleaning(pathName); } - Info<< "\nEnd" << endl; - + Info<< "\nEnd\n" << endl; return 0; } diff --git a/applications/test/liquid/liquidTest.C b/applications/test/liquid/liquidTest.C index 34837df39a..fe32c13e28 100644 --- a/applications/test/liquid/liquidTest.C +++ b/applications/test/liquid/liquidTest.C @@ -39,7 +39,7 @@ int main() Info<< fuel.rho(1e5, 300) << endl; Info<< fuel << endl; - Info << "End\n" << endl; + Info<< "End\n" << endl; return 0; } diff --git a/applications/test/mesh/meshTest.C b/applications/test/mesh/meshTest.C index 5041983675..91a003bc17 100644 --- a/applications/test/mesh/meshTest.C +++ b/applications/test/mesh/meshTest.C @@ -59,7 +59,7 @@ int main(int argc, char *argv[]) Info<< Cf << endl; - Info << "End\n" << endl; + Info<< "End\n" << endl; return 0; } diff --git a/applications/test/pTraits/pTraitsTest.C b/applications/test/pTraits/pTraitsTest.C index 4fcdfce719..2697e6b732 100644 --- a/applications/test/pTraits/pTraitsTest.C +++ b/applications/test/pTraits/pTraitsTest.C @@ -38,7 +38,7 @@ int main() { Info<< pTraits::typeName << endl; - Info << "End\n" << endl; + Info<< "End\n" << endl; return 0; } diff --git a/applications/test/primitivePatch/testPrimitivePatch.C b/applications/test/primitivePatch/testPrimitivePatch.C index e19b7d0512..cf24ab3435 100644 --- a/applications/test/primitivePatch/testPrimitivePatch.C +++ b/applications/test/primitivePatch/testPrimitivePatch.C @@ -137,7 +137,7 @@ void writeFaceEdges const labelList& myEdges = faceEdges[faceI]; forAll(myEdges, i) - { + { const edge& e = edges[myEdges[i]]; feStream<< "l " << e.start()+1 << ' ' << e.end()+1 << endl; @@ -172,7 +172,7 @@ void writeEdgeFaces const labelList& myFaces = edgeFaces[edgeI]; forAll(myFaces, i) - { + { efStream<< "l " << myFaces[0]+1 << ' ' << myFaces[i]+1 << endl; } } @@ -249,7 +249,7 @@ int main(int argc, char *argv[]) writeFaceFaces(localPoints, localFaces, faceFaces); - Info << "End\n" << endl; + Info<< "End\n" << endl; return 0; } diff --git a/applications/test/readCHEMKINIII/readCHEMKINIII.C b/applications/test/readCHEMKINIII/readCHEMKINIII.C index 50721d64ea..10514de3fe 100644 --- a/applications/test/readCHEMKINIII/readCHEMKINIII.C +++ b/applications/test/readCHEMKINIII/readCHEMKINIII.C @@ -91,7 +91,7 @@ int main(int argc, char *argv[]) Info<< testReactions << endl; } - Info << "End\n" << endl; + Info<< "End\n" << endl; return 0; } 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/test/simpleMatrix/simpleMatrixTest.C b/applications/test/simpleMatrix/simpleMatrixTest.C index e26c4ea4a7..709eb819f3 100644 --- a/applications/test/simpleMatrix/simpleMatrixTest.C +++ b/applications/test/simpleMatrix/simpleMatrixTest.C @@ -56,7 +56,7 @@ int main(int argc, char *argv[]) Info<< hmm.LUsolve() << endl; Info<< hmm << endl; - Info << "End\n" << endl; + Info<< "End\n" << endl; return 0; } diff --git a/applications/test/string/stringTest.C b/applications/test/string/stringTest.C index 2ed59bf88f..7c74de93ed 100644 --- a/applications/test/string/stringTest.C +++ b/applications/test/string/stringTest.C @@ -102,8 +102,7 @@ int main(int argc, char *argv[]) Info<< "Ostream<< >" << s2 << "<\n"; Info<< "hash:" << hex << string::hash()(s2) << endl; - Info << "End\n" << endl; - + Info<< "\nEnd\n" << endl; return 0; } diff --git a/applications/test/testPointEdgeWave/testPointEdgeWave.C b/applications/test/testPointEdgeWave/testPointEdgeWave.C index 124b7a921a..10856cbead 100644 --- a/applications/test/testPointEdgeWave/testPointEdgeWave.C +++ b/applications/test/testPointEdgeWave/testPointEdgeWave.C @@ -52,7 +52,7 @@ int main(int argc, char *argv[]) // Get name of patch word patchName(args.additionalArgs()[0]); - + // Find the label in patches by name. label patchI = patches.findPatchID(patchName); @@ -131,8 +131,7 @@ int main(int argc, char *argv[]) psf.write(); - Info << nl << "End" << endl; - + Info<< "\nEnd\n" << endl; return 0; } diff --git a/applications/utilities/errorEstimation/estimateScalarError/estimateScalarError.C b/applications/utilities/errorEstimation/estimateScalarError/estimateScalarError.C index 9fb3a646d6..76f67f6cdb 100644 --- a/applications/utilities/errorEstimation/estimateScalarError/estimateScalarError.C +++ b/applications/utilities/errorEstimation/estimateScalarError/estimateScalarError.C @@ -98,10 +98,10 @@ int main(int argc, char *argv[]) if (THeader.headerOk() && Uheader.headerOk()) { - Info << "Reading T" << endl; + Info<< "Reading T" << endl; volScalarField T(THeader, mesh); - Info << "Reading U" << endl; + Info<< "Reading U" << endl; volVectorField U(Uheader, mesh); # include "createPhi.H" diff --git a/applications/utilities/errorEstimation/icoErrorEstimate/icoErrorEstimate.C b/applications/utilities/errorEstimation/icoErrorEstimate/icoErrorEstimate.C index c236b76eb4..df1069f0bf 100644 --- a/applications/utilities/errorEstimation/icoErrorEstimate/icoErrorEstimate.C +++ b/applications/utilities/errorEstimation/icoErrorEstimate/icoErrorEstimate.C @@ -93,10 +93,10 @@ int main(int argc, char *argv[]) if (pHeader.headerOk() && Uheader.headerOk()) { - Info << "Reading p" << endl; + Info<< "Reading p" << endl; volScalarField p(pHeader, mesh); - Info << "Reading U" << endl; + Info<< "Reading U" << endl; volVectorField U(Uheader, mesh); # include "createPhi.H" diff --git a/applications/utilities/errorEstimation/icoMomentError/icoMomentError.C b/applications/utilities/errorEstimation/icoMomentError/icoMomentError.C index 67551e1eec..edfe1a3b59 100644 --- a/applications/utilities/errorEstimation/icoMomentError/icoMomentError.C +++ b/applications/utilities/errorEstimation/icoMomentError/icoMomentError.C @@ -94,10 +94,10 @@ int main(int argc, char *argv[]) if (pHeader.headerOk() && Uheader.headerOk()) { - Info << "Reading p" << endl; + Info<< "Reading p" << endl; volScalarField p(pHeader, mesh); - Info << "Reading U" << endl; + Info<< "Reading U" << endl; volVectorField U(Uheader, mesh); # include "createPhi.H" diff --git a/applications/utilities/errorEstimation/momentScalarError/momentScalarError.C b/applications/utilities/errorEstimation/momentScalarError/momentScalarError.C index f1767e75b0..145f03f737 100644 --- a/applications/utilities/errorEstimation/momentScalarError/momentScalarError.C +++ b/applications/utilities/errorEstimation/momentScalarError/momentScalarError.C @@ -99,10 +99,10 @@ int main(int argc, char *argv[]) if (THeader.headerOk() && Uheader.headerOk()) { - Info << "Reading T" << endl; + Info<< "Reading T" << endl; volScalarField T(THeader, mesh); - Info << "Reading U" << endl; + Info<< "Reading U" << endl; volVectorField U(Uheader, mesh); # include "createPhi.H" diff --git a/applications/utilities/mesh/advanced/autoRefineMesh/autoRefineMesh.C b/applications/utilities/mesh/advanced/autoRefineMesh/autoRefineMesh.C index 82e6f2c4c9..858ceb2fdb 100644 --- a/applications/utilities/mesh/advanced/autoRefineMesh/autoRefineMesh.C +++ b/applications/utilities/mesh/advanced/autoRefineMesh/autoRefineMesh.C @@ -1015,7 +1015,7 @@ int main(int argc, char *argv[]) } - Info << "End\n" << endl; + Info<< "End\n" << endl; return 0; } diff --git a/applications/utilities/mesh/advanced/collapseEdges/collapseEdges.C b/applications/utilities/mesh/advanced/collapseEdges/collapseEdges.C index 51ae42fb25..bc0a575207 100644 --- a/applications/utilities/mesh/advanced/collapseEdges/collapseEdges.C +++ b/applications/utilities/mesh/advanced/collapseEdges/collapseEdges.C @@ -596,7 +596,7 @@ int main(int argc, char *argv[]) mesh.write(); } - Info << "End\n" << endl; + Info<< "End\n" << endl; return 0; } diff --git a/applications/utilities/mesh/advanced/combinePatchFaces/combinePatchFaces.C b/applications/utilities/mesh/advanced/combinePatchFaces/combinePatchFaces.C index 5e240daff1..5fc2803c8d 100644 --- a/applications/utilities/mesh/advanced/combinePatchFaces/combinePatchFaces.C +++ b/applications/utilities/mesh/advanced/combinePatchFaces/combinePatchFaces.C @@ -510,7 +510,7 @@ int main(int argc, char *argv[]) Info<< "Mesh unchanged." << endl; } - Info << "End\n" << endl; + Info<< "End\n" << endl; return 0; } diff --git a/applications/utilities/mesh/advanced/modifyMesh/Tuple.H b/applications/utilities/mesh/advanced/modifyMesh/Tuple.H deleted file mode 100644 index 5660e085dc..0000000000 --- a/applications/utilities/mesh/advanced/modifyMesh/Tuple.H +++ /dev/null @@ -1,215 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by the - Free Software Foundation; either version 2 of the License, or (at your - option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM; if not, write to the Free Software Foundation, - Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -Class - Foam::Tuple - -Description - A 2 Tuple. Differs from Tuple in that the two elements can be different - type. - - -\*---------------------------------------------------------------------------*/ - -#ifndef Tuple_H -#define Tuple_H - -#include "Istream.H" -#include "Ostream.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - -// Forward declaration of friend functions and operators - -template -class Tuple; - -template -Istream& operator>>(Istream&, Tuple&); - -template -Ostream& operator<<(Ostream&, const Tuple&); - -/*---------------------------------------------------------------------------*\ - Class Tuple Declaration -\*---------------------------------------------------------------------------*/ - -template -class Tuple -{ - // Private data - - Type1 first_; - Type2 second_; - - -public: - - // Constructors - - //- Null constructor for lists - inline Tuple() - {} - - //- Construct from components - inline Tuple(const Type1& first, const Type2& second) - : - first_(first), - second_(second) - {} - - //- Construct from Istream - inline Tuple(Istream& is) - { - // Read beginning of pair - is.readBegin("pair"); - - is >> first_ >> second_; - - // Read end of pair - is.readEnd("pair"); - - // Check state of Istream - is.check("Tuple::Tuple(Istream&)"); - } - - - // Member Functions - - //- Return first - inline Type1 first() const - { - return first_; - } - - //- Return first - inline Type1& first() - { - return first_; - } - - //- Return second - inline Type2 second() const - { - return second_; - } - - //- Return second - inline Type2& second() - { - return second_; - } - - //- Return reverse pair - inline Tuple reverseTuple() const - { - return Tuple(second_, first_); - } - - - // Friend Operators - - inline friend bool operator== - ( - const Tuple& a, - const Tuple& b - ) - { - return - ( - (a.first_ == b.first_) && (a.second_ == b.second_) - ); - } - - inline friend bool operator!= - ( - const Tuple& a, - const Tuple& b - ) - { - return (!(a == b)); - } - - - // IOstream Operators - - friend Istream& operator>> - ( - Istream& is, - Tuple& p - ); - friend Ostream& operator<< - ( - Ostream& os, - const Tuple& p - ); -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -template -Istream& operator>>(Istream& is, Tuple& p) -{ - // Read beginning of Tuple - is.readBegin("Tuple"); - - is >> p.first_ >> p.second_; - - // Read end of Tuple - is.readEnd("Tuple"); - - // Check state of Ostream - is.check("Istream& operator>>(Istream&, Tuple&)"); - - return is; -} - -template -Ostream& operator<<(Ostream& os, const Tuple& p) -{ - os << token::BEGIN_LIST - << p.first_ << token::SPACE - << p.second_ - << token::END_LIST; - - // Check state of Ostream - os.check("Ostream& operator<<(Ostream&, const Tuple&)"); - - return os; -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/applications/utilities/mesh/advanced/modifyMesh/modifyMesh.C b/applications/utilities/mesh/advanced/modifyMesh/modifyMesh.C index a78ade8d6d..efe2b761ed 100644 --- a/applications/utilities/mesh/advanced/modifyMesh/modifyMesh.C +++ b/applications/utilities/mesh/advanced/modifyMesh/modifyMesh.C @@ -375,8 +375,8 @@ int main(int argc, char *argv[]) bool cellsToSplit = cellsToPyramidise.size(); - //List > - // cellsToCreate(dict.lookup("cellsToCreate")); + // List > + // cellsToCreate(dict.lookup("cellsToCreate")); Info<< "Read from " << dict.name() << nl << " Boundary cutting module:" << nl @@ -560,7 +560,7 @@ int main(int argc, char *argv[]) } // Write resulting mesh - Info << "Writing modified mesh to time " << runTime.timeName() << endl; + Info<< "Writing modified mesh to time " << runTime.timeName() << endl; mesh.write(); } else if (edgeToPos.size()) @@ -613,7 +613,7 @@ int main(int argc, char *argv[]) } // Write resulting mesh - Info << "Writing modified mesh to time " << runTime.timeName() << endl; + Info<< "Writing modified mesh to time " << runTime.timeName() << endl; mesh.write(); } else @@ -656,13 +656,12 @@ int main(int argc, char *argv[]) } // Write resulting mesh - Info << "Writing modified mesh to time " << runTime.timeName() << endl; + Info<< "Writing modified mesh to time " << runTime.timeName() << endl; mesh.write(); } - Info << nl << "End" << endl; - + Info<< "\nEnd\n" << endl; return 0; } diff --git a/applications/utilities/mesh/advanced/refineWallLayer/refineWallLayer.C b/applications/utilities/mesh/advanced/refineWallLayer/refineWallLayer.C index 4e48feeea5..7e42676f3a 100644 --- a/applications/utilities/mesh/advanced/refineWallLayer/refineWallLayer.C +++ b/applications/utilities/mesh/advanced/refineWallLayer/refineWallLayer.C @@ -234,11 +234,11 @@ int main(int argc, char *argv[]) } // Write resulting mesh - Info << "Writing refined morphMesh to time " << runTime.timeName() << endl; + Info<< "Writing refined morphMesh to time " << runTime.timeName() << endl; mesh.write(); - Info << "End\n" << endl; + Info<< "End\n" << endl; return 0; } diff --git a/applications/utilities/mesh/advanced/refinementLevel/refinementLevel.C b/applications/utilities/mesh/advanced/refinementLevel/refinementLevel.C index 7732c985b8..d3b1e14c63 100644 --- a/applications/utilities/mesh/advanced/refinementLevel/refinementLevel.C +++ b/applications/utilities/mesh/advanced/refinementLevel/refinementLevel.C @@ -126,41 +126,41 @@ int main(int argc, char *argv[]) // Create bin0. Have upperlimit as factor times lowerlimit. bins.append(DynamicList