Merge branch 'master' of /home/noisy3/OpenFOAM/OpenFOAM-dev

Conflicts:
	applications/utilities/postProcessing/dataConversion/foamToTecplot360/Allwmake
This commit is contained in:
mattijs
2009-12-01 16:47:45 +00:00
614 changed files with 56132 additions and 2923 deletions

17
README
View File

@ -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 <path_to_qmake>
+ ./makeParaView -qmake <path_to_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

View File

@ -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
(

View File

@ -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
(

View File

@ -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())
{

View File

@ -1,5 +1,5 @@
{
Info << "Solving chemistry" << endl;
Info<< "Solving chemistry" << endl;
chemistry.solve
(

View File

@ -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())
{

View File

@ -1,5 +1,5 @@
{
Info << "Solving chemistry" << endl;
Info<< "Solving chemistry" << endl;
chemistry.solve
(

View File

@ -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())
{

View File

@ -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");

View File

@ -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();

View File

@ -0,0 +1,3 @@
rhoSimplecFoam.C
EXE = $(FOAM_APPBIN)/rhoSimplecFoam

View File

@ -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

View File

@ -0,0 +1,17 @@
// Solve the Momentum equation
tmp<fvVectorMatrix> 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);

View File

@ -0,0 +1,63 @@
Info<< "Reading thermophysical properties\n" << endl;
autoPtr<basicPsiThermo> 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<compressible::RASModel> turbulence
(
compressible::RASModel::New
(
rho,
U,
phi,
thermo
)
);
dimensionedScalar initialMass = fvc::domainIntegrate(rho);

View File

@ -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;
}

View File

@ -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<mixedFvPatchScalarField>(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;

View File

@ -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;
}
// ************************************************************************* //

View File

@ -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;
}

View File

@ -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;
}

View File

@ -117,7 +117,7 @@ int main(int argc, char *argv[])
<< nl << endl;
}
Info << "End\n" << endl;
Info<< "End\n" << endl;
return 0;
}

View File

@ -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

View File

@ -5,7 +5,7 @@
runTime.path()/runTime.timeName()/"uniform"/"gradP.raw"
);
if(gradPFile.good())
if (gradPFile.good())
{
gradPFile << gradP << endl;
}

View File

