Merge branch 'master' into cvm

This commit is contained in:
graham
2010-04-13 11:31:32 +01:00
1168 changed files with 44487 additions and 5367 deletions

View File

@ -128,9 +128,8 @@ public:
);
// Destructor
virtual ~basicSubGrid();
//- Destructor
virtual ~basicSubGrid();
// Member Functions

View File

@ -107,9 +107,8 @@ public:
);
// Destructor
virtual ~basicSubGrid();
//- Destructor
virtual ~basicSubGrid();
// Member Functions

View File

@ -137,9 +137,8 @@ public:
);
// Destructor
virtual ~PDRDragModel();
//- Destructor
virtual ~PDRDragModel();
// Member Functions

View File

@ -135,9 +135,8 @@ public:
);
// Destructor
virtual ~basic();
//- Destructor
virtual ~basic();
// Member Functions

View File

@ -86,9 +86,8 @@ public:
);
// Destructor
virtual ~Gulder();
//- Destructor
virtual ~Gulder();
// Member Functions

View File

@ -91,9 +91,8 @@ public:
);
// Destructor
virtual ~SCOPEBlend();
//- Destructor
virtual ~SCOPEBlend();
// Member Functions

View File

@ -96,9 +96,8 @@ public:
);
// Destructor
virtual ~SCOPEXiEq();
//- Destructor
virtual ~SCOPEXiEq();
// Member Functions

View File

@ -132,9 +132,8 @@ public:
);
// Destructor
virtual ~XiEqModel();
//- Destructor
virtual ~XiEqModel();
// Member Functions

View File

@ -90,9 +90,8 @@ public:
);
// Destructor
virtual ~instability();
//- Destructor
virtual ~instability();
// Member Functions

View File

@ -85,9 +85,8 @@ public:
);
// Destructor
virtual ~KTS();
//- Destructor
virtual ~KTS();
// Member Functions

View File

@ -129,9 +129,8 @@ public:
);
// Destructor
virtual ~XiGModel();
//- Destructor
virtual ~XiGModel();
// Member Functions

View File

@ -94,9 +94,8 @@ public:
);
// Destructor
virtual ~instabilityG();
//- Destructor
virtual ~instabilityG();
// Member Functions

View File

@ -200,9 +200,8 @@ public:
);
// Destructor
virtual ~XiModel();
//- Destructor
virtual ~XiModel();
// Member Functions

View File

@ -95,9 +95,8 @@ public:
);
// Destructor
virtual ~algebraic();
//- Destructor
virtual ~algebraic();
// Member Functions

View File

@ -83,9 +83,8 @@ public:
);
// Destructor
virtual ~fixed();
//- Destructor
virtual ~fixed();
// Member Functions

View File

@ -95,9 +95,8 @@ public:
);
// Destructor
virtual ~transport();
//- Destructor
virtual ~transport();
// Member Functions

View File

@ -194,7 +194,7 @@ public:
);
// Destructor
//- Destructor
~SCOPE();

View File

@ -88,9 +88,8 @@ public:
);
// Destructor
virtual ~infinitelyFastChemistry();
//- Destructor
virtual ~infinitelyFastChemistry();
// Member Functions

View File

@ -83,9 +83,8 @@ public:
);
// Destructor
virtual ~noCombustion();
//- Destructor
virtual ~noCombustion();
// Member Functions

View File

@ -77,9 +77,8 @@ public:
regionProperties(const Time& runTime);
// Destructor
~regionProperties();
//- Destructor
~regionProperties();
// Member Functions

View File

@ -16,6 +16,7 @@ EXE_INC = \
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/chemistryModel/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude \
-I$(LIB_SRC)/surfaceFilmModels/lnInclude \
-I$(LIB_SRC)/ODE/lnInclude
EXE_LIBS = \
@ -36,4 +37,5 @@ EXE_LIBS = \
-lreactionThermophysicalModels \
-lchemistryModel \
-lradiation \
-lsurfaceFilmModels \
-lODE

View File

@ -16,7 +16,8 @@ EXE_INC = \
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/chemistryModel/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude \
-I$(LIB_SRC)/ODE/lnInclude
-I$(LIB_SRC)/ODE/lnInclude \
-I$(LIB_SRC)/surfaceFilmModels/lnInclude
EXE_LIBS = \
-lfiniteVolume \
@ -35,4 +36,5 @@ EXE_LIBS = \
-lreactionThermophysicalModels \
-lchemistryModel \
-lradiation \
-lODE
-lODE \
-lsurfaceFilmModels

View File

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

View File

@ -0,0 +1,38 @@
DEV_PATH=./../..
EXE_INC = \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I${LIB_SRC}/meshTools/lnInclude \
-I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \
-I$(LIB_SRC)/thermophysicalModels/pdfs/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/solids/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/solidMixture/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/liquids/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/liquidMixture/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/thermophysicalFunctions/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/chemistryModel/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude \
-I$(LIB_SRC)/surfaceFilmModels/lnInclude \
-I$(LIB_SRC)/lagrangian/basic/lnInclude \
-I$(LIB_SRC)/lagrangian/intermediate/lnInclude \
-I$(LIB_SRC)/ODE/lnInclude
EXE_LIBS = \
-lfiniteVolume \
-lmeshTools \
-lcompressibleRASModels \
-lcompressibleLESModels \
-lspecie \
-lbasicThermophysicalModels \
-lsolids \
-lsolidMixture \
-lthermophysicalFunctions \
-lreactionThermophysicalModels \
-lchemistryModel \
-lradiation \
-lsurfaceFilmModels \
-llagrangianIntermediate \
-lODE

View File

@ -0,0 +1,16 @@
fvVectorMatrix UEqn
(
fvm::ddt(rho, U)
+ fvm::div(phi, U)
+ turbulence->divDevRhoReff(U)
==
rho.dimensionedInternalField()*g
+ parcels.SU()
);
UEqn.relax();
if (momentumPredictor)
{
solve(UEqn == -fvc::grad(p));
}

View File

@ -0,0 +1,44 @@
tmp<fv::convectionScheme<scalar> > mvConvection
(
fv::convectionScheme<scalar>::New
(
mesh,
fields,
phi,
mesh.divScheme("div(phi,Yi_h)")
)
);
{
label inertIndex = -1;
volScalarField Yt = 0.0*Y[0];
for (label i=0; i<Y.size(); i++)
{
if (Y[i].name() != inertSpecie)
{
volScalarField& Yi = Y[i];
solve
(
fvm::ddt(rho, Yi)
+ mvConvection->fvmDiv(phi, Yi)
- fvm::laplacian(turbulence->muEff(), Yi)
==
parcels.Srho(i)
+ kappa*chemistry.RR(i)().dimensionedInternalField(),
mesh.solver("Yi")
);
Yi.max(0.0);
Yt += Yi;
}
else
{
inertIndex = i;
}
}
Y[inertIndex] = scalar(1) - Yt;
Y[inertIndex].max(0.0);
}

View File

