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

Conflicts:
	src/parallel/decompose/scotchDecomp/scotchDecomp.C
This commit is contained in:
mattijs
2010-06-04 16:09:16 +01:00
1046 changed files with 4231 additions and 1807 deletions

View File

@ -29,14 +29,9 @@ License
#include "volFields.H"
#include "mathematicalConstants.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
smoluchowskiJumpTFvPatchScalarField::smoluchowskiJumpTFvPatchScalarField
Foam::smoluchowskiJumpTFvPatchScalarField::smoluchowskiJumpTFvPatchScalarField
(
const fvPatch& p,
const DimensionedField<scalar, volMesh>& iF
@ -52,7 +47,8 @@ smoluchowskiJumpTFvPatchScalarField::smoluchowskiJumpTFvPatchScalarField
valueFraction() = 0.0;
}
smoluchowskiJumpTFvPatchScalarField::smoluchowskiJumpTFvPatchScalarField
Foam::smoluchowskiJumpTFvPatchScalarField::smoluchowskiJumpTFvPatchScalarField
(
const smoluchowskiJumpTFvPatchScalarField& ptf,
const fvPatch& p,
@ -67,7 +63,7 @@ smoluchowskiJumpTFvPatchScalarField::smoluchowskiJumpTFvPatchScalarField
{}
smoluchowskiJumpTFvPatchScalarField::smoluchowskiJumpTFvPatchScalarField
Foam::smoluchowskiJumpTFvPatchScalarField::smoluchowskiJumpTFvPatchScalarField
(
const fvPatch& p,
const DimensionedField<scalar, volMesh>& iF,
@ -118,7 +114,7 @@ smoluchowskiJumpTFvPatchScalarField::smoluchowskiJumpTFvPatchScalarField
}
smoluchowskiJumpTFvPatchScalarField::smoluchowskiJumpTFvPatchScalarField
Foam::smoluchowskiJumpTFvPatchScalarField::smoluchowskiJumpTFvPatchScalarField
(
const smoluchowskiJumpTFvPatchScalarField& ptpsf,
const DimensionedField<scalar, volMesh>& iF
@ -134,7 +130,7 @@ smoluchowskiJumpTFvPatchScalarField::smoluchowskiJumpTFvPatchScalarField
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
// Map from self
void smoluchowskiJumpTFvPatchScalarField::autoMap
void Foam::smoluchowskiJumpTFvPatchScalarField::autoMap
(
const fvPatchFieldMapper& m
)
@ -144,7 +140,7 @@ void smoluchowskiJumpTFvPatchScalarField::autoMap
// Reverse-map the given fvPatchField onto this fvPatchField
void smoluchowskiJumpTFvPatchScalarField::rmap
void Foam::smoluchowskiJumpTFvPatchScalarField::rmap
(
const fvPatchField<scalar>& ptf,
const labelList& addr
@ -155,7 +151,7 @@ void smoluchowskiJumpTFvPatchScalarField::rmap
// Update the coefficients associated with the patch field
void smoluchowskiJumpTFvPatchScalarField::updateCoeffs()
void Foam::smoluchowskiJumpTFvPatchScalarField::updateCoeffs()
{
if (updated())
{
@ -174,11 +170,16 @@ void smoluchowskiJumpTFvPatchScalarField::updateCoeffs()
// Prandtl number reading consistent with rhoCentralFoam
const dictionary& thermophysicalProperties =
db().lookupObject<IOdictionary>("thermophysicalProperties");
dimensionedScalar Pr = dimensionedScalar("Pr", dimless, 1.0);
if (thermophysicalProperties.found("Pr"))
{
Pr = thermophysicalProperties.lookup("Pr");
}
dimensionedScalar Pr
(
dimensionedScalar::lookupOrDefault
(
"Pr",
thermophysicalProperties,
1.0
)
);
Field<scalar> C2 = pmu/prho
*sqrt(ppsi*constant::mathematical::piByTwo)
@ -197,7 +198,7 @@ void smoluchowskiJumpTFvPatchScalarField::updateCoeffs()
// Write
void smoluchowskiJumpTFvPatchScalarField::write(Ostream& os) const
void Foam::smoluchowskiJumpTFvPatchScalarField::write(Ostream& os) const
{
fvPatchScalarField::write(os);
os.writeKeyword("accommodationCoeff")
@ -211,10 +212,12 @@ void smoluchowskiJumpTFvPatchScalarField::write(Ostream& os) const
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
makePatchTypeField(fvPatchScalarField, smoluchowskiJumpTFvPatchScalarField);
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
}
} // End namespace Foam
// ************************************************************************* //

View File

@ -1,7 +1,6 @@
word fluxScheme("Kurganov");
if (mesh.schemesDict().found("fluxScheme"))
if (mesh.schemesDict().readIfPresent("fluxScheme", fluxScheme))
{
fluxScheme = word(mesh.schemesDict().lookup("fluxScheme"));
if ((fluxScheme == "Tadmor") || (fluxScheme == "Kurganov"))
{
Info<< "fluxScheme: " << fluxScheme << endl;

View File

@ -14,9 +14,13 @@ IOdictionary thermophysicalProperties
)
);
dimensionedScalar Pr = dimensionedScalar("Pr", dimless, 1.0);
dimensionedScalar Pr
(
dimensionedScalar::lookupOrDefault
(
"Pr",
thermophysicalProperties,
1.0
)
);
if (thermophysicalProperties.found("Pr"))
{
Pr = thermophysicalProperties.lookup("Pr");
}

View File

@ -70,22 +70,13 @@
dimensionedScalar initialMass = fvc::domainIntegrate(rho);
thermalPorousZones pZones(mesh);
Switch pressureImplicitPorosity(false);
// nUCorrectors used for pressureImplicitPorosity
int nUCorr = 0;
if (pZones.size())
{
// nUCorrectors for pressureImplicitPorosity
if (mesh.solutionDict().subDict("SIMPLE").found("nUCorrectors"))
{
nUCorr = readInt
const bool pressureImplicitPorosity =
(
mesh.solutionDict().subDict("SIMPLE").lookup("nUCorrectors")
pZones.size()
&& mesh.solutionDict().subDict("SIMPLE").readIfPresent("nUCorrectors", nUCorr)
&& (nUCorr > 0)
);
}
if (nUCorr > 0)
{
pressureImplicitPorosity = true;
}
}

View File

@ -26,8 +26,13 @@
dimensionedScalar gamma = Cp/Cv;
dimensionedScalar Pr = dimensionedScalar("Pr", dimless, 1.0);
if (thermodynamicProperties.found("Pr"))
{
Pr = thermodynamicProperties.lookup("Pr");
}
dimensionedScalar Pr
(
dimensionedScalar::lookupOrDefault
(
"Pr",
thermodynamicProperties,
1.0
)
);

View File

@ -1,3 +1,4 @@
const dictionary& Bpiso = mesh.solutionDict().subDict("BPISO");
const dictionary& Bpiso = mesh.solutionDict().subDict("BPISO");
const int nBcorr = Bpiso.lookupOrDefault<int>("nCorrectors", 1);
int nBcorr(readInt(Bpiso.lookup("nCorrectors")));

View File

@ -1,25 +1,11 @@
dictionary simple = fluidRegions[i].solutionDict().subDict("SIMPLE");
const dictionary& simple = fluidRegions[i].solutionDict().subDict("SIMPLE");
int nNonOrthCorr = 0;
if (simple.found("nNonOrthogonalCorrectors"))
{
nNonOrthCorr = readInt(simple.lookup("nNonOrthogonalCorrectors"));
}
const int nNonOrthCorr =
simple.lookupOrDefault<int>("nNonOrthogonalCorrectors", 0);
bool momentumPredictor = true;
if (simple.found("momentumPredictor"))
{
momentumPredictor = Switch(simple.lookup("momentumPredictor"));
}
const bool momentumPredictor =
simple.lookupOrDefault("momentumPredictor", true);
bool fluxGradp = false;
if (simple.found("fluxGradp"))
{
fluxGradp = Switch(simple.lookup("fluxGradp"));
}
const bool transonic =
simple.lookupOrDefault("transonic", false);
bool transonic = false;
if (simple.found("transonic"))
{
transonic = Switch(simple.lookup("transonic"));
}

View File

@ -1,7 +1,5 @@
dictionary simple = solidRegions[i].solutionDict().subDict("SIMPLE");
const dictionary& simple = solidRegions[i].solutionDict().subDict("SIMPLE");
const int nNonOrthCorr =
simple.lookupOrDefault<int>("nNonOrthogonalCorrectors", 0);
int nNonOrthCorr = 0;
if (simple.found("nNonOrthogonalCorrectors"))
{
nNonOrthCorr = readInt(simple.lookup("nNonOrthogonalCorrectors"));
}

View File

@ -1,9 +1,11 @@
const dictionary& pimple = mesh.solutionDict().subDict("PIMPLE");
int nCorr(readInt(pimple.lookup("nCorrectors")));
const int nCorr =
pimple.lookupOrDefault<int>("nCorrectors", 1);
int nNonOrthCorr =
const int nNonOrthCorr =
pimple.lookupOrDefault<int>("nNonOrthogonalCorrectors", 0);
bool momentumPredictor =
pimple.lookupOrDefault<Switch>("momentumPredictor", true);
const bool momentumPredictor =
pimple.lookupOrDefault("momentumPredictor", true);

View File

@ -1,27 +1,17 @@
dictionary piso = fluidRegions[i].solutionDict().subDict("PISO");
const dictionary& piso = fluidRegions[i].solutionDict().subDict("PISO");
int nCorr(readInt(piso.lookup("nCorrectors")));
const int nOuterCorr =
piso.lookupOrDefault<int>("nOuterCorrectors", 1);
int nNonOrthCorr = 0;
if (piso.found("nNonOrthogonalCorrectors"))
{
nNonOrthCorr = readInt(piso.lookup("nNonOrthogonalCorrectors"));
}
const int nCorr =
piso.lookupOrDefault<int>("nCorrectors", 1);
bool momentumPredictor = true;
if (piso.found("momentumPredictor"))
{
momentumPredictor = Switch(piso.lookup("momentumPredictor"));
}
const int nNonOrthCorr =
piso.lookupOrDefault<int>("nNonOrthogonalCorrectors", 0);
bool transonic = false;
if (piso.found("transonic"))
{
transonic = Switch(piso.lookup("transonic"));
}
const bool momentumPredictor =
piso.lookupOrDefault("momentumPredictor", true);
const bool transonic =
piso.lookupOrDefault("transonic", false);
int nOuterCorr = 1;
if (piso.found("nOuterCorrectors"))
{
nOuterCorr = readInt(piso.lookup("nOuterCorrectors"));
}

View File

@ -4,4 +4,6 @@
const dictionary& pimple = solutionDict.subDict("PIMPLE");
int nOuterCorr(readInt(pimple.lookup("nOuterCorrectors")));
const int nOuterCorr =
pimple.lookupOrDefault<int>("nOuterCorrectors", 1);

View File

@ -1,7 +1,5 @@
const dictionary& piso = solidRegions[i].solutionDict().subDict("PISO");
int nNonOrthCorr = 0;
if (piso.found("nNonOrthogonalCorrectors"))
{
nNonOrthCorr = readInt(piso.lookup("nNonOrthogonalCorrectors"));
}
const int nNonOrthCorr =
piso.lookupOrDefault<int>("nNonOrthogonalCorrectors", 0);

View File

@ -1,14 +1,9 @@
#include "readTimeControls.H"
#include "readPIMPLEControls.H"
bool correctPhi = false;
if (pimple.found("correctPhi"))
{
correctPhi = Switch(pimple.lookup("correctPhi"));
}
const bool correctPhi =
pimple.lookupOrDefault("correctPhi", false);
const bool checkMeshCourantNo =
pimple.lookupOrDefault("checkMeshCourantNo", false);
bool checkMeshCourantNo = false;
if (pimple.found("checkMeshCourantNo"))
{
checkMeshCourantNo = Switch(pimple.lookup("checkMeshCourantNo"));
}

View File

@ -43,22 +43,13 @@
porousZones pZones(mesh);
Switch pressureImplicitPorosity(false);
// nUCorrectors used for pressureImplicitPorosity
int nUCorr = 0;
if (pZones.size())
{
// nUCorrectors for pressureImplicitPorosity
if (mesh.solutionDict().subDict("SIMPLE").found("nUCorrectors"))
{
nUCorr = readInt
const bool pressureImplicitPorosity =
(
mesh.solutionDict().subDict("SIMPLE").lookup("nUCorrectors")
pZones.size()
&& mesh.solutionDict().subDict("SIMPLE").readIfPresent("nUCorrectors", nUCorr)
&& (nUCorr > 0)
);
}
if (nUCorr > 0)
{
pressureImplicitPorosity = true;
}
}

View File

@ -96,7 +96,7 @@
)
);
if (RASProperties.lookupOrDefault<Switch>("printCoeffs", false))
if (RASProperties.lookupOrDefault("printCoeffs", false))
{
Info<< "kEpsilonCoeffs" << kEpsilonDict << nl
<< "wallFunctionCoeffs" << wallFunctionDict << endl;

View File

@ -19,14 +19,9 @@
<< exit(FatalError);
}
bool correctPhi = true;
if (piso.found("correctPhi"))
{
correctPhi = Switch(piso.lookup("correctPhi"));
}
const bool correctPhi =
piso.lookupOrDefault("correctPhi", true);
const bool checkMeshCourantNo =
piso.lookupOrDefault("checkMeshCourantNo", false);
bool checkMeshCourantNo = false;
if (piso.found("checkMeshCourantNo"))
{
checkMeshCourantNo = Switch(piso.lookup("checkMeshCourantNo"));
}

View File

@ -1,14 +1,9 @@
# include "readTimeControls.H"
# include "readPISOControls.H"
bool correctPhi = true;
if (piso.found("correctPhi"))
{
correctPhi = Switch(piso.lookup("correctPhi"));
}
const bool correctPhi =
piso.lookupOrDefault("correctPhi", true);
const bool checkMeshCourantNo =
piso.lookupOrDefault("checkMeshCourantNo", false);
bool checkMeshCourantNo = false;
if (piso.found("checkMeshCourantNo"))
{
checkMeshCourantNo = Switch(piso.lookup("checkMeshCourantNo"));
}

View File

@ -276,7 +276,7 @@
)
);
if (RASProperties.lookupOrDefault<Switch>("printCoeffs", false))
if (RASProperties.lookupOrDefault("printCoeffs", false))
{
Info<< "kEpsilonCoeffs" << kEpsilonDict << nl
<< "wallFunctionCoeffs" << wallFunctionDict << endl;

View File

@ -175,10 +175,8 @@
);
word dragPhase("blended");
if (interfacialProperties.found("dragPhase"))
if (interfacialProperties.readIfPresent("dragPhase", dragPhase))
{
dragPhase = word(interfacialProperties.lookup("dragPhase"));
bool validDrag =
dragPhase == "a" || dragPhase == "b" || dragPhase == "blended";

View File

@ -1,5 +1,6 @@
const dictionary& stressControl = mesh.solutionDict().subDict("stressAnalysis");
int nCorr(readInt(stressControl.lookup("nCorrectors")));
const int nCorr = stressControl.lookupOrDefault<int>("nCorrectors", 1);
scalar convergenceTolerance(readScalar(stressControl.lookup("D")));
Switch compactNormalStress(stressControl.lookup("compactNormalStress"));

View File

@ -1,10 +1,10 @@
/*-------------------------------*- C++ -*---------------------------------*\
| ========= |
| \\ / OpenFOAM |
| \\ / |
| \\ / The Open Source CFD Toolbox |
| \\/ http://www.OpenFOAM.org |
\*-------------------------------------------------------------------------*/
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.6 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -1,10 +1,10 @@
/*-------------------------------*- C++ -*---------------------------------*\
| ========= |
| \\ / OpenFOAM |
| \\ / |
| \\ / The Open Source CFD Toolbox |
| \\/ http://www.OpenFOAM.org |
\*-------------------------------------------------------------------------*/
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.6 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;

View File

@ -1,10 +1,10 @@
/*-------------------------------*- C++ -*---------------------------------*\
| ========= |
| \\ / OpenFOAM |
| \\ / |
| \\ / The Open Source CFD Toolbox |
| \\/ http://www.OpenFOAM.org |
\*-------------------------------------------------------------------------*/
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.6 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -2,7 +2,7 @@
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.6 |
| \\ / A nd | Web: http://www.OpenFOAM.org |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile

View File

@ -2,7 +2,7 @@
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.6 |
| \\ / A nd | Web: http://www.OpenFOAM.org |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
(

View File

@ -1,10 +1,10 @@
/*-------------------------------*- C++ -*---------------------------------*\
| ========= |
| \\ / OpenFOAM |
| \\ / |
| \\ / The Open Source CFD Toolbox |
| \\/ http://www.OpenFOAM.org |
\*-------------------------------------------------------------------------*/
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.6 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -2,7 +2,7 @@
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.6 |
| \\ / A nd | Web: http://www.OpenFOAM.org |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile

View File

@ -2,7 +2,7 @@
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.6 |
| \\ / A nd | Web: http://www.OpenFOAM.org |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile

View File

@ -2,7 +2,7 @@
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.6 |
| \\ / A nd | Web: http://www.OpenFOAM.org |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile

View File

@ -579,12 +579,17 @@ void ReadCells
int main(int argc, char *argv[])
{
argList::addNote
(
"read CCM files as written by proSTAR/ccm\n"
" - does not handle 'interfaces' (couples), cyclics or data\n"
" - does not handle mesh regions (porosity, solids, ...)\n"
);
argList::noParallel();
argList::validArgs.append("ccm26 file");
# include "setRootCase.H"
# include "createTime.H"
argList::validArgs.append("ccmFile");
#include "setRootCase.H"
#include "createTime.H"
// Foam mesh data
// ~~~~~~~~~~~~~~
@ -615,6 +620,7 @@ int main(int argc, char *argv[])
{
const fileName ccmFile = args[1];
const word ccmExt = ccmFile.ext();
if (!isFile(ccmFile))
{
@ -623,8 +629,6 @@ int main(int argc, char *argv[])
<< exit(FatalError);
}
word ccmExt = ccmFile.ext();
if (ccmExt != "ccm" && ccmExt != "ccmg")
{
FatalErrorIn(args.executable())

View File

@ -90,7 +90,7 @@ cellShape create3DCellShape
// make a list of outward-pointing faces
labelListList localFaces(faceLabels.size());
forAll (faceLabels, faceI)
forAll(faceLabels, faceI)
{
const label curFaceLabel = faceLabels[faceI];

View File

@ -62,6 +62,10 @@ using namespace Foam;
int main(int argc, char *argv[])
{
argList::addNote
(
"read OpenFOAM mesh and write a pro-STAR (v4) bnd/cel/vrt format"
);
argList::noParallel();
timeSelector::addOptions();
@ -74,7 +78,7 @@ int main(int argc, char *argv[])
argList::addBoolOption
(
"noBnd",
"suppress writing the .bnd file"
"suppress writing a boundary (.bnd) file"
);
# include "setRootCase.H"

View File

@ -38,8 +38,13 @@ Description
int main(int argc, char *argv[])
{
argList::addNote
(
"convert pro-STAR (v3) mesh to OpenFOAM"
);
argList::noParallel();
argList::validArgs.append("STAR mesh file prefix");
argList::validArgs.append("pro-STAR prefix");
argList::addOption
(
"scale",
@ -56,7 +61,7 @@ int main(int argc, char *argv[])
const scalar scaleFactor = args.optionLookupOrDefault("scale", 1.0);
# include "createTime.H"
#include "createTime.H"
starMesh makeMesh(args[1], runTime, scaleFactor);

View File

@ -59,6 +59,11 @@ using namespace Foam;
int main(int argc, char *argv[])
{
argList::addNote
(
"convert pro-STAR (v4) mesh to OpenFOAM"
);
argList::noParallel();
argList::validArgs.append("pro-STAR prefix");
argList::addBoolOption

View File

@ -2,7 +2,7 @@
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.6 |
| \\ / A nd | Web: http://www.OpenFOAM.org |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile

View File

@ -2,7 +2,7 @@
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.6 |
| \\ / A nd | Web: http://www.OpenFOAM.org |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile

View File

@ -2,7 +2,7 @@
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.6 |
| \\ / A nd | Web: http://www.OpenFOAM.org |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile

View File

@ -2,7 +2,7 @@
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.6 |
| \\ / A nd | Web: http://www.OpenFOAM.org |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile

View File

@ -881,9 +881,6 @@ Foam::meshDualiser::meshDualiser(const polyMesh& mesh)
{}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
void Foam::meshDualiser::setRefinement
@ -1469,14 +1466,4 @@ void Foam::meshDualiser::setRefinement
}
// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
// * * * * * * * * * * * * * * * Friend Functions * * * * * * * * * * * * * //
// * * * * * * * * * * * * * * * Friend Operators * * * * * * * * * * * * * //
// ************************************************************************* //

View File

@ -2,7 +2,7 @@
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.6 |
| \\ / A nd | Web: http://www.OpenFOAM.org |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile

View File

@ -2,7 +2,7 @@
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.6 |
| \\ / A nd | Web: http://www.OpenFOAM.org |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile

View File

@ -42,6 +42,12 @@ using namespace Foam;
int main(int argc, char *argv[])
{
argList::addNote
(
"Read the specified dictionary file, expand the macros etc. and write\n"
"the resulting dictionary to standard output."
);
argList::noBanner();
argList::noParallel();
argList::validArgs.append("inputDict");
@ -49,9 +55,10 @@ int main(int argc, char *argv[])
const string dictName = args[1];
Info<<"//\n// expansion of dictionary " << dictName << "\n//\n";
IOobject::writeBanner(Info)
<<"//\n// " << dictName << "\n//\n";
dictionary(IFstream(dictName)()).write(Info, false);
dictionary(IFstream(dictName)(), true).write(Info, false);
IOobject::writeDivider(Info);

View File

@ -64,11 +64,17 @@ Usage
#include "IOobjectList.H"
#include "domainDecomposition.H"
#include "labelIOField.H"
#include "labelFieldIOField.H"
#include "scalarIOField.H"
#include "scalarFieldIOField.H"
#include "vectorIOField.H"
#include "vectorFieldIOField.H"
#include "sphericalTensorIOField.H"
#include "sphericalTensorFieldIOField.H"
#include "symmTensorIOField.H"
#include "symmTensorFieldIOField.H"
#include "tensorIOField.H"
#include "tensorFieldIOField.H"
#include "pointFields.H"
#include "readFields.H"
@ -374,20 +380,42 @@ int main(int argc, char *argv[])
PtrList< List<SLList<indexedParticle*>*> > cellParticles(cloudDirs.size());
PtrList<PtrList<labelIOField> > lagrangianLabelFields(cloudDirs.size());
PtrList<PtrList<labelIOFieldField> > lagrangianLabelFieldFields
(
cloudDirs.size()
);
PtrList<PtrList<scalarIOField> > lagrangianScalarFields(cloudDirs.size());
PtrList<PtrList<scalarIOFieldField> > lagrangianScalarFieldFields
(
cloudDirs.size()
);
PtrList<PtrList<vectorIOField> > lagrangianVectorFields(cloudDirs.size());
PtrList<PtrList<vectorIOFieldField> > lagrangianVectorFieldFields
(
cloudDirs.size()
);
PtrList<PtrList<sphericalTensorIOField> > lagrangianSphericalTensorFields
(
cloudDirs.size()
);
PtrList<PtrList<sphericalTensorIOFieldField> >
lagrangianSphericalTensorFieldFields(cloudDirs.size());
PtrList<PtrList<symmTensorIOField> > lagrangianSymmTensorFields
(
cloudDirs.size()
);
PtrList<PtrList<symmTensorIOFieldField> > lagrangianSymmTensorFieldFields
(
cloudDirs.size()
);
PtrList<PtrList<tensorIOField> > lagrangianTensorFields
(
cloudDirs.size()
);
PtrList<PtrList<tensorIOFieldField> > lagrangianTensorFieldFields
(
cloudDirs.size()
);
label cloudI = 0;
@ -487,6 +515,13 @@ int main(int argc, char *argv[])
lagrangianLabelFields
);
lagrangianFieldDecomposer::readFieldFields
(
cloudI,
lagrangianObjects,
lagrangianLabelFieldFields
);
lagrangianFieldDecomposer::readFields
(
cloudI,
@ -494,6 +529,14 @@ int main(int argc, char *argv[])
lagrangianScalarFields
);
lagrangianFieldDecomposer::readFieldFields
(
cloudI,
lagrangianObjects,
lagrangianScalarFieldFields
);
lagrangianFieldDecomposer::readFields
(
cloudI,
@ -501,6 +544,13 @@ int main(int argc, char *argv[])
lagrangianVectorFields
);
lagrangianFieldDecomposer::readFieldFields
(
cloudI,
lagrangianObjects,
lagrangianVectorFieldFields
);
lagrangianFieldDecomposer::readFields
(
cloudI,
@ -508,6 +558,13 @@ int main(int argc, char *argv[])
lagrangianSphericalTensorFields
);
lagrangianFieldDecomposer::readFieldFields
(
cloudI,
lagrangianObjects,
lagrangianSphericalTensorFieldFields
);
lagrangianFieldDecomposer::readFields
(
cloudI,
@ -515,6 +572,13 @@ int main(int argc, char *argv[])
lagrangianSymmTensorFields
);
lagrangianFieldDecomposer::readFieldFields
(
cloudI,
lagrangianObjects,
lagrangianSymmTensorFieldFields
);
lagrangianFieldDecomposer::readFields
(
cloudI,
@ -522,6 +586,13 @@ int main(int argc, char *argv[])
lagrangianTensorFields
);
lagrangianFieldDecomposer::readFieldFields
(
cloudI,
lagrangianObjects,
lagrangianTensorFieldFields
);
cloudI++;
}
}
@ -529,11 +600,17 @@ int main(int argc, char *argv[])
lagrangianPositions.setSize(cloudI);
cellParticles.setSize(cloudI);
lagrangianLabelFields.setSize(cloudI);
lagrangianLabelFieldFields.setSize(cloudI);
lagrangianScalarFields.setSize(cloudI);
lagrangianScalarFieldFields.setSize(cloudI);
lagrangianVectorFields.setSize(cloudI);
lagrangianVectorFieldFields.setSize(cloudI);
lagrangianSphericalTensorFields.setSize(cloudI);
lagrangianSphericalTensorFieldFields.setSize(cloudI);
lagrangianSymmTensorFields.setSize(cloudI);
lagrangianSymmTensorFieldFields.setSize(cloudI);
lagrangianTensorFields.setSize(cloudI);
lagrangianTensorFieldFields.setSize(cloudI);
// Any uniform data to copy/link?
@ -725,11 +802,17 @@ int main(int argc, char *argv[])
if
(
lagrangianLabelFields[cloudI].size()
|| lagrangianLabelFieldFields[cloudI].size()
|| lagrangianScalarFields[cloudI].size()
|| lagrangianScalarFieldFields[cloudI].size()
|| lagrangianVectorFields[cloudI].size()
|| lagrangianVectorFieldFields[cloudI].size()
|| lagrangianSphericalTensorFields[cloudI].size()
|| lagrangianSphericalTensorFieldFields[cloudI].size()
|| lagrangianSymmTensorFields[cloudI].size()
|| lagrangianSymmTensorFieldFields[cloudI].size()
|| lagrangianTensorFields[cloudI].size()
|| lagrangianTensorFieldFields[cloudI].size()
)
{
fieldDecomposer.decomposeFields
@ -737,31 +820,61 @@ int main(int argc, char *argv[])
cloudDirs[cloudI],
lagrangianLabelFields[cloudI]
);
fieldDecomposer.decomposeFieldFields
(
cloudDirs[cloudI],
lagrangianLabelFieldFields[cloudI]
);
fieldDecomposer.decomposeFields
(
cloudDirs[cloudI],
lagrangianScalarFields[cloudI]
);
fieldDecomposer.decomposeFieldFields
(
cloudDirs[cloudI],
lagrangianScalarFieldFields[cloudI]
);
fieldDecomposer.decomposeFields
(
cloudDirs[cloudI],
lagrangianVectorFields[cloudI]
);
fieldDecomposer.decomposeFieldFields
(
cloudDirs[cloudI],
lagrangianVectorFieldFields[cloudI]
);
fieldDecomposer.decomposeFields
(
cloudDirs[cloudI],
lagrangianSphericalTensorFields[cloudI]
);
fieldDecomposer.decomposeFieldFields
(
cloudDirs[cloudI],
lagrangianSphericalTensorFieldFields[cloudI]
);
fieldDecomposer.decomposeFields
(
cloudDirs[cloudI],
lagrangianSymmTensorFields[cloudI]
);
fieldDecomposer.decomposeFieldFields
(
cloudDirs[cloudI],
lagrangianSymmTensorFieldFields[cloudI]
);
fieldDecomposer.decomposeFields
(
cloudDirs[cloudI],
lagrangianTensorFields[cloudI]
);
fieldDecomposer.decomposeFieldFields
(
cloudDirs[cloudI],
lagrangianTensorFieldFields[cloudI]
);
}
}
}

View File

@ -1,10 +1,10 @@
/*-------------------------------*- C++ -*---------------------------------*\
| ========= |
| \\ / OpenFOAM |
| \\ / |
| \\ / The Open Source CFD Toolbox |
| \\/ http://www.OpenFOAM.org |
\*-------------------------------------------------------------------------*/
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.6 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;

View File

@ -112,11 +112,7 @@ Foam::domainDecomposition::domainDecomposition(const IOobject& io)
procProcessorPatchSubPatchIDs_(nProcs_),
procProcessorPatchSubPatchStarts_(nProcs_)
{
if (decompositionDict_.found("distributed"))
{
Switch distributed(decompositionDict_.lookup("distributed"));
distributed_ = distributed;
}
decompositionDict_.readIfPresent("distributed", distributed_);
}

View File

@ -130,7 +130,7 @@ void Foam::domainDecomposition::decomposeMesh()
procFaceAddressing_.setSize(nProcs_);
// Internal faces
forAll (neighbour, facei)
forAll(neighbour, facei)
{
if (cellToProc_[owner[facei]] == cellToProc_[neighbour[facei]])
{
@ -141,16 +141,16 @@ void Foam::domainDecomposition::decomposeMesh()
// for all processors, set the size of start index and patch size
// lists to the number of patches in the mesh
forAll (procPatchSize_, procI)
forAll(procPatchSize_, procI)
{
procPatchSize_[procI].setSize(patches.size());
procPatchStartIndex_[procI].setSize(patches.size());
}
forAll (patches, patchi)
forAll(patches, patchi)
{
// Reset size and start index for all processors
forAll (procPatchSize_, procI)
forAll(procPatchSize_, procI)
{
procPatchSize_[procI][patchi] = 0;
procPatchStartIndex_[procI][patchi] =
@ -167,7 +167,7 @@ void Foam::domainDecomposition::decomposeMesh()
const unallocLabelList& patchFaceCells =
patches[patchi].faceCells();
forAll (patchFaceCells, facei)
forAll(patchFaceCells, facei)
{
const label curProc = cellToProc_[patchFaceCells[facei]];
@ -190,7 +190,7 @@ void Foam::domainDecomposition::decomposeMesh()
const unallocLabelList& nbrPatchFaceCells =
pp.neighbPatch().faceCells();
forAll (patchFaceCells, facei)
forAll(patchFaceCells, facei)
{
const label curProc = cellToProc_[patchFaceCells[facei]];
const label nbrProc = cellToProc_[nbrPatchFaceCells[facei]];
@ -216,7 +216,7 @@ void Foam::domainDecomposition::decomposeMesh()
List<DynamicList<DynamicList<label> > > interPatchFaces(nProcs_);
// Processor boundaries from internal faces
forAll (neighbour, facei)
forAll(neighbour, facei)
{
label ownerProc = cellToProc_[owner[facei]];
label nbrProc = cellToProc_[neighbour[facei]];
@ -249,7 +249,7 @@ void Foam::domainDecomposition::decomposeMesh()
}
// Processor boundaries from split cyclics
forAll (patches, patchi)
forAll(patches, patchi)
{
if (isA<cyclicPolyPatch>(patches[patchi]))
{
@ -279,7 +279,7 @@ void Foam::domainDecomposition::decomposeMesh()
}
// Add faces with different owner and neighbour processors
forAll (patchFaceCells, facei)
forAll(patchFaceCells, facei)
{
const label ownerProc = cellToProc_[patchFaceCells[facei]];
const label nbrProc = cellToProc_[nbrPatchFaceCells[facei]];

View File

@ -37,6 +37,7 @@ SourceFiles
#define lagrangianFieldDecomposer_H
#include "Cloud.H"
#include "IOFieldField.H"
#include "indexedParticle.H"
#include "passiveParticle.H"
@ -102,6 +103,19 @@ public:
// PtrList<IOField<Type> >& lagrangianFields
);
template<class Type>
static void readFieldFields
(
const label cloudI,
const IOobjectList& lagrangianObjects,
PtrList
<
PtrList<IOFieldField<Field<Type>, Type> >
>& lagrangianFields
// PtrList<IOFieldField<Field<Type>, Type > >& lagrangianFields
);
//- Decompose volume field
template<class Type>
tmp<IOField<Type> > decomposeField
@ -110,12 +124,27 @@ public:
const IOField<Type>& field
) const;
template<class Type>
tmp<IOFieldField<Field<Type>, Type> > decomposeFieldField
(
const word& cloudName,
const IOFieldField<Field<Type>, Type>& field
) const;
template<class GeoField>
void decomposeFields
(
const word& cloudName,
const PtrList<GeoField>& fields
) const;
template<class GeoField>
void decomposeFieldFields
(
const word& cloudName,
const PtrList<GeoField>& fields
) const;
};

View File

@ -63,6 +63,56 @@ void Foam::lagrangianFieldDecomposer::readFields
}
template<class Type>
void Foam::lagrangianFieldDecomposer::readFieldFields
(
const label cloudI,
const IOobjectList& lagrangianObjects,
PtrList<PtrList<IOFieldField<Field<Type>, Type> > >& lagrangianFields
)
{
// Search list of objects for lagrangian fields
IOobjectList lagrangianTypeObjectsA
(
lagrangianObjects.lookupClass(IOField<Field<Type> >::typeName)
);
IOobjectList lagrangianTypeObjectsB
(
lagrangianObjects.lookupClass(IOFieldField<Field<Type>, Type>::typeName)
);
lagrangianFields.set
(
cloudI,
new PtrList<IOFieldField<Field<Type>, Type> >
(
lagrangianTypeObjectsA.size() + lagrangianTypeObjectsB.size()
)
);
label lagrangianFieldi=0;
forAllIter(IOobjectList, lagrangianTypeObjectsA, iter)
{
lagrangianFields[cloudI].set
(
lagrangianFieldi++,
new IOFieldField<Field<Type>, Type>(*iter())
);
}
forAllIter(IOobjectList, lagrangianTypeObjectsB, iter)
{
lagrangianFields[cloudI].set
(
lagrangianFieldi++,
new IOFieldField<Field<Type>, Type>(*iter())
);
}
}
template<class Type>
Foam::tmp<Foam::IOField<Type> >
Foam::lagrangianFieldDecomposer::decomposeField
@ -94,6 +144,37 @@ Foam::lagrangianFieldDecomposer::decomposeField
}
template<class Type>
Foam::tmp<Foam::IOFieldField<Foam::Field<Type>, Type> >
Foam::lagrangianFieldDecomposer::decomposeFieldField
(
const word& cloudName,
const IOFieldField<Field<Type>, Type>& field
) const
{
// Create and map the internal field values
Field<Field<Type> > procField(field, particleIndices_);
// Create the field for the processor
return tmp<IOFieldField<Field<Type>, Type> >
(
new IOFieldField<Field<Type>, Type>
(
IOobject
(
field.name(),
procMesh_.time().timeName(),
cloud::prefix/cloudName,
procMesh_,
IOobject::NO_READ,
IOobject::NO_WRITE
),
procField
)
);
}
template<class GeoField>
void Foam::lagrangianFieldDecomposer::decomposeFields
(
@ -111,4 +192,21 @@ void Foam::lagrangianFieldDecomposer::decomposeFields
}
template<class GeoField>
void Foam::lagrangianFieldDecomposer::decomposeFieldFields
(
const word& cloudName,
const PtrList<GeoField>& fields
) const
{
if (particleIndices_.size())
{
forAll(fields, fieldI)
{
decomposeFieldField(cloudName, fields[fieldI])().write();
}
}
}
// ************************************************************************* //

View File

@ -402,6 +402,13 @@ int main(int argc, char *argv[])
procMeshes.meshes(),
sprayObjs
);
reconstructLagrangianFieldFields<label>
(
cloudName,
mesh,
procMeshes.meshes(),
sprayObjs
);
reconstructLagrangianFields<scalar>
(
cloudName,
@ -409,6 +416,13 @@ int main(int argc, char *argv[])
procMeshes.meshes(),
sprayObjs
);
reconstructLagrangianFieldFields<scalar>
(
cloudName,
mesh,
procMeshes.meshes(),
sprayObjs
);
reconstructLagrangianFields<vector>
(
cloudName,
@ -416,6 +430,13 @@ int main(int argc, char *argv[])
procMeshes.meshes(),
sprayObjs
);
reconstructLagrangianFieldFields<vector>
(
cloudName,
mesh,
procMeshes.meshes(),
sprayObjs
);
reconstructLagrangianFields<sphericalTensor>
(
cloudName,
@ -423,6 +444,13 @@ int main(int argc, char *argv[])
procMeshes.meshes(),
sprayObjs
);
reconstructLagrangianFieldFields<sphericalTensor>
(
cloudName,
mesh,
procMeshes.meshes(),
sprayObjs
);
reconstructLagrangianFields<symmTensor>
(
cloudName,
@ -430,6 +458,13 @@ int main(int argc, char *argv[])
procMeshes.meshes(),
sprayObjs
);
reconstructLagrangianFieldFields<symmTensor>
(
cloudName,
mesh,
procMeshes.meshes(),
sprayObjs
);
reconstructLagrangianFields<tensor>
(
cloudName,
@ -437,6 +472,13 @@ int main(int argc, char *argv[])
procMeshes.meshes(),
sprayObjs
);
reconstructLagrangianFieldFields<tensor>
(
cloudName,
mesh,
procMeshes.meshes(),
sprayObjs
);
}
}
else

View File

@ -2,7 +2,7 @@
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.6 |
| \\ / A nd | Web: http://www.OpenFOAM.org |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile

View File

@ -2,7 +2,7 @@
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.6 |
| \\ / A nd | Web: http://www.OpenFOAM.org |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile

View File

@ -2,7 +2,7 @@
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.6 |
| \\ / A nd | Web: http://www.OpenFOAM.org |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile

View File

@ -1,10 +1,10 @@
/*-------------------------------*- C++ -*---------------------------------*\
| ========= |
| \\ / OpenFOAM 1.4.1 |
| \\ / |
| \\ / The Open Source CFD Toolbox |
| \\/ http://www.OpenFOAM.org |
\*-------------------------------------------------------------------------*/
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.6 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;

View File

@ -2,7 +2,7 @@
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.6 |
| \\ / A nd | Web: http://www.OpenFOAM.org |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/

View File

@ -2,7 +2,7 @@
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.6 |
| \\ / A nd | Web: http://www.OpenFOAM.org |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile

View File

@ -2,7 +2,7 @@
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.6 |
| \\ / A nd | Web: http://www.OpenFOAM.org |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile

View File

@ -2,7 +2,7 @@
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.6 |
| \\ / A nd | Web: http://www.OpenFOAM.org |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile

View File

@ -2,7 +2,7 @@
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.6 |
| \\ / A nd | Web: http://www.OpenFOAM.org |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile

View File

@ -102,7 +102,7 @@ int main(int argc, char *argv[])
);
const bool invertSelection =
meshSubsetDict.lookupOrDefault<bool>("invertSelection", false);
meshSubsetDict.lookupOrDefault("invertSelection", false);
// Mark the cells for the subset

View File

@ -2,7 +2,7 @@
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.6 |
| \\ / A nd | Web: http://www.OpenFOAM.org |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile

View File

@ -2,7 +2,7 @@
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.6 |
| \\ / A nd | Web: http://www.OpenFOAM.org |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
Exec : adiabaticFlameT -case . controlDict

View File

@ -2,7 +2,7 @@
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.6 |
| \\ / A nd | Web: http://www.OpenFOAM.org |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
Exec : adiabaticFlameT -case . controlDict

View File

@ -2,7 +2,7 @@
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.6 |
| \\ / A nd | Web: http://www.OpenFOAM.org |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
Exec : adiabaticFlameT -case . controlDict

View File

@ -2,7 +2,7 @@
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.6 |
| \\ / A nd | Web: http://www.OpenFOAM.org |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile

View File

@ -2,7 +2,7 @@
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.6 |
| \\ / A nd | Web: http://www.OpenFOAM.org |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
Exec : equilibriumFlameT -case . controlDict

View File

@ -2,7 +2,7 @@
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.6 |
| \\ / A nd | Web: http://www.OpenFOAM.org |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile

1
bin/org-pdflatex Symbolic link
View File

@ -0,0 +1 @@
tools/org-batch

View File

@ -39,6 +39,7 @@ Usage: ${0##*/} [OPTIONS] file1 [.. fileN]
options:
-html create html (default)
-latex create LaTeX
-pdflatex create pdf via pdflatex
* Batch process emacs org-mode files to create html/LaTeX etc.
@ -49,8 +50,14 @@ USAGE
# default is html export:
mode=html
unset makePDF
echo "have $Script"
case $Script in
*pdflatex)
mode=latex
makePDF=pdflatex
;;
*latex)
mode=latex
;;
@ -59,7 +66,6 @@ case $Script in
;;
esac
# parse options
while [ "$#" -gt 0 ]
do
@ -75,6 +81,11 @@ do
mode=latex
shift
;;
-pdflatex)
mode=latex
makePDF=pdflatex
shift
;;
-*)
usage "unknown option: '$*'"
;;
@ -98,6 +109,21 @@ do
then
emacs --batch -l org --visit=$org \
--funcall org-export-as-$mode-batch
# post-processing step to create pdf
case "$makePDF" in
pdflatex)
input="${org%.org}.tex"
if [ -f "$input" ]
then
pdflatex "$input"
else
echo "No $input to convert to pdf"
fi
;;
esac
else
echo "File not found"
fi