@ -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
(

View File

@ -1,4 +1,4 @@
Info << "Reading field p\n" << endl;
Info<< "Reading field p\n" << endl;
volScalarField p
(
IOobject
@ -12,7 +12,7 @@
mesh
);
Info << "Reading field U\n" << endl;
Info<< "Reading field U\n" << endl;
volVectorField U
(
IOobject

View File

@ -1,4 +1,4 @@
Info << "Reading field p\n" << endl;
Info<< "Reading field p\n" << endl;
volScalarField p
(
IOobject
@ -12,7 +12,7 @@
mesh
);
Info << "Reading field U\n" << endl;
Info<< "Reading field U\n" << endl;
volVectorField U
(
IOobject

View File

@ -1,5 +1,5 @@
{
Info << "Solving chemistry" << endl;
Info<< "Solving chemistry" << endl;
chemistry.solve
(

View File

@ -1,5 +1,5 @@
{
Info << "Solving chemistry" << endl;
Info<< "Solving chemistry" << endl;
chemistry.solve
(

View File

@ -1,5 +1,5 @@
{
Info << "Solving chemistry" << endl;
Info<< "Solving chemistry" << endl;
chemistry.solve
(

View File

@ -1,4 +1,4 @@
if(turbulence)
if (turbulence)
{
if (mesh.changing())
{

View File

@ -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
(

View File

@ -42,7 +42,7 @@
adjustPhi(phi, U, pcorr);
for(int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
{
fvScalarMatrix pcorrEqn
(

View File

@ -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
(

View File

@ -42,7 +42,7 @@
adjustPhi(phi, U, pcorr);
for(int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
{
fvScalarMatrix pcorrEqn
(

View File

@ -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
(

View File

@ -34,7 +34,7 @@
adjustPhi(phi, U, pcorr);
for(int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
{
fvScalarMatrix pcorrEqn
(

View File

@ -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
(

View File

@ -34,7 +34,7 @@
adjustPhi(phi, U, pcorr);
for(int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
{
fvScalarMatrix pcorrEqn
(

View File

@ -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
(

View File

@ -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;
}

View File

@ -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
(

View File

@ -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
(

View File

@ -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
(

View File

@ -190,7 +190,7 @@
}
}
Info << "dragPhase is " << dragPhase << endl;
Info<< "dragPhase is " << dragPhase << endl;
kineticTheoryModel kineticTheory
(
phasea,

View File

@ -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();

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -41,7 +41,7 @@ Foam::autoPtr<Foam::dragModel> 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> 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);

View File

@ -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
(

View File

@ -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<Scalar> 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();

View File

@ -72,7 +72,7 @@ int main(int argc, char *argv[])
<< "list: " << idl() << nl
<< endl;
Info << "End\n" << endl;
Info<< "End\n" << endl;
return 0;
}

View File

@ -155,7 +155,7 @@ int main(int argc, char *argv[])
Info<< psi << endl;
Info << "End\n" << endl;
Info<< "End\n" << endl;
return 0;
}

View File

@ -155,7 +155,7 @@ int main(int argc, char *argv[])
Info<< psi << endl;
Info << "End\n" << endl;
Info<< "End\n" << endl;
return 0;
}

View File

@ -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<label, bool> 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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -37,7 +37,7 @@ int main(int argc, char *argv[])
{
rmDir("hmm");
Info << "End\n" << endl;
Info<< "End\n" << endl;
return 0;
}

View File

@ -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;
}

View File

@ -54,7 +54,7 @@ public:
~Scalar()
{
Info <<"delete Scalar: " << data_ << endl;
Info<<"delete Scalar: " << data_ << endl;
}
autoPtr<Scalar> clone() const;

View File

@ -44,7 +44,7 @@ int main()
Info<< t2 << " " << t2.first() << " " << t2.second() << endl;
Info << "End\n" << endl;
Info<< "End\n" << endl;
return 0;
}

View File

@ -100,7 +100,7 @@ int main(int argc, char *argv[])
dynList.append(UIndirectList<double>(completeList, addresses));
Info<< "DynamicList::append(UIndirectList): " << dynList << endl;
Info << "\nEnd\n" << endl;
Info<< "\nEnd\n" << endl;
return 0;
}

View File

@ -118,7 +118,7 @@ int main(int argc, char *argv[])
cbr.testCallbackFunction();
Info << "End\n" << endl;
Info<< "End\n" << endl;
return 0;
}

View File

@ -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;
}

View File

@ -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];

View File

@ -108,8 +108,7 @@ int main()
Info<< " badName(die) => " << findEtcFile("badName", true) << nl
<< endl;
Info<< "\nEnd" << endl;
Info<< "\nEnd\n" << endl;
return 0;
}

View File

@ -95,8 +95,7 @@ int main(int argc, char *argv[])
printCleaning(pathName);
}
Info<< "\nEnd" << endl;
Info<< "\nEnd\n" << endl;
return 0;
}

View File

@ -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;
}

View File

@ -59,7 +59,7 @@ int main(int argc, char *argv[])
Info<< Cf << endl;
Info << "End\n" << endl;
Info<< "End\n" << endl;
return 0;
}

View File

@ -38,7 +38,7 @@ int main()
{
Info<< pTraits<scalar>::typeName << endl;
Info << "End\n" << endl;
Info<< "End\n" << endl;
return 0;
}

View File

@ -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;
}

View File

@ -91,7 +91,7 @@ int main(int argc, char *argv[])
Info<< testReactions << endl;
}
Info << "End\n" << endl;
Info<< "End\n" << endl;
return 0;
}

View File

@ -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 << ' '

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -1015,7 +1015,7 @@ int main(int argc, char *argv[])
}
Info << "End\n" << endl;
Info<< "End\n" << endl;
return 0;
}

View File

@ -596,7 +596,7 @@ int main(int argc, char *argv[])
mesh.write();
}
Info << "End\n" << endl;
Info<< "End\n" << endl;
return 0;
}

View File

@ -510,7 +510,7 @@ int main(int argc, char *argv[])
Info<< "Mesh unchanged." << endl;
}
Info << "End\n" << endl;
Info<< "End\n" << endl;
return 0;
}

View File

@ -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 Type1, class Type2>
class Tuple;
template<class Type1, class Type2>
Istream& operator>>(Istream&, Tuple<Type1, Type2>&);
template<class Type1, class Type2>
Ostream& operator<<(Ostream&, const Tuple<Type1, Type2>&);
/*---------------------------------------------------------------------------*\
Class Tuple Declaration
\*---------------------------------------------------------------------------*/
template<class Type1, class Type2>
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<Type1, Type2> reverseTuple() const
{
return Tuple<Type1, Type2>(second_, first_);
}
// Friend Operators
inline friend bool operator==
(
const Tuple<Type1, Type2>& a,
const Tuple<Type1, Type2>& b
)
{
return
(
(a.first_ == b.first_) && (a.second_ == b.second_)
);
}
inline friend bool operator!=
(
const Tuple<Type1, Type2>& a,
const Tuple<Type1, Type2>& b
)
{
return (!(a == b));
}
// IOstream Operators
friend Istream& operator>> <Type1, Type2>
(
Istream& is,
Tuple<Type1, Type2>& p
);
friend Ostream& operator<< <Type1, Type2>
(
Ostream& os,
const Tuple<Type1, Type2>& p
);
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
template<class Type1, class Type2>
Istream& operator>>(Istream& is, Tuple<Type1, Type2>& p)
{
// Read beginning of Tuple<Type, Type>
is.readBegin("Tuple<Type, Type>");
is >> p.first_ >> p.second_;
// Read end of Tuple<Type, Type>
is.readEnd("Tuple<Type, Type>");
// Check state of Ostream
is.check("Istream& operator>>(Istream&, Tuple<Type, Type>&)");
return is;
}
template<class Type1, class Type2>
Ostream& operator<<(Ostream& os, const Tuple<Type1, Type2>& 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<Type, Type>&)");
return os;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -375,8 +375,8 @@ int main(int argc, char *argv[])
bool cellsToSplit = cellsToPyramidise.size();
//List<Tuple<pointField,point> >
// cellsToCreate(dict.lookup("cellsToCreate"));
// List<Tuple2<pointField,point> >
// 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;
}

View File

@ -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;
}

View File

@ -126,41 +126,41 @@ int main(int argc, char *argv[])
// Create bin0. Have upperlimit as factor times lowerlimit.
bins.append(DynamicList<label>());
lowerLimits.append(sortedVols[0]);
upperLimits.append(1.1*lowerLimits[lowerLimits.size()-1]);
upperLimits.append(1.1 * lowerLimits.last());
forAll(sortedVols, i)
{
if (sortedVols[i] > upperLimits[upperLimits.size()-1])
if (sortedVols[i] > upperLimits.last())
{
// New value outside of current bin
// Shrink old bin.
DynamicList<label>& bin = bins[bins.size()-1];
DynamicList<label>& bin = bins.last();
bin.shrink();
Info<< "Collected " << bin.size() << " elements in bin "
<< lowerLimits[lowerLimits.size()-1] << " .. "
<< upperLimits[upperLimits.size()-1] << endl;
<< lowerLimits.last() << " .. "
<< upperLimits.last() << endl;
// Create new bin.
bins.append(DynamicList<label>());
lowerLimits.append(sortedVols[i]);
upperLimits.append(1.1*lowerLimits[lowerLimits.size()-1]);
upperLimits.append(1.1 * lowerLimits.last());
Info<< "Creating new bin " << lowerLimits[lowerLimits.size()-1]
<< " .. " << upperLimits[upperLimits.size()-1]
Info<< "Creating new bin " << lowerLimits.last()
<< " .. " << upperLimits.last()
<< endl;
}
// Append to current bin.
DynamicList<label>& bin = bins[bins.size()-1];
DynamicList<label>& bin = bins.last();
bin.append(sortedVols.indices()[i]);
}
Info<< endl;
bins[bins.size()-1].shrink();
bins.last().shrink();
bins.shrink();
lowerLimits.shrink();
upperLimits.shrink();
@ -355,8 +355,7 @@ int main(int argc, char *argv[])
<< nl << endl;
}
Info << nl << "End" << endl;
Info<< "\nEnd\n" << endl;
return 0;
}

View File

@ -469,7 +469,7 @@ int main(int argc, char *argv[])
MESH, // meshType
NONMESH, // fill type
mesh.nCells()
);
);
Info<< "Removing points connecting cells unconnected by faces ..."
@ -510,7 +510,7 @@ int main(int argc, char *argv[])
writeSet(selectedCells, "cells selected for meshing");
Info << "End\n" << endl;
Info<< "End\n" << endl;
return 0;
}