@ -0,0 +1,27 @@
{
Info << "Solving chemistry" << endl;
chemistry.solve
(
runTime.value() - runTime.deltaTValue(),
runTime.deltaTValue()
);
// turbulent time scale
if (turbulentReaction)
{
DimensionedField<scalar, volMesh> tk =
Cmix*sqrt(turbulence->muEff()/rho/turbulence->epsilon());
DimensionedField<scalar, volMesh> tc =
chemistry.tc()().dimensionedInternalField();
// Chalmers PaSR model
kappa = (runTime.deltaT() + tc)/(runTime.deltaT() + tc + tk);
}
else
{
kappa = 1.0;
}
chemistrySh = kappa*chemistry.Sh()();
}

View File

@ -0,0 +1,9 @@
Info<< "\nConstructing reacting cloud" << endl;
thermoReactingCloud parcels
(
"reactingCloud1",
rho,
U,
g,
thermo
);

View File

@ -0,0 +1,122 @@
Info<< "Reading thermophysical properties\n" << endl;
autoPtr<psiChemistryModel> pChemistry
(
psiChemistryModel::New(mesh)
);
psiChemistryModel& chemistry = pChemistry();
hsCombustionThermo& thermo = chemistry.thermo();
basicMultiComponentMixture& composition = thermo.composition();
PtrList<volScalarField>& Y = composition.Y();
word inertSpecie(thermo.lookup("inertSpecie"));
volScalarField& p = thermo.p();
volScalarField& hs = thermo.hs();
const volScalarField& T = thermo.T();
const volScalarField& psi = thermo.psi();
Info<< "Creating field rho\n" << endl;
volScalarField rho
(
IOobject
(
"rho",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
thermo.rho()
);
Info<< "\nReading field U\n" << endl;
volVectorField U
(
IOobject
(
"U",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
);
#include "compressibleCreatePhi.H"
Info<< "Creating field kappa\n" << endl;
DimensionedField<scalar, volMesh> kappa
(
IOobject
(
"kappa",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
mesh,
dimensionedScalar("zero", dimless, 0.0)
);
Info<< "Creating turbulence model\n" << endl;
autoPtr<compressible::turbulenceModel> turbulence
(
compressible::turbulenceModel::New
(
rho,
U,
phi,
thermo
)
);
Info<< "Creating field DpDt\n" << endl;
volScalarField DpDt
(
"DpDt",
fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p)
);
multivariateSurfaceInterpolationScheme<scalar>::fieldTable fields;
forAll(Y, i)
{
fields.add(Y[i]);
}
fields.add(hs);
IOdictionary additionalControlsDict
(
IOobject
(
"additionalControls",
runTime.constant(),
mesh,
IOobject::MUST_READ,
IOobject::NO_WRITE
)
);
Switch solvePrimaryRegion
(
additionalControlsDict.lookup("solvePrimaryRegion")
);
DimensionedField<scalar, volMesh> chemistrySh
(
IOobject
(
"chemistry::Sh",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::NO_WRITE
),
mesh,
dimensionedScalar("chemistrySh", dimEnergy/dimTime/dimVolume, 0.0)
);

View File

@ -0,0 +1,6 @@
Info<< "\nConstructing surface film model" << endl;
autoPtr<surfaceFilmModels::surfaceFilmModel>
tsurfaceFilm(surfaceFilmModels::surfaceFilmModel::New(mesh, g));
surfaceFilmModels::surfaceFilmModel& surfaceFilm = tsurfaceFilm();

View File

@ -0,0 +1,21 @@
{
fvScalarMatrix hsEqn
(
fvm::ddt(rho, hs)
+ mvConvection->fvmDiv(phi, hs)
- fvm::laplacian(turbulence->alphaEff(), hs)
==
DpDt
+ parcels.Sh()
+ radiation->Shs(thermo)
+ chemistrySh
);
hsEqn.relax();
hsEqn.solve();
thermo.correct();
radiation->correct();
}

View File

@ -0,0 +1,72 @@
rho = thermo.rho();
volScalarField rUA = 1.0/UEqn.A();
U = rUA*UEqn.H();
if (transonic)
{
surfaceScalarField phid
(
"phid",
fvc::interpolate(psi)
*(
(fvc::interpolate(U) & mesh.Sf())
+ fvc::ddtPhiCorr(rUA, rho, U, phi)
)
);
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
{
fvScalarMatrix pEqn
(
fvm::ddt(psi, p)
+ fvm::div(phid, p)
- fvm::laplacian(rho*rUA, p)
==
parcels.Srho()
);
pEqn.solve();
if (nonOrth == nNonOrthCorr)
{
phi == pEqn.flux();
}
}
}
else
{
phi =
fvc::interpolate(rho)
*(
(fvc::interpolate(U) & mesh.Sf())
+ fvc::ddtPhiCorr(rUA, rho, U, phi)
);
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
{
fvScalarMatrix pEqn
(
fvm::ddt(psi, p)
+ fvc::div(phi)
- fvm::laplacian(rho*rUA, p)
==
parcels.Srho()
);
pEqn.solve();
if (nonOrth == nNonOrthCorr)
{
phi += pEqn.flux();
}
}
}
#include "rhoEqn.H"
#include "compressibleContinuityErrs.H"
U -= rUA*fvc::grad(p);
U.correctBoundaryConditions();
DpDt = fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p);

View File

@ -0,0 +1,127 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2009-2010 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 3 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, see <http://www.gnu.org/licenses/>.
Application
reactingParcelFilmFoam
Description
Transient PISO solver for compressible, laminar or turbulent flow with
reacting Lagrangian parcels, and surface film modelling.
\*---------------------------------------------------------------------------*/
#include "fvCFD.H"
#include "hCombustionThermo.H"
#include "turbulenceModel.H"
#include "BasicReactingCloud.H"
#include "surfaceFilmModel.H"
#include "psiChemistryModel.H"
#include "chemistrySolver.H"
#include "radiationModel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
int main(int argc, char *argv[])
{
#include "setRootCase.H"
#include "createTime.H"
#include "createMesh.H"
#include "readChemistryProperties.H"
#include "readGravitationalAcceleration.H"
#include "createFields.H"
#include "createClouds.H"
#include "createRadiationModel.H"
#include "createSurfaceFilmModel.H"
#include "initContinuityErrs.H"
#include "readTimeControls.H"
#include "compressibleCourantNo.H"
#include "setInitialDeltaT.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Info<< "\nStarting time loop\n" << endl;
while (runTime.run())
{
#include "readTimeControls.H"
#include "readPISOControls.H"
#include "compressibleCourantNo.H"
#include "setDeltaT.H"
runTime++;
Info<< "Time = " << runTime.timeName() << nl << endl;
parcels.evolve();
surfaceFilm.evolve();
if (solvePrimaryRegion)
{
#include "chemistry.H"
#include "rhoEqn.H"
// --- PIMPLE loop
for (int ocorr=1; ocorr<=nOuterCorr; ocorr++)
{
#include "UEqn.H"
#include "YEqn.H"
// --- PISO loop
for (int corr=1; corr<=nCorr; corr++)
{
#include "hsEqn.H"
#include "pEqn.H"
}
Info<< "T gas min/max = " << min(T).value() << ", "
<< max(T).value() << endl;
}
turbulence->correct();
rho = thermo.rho();
if (runTime.write())
{
chemistry.dQ()().write();
}
}
else
{
runTime.write();
}
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
<< nl << endl;
}
Info<< "End" << endl;
return(0);
}
// ************************************************************************* //

View File

@ -0,0 +1,23 @@
Info<< "Reading chemistry properties\n" << endl;
IOdictionary chemistryProperties
(
IOobject
(
"chemistryProperties",
runTime.constant(),
mesh,
IOobject::MUST_READ,
IOobject::NO_WRITE,
false
)
);
Switch turbulentReaction(chemistryProperties.lookup("turbulentReaction"));
dimensionedScalar Cmix("Cmix", dimless, 1.0);
if (turbulentReaction)
{
chemistryProperties.lookup("Cmix") >> Cmix;
}

View File

@ -0,0 +1,42 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2008-2010 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 3 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, see <http://www.gnu.org/licenses/>.
Global
rhoEqn
Description
Solve the continuity for density.
\*---------------------------------------------------------------------------*/
{
solve
(
fvm::ddt(rho)
+ fvc::div(phi)
==
parcels.Srho()
);
}
// ************************************************************************* //

View File

@ -15,7 +15,8 @@ EXE_INC = \
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/chemistryModel/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude \
-I$(LIB_SRC)/ODE/lnInclude
-I$(LIB_SRC)/ODE/lnInclude \
-I$(LIB_SRC)/surfaceFilmModels/lnInclude
EXE_LIBS = \
-lfiniteVolume \
@ -34,4 +35,5 @@ EXE_LIBS = \
-lreactionThermophysicalModels \
-lchemistryModel \
-lradiation \
-lODE
-lODE \
-lsurfaceFilmModels

View File

@ -8,6 +8,7 @@ EXE_INC = \
-I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/surfaceFilmModels/lnInclude
EXE_LIBS = \
-llagrangian \
@ -19,4 +20,5 @@ EXE_LIBS = \
-lcompressibleRASModels \
-lcompressibleLESModels \
-lfiniteVolume \
-lmeshTools
-lmeshTools \
-lsurfaceFilmModels

View File

@ -94,10 +94,9 @@ public:
);
// Destructor
~threePhaseMixture()
{}
//- Destructor
~threePhaseMixture()
{}
// Member Functions