View File

@ -2,7 +2,7 @@
#
#+TITLE: OpenFOAM C++ style guide
#+AUTHOR: OpenCFD Ltd.
#+DATE: May 2010
#+DATE: June 2010
#+LINK: http://www.opencfd.co.uk
#+OPTIONS: author:nil ^:{}
@ -13,9 +13,12 @@
+ The normal indentation is 4 spaces per logical level.
+ Use spaces for indentation, not tab characters.
+ Avoid trailing whitespace.
+ The body of control statements (eg, =if=, =else=, =while=, etc).
+ The body of control statements (eg, =if=, =else=, =while=, etc). is
always delineated with brace brackets. A possible exception can be
made with =break= or =continue= as part of a control structure.
made in conjunction with =break= or =continue= as part of a control
structure.
+ The body of =case= statements is usually delineated with brace brackets.
+ A fall-through =case= should be commented as such.
+ stream output
+ =<<= is always four characters after the start of the stream,
@ -132,22 +135,25 @@
+ Use two empty lines between functions
*** Coding Practice
+ passing data as arguments or return
Pass bool, label and scalar as copy, anything larger by reference.
+ passing data as arguments or return values.
+ Pass bool, label and scalar as copy, anything larger by reference.
+ const
Use everywhere it is applicable.
+ Use everywhere it is applicable.
+ variable initialisation using =
: const className& variableName = otherClass.data();
+ variable initialisation using
#+BEGIN_EXAMPLE
const className& variableName = otherClass.data();
#+END_EXAMPLE
NOT
: const className& variableName(otherClass.data());
#+BEGIN_EXAMPLE
const className& variableName(otherClass.data());
#+END_EXAMPLE
+ virtual functions
If a class is virtual - make all derived classes virtual.
+ If a class is virtual, make all derived classes virtual.
*** Conditional Statements
#+BEGIN_EXAMPLE
@ -169,7 +175,7 @@
}
#+END_EXAMPLE
NOT (no space between =if= and =(=)
NOT (no space between =if= and =(= used)
#+BEGIN_EXAMPLE
if(condition)
@ -201,7 +207,7 @@
}
#+END_EXAMPLE
NOT (no space between =for= and =(=)
NOT this (no space between =for= and =(= used)
#+BEGIN_EXAMPLE
for(i = 0; i < maxI; i++)
@ -349,7 +355,7 @@
* (k + t);
#+END_EXAMPLE
This is sometime more legible when surrounded by extra parentheses:
This is sometimes more legible when surrounded by extra parentheses:
#+BEGIN_EXAMPLE
variableName =
@ -437,15 +443,15 @@
*** Doxygen Special Commands
Doxygen has a large number of special commands with a '\' prefix or a
(alternatively) an '@' prefix.
Doxygen has a large number of special commands with a =\= prefix or
(alternatively) an =@= prefix.
The '@' prefix form is recommended for most Doxygen specials, since it
The =@= prefix form is recommended for most Doxygen specials, since it
has the advantage of standing out. It also happens to be what projects
like gcc and VTK are using.
The '\' prefix form, however, looks a bit better for the '\n' newline
command and when escaping single characters - eg, '\@', '\<', '\>', etc.
The =\= prefix form, however, looks a bit better for the =\n= newline
command and when escaping single characters - eg, =\@=, =\<=, =\>=, etc.
Since the filtering removes the leading 4 spaces within the blocks, the
Doxygen commmands can be inserted within the block without problems.
@ -514,7 +520,7 @@
#+END_EXAMPLE
*** Documenting Typedefs and classes defined via macros
*** Documenting typedefs and classes defined via macros
... not yet properly resolved

View File

@ -2,7 +2,7 @@
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.6 |
| \\ / A nd | Web: http://www.OpenFOAM.org |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/

View File

@ -2,7 +2,7 @@
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.6 |
| \\ / A nd | Web: http://www.OpenFOAM.org |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile

View File

@ -497,10 +497,15 @@ $(Fields)/scalarField/scalarFieldIOField.C
$(Fields)/vectorField/vectorIOField.C
$(Fields)/vectorField/vectorFieldIOField.C
$(Fields)/vector2DField/vector2DIOField.C
$(Fields)/vector2DField/vector2DFieldIOField.C
$(Fields)/sphericalTensorField/sphericalTensorIOField.C
$(Fields)/sphericalTensorField/sphericalTensorFieldIOField.C
$(Fields)/diagTensorField/diagTensorIOField.C
$(Fields)/diagTensorField/diagTensorFieldIOField.C
$(Fields)/symmTensorField/symmTensorIOField.C
$(Fields)/symmTensorField/symmTensorFieldIOField.C
$(Fields)/tensorField/tensorIOField.C
$(Fields)/tensorField/tensorFieldIOField.C
$(Fields)/transformField/transformField.C
pointPatchFields = fields/pointPatchFields

View File

@ -33,25 +33,25 @@ Foam::NamedEnum<Enum, nEnum>::NamedEnum()
:
HashTable<int>(2*nEnum)
{
for (int i=0; i<nEnum; i++)
for (int enumI = 0; enumI < nEnum; ++enumI)
{
if (!names[i] || names[i][0] == '\0')
if (!names[enumI] || names[enumI][0] == '\0')
{
stringList goodNames(i);
stringList goodNames(enumI);
for (int j = 0; j < i; j++)
for (int i = 0; i < enumI; ++i)
{
goodNames[j] = names[j];
goodNames[i] = names[i];
}
FatalErrorIn("NamedEnum<Enum, nEnum>::NamedEnum()")
<< "Illegal enumeration name at position " << i << endl
<< "Illegal enumeration name at position " << enumI << endl
<< "after entries " << goodNames << ".\n"
<< "Possibly your NamedEnum<Enum, nEnum>::names array"
<< " is not of size " << nEnum << endl
<< abort(FatalError);
}
insert(names[i], i);
insert(names[enumI], enumI);
}
}
@ -61,7 +61,7 @@ Foam::NamedEnum<Enum, nEnum>::NamedEnum()
template<class Enum, int nEnum>
Enum Foam::NamedEnum<Enum, nEnum>::read(Istream& is) const
{
word name(is);
const word name(is);
HashTable<int>::const_iterator iter = find(name);
@ -71,7 +71,7 @@ Enum Foam::NamedEnum<Enum, nEnum>::read(Istream& is) const
(
"NamedEnum<Enum, nEnum>::read(Istream&) const", is
) << name << " is not in enumeration: "
<< toc() << exit(FatalIOError);
<< sortedToc() << exit(FatalIOError);
}
return Enum(iter());

View File

@ -597,8 +597,9 @@ bool Foam::Time::end() const
}
void Foam::Time::stopAt(const stopAtControls sa) const
bool Foam::Time::stopAt(const stopAtControls sa) const
{
const bool changed = (stopAt_ != sa);
stopAt_ = sa;
// adjust endTime
@ -610,6 +611,7 @@ void Foam::Time::stopAt(const stopAtControls sa) const
{
endTime_ = GREAT;
}
return changed;
}

View File

@ -434,7 +434,8 @@ public:
//- Adjust the current stopAtControl. Note that this value
// only persists until the next time the dictionary is read.
virtual void stopAt(const stopAtControls) const;
// Return true if the stopAtControl changed.
virtual bool stopAt(const stopAtControls) const;
//- Reset the time and time-index to those of the given time
virtual void setTime(const Time&);

View File

@ -191,10 +191,14 @@ public:
Istream&
);
//- Construct top-level dictionary from Istream, reading entries
// until EOF
//- Construct top-level dictionary from Istream,
// reading entries until EOF
dictionary(Istream&);
//- Construct top-level dictionary from Istream,
// reading entries until EOF, optionally keeping the header
dictionary(Istream&, const bool keepHeader);
//- Construct as copy given the parent dictionary
dictionary(const dictionary& parentDict, const dictionary&);
@ -441,6 +445,9 @@ public:
//- Read dictionary from Istream
bool read(Istream&);
//- Read dictionary from Istream, optionally keeping the header
bool read(Istream&, const bool keepHeader);
// Write

View File

@ -28,68 +28,6 @@ License
#include "inputModeEntry.H"
#include "regExp.H"
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
bool Foam::dictionary::read(Istream& is)
{
if (!is.good())
{
FatalIOErrorIn("dictionary::read(Istream&, const word&)", is)
<< "Istream not OK for reading dictionary "
<< exit(FatalIOError);
return false;
}
token currToken(is);
if (currToken != token::BEGIN_BLOCK)
{
is.putBack(currToken);
}
while (!is.eof() && entry::New(*this, is))
{}
// Remove the FoamFile header entry if it exists
remove("FoamFile");
if (is.bad())
{
Info<< "dictionary::read(Istream&, const word&) : "
<< "Istream not OK after reading dictionary " << name()
<< endl;
return false;
}
return true;
}
bool Foam::dictionary::substituteKeyword(const word& keyword)
{
word varName = keyword(1, keyword.size()-1);
// lookup the variable name in the given dictionary
const entry* ePtr = lookupEntryPtr(varName, true, true);
// if defined insert its entries into this dictionary
if (ePtr != NULL)
{
const dictionary& addDict = ePtr->dict();
forAllConstIter(IDLList<entry>, addDict, iter)
{
add(iter());
}
return true;
}
return false;
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::dictionary::dictionary
@ -118,12 +56,97 @@ Foam::dictionary::dictionary(Istream& is)
}
Foam::dictionary::dictionary(Istream& is, const bool keepHeader)
:
dictionaryName(is.name()),
parent_(dictionary::null)
{
// Reset input mode as this is a "top-level" dictionary
functionEntries::inputModeEntry::clear();
read(is, keepHeader);
}
// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * //
Foam::autoPtr<Foam::dictionary> Foam::dictionary::New(Istream& is)
{
return autoPtr<dictionary>(new dictionary(is));
}
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
bool Foam::dictionary::read(Istream& is, const bool keepHeader)
{
if (!is.good())
{
FatalIOErrorIn("dictionary::read(Istream&, bool)", is)
<< "Istream not OK for reading dictionary "
<< exit(FatalIOError);
return false;
}
token currToken(is);
if (currToken != token::BEGIN_BLOCK)
{
is.putBack(currToken);
}
while (!is.eof() && entry::New(*this, is))
{}
// normally remove the FoamFile header entry if it exists
if (!keepHeader)
{
remove("FoamFile");
}
if (is.bad())
{
Info<< "dictionary::read(Istream&, bool) : "
<< "Istream not OK after reading dictionary " << name()
<< endl;
return false;
}
return true;
}
bool Foam::dictionary::read(Istream& is)
{
return this->read(is, false);
}
bool Foam::dictionary::substituteKeyword(const word& keyword)
{
word varName = keyword(1, keyword.size()-1);
// lookup the variable name in the given dictionary
const entry* ePtr = lookupEntryPtr(varName, true, true);
// if defined insert its entries into this dictionary
if (ePtr != NULL)
{
const dictionary& addDict = ePtr->dict();
forAllConstIter(IDLList<entry>, addDict, iter)
{
add(iter());
}
return true;
}
return false;
}
// * * * * * * * * * * * * * * Istream Operator * * * * * * * * * * * * * * //
Foam::Istream& Foam::operator>>(Istream& is, dictionary& dict)

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -68,17 +68,27 @@ Foam::outputFilterOutputControl::~outputFilterOutputControl()
void Foam::outputFilterOutputControl::read(const dictionary& dict)
{
if (dict.found("outputControl"))
{
outputControl_ = outputControlNames_.read(dict.lookup("outputControl"));
}
else
{
outputControl_ = ocTimeStep;
}
switch (outputControl_)
{
case ocTimeStep:
{
dict.lookup("outputInterval") >> outputInterval_;
outputInterval_ = dict.lookupOrDefault<label>("outputInterval", 0);
break;
}
default:
{
// do nothing
break;
}
}
}
@ -97,17 +107,21 @@ bool Foam::outputFilterOutputControl::output() const
);
break;
}
case ocOutputTime:
{
return time_.outputTime();
break;
}
default:
{
// this error should not actually be possible
FatalErrorIn("bool Foam::outputFilterOutputControl::output()")
<< "Unknown output control: "
<< "Undefined output control: "
<< outputControlNames_[outputControl_] << nl
<< abort(FatalError);
break;
}
}