View File

@ -701,7 +701,7 @@ int main(int argc, char *argv[])
mesh.write();
}
Info << "End\n" << endl;
Info<< "End\n" << endl;
return 0;
}

View File

@ -264,10 +264,10 @@ int main(int argc, char *argv[])
}
yyFlexLexer lexer(&ansysStream);
while(lexer.yylex() != 0)
while (lexer.yylex() != 0)
{}
Info << "Creating points" << endl;
Info<< "Creating points" << endl;
pointField points(slPoints.size());
@ -297,7 +297,7 @@ int main(int argc, char *argv[])
pointMap[pointMapIter()] = i++;
}
Info << "Creating cells" << endl;
Info<< "Creating cells" << endl;
labelList cellMap(maxCelli+1);
@ -409,7 +409,7 @@ int main(int argc, char *argv[])
{ 4, 2, 1, 3, 0, 5}, // hex
};
Info << "Creating boundary patches" << endl;
Info<< "Creating boundary patches" << endl;
faceListList boundary(slPatchCells.size());
wordList patchNames(slPatchCells.size());
@ -442,11 +442,11 @@ int main(int argc, char *argv[])
boundary[patchI] = patchFaces;
patchNames[patchI] = word("patch") + name(patchI + 1);
Info << "Patch " << patchI << " named " << patchNames[patchI]
Info<< "Patch " << patchI << " named " << patchNames[patchI]
<< ": " << boundary[patchI].size() << " faces" << endl;
}
Info << "ansysToFoam: " << endl
Info<< "ansysToFoam: " << endl
<< "Ansys file format does not provide information about the type of "
<< "the patch (eg. wall, symmetry plane, cyclic etc)." << endl
<< "All the patches have been created "
@ -491,7 +491,7 @@ int main(int argc, char *argv[])
// Set the precision of the points data to 10
IOstream::defaultPrecision(10);
Info << "Writing polyMesh" << endl;
Info<< "Writing polyMesh" << endl;
pShapeMesh.write();
Info<< nl << "end" << endl;