View File

@ -96,10 +96,9 @@ public:
);
// Destructor
virtual ~Kunz()
{}
//- Destructor
virtual ~Kunz()
{}
// Member Functions

View File

@ -90,10 +90,9 @@ public:
);
// Destructor
virtual ~Merkle()
{}
//- Destructor
virtual ~Merkle()
{}
// Member Functions

View File

@ -103,10 +103,9 @@ public:
);
// Destructor
virtual ~SchnerrSauer()
{}
//- Destructor
virtual ~SchnerrSauer()
{}
// Member Functions

View File

@ -121,10 +121,9 @@ public:
);
// Destructor
virtual ~phaseChangeTwoPhaseMixture()
{}
//- Destructor
virtual ~phaseChangeTwoPhaseMixture()
{}
// Member Functions

View File

@ -209,10 +209,9 @@ public:
);
// Destructor
~multiphaseMixture()
{}
//- Destructor
~multiphaseMixture()
{}
// Member Functions

View File

@ -51,12 +51,7 @@ int main(int argc, char *argv[])
Info<< nl << "And again using STL iterator: " << nl << endl;
for
(
DLList<scalar>::iterator iter = myList.begin();
iter != myList.end();
++iter
)
forAllIter(DLList<scalar>, myList, iter)
{
Info<< "element:" << *iter << endl;
}
@ -64,12 +59,7 @@ int main(int argc, char *argv[])
Info<< nl << "And again using the same STL iterator: " << nl << endl;
for
(
DLList<scalar>::iterator iter = myList.begin();
iter != myList.end();
++iter
)
forAllIter(DLList<scalar>, myList, iter)
{
Info<< "Removing " << myList.remove(iter) << endl;
}
@ -82,12 +72,7 @@ int main(int argc, char *argv[])
const DLList<scalar>& const_myList = myList;
for
(
DLList<scalar>::const_iterator iter = const_myList.begin();
iter != const_myList.end();
++iter
)
forAllConstIter(DLList<scalar>, const_myList, iter)
{
Info<< "element:" << *iter << endl;
}
@ -95,12 +80,7 @@ int main(int argc, char *argv[])
myList.swapUp(myList.DLListBase::first());
myList.swapUp(myList.DLListBase::last());
for
(
DLList<scalar>::const_iterator iter = const_myList.begin();
iter != const_myList.end();
++iter
)
forAllConstIter(DLList<scalar>, const_myList, iter)
{
Info<< "element:" << *iter << endl;
}
@ -108,19 +88,14 @@ int main(int argc, char *argv[])
myList.swapDown(myList.DLListBase::first());
myList.swapDown(myList.DLListBase::last());
for
(
DLList<scalar>::const_iterator iter = const_myList.begin();
iter != const_myList.end();
++iter
)
forAllConstIter(DLList<scalar>, const_myList, iter)
{
Info<< "element:" << *iter << endl;
}
Info<< nl << "Testing transfer: " << nl << endl;
Info<< "original: " << myList << endl;
Info<< nl << "Testing transfer: " << nl << nl
<< "original: " << myList << endl;
DLList<scalar> newList;
newList.transfer(myList);

View File

@ -114,12 +114,7 @@ int main(int argc, char *argv[])
dict.swapDown(dict.first());
for
(
Dictionary<ent>::const_iterator iter = dict.begin();
iter != dict.end();
++iter
)
forAllConstIter(Dictionary<ent>, dict, iter)
{
Info<< "element : " << *iter;
}
@ -159,12 +154,7 @@ int main(int argc, char *argv[])
}
Info<< nl << "scalarDict1: " << endl;
for
(
PtrDictionary<Scalar>::const_iterator iter = scalarDict.begin();
iter != scalarDict.end();
++iter
)
forAllConstIter(PtrDictionary<Scalar>, scalarDict, iter)
{
Info<< " = " << iter() << endl;
}
@ -176,12 +166,7 @@ int main(int argc, char *argv[])
scalarDict2.insert(key, new Scalar(1.3*i));
}
Info<< nl << "scalarDict2: " << endl;
for
(
PtrDictionary<Scalar>::const_iterator iter = scalarDict2.begin();
iter != scalarDict2.end();
++iter
)
forAllConstIter(PtrDictionary<Scalar>, scalarDict2, iter)
{
Info<< "elem = " << *iter << endl;
}

View File

@ -78,12 +78,7 @@ int main(int argc, char *argv[])
Info<< nl << "And again using STL iterator: " << nl << endl;
for
(
SLList<scalar>::iterator iter = myList.begin();
iter != myList.end();
++iter
)
forAllIter(SLList<scalar>, myList, iter)
{
Info<< "element:" << *iter << endl;
}
@ -92,14 +87,9 @@ int main(int argc, char *argv[])
const ISLList<Scalar>& const_myList = myList;
for
(
SLList<scalar>::const_iterator iter2 = const_myList.begin();
iter2 != const_myList.end();
++iter2
)
forAllConstIter(SLList<scalar>, const_myList, iter)
{
Info<< "element:" << *iter2 << endl;
Info<< "element:" << *iter << endl;
}