View File

@ -25,6 +25,8 @@ Class
Foam::outputFilterOutputControl
Description
An output control for function objects.
The default is time-step execution at every interval.
SourceFiles
outputFilterOutputControl.C
@ -51,10 +53,11 @@ class outputFilterOutputControl
{
public:
//- The output control options
enum outputControls
{
ocTimeStep,
ocOutputTime
ocTimeStep, /*!< execution is coupled to the time-step */
ocOutputTime /*!< execution is coupled to the output-time */
};
@ -71,7 +74,7 @@ private:
//- Type of output
outputControls outputControl_;
//- The execution interval (in time steps) when using TIMESTEP mode
//- The execution interval (in time steps) when using @c timeStep mode,
// a value <= 1 means execute at every time step
label outputInterval_;

View File

@ -0,0 +1,50 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / 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 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/>.
Description
diagTensorField with IO.
\*---------------------------------------------------------------------------*/
#include "diagTensorFieldIOField.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
defineTemplateTypeNameAndDebugWithName
(
diagTensorFieldIOField,
"diagTensorFieldField",
0
);
defineTemplateTypeNameAndDebugWithName
(
diagTensorIOFieldField,
"diagTensorCompactFieldField",
0
);
}
// ************************************************************************* //

View File

@ -0,0 +1,51 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / 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 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/>.
Typedef
Foam::diagTensorFieldIOField
Description
diagTensorFieldField with IO.
\*---------------------------------------------------------------------------*/
#ifndef diagTensorFieldIOField_H
#define diagTensorFieldIOField_H
#include "diagTensorField.H"
#include "IOField.H"
#include "IOFieldField.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
typedef IOField<diagTensorField> diagTensorFieldIOField;
typedef IOFieldField<diagTensorField, diagTensor> diagTensorIOFieldField;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -0,0 +1,50 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / 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 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/>.
Description
sphericalTensorField with IO.
\*---------------------------------------------------------------------------*/
#include "sphericalTensorFieldIOField.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
defineTemplateTypeNameAndDebugWithName
(
sphericalTensorFieldIOField,
"sphericalTensorFieldField",
0
);
defineTemplateTypeNameAndDebugWithName
(
sphericalTensorIOFieldField,
"sphericalTensorCompactFieldField",
0
);
}
// ************************************************************************* //