View File

@ -73,7 +73,7 @@ int main(int argc, char *argv[])
cfxFile >> nblock >> npatch >> nglue >> nelem >> npoint;
Info << "Reading blocks" << endl;
Info<< "Reading blocks" << endl;
PtrList<hexBlock> blocks(nblock);
@ -90,7 +90,7 @@ int main(int argc, char *argv[])
}
}
Info << "Reading patch definitions" << endl;
Info<< "Reading patch definitions" << endl;
wordList cfxPatchTypes(npatch);
wordList cfxPatchNames(npatch);
@ -126,7 +126,7 @@ int main(int argc, char *argv[])
}
}
Info << "Reading block glueing information" << endl;
Info<< "Reading block glueing information" << endl;
labelList glueMasterPatches(nglue, -1);
labelList glueSlavePatches(nglue, -1);
@ -145,15 +145,15 @@ int main(int argc, char *argv[])
}
}
Info << "Reading block points" << endl;
Info<< "Reading block points" << endl;
forAll (blocks, blockI)
{
Info << "block " << blockI << " is a ";
Info<< "block " << blockI << " is a ";
blocks[blockI].readPoints(cfxFile);
}
Info << "Calculating block offsets" << endl;
Info<< "Calculating block offsets" << endl;
labelList blockOffsets(nblock, -1);
@ -172,7 +172,7 @@ int main(int argc, char *argv[])
+ blocks[blockI - 1].nBlockPoints();
}
Info << "Assembling patches" << endl;
Info<< "Assembling patches" << endl;
faceListList rawPatches(npatch);
@ -203,13 +203,13 @@ int main(int argc, char *argv[])
}
}
Info << "Merging points ";
Info<< "Merging points ";
labelList pointMergeList(nMeshPoints, -1);
// In order to ensure robust merging, it is necessary to traverse
// the patch glueing list until the pointMergeList stops changing.
//
//
// For efficiency, create merge pairs in the first pass
labelListListList glueMergePairs(glueMasterPatches.size());
@ -396,7 +396,7 @@ int main(int argc, char *argv[])
)
{
changedPointMerge = true;
pointMergeList[PpointLabel]
= pointMergeList[NpointLabel]
= min
@ -408,10 +408,10 @@ int main(int argc, char *argv[])
}
}
}
Info << "." << flush;
Info<< "." << flush;
}
while (changedPointMerge && nPasses < 8);
Info << endl;
Info<< endl;
if (changedPointMerge == true)
{
@ -509,7 +509,7 @@ int main(int argc, char *argv[])
nMeshPoints = nNewPoints;
Info << "Creating points" << endl;
Info<< "Creating points" << endl;
pointField points(nMeshPoints);
@ -536,7 +536,7 @@ int main(int argc, char *argv[])
points *= scaleFactor;
}
Info << "Creating cells" << endl;
Info<< "Creating cells" << endl;
cellShapeList cellShapes(nMeshCells);
@ -568,7 +568,7 @@ int main(int argc, char *argv[])
}
}
Info << "Creating boundary patches" << endl;
Info<< "Creating boundary patches" << endl;
faceListList boundary(npatch);
wordList patchNames(npatch);
@ -600,7 +600,7 @@ int main(int argc, char *argv[])
if (existingPatch >= 0)
{
Info << "CFX patch " << patchI
Info<< "CFX patch " << patchI
<< ", of type " << cfxPatchTypes[patchI]
<< ", name " << cfxPatchNames[patchI]
<< " already exists as FOAM patch " << existingPatch
@ -652,7 +652,7 @@ int main(int argc, char *argv[])
}
}
Info << "CFX patch " << patchI
Info<< "CFX patch " << patchI
<< ", of type " << cfxPatchTypes[patchI]
<< ", name " << cfxPatchNames[patchI]
<< " converted into FOAM patch " << nCreatedPatches
@ -660,7 +660,7 @@ int main(int argc, char *argv[])
if (cfxPatchTypes[patchI] == "WALL")
{
Info << "wall." << endl;
Info<< "wall." << endl;
patchTypes[nCreatedPatches] = wallPolyPatch::typeName;
patchNames[nCreatedPatches] = cfxPatchNames[patchI];
@ -668,7 +668,7 @@ int main(int argc, char *argv[])
}
else if (cfxPatchTypes[patchI] == "SYMMET")
{
Info << "symmetryPlane." << endl;
Info<< "symmetryPlane." << endl;
patchTypes[nCreatedPatches] = symmetryPolyPatch::typeName;
patchNames[nCreatedPatches] = cfxPatchNames[patchI];
@ -683,7 +683,7 @@ int main(int argc, char *argv[])
|| cfxPatchTypes[patchI] == "USER2D"
)
{
Info << "generic." << endl;
Info<< "generic." << endl;
patchTypes[nCreatedPatches] = polyPatch::typeName;
patchNames[nCreatedPatches] = cfxPatchNames[patchI];
@ -737,10 +737,10 @@ int main(int argc, char *argv[])
// Set the precision of the points data to 10
IOstream::defaultPrecision(10);
Info << "Writing polyMesh" << endl;
Info<< "Writing polyMesh" << endl;
pShapeMesh.write();
Info << "End\n" << endl;
Info<< "End\n" << endl;
return 0;
}

