mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge branch 'master' of /home/noisy3/OpenFOAM/OpenFOAM-dev
Conflicts: src/parallel/decompose/scotchDecomp/scotchDecomp.C
This commit is contained in:
@ -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
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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");
|
||||
}
|
||||
|
||||
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@ -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
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
const dictionary& Bpiso = mesh.solutionDict().subDict("BPISO");
|
||||
|
||||
int nBcorr(readInt(Bpiso.lookup("nCorrectors")));
|
||||
const int nBcorr = Bpiso.lookupOrDefault<int>("nCorrectors", 1);
|
||||
|
||||
|
||||
@ -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"));
|
||||
}
|
||||
|
||||
@ -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"));
|
||||
}
|
||||
|
||||
@ -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);
|
||||
|
||||
|
||||
@ -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"));
|
||||
}
|
||||
|
||||
@ -4,4 +4,6 @@
|
||||
|
||||
const dictionary& pimple = solutionDict.subDict("PIMPLE");
|
||||
|
||||
int nOuterCorr(readInt(pimple.lookup("nOuterCorrectors")));
|
||||
const int nOuterCorr =
|
||||
pimple.lookupOrDefault<int>("nOuterCorrectors", 1);
|
||||
|
||||
|
||||
@ -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);
|
||||
|
||||
|
||||
@ -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"));
|
||||
}
|
||||
|
||||
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@ -96,7 +96,7 @@
|
||||
)
|
||||
);
|
||||
|
||||
if (RASProperties.lookupOrDefault<Switch>("printCoeffs", false))
|
||||
if (RASProperties.lookupOrDefault("printCoeffs", false))
|
||||
{
|
||||
Info<< "kEpsilonCoeffs" << kEpsilonDict << nl
|
||||
<< "wallFunctionCoeffs" << wallFunctionDict << endl;
|
||||
|
||||
@ -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"));
|
||||
}
|
||||
|
||||
@ -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"));
|
||||
}
|
||||
|
||||
@ -276,7 +276,7 @@
|
||||
)
|
||||
);
|
||||
|
||||
if (RASProperties.lookupOrDefault<Switch>("printCoeffs", false))
|
||||
if (RASProperties.lookupOrDefault("printCoeffs", false))
|
||||
{
|
||||
Info<< "kEpsilonCoeffs" << kEpsilonDict << nl
|
||||
<< "wallFunctionCoeffs" << wallFunctionDict << endl;
|
||||
|
||||
@ -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";
|
||||
|
||||
|
||||
@ -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"));
|
||||
|
||||
@ -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 | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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 | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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 | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
(
|
||||
|
||||
@ -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 | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -579,13 +579,18 @@ 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");
|
||||
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())
|
||||
|
||||
@ -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"
|
||||
|
||||
@ -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",
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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 * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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);
|
||||
|
||||
|
||||
@ -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]
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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_);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -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;
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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,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;
|
||||
|
||||
@ -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 | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
1
bin/org-pdflatex
Symbolic link
@ -0,0 +1 @@
|
||||
tools/org-batch
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
|
||||
@ -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 | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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());
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -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&);
|
||||
|
||||
@ -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
|
||||
|
||||
|
||||
@ -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)
|
||||
|
||||
@ -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
|
||||
@ -67,18 +67,28 @@ Foam::outputFilterOutputControl::~outputFilterOutputControl()
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -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_;
|
||||
|
||||
|
||||
@ -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
|
||||
);
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -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
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -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
|
||||
);
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -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
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -32,7 +32,12 @@ Description
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
defineTemplateTypeNameAndDebugWithName(sphericalTensorIOField, "sphericalTensorField", 0);
|
||||
defineTemplateTypeNameAndDebugWithName
|
||||
(
|
||||
sphericalTensorIOField,
|
||||
"sphericalTensorField",
|
||||
0
|
||||
);
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -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
|
||||
);
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -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
|
||||
|
||||
// ************************************************************************* //
|
||||
50
src/OpenFOAM/fields/Fields/tensorField/tensorFieldIOField.C
Normal file
50
src/OpenFOAM/fields/Fields/tensorField/tensorFieldIOField.C
Normal 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
|
||||
);
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
51
src/OpenFOAM/fields/Fields/tensorField/tensorFieldIOField.H
Normal file
51
src/OpenFOAM/fields/Fields/tensorField/tensorFieldIOField.H
Normal 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
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -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
|
||||
);
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -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
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -32,7 +32,12 @@ Description
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
defineTemplateTypeNameAndDebugWithName(vector2DIOField, "vector2DField", 0);
|
||||
defineTemplateTypeNameAndDebugWithName
|
||||
(
|
||||
vector2DIOField,
|
||||
"vector2DField",
|
||||
0
|
||||
);
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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&);
|
||||
};
|
||||
|
||||
|
||||
@ -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,
|
||||
|
||||
@ -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_;
|
||||
|
||||
@ -255,7 +255,7 @@ bool Foam::solution::read()
|
||||
if (dict.found("cache"))
|
||||
{
|
||||
cache_ = dict.subDict("cache");
|
||||
caching_ = cache_.lookupOrDefault<Switch>("active", true);
|
||||
caching_ = cache_.lookupOrDefault("active", true);
|
||||
}
|
||||
|
||||
if (dict.found("relaxationFactors"))
|
||||
|
||||
@ -36,7 +36,6 @@ SourceFiles
|
||||
#define solution_H
|
||||
|
||||
#include "IOdictionary.H"
|
||||
#include "Switch.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -57,7 +56,7 @@ class solution
|
||||
dictionary cache_;
|
||||
|
||||
//- Switch for the caching mechanism
|
||||
Switch caching_;
|
||||
bool caching_;
|
||||
|
||||
//- Dictionary of relaxation factors for all the fields
|
||||
dictionary relaxationFactors_;
|
||||
|
||||
@ -27,6 +27,7 @@ License
|
||||
#include "ListOps.H"
|
||||
#include "Pstream.H"
|
||||
#include "commSchedule.H"
|
||||
#include "boolList.H"
|
||||
|
||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||
|
||||
@ -42,6 +43,8 @@ Foam::labelList Foam::ProcessorTopology<Patch, ProcPatch>::procNeighbours
|
||||
|
||||
label maxNb = 0;
|
||||
|
||||
boolList isNeighbourProc(Pstream::nProcs(), false);
|
||||
|
||||
forAll(patches, patchi)
|
||||
{
|
||||
const Patch& patch = patches[patchi];
|
||||
@ -51,19 +54,34 @@ Foam::labelList Foam::ProcessorTopology<Patch, ProcPatch>::procNeighbours
|
||||
const ProcPatch& procPatch =
|
||||
refCast<const ProcPatch>(patch);
|
||||
|
||||
label pNeighbProcNo = procPatch.neighbProcNo();
|
||||
|
||||
if (!isNeighbourProc[pNeighbProcNo])
|
||||
{
|
||||
nNeighbours++;
|
||||
|
||||
maxNb = max(maxNb, procPatch.neighbProcNo());
|
||||
|
||||
isNeighbourProc[pNeighbProcNo] = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
labelList neighbours(nNeighbours);
|
||||
labelList neighbours(nNeighbours, -1);
|
||||
|
||||
nNeighbours = 0;
|
||||
|
||||
forAll(isNeighbourProc, procI)
|
||||
{
|
||||
if (isNeighbourProc[procI])
|
||||
{
|
||||
neighbours[nNeighbours++] = procI;
|
||||
}
|
||||
}
|
||||
|
||||
procPatchMap_.setSize(maxNb + 1);
|
||||
procPatchMap_ = -1;
|
||||
|
||||
nNeighbours = 0;
|
||||
|
||||
forAll(patches, patchi)
|
||||
{
|
||||
const Patch& patch = patches[patchi];
|
||||
@ -73,8 +91,6 @@ Foam::labelList Foam::ProcessorTopology<Patch, ProcPatch>::procNeighbours
|
||||
const ProcPatch& procPatch =
|
||||
refCast<const ProcPatch>(patch);
|
||||
|
||||
neighbours[nNeighbours++] = procPatch.neighbProcNo();
|
||||
|
||||
// Construct reverse map
|
||||
procPatchMap_[procPatch.neighbProcNo()] = patchi;
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user