View File

@ -0,0 +1,53 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / 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 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/>.
Typedef
Foam::sphericalTensorFieldIOField
Description
sphericalTensorFieldField with IO.
\*---------------------------------------------------------------------------*/
#ifndef sphericalTensorFieldIOField_H
#define sphericalTensorFieldIOField_H
#include "sphericalTensorField.H"
#include "IOField.H"
#include "IOFieldField.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
typedef IOField<sphericalTensorField> sphericalTensorFieldIOField;
typedef IOFieldField<sphericalTensorField, sphericalTensor>
sphericalTensorIOFieldField;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -32,7 +32,12 @@ Description
namespace Foam
{
defineTemplateTypeNameAndDebugWithName(sphericalTensorIOField, "sphericalTensorField", 0);
defineTemplateTypeNameAndDebugWithName
(
sphericalTensorIOField,
"sphericalTensorField",
0
);
}
// ************************************************************************* //

View File

@ -0,0 +1,50 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / 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 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/>.
Description
symmTensorField with IO.
\*---------------------------------------------------------------------------*/
#include "symmTensorFieldIOField.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
defineTemplateTypeNameAndDebugWithName
(
symmTensorFieldIOField,
"symmTensorFieldField",
0
);
defineTemplateTypeNameAndDebugWithName
(
symmTensorIOFieldField,
"symmTensorCompactFieldField",
0
);
}
// ************************************************************************* //