View File

@ -70,12 +70,12 @@ void hexBlock::readPoints(Istream& is)
if (((i ^ j) & k) > 0)
{
Info << "right-handed block" << endl;
Info<< "right-handed block" << endl;
blockHandedness_ = right;
}
else
{
Info << "left-handed block" << endl;
Info<< "left-handed block" << endl;
blockHandedness_ = left;
}
}

View File

@ -324,7 +324,7 @@ endOfSection {space}")"{space}
// point group type skipped
strtol(endPtr, &endPtr, 16);
pointi = pointGroupStartIndex[pointGroupStartIndex.size()-1];
pointi = pointGroupStartIndex.last();
// reset number of components to default
pointGroupNumberOfComponents = 3;
@ -336,11 +336,11 @@ endOfSection {space}")"{space}
}
Info<< "PointGroup: "
<< pointGroupZoneID[pointGroupZoneID.size()-1]
<< pointGroupZoneID.last()
<< " start: "
<< pointGroupStartIndex[pointGroupStartIndex.size()-1]
<< pointGroupStartIndex.last()
<< " end: "
<< pointGroupEndIndex[pointGroupEndIndex.size()-1] << flush;
<< pointGroupEndIndex.last() << flush;
}
<readNumberOfPoints,readPointGroupData>{endOfSection} {
@ -387,14 +387,14 @@ endOfSection {space}")"{space}
Info<< "done." << endl;
// check read of points
if (pointi != pointGroupEndIndex[pointGroupEndIndex.size()-1]+1)
if (pointi != pointGroupEndIndex.last()+1)
{
Warning
<< "Problem with reading points: " << nl
<< " start index: "
<< pointGroupStartIndex[pointGroupStartIndex.size()-1]
<< pointGroupStartIndex.last()
<< " end index: "
<< pointGroupEndIndex[pointGroupEndIndex.size()-1]
<< pointGroupEndIndex.last()
<< " last points read: " << pointi << nl
<< " on line " << lineNo << endl;
}
@ -440,14 +440,14 @@ endOfSection {space}")"{space}
faceGroupElementType = strtol(endPtr, &endPtr, 16);
facei = faceGroupStartIndex[faceGroupStartIndex.size()-1];
facei = faceGroupStartIndex.last();
Info<< "FaceGroup: "
<< faceGroupZoneID[faceGroupZoneID.size()-1]
<< faceGroupZoneID.last()
<< " start: "
<< faceGroupStartIndex[faceGroupStartIndex.size()-1]
<< faceGroupStartIndex.last()
<< " end: "
<< faceGroupEndIndex[faceGroupEndIndex.size()-1] << flush;
<< faceGroupEndIndex.last() << flush;
}
<readNumberOfFaces,readFaceGroupData>{space}{endOfSection} {
@ -507,14 +507,14 @@ endOfSection {space}")"{space}
Info<< "done." << endl;
// check read of fluentFaces
if (facei != faceGroupEndIndex[faceGroupEndIndex.size()-1]+1)
if (facei != faceGroupEndIndex.last()+1)
{
Warning
<< "Problem with reading fluentFaces: " << nl
<< " start index: "
<< faceGroupStartIndex[faceGroupStartIndex.size()-1]
<< faceGroupStartIndex.last()
<< " end index: "
<< faceGroupEndIndex[faceGroupEndIndex.size()-1]
<< faceGroupEndIndex.last()
<< " last fluentFaces read: " << facei << nl
<< " on line " << lineNo << endl;
}
@ -560,13 +560,13 @@ endOfSection {space}")"{space}
cellGroupType.append(strtol(endPtr, &endPtr, 16));
Info<< "CellGroup: "
<< cellGroupZoneID[cellGroupZoneID.size()-1]
<< cellGroupZoneID.last()
<< " start: "
<< cellGroupStartIndex[cellGroupStartIndex.size()-1]
<< cellGroupStartIndex.last()
<< " end: "
<< cellGroupEndIndex[cellGroupEndIndex.size()-1]
<< cellGroupEndIndex.last()
<< " type: "
<< cellGroupType[cellGroupType.size()-1]
<< cellGroupType.last()
<< endl;
}
@ -587,13 +587,13 @@ endOfSection {space}")"{space}
strtol(endPtr, &endPtr, 16);
Info<< "CellGroup: "
<< cellGroupZoneID[cellGroupZoneID.size()-1]
<< cellGroupZoneID.last()
<< " start: "
<< cellGroupStartIndex[cellGroupStartIndex.size()-1]
<< cellGroupStartIndex.last()
<< " end: "
<< cellGroupEndIndex[cellGroupEndIndex.size()-1]
<< cellGroupEndIndex.last()
<< " type: "
<< cellGroupType[cellGroupType.size()-1]
<< cellGroupType.last()
<< 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;
}
@ -1356,7 +1356,7 @@ int main(int argc, char *argv[])
mesh.write();
Info<< nl << "End" << endl;
Info<< "\nEnd\n" << endl;
return 0;
}