View File

@ -188,12 +188,7 @@ int main(int argc, char *argv[])
sum = 0;
for (label iter = 0; iter < nIters; ++iter)
{
for
(
PackedBoolList::iterator it = packed.begin();
it != packed.end();
++it
)
forAllIter(PackedBoolList, packed, it)
{
sum += it;
}
@ -207,12 +202,7 @@ int main(int argc, char *argv[])
sum = 0;
for (label iter = 0; iter < nIters; ++iter)
{
for
(
PackedBoolList::const_iterator cit = packed.cbegin();
cit != packed.cend();
++cit
)
forAllConstIter(PackedBoolList, packed, cit)
{
sum += cit();
}
@ -333,12 +323,7 @@ int main(int argc, char *argv[])
// Write packed
for (label iter = 0; iter < nIters; ++iter)
{
for
(
PackedBoolList::iterator it = packed.begin();
it != packed.end();
++it
)
forAllIter(PackedBoolList, packed, it)
{
it() = 1;
}

View File

@ -51,12 +51,7 @@ int main(int argc, char *argv[])
Info<< nl << "And again using STL iterator: " << nl << endl;
for
(
SLList<scalar>::iterator iter = myList.begin();
iter != myList.end();
++iter
)
forAllIter(SLList<scalar>, myList, iter)
{
Info<< "element:" << *iter << endl;
}
@ -65,39 +60,23 @@ int main(int argc, char *argv[])
const SLList<scalar>& const_myList = myList;
for
(
SLList<scalar>::const_iterator iter2 = const_myList.begin();
iter2 != const_myList.end();
++iter2
)
forAllConstIter(SLList<scalar>, const_myList, iter)
{
Info<< "element:" << *iter2 << endl;
Info<< "element:" << *iter << endl;
}
for
(
SLList<scalar>::iterator iter = myList.begin();
iter != myList.end();
++iter
)
forAllIter(SLList<scalar>, myList, iter)
{
Info<< "Removing element:" << *iter << endl;
myList.remove(iter);
}
for
(
SLList<scalar>::const_iterator iter2 = const_myList.begin();
iter2 != const_myList.end();
++iter2
)
forAllConstIter(SLList<scalar>, const_myList, iter)
{
Info<< "element:" << *iter2 << endl;
Info<< "element:" << *iter << endl;
}
for (int i = 0; i<10; i++)
{
myList.append(1.3*i);

View File

@ -81,12 +81,7 @@ int main(int argc, char *argv[])
dict.swapDown(dict.first());
for
(
UDictionary<ent>::const_iterator iter = dict.begin();
iter != dict.end();
++iter
)
forAllConstIter(UDictionary<ent>, dict, iter)
{
Info<< "element : " << *iter;
}

View File

@ -292,20 +292,14 @@ void addCutNeighbours
labelHashSet addCutFaces(cutCells.size());
for
(
labelHashSet::const_iterator iter = cutCells.begin();
iter != cutCells.end();
++iter
)
forAllConstIter(labelHashSet, cutCells, iter)
{
label cellI = iter.key();
const label cellI = iter.key();
const labelList& cFaces = mesh.cells()[cellI];
forAll(cFaces, i)
{
label faceI = cFaces[i];
const label faceI = cFaces[i];
if (mesh.isInternalFace(faceI))
{
@ -331,12 +325,7 @@ void addCutNeighbours
Info<< " Selected an additional " << addCutFaces.size()
<< " neighbours of cutCells to refine" << endl;
for
(
labelHashSet::const_iterator iter = addCutFaces.begin();
iter != addCutFaces.end();
++iter
)
forAllConstIter(labelHashSet, addCutFaces, iter)
{
cutCells.insert(iter.key());
}
@ -386,21 +375,15 @@ bool limitRefinementLevel
labelHashSet addCutCells(cutCells.size());
for
(
labelHashSet::const_iterator iter = cutCells.begin();
iter != cutCells.end();
++iter
)
forAllConstIter(labelHashSet, cutCells, iter)
{
// cellI will be refined.
label cellI = iter.key();
const label cellI = iter.key();
const labelList& cCells = mesh.cellCells()[cellI];
forAll(cCells, i)
{
label nbr = cCells[i];
const label nbr = cCells[i];
if (!excludeCells.found(nbr) && !cutCells.found(nbr))
{
@ -419,12 +402,8 @@ bool limitRefinementLevel
Info<< "Added an additional " << addCutCells.size() << " cells"
<< " to satisfy 1:" << limitDiff << " refinement level"
<< endl;
for
(
labelHashSet::const_iterator iter = addCutCells.begin();
iter != addCutCells.end();
++iter
)
forAllConstIter(labelHashSet, addCutCells, iter)
{
cutCells.insert(iter.key());
}

View File

@ -108,9 +108,8 @@ public:
cellSplitter(const polyMesh& mesh);
// Destructor
~cellSplitter();
//- Destructor
~cellSplitter();
// Member Functions

View File

@ -112,12 +112,7 @@ int main(int argc, char *argv[])
<< cells.instance()/cells.local()/cells.name()
<< nl << endl;
for
(
cellSet::const_iterator iter = cells.begin();
iter != cells.end();
++iter
)
forAllConstIter(cellSet, cells, iter)
{
cutCells.erase(iter.key());
}
@ -131,7 +126,7 @@ int main(int argc, char *argv[])
forAll(meshPoints, pointI)
{
label meshPointI = meshPoints[pointI];
const label meshPointI = meshPoints[pointI];
vertOnPatch[meshPointI] = true;
}
@ -151,8 +146,7 @@ int main(int argc, char *argv[])
forAll(pEdges, pEdgeI)
{
label edgeI = pEdges[pEdgeI];
const label edgeI = pEdges[pEdgeI];
const edge& e = mesh.edges()[edgeI];
label otherPointI = e.otherVertex(meshPointI);

View File

@ -392,15 +392,9 @@ void collectCuts
boolList edgeIsCut(mesh.nEdges(), false);
scalarField edgeWeight(mesh.nEdges(), -GREAT);
for
(
cellSet::const_iterator iter = cellsToCut.begin();
iter != cellsToCut.end();
++iter
)
forAllConstIter(cellSet, cellsToCut, iter)
{
label cellI = iter.key();
const label cellI = iter.key();
const labelList& cEdges = cellEdges[cellI];
forAll(cEdges, i)

View File

@ -268,13 +268,8 @@ int main(int argc, char *argv[])
pointField points(slPoints.size());
label i=0;
for
(
SLList<point>::iterator pointIter = slPoints.begin();
pointIter != slPoints.end();
++pointIter
)
label i = 0;
forAllConstIter(SLList<point>, slPoints, pointIter)
{
// Scale points for the given scale factor
points[i++] = scaleFactor * pointIter();
@ -283,13 +278,8 @@ int main(int argc, char *argv[])
labelList pointMap(maxNodei+1);
i=0;
for
(
SLList<label>::iterator pointMapIter = slPointMap.begin();
pointMapIter != slPointMap.end();
++pointMapIter
)
i = 0;
forAllConstIter(SLList<label>, slPointMap, pointMapIter)
{
pointMap[pointMapIter()] = i++;
}
@ -298,13 +288,8 @@ int main(int argc, char *argv[])
labelList cellMap(maxCelli+1);
i=0;
for
(
SLList<label>::iterator cellMapIter = slCellMap.begin();
cellMapIter != slCellMap.end();
++cellMapIter
)
i = 0;
forAllConstIter(SLList<label>, slCellMap, cellMapIter)
{
cellMap[cellMapIter()] = i++;
}
@ -323,12 +308,7 @@ int main(int argc, char *argv[])
cellShapeList cellShapes(slCellLabels.size());
label nCells = 0;
for
(
SLPtrList<labelList>::iterator cellIter = slCellLabels.begin();
cellIter != slCellLabels.end();
++cellIter
)
forAllConstIter(SLPtrList<labelList>, slCellLabels, cellIter)
{
if // Tetrahedron
(

View File

@ -100,9 +100,8 @@ public:
return autoPtr<block>(NULL);
}
// Destructor
~block();
//- Destructor
~block();
// Member Functions

View File

@ -327,12 +327,7 @@ if
{
scalar minz = GREAT;
for
(
SLList<face>::iterator iter = pFaces[CYLINDERHEAD][0].begin();
iter != pFaces[CYLINDERHEAD][0].end();
++iter
)
forAllConstIter(SLList<face>, pFaces[CYLINDERHEAD][0], iter)
{
const face& pf = iter();
@ -346,12 +341,7 @@ if
SLList<face> newLinerFaces;
for
(
SLList<face>::iterator iter = pFaces[LINER][0].begin();
iter != pFaces[LINER][0].end();
++iter
)
forAllConstIter(SLList<face>, pFaces[LINER][0], iter)
{
const face& pf = iter();
@ -380,12 +370,7 @@ if
SLList<face> newCylinderHeadFaces;
for
(
SLList<face>::iterator iter = pFaces[CYLINDERHEAD][0].begin();
iter != pFaces[CYLINDERHEAD][0].end();
++iter
)
forAllConstIter(SLList<face>, pFaces[CYLINDERHEAD][0], iter)
{
const face& pf = iter();
@ -456,12 +441,7 @@ if (pFaces[WEDGE].size() && pFaces[WEDGE][0].size())
{
pFaces[CYCLIC].setSize(1);
pFaces[CYCLIC][0] = pFaces[WEDGE][0];
for
(
SLList<face>::iterator iterb = pFaces[WEDGE][1].begin();
iterb != pFaces[WEDGE][1].end();
++iterb
)
forAllIter(SLList<face>, pFaces[WEDGE][1], iterb)
{
pFaces[CYCLIC][0].append(iterb());
}

View File

@ -238,9 +238,8 @@ public:
);
// Destructor
~sammMesh();
//- Destructor
~sammMesh();
// Member Functions

View File

@ -299,9 +299,8 @@ public:
);
// Destructor
~starMesh();
//- Destructor
~starMesh();
// Member Functions

View File

@ -468,12 +468,7 @@ int main(int argc, char *argv[])
// Print region to patch mapping
Info<< "Regions:" << endl;
for
(
Map<label>::const_iterator iter = regionToPatch.begin();
iter != regionToPatch.end();
++iter
)
forAllConstIter(Map<label>, regionToPatch, iter)
{
Info<< " region:" << iter.key() << '\t' << "patch:"
<< iter() << endl;

View File

@ -356,12 +356,7 @@ void writePointCells
label vertI = 0;
for
(
labelHashSet::const_iterator iter = allEdges.begin();
iter != allEdges.end();
++iter
)
forAllConstIter(labelHashSet, allEdges, iter)
{
const edge& e = mesh.edges()[iter.key()];

View File

@ -143,12 +143,7 @@ void addPatchFields(fvMesh& mesh, const word& patchFieldType)
mesh.objectRegistry::lookupClass<GeoField>()
);
for
(
typename HashTable<const GeoField*>::const_iterator iter = flds.begin();
iter != flds.end();
++iter
)
forAllConstIter(typename HashTable<const GeoField*>, flds, iter)
{
const GeoField& fld = *iter();
@ -183,12 +178,7 @@ void trimPatchFields(fvMesh& mesh, const label nPatches)
mesh.objectRegistry::lookupClass<GeoField>()
);
for
(
typename HashTable<const GeoField*>::const_iterator iter = flds.begin();
iter != flds.end();
++iter
)
forAllConstIter(typename HashTable<const GeoField*>, flds, iter)
{
const GeoField& fld = *iter();
@ -209,12 +199,7 @@ void reorderPatchFields(fvMesh& mesh, const labelList& oldToNew)
mesh.objectRegistry::lookupClass<GeoField>()
);
for
(
typename HashTable<const GeoField*>::const_iterator iter = flds.begin();
iter != flds.end();
++iter
)
forAllConstIter(typename HashTable<const GeoField*>, flds, iter)
{
const GeoField& fld = *iter();
@ -1461,7 +1446,7 @@ int main(int argc, char *argv[])
mesh.setInstance(meshInstance);
}
// Change master and slave boundary conditions on originating mesh

View File

@ -102,10 +102,9 @@ public:
mergePolyMesh(const IOobject& io);
// Destructor
virtual ~mergePolyMesh()
{}
//- Destructor
virtual ~mergePolyMesh()
{}
// Member Functions

View File

@ -76,9 +76,8 @@ public:
mirrorFvMesh(const IOobject& io);
// Destructor
~mirrorFvMesh();
//- Destructor
~mirrorFvMesh();
// Member Functions

View File

@ -100,12 +100,7 @@ int main(int argc, char *argv[])
//Pout<< "pointSets:" << pointObjects.names() << endl;
for
(
IOobjectList::const_iterator iter = pointObjects.begin();
iter != pointObjects.end();
++iter
)
forAllConstIter(IOobjectList, pointObjects, iter)
{
// Not in memory. Load it.
pointSet set(*iter());
@ -149,12 +144,7 @@ int main(int argc, char *argv[])
//Pout<< "faceSets:" << faceObjects.names() << endl;
for
(
IOobjectList::const_iterator iter = faceObjects.begin();
iter != faceObjects.end();
++iter
)
forAllConstIter(IOobjectList, faceObjects, iter)
{
// Not in memory. Load it.
faceSet set(*iter());
@ -288,12 +278,7 @@ int main(int argc, char *argv[])
//Pout<< "cellSets:" << cellObjects.names() << endl;
for
(
IOobjectList::const_iterator iter = cellObjects.begin();
iter != cellObjects.end();
++iter
)
forAllConstIter(IOobjectList, cellObjects, iter)
{
if (!slaveCellSets.found(iter.key()))
{

View File

@ -81,8 +81,7 @@ Foam::label Foam::regionSide::otherEdge
forAll(fEdges, fEdgeI)
{
label otherEdgeI = fEdges[fEdgeI];
const label otherEdgeI = fEdges[fEdgeI];
const edge& otherE = mesh.edges()[otherEdgeI];
if
@ -300,15 +299,9 @@ void Foam::regionSide::walkAllPointConnectedFaces
//
labelHashSet regionEdges(4*regionFaces.size());
for
(
labelHashSet::const_iterator iter = regionFaces.begin();
iter != regionFaces.end();
++iter
)
forAllConstIter(labelHashSet, regionFaces, iter)
{
label faceI = iter.key();
const label faceI = iter.key();
const labelList& fEdges = mesh.faceEdges()[faceI];
forAll(fEdges, fEdgeI)
@ -326,12 +319,7 @@ void Foam::regionSide::walkAllPointConnectedFaces
labelHashSet visitedPoint(4*regionFaces.size());
// Insert fence points so we don't visit them
for
(
labelHashSet::const_iterator iter = fencePoints.begin();
iter != fencePoints.end();
++iter
)
forAllConstIter(labelHashSet, fencePoints, iter)
{
visitedPoint.insert(iter.key());
}
@ -344,14 +332,9 @@ void Foam::regionSide::walkAllPointConnectedFaces
Info<< "Excluding visit of points:" << visitedPoint << endl;
}
for
(
labelHashSet::const_iterator iter = regionFaces.begin();
iter != regionFaces.end();
++iter
)
forAllConstIter(labelHashSet, regionFaces, iter)
{
label faceI = iter.key();
const label faceI = iter.key();
// Get side of face.
label cellI;
@ -459,12 +442,7 @@ Foam::regionSide::regionSide
labelHashSet fencePoints(fenceEdges.size());
for
(
labelHashSet::const_iterator iter = fenceEdges.begin();
iter != fenceEdges.end();
++iter
)
forAllConstIter(labelHashSet, fenceEdges, iter)
{
const edge& e = mesh.edges()[iter.key()];

View File

@ -99,12 +99,7 @@ void addPatchFields(fvMesh& mesh, const word& patchFieldType)
mesh.objectRegistry::lookupClass<GeoField>()
);
for
(
typename HashTable<const GeoField*>::const_iterator iter = flds.begin();
iter != flds.end();
++iter
)
forAllConstIter(typename HashTable<const GeoField*>, flds, iter)
{
const GeoField& fld = *iter();
@ -139,12 +134,7 @@ void trimPatchFields(fvMesh& mesh, const label nPatches)
mesh.objectRegistry::lookupClass<GeoField>()
);
for
(
typename HashTable<const GeoField*>::const_iterator iter = flds.begin();
iter != flds.end();
++iter
)
forAllConstIter(typename HashTable<const GeoField*>, flds, iter)
{
const GeoField& fld = *iter();
@ -165,12 +155,7 @@ void reorderPatchFields(fvMesh& mesh, const labelList& oldToNew)
mesh.objectRegistry::lookupClass<GeoField>()
);
for
(
typename HashTable<const GeoField*>::const_iterator iter = flds.begin();
iter != flds.end();
++iter
)
forAllConstIter(typename HashTable<const GeoField*>, flds, iter)
{
const GeoField& fld = *iter();

View File

@ -360,7 +360,7 @@ int main(int argc, char *argv[])
labelList osf(slavePatch.size());
forAll (osf, i)
forAll(osf, i)
{
osf[i] = slavePatch.start() + i;
}

View File

@ -76,12 +76,7 @@ int main(int argc, char *argv[])
if (args.optionFound("keywords") && !args.optionFound("entry"))
{
for
(
IDLList<entry>::iterator iter = dict.begin();
iter != dict.end();
++iter
)
forAllConstIter(dictionary, dict, iter)
{
Info<< iter().keyword() << endl;
}
@ -137,13 +132,8 @@ int main(int argc, char *argv[])
}
*/
const dictionary& dict(entPtr->dict());
for
(
IDLList<entry>::const_iterator iter = dict.begin();
iter != dict.end();
++iter
)
const dictionary& dict = entPtr->dict();
forAllConstIter(dictionary, dict, iter)
{
Info<< iter().keyword() << endl;
}

View File

@ -126,9 +126,8 @@ public:
domainDecomposition(const IOobject& io);
// Destructor
~domainDecomposition();
//- Destructor
~domainDecomposition();
// Member Functions

View File

@ -506,12 +506,7 @@ void Foam::domainDecomposition::decomposeMesh()
// Add internal and boundary faces
// Remember to increment the index by one such that the
// turning index works properly.
for
(
SLList<label>::iterator curProcFacesIter = curProcFaces.begin();
curProcFacesIter != curProcFaces.end();
++curProcFacesIter
)
forAllConstIter(SLList<label>, curProcFaces, curProcFacesIter)
{
curProcFaceAddressing[nFaces] = curProcFacesIter() + 1;
nFaces++;
@ -564,12 +559,11 @@ void Foam::domainDecomposition::decomposeMesh()
// add faces for this processor boundary
for
forAllConstIter
(
SLList<label>::iterator curFacesIter =
curInterProcBFacesIter().begin();
curFacesIter != curInterProcBFacesIter().end();
++curFacesIter
SLList<label>,
curInterProcBFacesIter(),
curFacesIter
)
{
// add the face

View File

@ -230,9 +230,8 @@ public:
);
// Destructor
~fvFieldDecomposer();
//- Destructor
~fvFieldDecomposer();
// Member Functions

View File

@ -55,7 +55,7 @@ Foam::lagrangianFieldDecomposer::lagrangianFieldDecomposer
{
SLList<indexedParticle*>& particlePtrs = *cellParticles[celli];
forAllIter(SLList<indexedParticle*>, particlePtrs, iter)
forAllConstIter(SLList<indexedParticle*>, particlePtrs, iter)
{
const indexedParticle& ppi = *iter();
particleIndices_[pi++] = ppi.index();

View File

@ -138,9 +138,8 @@ public:
);
// Destructor
~pointFieldDecomposer();
//- Destructor
~pointFieldDecomposer();
// Member Functions

View File

@ -48,22 +48,13 @@ void Foam::readFields
// Construct the vol scalar fields
fields.setSize(fieldObjects.size());
label fieldi=0;
for
(
IOobjectList::iterator iter = fieldObjects.begin();
iter != fieldObjects.end();
++iter
)
label fieldI = 0;
forAllIter(IOobjectList, fieldObjects, iter)
{
fields.set
(
fieldi++,
new GeoField
(
*iter(),
mesh
)
fieldI++,
new GeoField(*iter(), mesh)
);
}
}

View File

@ -110,34 +110,21 @@ int main(int argc, char *argv[])
// Search list of objects for volScalarFields
IOobjectList scalarFields(objects.lookupClass("volScalarField"));
for
(
IOobjectList::iterator scalarFieldIter = scalarFields.begin();
scalarFieldIter != scalarFields.end();
++scalarFieldIter
)
forAllIter(IOobjectList, scalarFields, iter)
{
// Read field
volScalarField field
volScalarField field(*iter(), mesh);
// lookup field from dictionary and convert field
label unitNumber;
if
(
*scalarFieldIter(),
mesh
);
// lookup field from dictionary
if (foamDataToFluentDict.found(field.name()))
foamDataToFluentDict.readIfPresent(field.name(), unitNumber)
&& unitNumber > 0
)
{
label unitNumber
(
readLabel(foamDataToFluentDict.lookup(field.name()))
);
// Convert field
if (unitNumber > 0)
{
Info<< " Converting field " << field.name() << endl;
writeFluentField(field, unitNumber, fluentDataFile);
}
Info<< " Converting field " << field.name() << endl;
writeFluentField(field, unitNumber, fluentDataFile);
}
}
@ -148,34 +135,21 @@ int main(int argc, char *argv[])
// Search list of objects for volVectorFields
IOobjectList vectorFields(objects.lookupClass("volVectorField"));
for
(
IOobjectList::iterator vectorFieldIter = vectorFields.begin();
vectorFieldIter != vectorFields.end();
++vectorFieldIter
)
forAllIter(IOobjectList, vectorFields, iter)
{
// Read field
volVectorField field
volVectorField field(*iter(), mesh);
// lookup field from dictionary and convert field
label unitNumber;
if
(
*vectorFieldIter(),
mesh
);
// lookup field from dictionary
if (foamDataToFluentDict.found(field.name()))
foamDataToFluentDict.readIfPresent(field.name(), unitNumber)
&& unitNumber > 0
)
{
label unitNumber
(
readLabel(foamDataToFluentDict.lookup(field.name()))
);
// Convert field
if (unitNumber > 0)
{
Info<< " Converting field " << field.name() << endl;
writeFluentField(field, unitNumber, fluentDataFile);
}
Info<< " Converting field " << field.name() << endl;
writeFluentField(field, unitNumber, fluentDataFile);
}
}

View File

@ -22,11 +22,11 @@ for (label i=0; i < nTypes; i++)
if (fieldTypes[i] == "volScalarField")
{
volScalarField gmvScalarField(fieldObject, mesh);
volScalarField fld(fieldObject, mesh);
gmvFile << fieldName << " 0" << nl;
for (label indx=0;indx<mesh.nCells();indx++)
{
gmvFile << gmvScalarField[indx] << " ";
gmvFile << fld[indx] << " ";
}
gmvFile << nl;
}
@ -35,19 +35,19 @@ for (label i=0; i < nTypes; i++)
{
if (fieldName == vComp)
{
volVectorField gmvVectorField(fieldObject, mesh);
volVectorField fld(fieldObject, mesh);
gmvFile << "velocity 0" << nl;
for (label indx=0;indx<mesh.nCells();indx++)
{
gmvFile << gmvVectorField[indx].x() << " ";
gmvFile << fld[indx].x() << " ";
}
for (label indx=0;indx<mesh.nCells();indx++)
{
gmvFile << gmvVectorField[indx].y() << " ";
gmvFile << fld[indx].y() << " ";
}
for (label indx=0;indx<mesh.nCells();indx++)
{
gmvFile << gmvVectorField[indx].z() << " ";
gmvFile << fld[indx].z() << " ";
}
gmvFile << nl;
}

View File

@ -1,42 +1,27 @@
gmvFile << "tracers " << particles.size() << nl;
for
(
Cloud<passiveParticle>::iterator elmnt = particles.begin();
elmnt != particles.end();
++elmnt
)
forAllConstIter(Cloud<passiveParticle>, particles, iter)
{
gmvFile << elmnt().position().x() << " ";
gmvFile << iter().position().x() << ' ';
}
gmvFile << nl;
for
(
Cloud<passiveParticle>::iterator elmnt = particles.begin();
elmnt != particles.end();
++elmnt
)
forAllConstIter(Cloud<passiveParticle>, particles, iter)
{
gmvFile << elmnt().position().y() << " ";
gmvFile << iter().position().y() << ' ';
}
gmvFile << nl;
for
(
Cloud<passiveParticle>::iterator elmnt = particles.begin();
elmnt != particles.end();
++elmnt
)
forAllConstIter(Cloud<passiveParticle>, particles, iter)
{
gmvFile << elmnt().position().z() << " ";
gmvFile << iter().position().z() << ' ';
}
gmvFile << nl;
forAll(lagrangianScalarNames, i)
{
word name = lagrangianScalarNames[i];
const word& name = lagrangianScalarNames[i];
IOField<scalar> s
IOField<scalar> fld
(
IOobject
(
@ -49,13 +34,13 @@ forAll(lagrangianScalarNames, i)
)
);
if (s.size())
if (fld.size())
{
gmvFile << name << nl;
for (label n = 0; n < s.size(); n++)
forAll(fld, n)
{
gmvFile << s[n] << token::SPACE;
gmvFile << fld[n] << token::SPACE;
}
gmvFile << nl;
}
@ -65,9 +50,9 @@ forAll(lagrangianScalarNames, i)
forAll(lagrangianVectorNames, i)
{
word name = lagrangianVectorNames[i];
const word& name = lagrangianVectorNames[i];
IOField<vector> v
IOField<vector> fld
(
IOobject
(
@ -80,29 +65,29 @@ forAll(lagrangianVectorNames, i)
)
);
if (v.size())
if (fld.size())
{
gmvFile << name + "x" << nl;
for (label n = 0; n < v.size(); n++)
forAll(fld, n)
{
gmvFile << v[n].x() << token::SPACE;
gmvFile << fld[n].x() << token::SPACE;
}
gmvFile << nl;
gmvFile << name + "y" << nl;
for (label n = 0; n < v.size(); n++)
forAll(fld, n)
{
gmvFile << v[n].y() << token::SPACE;
gmvFile << fld[n].y() << token::SPACE;
}
gmvFile << nl;
gmvFile << name + "z" << nl;
for (label n = 0; n < v.size(); n++)
forAll(fld, n)
{
gmvFile << v[n].z() << token::SPACE;
gmvFile << fld[n].z() << token::SPACE;
}
gmvFile << nl;
}

View File

@ -1,81 +1,48 @@
gmvFile << "tracers " << particles.size() << nl;
for
(
discretePhase::iterator elmnt = particles.begin();
elmnt != particles.end();
++elmnt
)
forAllConstIter(discretePhase, particles, iter)
{
gmvFile << elmnt().position().x() << " ";
gmvFile << iter().position().x() << " ";
}
gmvFile << nl;
for
(
discretePhase::iterator elmnt = particles.begin();
elmnt != particles.end();
++elmnt
)
forAllConstIter(discretePhase, particles, iter)
{
gmvFile << elmnt().position().y() << " ";
gmvFile << iter().position().y() << " ";
}
gmvFile << nl;
for
(
discretePhase::iterator elmnt = particles.begin();
elmnt != particles.end();
++elmnt
)
forAllConstIter(discretePhase, particles, iter)
{
gmvFile << elmnt().position().z() << " ";
gmvFile << iter().position().z() << " ";
}
gmvFile << nl;
gmvFile << "U" << nl;
for
(
discretePhase::iterator elmnt = particles.begin();
elmnt != particles.end();
++elmnt
)
forAllConstIter(discretePhase, particles, iter)
{
gmvFile << elmnt().velocity().x() << " ";
gmvFile << iter().velocity().x() << " ";
}
gmvFile << nl;
gmvFile << "V" << nl;
for
(
discretePhase::iterator elmnt = particles.begin();
elmnt != particles.end();
++elmnt
)
forAllConstIter(discretePhase, particles, iter)
{
gmvFile << elmnt().velocity().y() << " ";
gmvFile << iter().velocity().y() << " ";
}
gmvFile << nl;
gmvFile << "W" << nl;
for
(
discretePhase::iterator elmnt = particles.begin();
elmnt != particles.end();
++elmnt
)
forAllConstIter(discretePhase, particles, iter)
{
gmvFile << elmnt().velocity().z() << " ";
{
gmvFile << iter().velocity().z() << " ";
}
gmvFile << nl;
gmvFile << "Diam" << nl;
for
(
discretePhase::iterator elmnt = particles.begin();
elmnt != particles.end();
++elmnt
)
forAllConstIter(discretePhase, particles, iter)
{
gmvFile << elmnt().d() << " ";
gmvFile << iter().d() << " ";
}
gmvFile << "endtrace"<< nl;

View File

@ -1,32 +1,19 @@
gmvFile << "tracers " << particles.size() << nl;
for
(
Cloud<passiveParticle>::iterator elmnt = particles.begin();
elmnt != particles.end();
++elmnt
)
forAllConstIter(Cloud<passiveParticle>, particles, iter)
{
gmvFile << elmnt().position().x() << " ";
gmvFile << iter().position().x() << " ";
}
gmvFile << nl;
for
(
Cloud<passiveParticle>::iterator elmnt = particles.begin();
elmnt != particles.end();
++elmnt
)
forAllConstIter(Cloud<passiveParticle>, particles, iter)
{
gmvFile << elmnt().position().y() << " ";
gmvFile << iter().position().y() << " ";
}
gmvFile << nl;
for
(
Cloud<passiveParticles>::iterator elmnt = particles.begin();
elmnt != particles.end();
++elmnt
)
forAllConstIter(Cloud<passiveParticle>, particles, iter)
{
gmvFile << elmnt().position().z() << " ";
gmvFile << iter().position().z() << " ";
}
gmvFile << nl;
@ -51,15 +38,13 @@ forAll(lagrangianScalarNames, i)
{
gmvFile << name << nl;
for (label n = 0; n < s.size(); n++)
forAll(s, n)
{
gmvFile << s[n] << token::SPACE;
}
gmvFile << nl;
}
}
gmvFile << "endtrace"<< nl;

View File

@ -1,2 +1,3 @@
gmvFile << "probtime " << runTime.timeName() << nl;
gmvFile << "endgmv" << nl;
gmvFile
<< "probtime " << runTime.timeName() << nl
<< "endgmv" << nl;

View File

@ -26,13 +26,14 @@ word format
conversionProperties.lookup("format")
);
if ( (format != "ascii") && (format != "ieeei4r8") )
if ((format != "ascii") && (format != "ieeei4r8"))
{
FatalError << "format type: " << format << " unknown."
<< " Valid options are: ascii ieeei4r8"
<< abort(FatalError);
}
word cells
(
conversionProperties.lookup("cells")

View File

@ -50,12 +50,7 @@ void readFields
label nFields = fields.size();
fields.setSize(nFields + fieldObjects.size());
for
(
IOobjectList::iterator iter = fieldObjects.begin();
iter != fieldObjects.end();
++iter
)
forAllIter(IOobjectList, fieldObjects, iter)
{
if (selectedFields.empty() || selectedFields.found(iter()->name()))
{

View File

@ -50,12 +50,7 @@ void readFields
fields.setSize(fieldObjects.size());
label nFields = 0;
for
(
IOobjectList::iterator iter = fieldObjects.begin();
iter != fieldObjects.end();
++iter
)
forAllIter(IOobjectList, fieldObjects, iter)
{
if (selectedFields.empty() || selectedFields.found(iter()->name()))
{

View File

@ -27,14 +27,9 @@ License
#include "OFstream.H"
#include "writeFuns.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
// * * * * * * * * * * * * * * * Global Functions * * * * * * * * * * * * * //
void writeFaceSet
void Foam::writeFaceSet
(
const bool binary,
const vtkMesh& vMesh,
@ -73,12 +68,7 @@ void writeFaceSet
labelList setFaceLabels(set.size());
label setFaceI = 0;
for
(
faceSet::const_iterator iter = set.begin();
iter != set.end();
++iter
)
forAllConstIter(faceSet, set, iter)
{
setFaceLabels[setFaceI] = iter.key();
setFaces[setFaceI] = faces[iter.key()];
@ -139,8 +129,5 @@ void writeFaceSet
writeFuns::write(pStream, binary, setFaceLabels);
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// ************************************************************************* //

View File

@ -187,7 +187,6 @@ protected:
);
//- Get the mesh/fields for a particular time
//- Destructor
virtual int RequestData
(
vtkInformation*,

View File

@ -693,8 +693,7 @@ public:
//- Destructor
~vtkPV3Foam();
~vtkPV3Foam();
// Member Functions

View File

@ -312,8 +312,7 @@ public:
//- Destructor
~vtkPV3blockMesh();
~vtkPV3blockMesh();
// Member Functions

View File

@ -47,19 +47,13 @@ int USERD_get_part_coords
}
else if (part_number == nPatches+2)
{
label indx = 1;
for
(
Cloud<passiveParticle>::iterator elmnt = sprayPtr->begin();
elmnt != sprayPtr->end();
++elmnt
)
forAllConstIter(Cloud<passiveParticle>, *sprayPtr, iter)
{
coord_array[0][indx] = (float)elmnt().position().x();
coord_array[1][indx] = (float)elmnt().position().y();
coord_array[2][indx] = (float)elmnt().position().z();
coord_array[0][indx] = (float)iter().position().x();
coord_array[1][indx] = (float)iter().position().y();
coord_array[2][indx] = (float)iter().position().z();
indx++;
}

View File

@ -17,7 +17,7 @@ int USERD_get_part_node_ids
nodeid_array[indx] = indx + 1;
}
}
else if (part_number < nPatches+2)
else if (part_number < nPatches+2)
{
label patchi = part_number-2;
@ -32,18 +32,14 @@ int USERD_get_part_node_ids
}
}
else if (part_number == nPatches+2)
else if (part_number == nPatches+2)
{
label indx = 0;
for
(
Cloud<passiveParticle>::iterator elmnt = sprayPtr->begin();
elmnt != sprayPtr->end();
++elmnt
)
forAllConstIter(Cloud<passiveParticle>, *sprayPtr, iter)
{
nodeid_array[indx] = indx + 1;
indx++;
nodeid_array[indx] = indx + 1;
indx++;
}
}
else

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