View File

@ -0,0 +1,51 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / 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 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/>.
Typedef
Foam::symmTensorFieldIOField
Description
symmTensorFieldField with IO.
\*---------------------------------------------------------------------------*/
#ifndef symmTensorFieldIOField_H
#define symmTensorFieldIOField_H
#include "symmTensorField.H"
#include "IOField.H"
#include "IOFieldField.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
typedef IOField<symmTensorField> symmTensorFieldIOField;
typedef IOFieldField<symmTensorField, symmTensor> symmTensorIOFieldField;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -0,0 +1,50 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / 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 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/>.
Description
tensorField with IO.
\*---------------------------------------------------------------------------*/
#include "tensorFieldIOField.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
defineTemplateTypeNameAndDebugWithName
(
tensorFieldIOField,
"tensorFieldField",
0
);
defineTemplateTypeNameAndDebugWithName
(
tensorIOFieldField,
"tensorCompactFieldField",
0
);
}
// ************************************************************************* //

View File

@ -0,0 +1,51 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / 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 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/>.
Typedef
Foam::tensorFieldIOField
Description
tensorFieldField with IO.
\*---------------------------------------------------------------------------*/
#ifndef tensorFieldIOField_H
#define tensorFieldIOField_H
#include "tensorField.H"
#include "IOField.H"
#include "IOFieldField.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
typedef IOField<tensorField> tensorFieldIOField;
typedef IOFieldField<tensorField, tensor> tensorIOFieldField;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -0,0 +1,50 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / 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 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/>.
Description
vector2DField with IO.
\*---------------------------------------------------------------------------*/
#include "vector2DFieldIOField.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
defineTemplateTypeNameAndDebugWithName
(
vector2DFieldIOField,
"vector2DFieldField",
0
);
defineTemplateTypeNameAndDebugWithName
(
vector2DIOFieldField,
"vector2DCompactFieldField",
0
);
}
// ************************************************************************* //