View File

@ -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);
}
@ -1729,7 +1733,7 @@ int main(int argc, char *argv[])
}
}
Info<< nl << "End" << endl;
Info<< "\nEnd\n" << endl;
return 0;
}

View File

@ -63,7 +63,7 @@ void Foam::fluentFvMesh::writeFluentMesh() const
).c_str()
);
Info << "Writing Header" << endl;
Info<< "Writing Header" << endl;
fluentMeshFile
<< "(0 \"FOAM to Fluent Mesh File\")" << std::endl << std::endl

View File

@ -57,7 +57,7 @@ int main(int argc, char *argv[])
mesh.writeFluentMesh();
Info << "End\n" << endl;
Info<< "End\n" << endl;
return 0;
}

View File

@ -233,7 +233,7 @@ mtype {space}"MTYPE:"{space}
<readProgramID>{space}{word} {
Info << "Written by " << YYText() << " ";
Info<< "Written by " << YYText() << " ";
BEGIN(controlInfo);
}
@ -245,20 +245,20 @@ mtype {space}"MTYPE:"{space}
<readVersionID>{space}{versionNumber} {
Info << " version " << YYText() << endl;
Info<< " version " << YYText() << endl;
BEGIN(controlInfo);
}
<controlInfo>{space}{dateDDMonYYYY}{space}{time} {
Info << "File written on " << YYText() << endl;
Info<< "File written on " << YYText() << endl;
}
<controlInfo>{space}{dateDDMMYYYY}{space}{time} {
Info << "File written on " << YYText() << endl;
Info<< "File written on " << YYText() << endl;
}
@ -304,7 +304,7 @@ mtype {space}"MTYPE:"{space}
{nodalCoords}{spaceNl} {
curNumberOfNodes = 0;
Info << "Reading nodal coordinates" << endl;
Info<< "Reading nodal coordinates" << endl;
BEGIN(nodalCoords);
}
@ -332,7 +332,7 @@ mtype {space}"MTYPE:"{space}
{cellsAndElements}{spaceNl} {
curNumberOfCells = 0;
Info << "Reading cells" << endl;
Info<< "Reading cells" << endl;
BEGIN(cellsAndElements);
}
@ -422,7 +422,7 @@ mtype {space}"MTYPE:"{space}
/* ------ Reading element group information ------ */
{cellStreams}{spaceNl} {
Info << "Reading cell streams" << endl;
Info<< "Reading cell streams" << endl;
BEGIN(cellStreams);
}
@ -504,7 +504,7 @@ mtype {space}"MTYPE:"{space}
<cellStreamFlags>{labelList} {
Info << "Reading cell stream labels" << endl;
Info<< "Reading cell stream labels" << endl;
BEGIN(cellStreamLabels);
}
@ -529,7 +529,7 @@ mtype {space}"MTYPE:"{space}
<cellStreamLabels>{endOfSection}\n {
Info << "Finished reading cell stream labels" << endl;
Info<< "Finished reading cell stream labels" << endl;
// reset current group ID and a number of flags
curGroupID = 0;
@ -541,7 +541,7 @@ mtype {space}"MTYPE:"{space}
{boundaryPatch}{spaceNl} {
curPatchFace = 0;
Info << "Reading patches" << endl;
Info<< "Reading patches" << endl;
BEGIN(boundaryPatchParams);
}
@ -665,10 +665,10 @@ int main(int argc, char *argv[])
}
yyFlexLexer lexer(&gambitStream);
while(lexer.yylex() != 0)
while (lexer.yylex() != 0)
{}
Info << "Finished lexing" << endl;
Info<< "Finished lexing" << endl;
// make a point mapping array
label maxPointIndex = 0;
@ -815,7 +815,7 @@ int main(int argc, char *argv[])
}
}
Info << "gambitToFoam: " << endl
Info<< "gambitToFoam: " << endl
<< "Gambit file format does not provide information about the type of "
<< "the patch (eg. wall, symmetry plane, cyclic etc)." << endl
<< "All the patches have been created "
@ -864,10 +864,10 @@ int main(int argc, char *argv[])
// Set the precision of the points data to 10
IOstream::defaultPrecision(10);
Info << "Writing polyMesh" << endl;
Info<< "Writing polyMesh" << endl;
pShapeMesh.write();
Info<< nl << "End" << endl;
Info<< "\nEnd\n" << endl;
return 0;
}

View File

@ -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;
@ -885,7 +885,7 @@ int main(int argc, char *argv[])
// Now use the patchFaces to patch up the outside faces of the mesh.
// Get the patch for all the outside faces (= default patch added as last)
const polyPatch& pp = mesh.boundaryMesh()[mesh.boundaryMesh().size()-1];
const polyPatch& pp = mesh.boundaryMesh().last();
// Storage for faceZones.
List<DynamicList<label> > zoneFaces(patchFaces.size());

View File

@ -324,13 +324,13 @@ void readCells
cellVerts.append(cellShape(tet, cVerts, true));
cellMaterial.append(physProp);
if (cellVerts[cellVerts.size()-1].size() != cVerts.size())
if (cellVerts.last().size() != cVerts.size())
{
Pout<< "Line:" << is.lineNumber()
<< " element:" << cellI
<< " type:" << feID
<< " collapsed from " << cVerts << nl
<< " to:" << cellVerts[cellVerts.size()-1]
<< " to:" << cellVerts.last()
<< endl;
}
}
@ -347,13 +347,13 @@ void readCells
cellVerts.append(cellShape(prism, cVerts, true));
cellMaterial.append(physProp);
if (cellVerts[cellVerts.size()-1].size() != cVerts.size())
if (cellVerts.last().size() != cVerts.size())
{
Pout<< "Line:" << is.lineNumber()
<< " element:" << cellI
<< " type:" << feID
<< " collapsed from " << cVerts << nl
<< " to:" << cellVerts[cellVerts.size()-1]
<< " to:" << cellVerts.last()
<< endl;
}
}
@ -371,13 +371,13 @@ void readCells
cellVerts.append(cellShape(hex, cVerts, true));
cellMaterial.append(physProp);
if (cellVerts[cellVerts.size()-1].size() != cVerts.size())
if (cellVerts.last().size() != cVerts.size())
{
Pout<< "Line:" << is.lineNumber()
<< " element:" << cellI
<< " type:" << feID
<< " collapsed from " << cVerts << nl
<< " to:" << cellVerts[cellVerts.size()-1]
<< " to:" << cellVerts.last()
<< endl;
}
}
@ -412,7 +412,7 @@ void readPatches
Sout<< "Starting reading patches at line " << is.lineNumber() << '.'
<< endl;
while(true)
while (true)
{
string line;
is.getLine(line);
@ -511,7 +511,7 @@ void readDOFS
}
Info<< "For DOF set " << group
<< " named " << patchNames[patchNames.size()-1]
<< " named " << patchNames.last()
<< " trying to read vertex indices."
<< endl;
@ -534,7 +534,7 @@ void readDOFS
}
Info<< "For DOF set " << group
<< " named " << patchNames[patchNames.size()-1]
<< " named " << patchNames.last()
<< " read " << vertices.size() << " vertex indices." << endl;
dofVertices.append(vertices.shrink());

Some files were not shown because too many files have changed in this diff Show More