View File

@ -0,0 +1,51 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / 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 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/>.
Typedef
Foam::vector2DFieldIOField
Description
vector2DFieldField with IO.
\*---------------------------------------------------------------------------*/
#ifndef vector2DFieldIOField_H
#define vector2DFieldIOField_H
#include "vector2DField.H"
#include "IOField.H"
#include "IOFieldField.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
typedef IOField<vector2DField> vector2DFieldIOField;
typedef IOFieldField<vector2DField, vector2D> vector2DIOFieldField;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -32,7 +32,12 @@ Description
namespace Foam
{
defineTemplateTypeNameAndDebugWithName(vector2DIOField, "vector2DField", 0);
defineTemplateTypeNameAndDebugWithName
(
vector2DIOField,
"vector2DField",
0
);
}
// ************************************************************************* //

View File

@ -28,7 +28,6 @@ License
#include "clock.H"
#include "IFstream.H"
#include "dictionary.H"
#include "Switch.H"
#include "IOobject.H"
#include "JobInfo.H"
#include "labelList.H"
@ -564,7 +563,7 @@ Foam::argList::argList
}
// distributed data
if (decompDict.lookupOrDefault<Switch>("distributed", false))
if (decompDict.lookupOrDefault("distributed", false))
{
fileNameList roots;
decompDict.lookup("roots") >> roots;

View File

@ -145,6 +145,20 @@ public:
return solverName_;
}
//- Return solver name
word& solverName()
{
return solverName_;
}
//- Return field name
const word& fieldName() const
{
return fieldName_;
}
//- Return initial residual
scalar initialResidual() const
{
@ -209,6 +223,10 @@ public:
//- Print summary of solver performance
void print() const;
// Member Operators
bool operator!=(const solverPerformance&) const;
// Friend functions
@ -222,6 +240,7 @@ public:
// Ostream Operator
friend Istream& operator>>(Istream&, solverPerformance&);
friend Ostream& operator<<(Ostream&, const solverPerformance&);
};

View File

@ -32,15 +32,7 @@ Description
Foam::lduMatrix::solverPerformance::solverPerformance(Istream& is)
{
is.readBeginList("lduMatrix::solverPerformance");
is >> solverName_
>> fieldName_
>> initialResidual_
>> finalResidual_
>> noIterations_
>> converged_
>> singular_;
is.readEndList("lduMatrix::solverPerformance");
is >> *this;
}
@ -118,6 +110,24 @@ void Foam::lduMatrix::solverPerformance::print() const
}
bool Foam::lduMatrix::solverPerformance::operator!=
(
const lduMatrix::solverPerformance& sp
) const
{
return
(
solverName() != sp.solverName()
|| fieldName() != sp.fieldName()
|| initialResidual() != sp.initialResidual()
|| finalResidual() != sp.finalResidual()
|| nIterations() != sp.nIterations()
|| converged() != sp.converged()
|| singular() != sp.singular()
);
}
Foam::lduMatrix::solverPerformance Foam::max
(
const lduMatrix::solverPerformance& sp1,
@ -137,6 +147,26 @@ Foam::lduMatrix::solverPerformance Foam::max
}
Foam::Istream& Foam::operator>>
(
Istream& is,
Foam::lduMatrix::solverPerformance& sp
)
{
is.readBeginList("lduMatrix::solverPerformance");
is >> sp.solverName_
>> sp.fieldName_
>> sp.initialResidual_
>> sp.finalResidual_
>> sp.noIterations_
>> sp.converged_
>> sp.singular_;
is.readEndList("lduMatrix::solverPerformance");
return is;
}
Foam::Ostream& Foam::operator<<
(
Ostream& os,

View File

@ -58,7 +58,6 @@ SourceFiles
#include "labelField.H"
#include "primitiveFields.H"
#include "LUscalarMatrix.H"
#include "Switch.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -75,7 +74,7 @@ class GAMGSolver
{
// Private data
Switch cacheAgglomeration_;
bool cacheAgglomeration_;
//- Number of pre-smoothing sweeps
label nPreSweeps_;

View File

@ -76,7 +76,7 @@ Foam::cyclicGAMGInterface::cyclicGAMGInterface
label nCoarseFaces = 0;
forAll (localRestrictAddressing, ffi)
forAll(localRestrictAddressing, ffi)
{
label curMaster = -1;
label curSlave = -1;
@ -164,7 +164,7 @@ Foam::cyclicGAMGInterface::cyclicGAMGInterface
if (owner())
{
// On master side, the owner addressing is stored in table of contents
forAll (contents, masterI)
forAll(contents, masterI)
{
SLList<label>& curNbrs = neighboursTable.find(contents[masterI])();
@ -200,7 +200,7 @@ Foam::cyclicGAMGInterface::cyclicGAMGInterface
else
{
// On slave side, the owner addressing is stored in linked lists
forAll (contents, masterI)
forAll(contents, masterI)
{
SLList<label>& curNbrs = neighboursTable.find(contents[masterI])();

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