Vanilla backport

- in FOAM library
updated containers
backported PackedBoolList, hashedWordList, nullObject, wordRe,
backported functions to
backported int32 support
backported tableReaders
backported Function1, TimeFunction1
backported dynamicCode (for codedBCs, ...) -- needs to be mapped out
advanced error macros (FatalIOErrorInFunction, ...) -- needs to be mapped out
backported IOobject::MUST_READ_IF_MODIFIED and added IOobject::READ_IF_PRESENT_IF_MODIFIED (only in FO)

- in postProcessing
backported IO FOs (partialWrite, removeRegisteredObject, writeDictionary, writeRegisteredObject)
backported field FOs (fieldCoordinateSystemTransform, fieldValues, nearWallFields, processorField, readFields, regionSizeDistribution, streamLine, wallBoundedStreamLine)
backported fvTools FOs (calcFvcDiv, calcFvcGrad, calcMag)
backported jobControl FOs (abortCalculation)
backported utilities FOs (ourantNo, Lambda2, Peclet, Q, codedFunctionObject, pressureTools, residuals, scalarTransport, setTimeStep, timeActivatedFileUpdate, turbulenceFields, vorticity, wallShearStress)
This commit is contained in:
Henrik Rusche 2017-04-09 15:11:54 +02:00
parent ec83275923
commit 67ab0b5abd
929 changed files with 73958 additions and 8367 deletions

View file

@ -7,7 +7,7 @@
"transportProperties", "transportProperties",
runTime.constant(), runTime.constant(),
mesh, mesh,
IOobject::MUST_READ, IOobject::MUST_READ_IF_MODIFIED,
IOobject::NO_WRITE IOobject::NO_WRITE
) )
); );

View file

@ -7,7 +7,7 @@
"turbulenceProperties", "turbulenceProperties",
runTime.constant(), runTime.constant(),
mesh, mesh,
IOobject::MUST_READ, IOobject::MUST_READ_IF_MODIFIED,
IOobject::NO_WRITE IOobject::NO_WRITE
) )
); );

View file

@ -23,7 +23,7 @@
"transportProperties", "transportProperties",
runTime.constant(), runTime.constant(),
mesh, mesh,
IOobject::MUST_READ, IOobject::MUST_READ_IF_MODIFIED,
IOobject::NO_WRITE IOobject::NO_WRITE
) )
); );

View file

@ -39,7 +39,7 @@
"transportProperties", "transportProperties",
runTime.constant(), runTime.constant(),
mesh, mesh,
IOobject::MUST_READ, IOobject::MUST_READ_IF_MODIFIED,
IOobject::NO_WRITE IOobject::NO_WRITE
) )
); );

View file

@ -50,10 +50,12 @@ PDRkEpsilon::PDRkEpsilon
const volScalarField& rho, const volScalarField& rho,
const volVectorField& U, const volVectorField& U,
const surfaceScalarField& phi, const surfaceScalarField& phi,
const basicThermo& thermophysicalModel const basicThermo& thermophysicalModel,
const word& turbulenceModelName,
const word& modelName
) )
: :
RASModel(typeName, rho, U, phi, thermophysicalModel), RASModel(typeName, rho, U, phi, thermophysicalModel, turbulenceModelName),
Cmu_ Cmu_
( (

View file

@ -112,7 +112,9 @@ public:
const volScalarField& rho, const volScalarField& rho,
const volVectorField& U, const volVectorField& U,
const surfaceScalarField& phi, const surfaceScalarField& phi,
const basicThermo& thermophysicalModel const basicThermo& thermophysicalModel,
const word& turbulenceModelName = turbulenceModel::typeName,
const word& modelName = typeName
); );

View file

@ -110,7 +110,7 @@
"PDRProperties", "PDRProperties",
runTime.constant(), runTime.constant(),
mesh, mesh,
IOobject::MUST_READ, IOobject::MUST_READ_IF_MODIFIED,
IOobject::NO_WRITE IOobject::NO_WRITE
) )
); );

View file

@ -7,7 +7,7 @@
"combustionProperties", "combustionProperties",
runTime.constant(), runTime.constant(),
mesh, mesh,
IOobject::MUST_READ, IOobject::MUST_READ_IF_MODIFIED,
IOobject::NO_WRITE IOobject::NO_WRITE
) )
); );

View file

@ -7,7 +7,7 @@
"combustionProperties", "combustionProperties",
runTime.constant(), runTime.constant(),
mesh, mesh,
IOobject::MUST_READ, IOobject::MUST_READ_IF_MODIFIED,
IOobject::NO_WRITE IOobject::NO_WRITE
) )
); );

View file

@ -7,7 +7,7 @@ IOdictionary combustionProperties
"combustionProperties", "combustionProperties",
runTime.constant(), runTime.constant(),
mesh, mesh,
IOobject::MUST_READ, IOobject::MUST_READ_IF_MODIFIED,
IOobject::NO_WRITE IOobject::NO_WRITE
) )
); );

View file

@ -65,7 +65,7 @@ IOdictionary combustionProperties
"combustionProperties", "combustionProperties",
runTime.constant(), runTime.constant(),
mesh, mesh,
IOobject::MUST_READ, IOobject::MUST_READ_IF_MODIFIED,
IOobject::NO_WRITE IOobject::NO_WRITE
) )
); );

View file

@ -7,7 +7,7 @@ IOdictionary chemistryProperties
"chemistryProperties", "chemistryProperties",
runTime.constant(), runTime.constant(),
mesh, mesh,
IOobject::MUST_READ, IOobject::MUST_READ_IF_MODIFIED,
IOobject::NO_WRITE, IOobject::NO_WRITE,
false false
) )

View file

@ -7,7 +7,7 @@ IOdictionary chemistryProperties
"chemistryProperties", "chemistryProperties",
runTime.constant(), runTime.constant(),
mesh, mesh,
IOobject::MUST_READ, IOobject::MUST_READ_IF_MODIFIED,
IOobject::NO_WRITE, IOobject::NO_WRITE,
false false
) )

View file

@ -9,7 +9,7 @@ IOdictionary thermophysicalProperties
"thermophysicalProperties", "thermophysicalProperties",
runTime.constant(), runTime.constant(),
mesh, mesh,
IOobject::MUST_READ, IOobject::MUST_READ_IF_MODIFIED,
IOobject::NO_WRITE IOobject::NO_WRITE
) )
); );

View file

@ -7,7 +7,7 @@
"thermodynamicProperties", "thermodynamicProperties",
runTime.constant(), runTime.constant(),
mesh, mesh,
IOobject::MUST_READ, IOobject::MUST_READ_IF_MODIFIED,
IOobject::NO_WRITE IOobject::NO_WRITE
) )
); );

View file

@ -7,7 +7,7 @@
"thermodynamicProperties", "thermodynamicProperties",
runTime.constant(), runTime.constant(),
mesh, mesh,
IOobject::MUST_READ, IOobject::MUST_READ_IF_MODIFIED,
IOobject::NO_WRITE IOobject::NO_WRITE
) )
); );

View file

@ -7,7 +7,7 @@
"transportProperties", "transportProperties",
runTime.constant(), runTime.constant(),
mesh, mesh,
IOobject::MUST_READ, IOobject::MUST_READ_IF_MODIFIED,
IOobject::NO_WRITE IOobject::NO_WRITE
) )
); );

View file

@ -7,7 +7,7 @@
"thermodynamicProperties", "thermodynamicProperties",
runTime.constant(), runTime.constant(),
mesh, mesh,
IOobject::MUST_READ, IOobject::MUST_READ_IF_MODIFIED,
IOobject::NO_WRITE IOobject::NO_WRITE
) )
); );

View file

@ -7,7 +7,7 @@
"transportProperties", "transportProperties",
runTime.constant(), runTime.constant(),
mesh, mesh,
IOobject::MUST_READ, IOobject::MUST_READ_IF_MODIFIED,
IOobject::NO_WRITE IOobject::NO_WRITE
) )
); );

View file

@ -69,7 +69,7 @@
"transportProperties", "transportProperties",
runTime.constant(), runTime.constant(),
mesh, mesh,
IOobject::MUST_READ, IOobject::MUST_READ_IF_MODIFIED,
IOobject::NO_WRITE IOobject::NO_WRITE
) )
); );

View file

@ -7,7 +7,7 @@
"transportProperties", "transportProperties",
runTime.constant(), runTime.constant(),
mesh, mesh,
IOobject::MUST_READ, IOobject::MUST_READ_IF_MODIFIED,
IOobject::NO_WRITE IOobject::NO_WRITE
) )
); );

View file

@ -7,7 +7,7 @@
"transportProperties", "transportProperties",
runTime.constant(), runTime.constant(),
mesh, mesh,
IOobject::MUST_READ, IOobject::MUST_READ_IF_MODIFIED,
IOobject::NO_WRITE IOobject::NO_WRITE
) )
); );

View file

@ -7,7 +7,7 @@
"physicalProperties", "physicalProperties",
runTime.constant(), runTime.constant(),
mesh, mesh,
IOobject::MUST_READ, IOobject::MUST_READ_IF_MODIFIED,
IOobject::NO_WRITE IOobject::NO_WRITE
) )
); );

View file

@ -7,7 +7,7 @@
"transportProperties", "transportProperties",
runTime.constant(), runTime.constant(),
mesh, mesh,
IOobject::MUST_READ, IOobject::MUST_READ_IF_MODIFIED,
IOobject::NO_WRITE IOobject::NO_WRITE
) )
); );

View file

@ -7,7 +7,7 @@
"transportProperties", "transportProperties",
runTime.constant(), runTime.constant(),
mesh, mesh,
IOobject::MUST_READ, IOobject::MUST_READ_IF_MODIFIED,
IOobject::NO_WRITE IOobject::NO_WRITE
) )
); );

View file

@ -7,7 +7,7 @@
"financialProperties", "financialProperties",
runTime.constant(), runTime.constant(),
mesh, mesh,
IOobject::MUST_READ, IOobject::MUST_READ_IF_MODIFIED,
IOobject::NO_WRITE IOobject::NO_WRITE
) )
); );

View file

@ -5,7 +5,7 @@ IOdictionary transportProperties
"transportProperties", "transportProperties",
runTime.constant(), runTime.constant(),
mesh, mesh,
IOobject::MUST_READ, IOobject::MUST_READ_IF_MODIFIED,
IOobject::NO_WRITE IOobject::NO_WRITE
) )
); );

View file

@ -21,7 +21,7 @@ IOdictionary transportProperties
"transportProperties", "transportProperties",
runTime.constant(), runTime.constant(),
mesh, mesh,
IOobject::MUST_READ, IOobject::MUST_READ_IF_MODIFIED,
IOobject::NO_WRITE IOobject::NO_WRITE
) )
); );

View file

@ -7,7 +7,7 @@
"transportProperties", "transportProperties",
runTime.constant(), runTime.constant(),
mesh, mesh,
IOobject::MUST_READ, IOobject::MUST_READ_IF_MODIFIED,
IOobject::NO_WRITE IOobject::NO_WRITE
) )
); );

View file

@ -7,7 +7,7 @@
"transportProperties", "transportProperties",
runTime.constant(), runTime.constant(),
mesh, mesh,
IOobject::MUST_READ, IOobject::MUST_READ_IF_MODIFIED,
IOobject::NO_WRITE IOobject::NO_WRITE
) )
); );

View file

@ -7,7 +7,7 @@
"transportProperties", "transportProperties",
runTime.constant(), runTime.constant(),
mesh, mesh,
IOobject::MUST_READ, IOobject::MUST_READ_IF_MODIFIED,
IOobject::NO_WRITE IOobject::NO_WRITE
) )
); );

View file

@ -1,25 +1,25 @@
/*---------------------------------------------------------------------------*\ /*---------------------------------------------------------------------------*\
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | foam-extend: Open Source CFD
\\ / O peration | \\ / O peration | Version: 4.0
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\ / A nd | Web: http://www.foam-extend.org
\\/ M anipulation | \\/ M anipulation | For copyright notice see file Copyright
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of foam-extend.
OpenFOAM is free software: you can redistribute it and/or modify it foam-extend is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by under the terms of the GNU General Public License as published by the
the Free Software Foundation, either version 3 of the License, or Free Software Foundation, either version 3 of the License, or (at your
(at your option) any later version. option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT foam-extend is distributed in the hope that it will be useful, but
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or WITHOUT ANY WARRANTY; without even the implied warranty of
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
for more details. General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. along with foam-extend. If not, see <http://www.gnu.org/licenses/>.
Application Application
RichardsFoam RichardsFoam

View file

@ -1,25 +1,25 @@
/*---------------------------------------------------------------------------*\ /*---------------------------------------------------------------------------*\
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | foam-extend: Open Source CFD
\\ / O peration | \\ / O peration | Version: 4.0
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd. \\ / A nd | Web: http://www.foam-extend.org
\\/ M anipulation | \\/ M anipulation | For copyright notice see file Copyright
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of foam-extend.
OpenFOAM is free software: you can redistribute it and/or modify it foam-extend is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by under the terms of the GNU General Public License as published by the
the Free Software Foundation, either version 3 of the License, or Free Software Foundation, either version 3 of the License, or (at your
(at your option) any later version. option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT foam-extend is distributed in the hope that it will be useful, but
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or WITHOUT ANY WARRANTY; without even the implied warranty of
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
for more details. General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. along with foam-extend. If not, see <http://www.gnu.org/licenses/>.
Global Global
setDeltaT setDeltaT

View file

@ -1,25 +1,25 @@
/*---------------------------------------------------------------------------*\ /*---------------------------------------------------------------------------*\
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | foam-extend: Open Source CFD
\\ / O peration | \\ / O peration | Version: 4.0
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\ / A nd | Web: http://www.foam-extend.org
\\/ M anipulation | \\/ M anipulation | For copyright notice see file Copyright
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of foam-extend.
OpenFOAM is free software: you can redistribute it and/or modify it foam-extend is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by under the terms of the GNU General Public License as published by the
the Free Software Foundation, either version 3 of the License, or Free Software Foundation, either version 3 of the License, or (at your
(at your option) any later version. option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT foam-extend is distributed in the hope that it will be useful, but
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or WITHOUT ANY WARRANTY; without even the implied warranty of
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
for more details. General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. along with foam-extend. If not, see <http://www.gnu.org/licenses/>.
Application Application
spatialMeanValue spatialMeanValue

View file

@ -6,7 +6,7 @@
"U", "U",
runTime.timeName(), runTime.timeName(),
mesh, mesh,
IOobject::MUST_READ, IOobject::MUST_READ_IF_MODIFIED,
IOobject::AUTO_WRITE IOobject::AUTO_WRITE
), ),
mesh mesh
@ -44,7 +44,7 @@
"transportProperties", "transportProperties",
runTime.constant(), runTime.constant(),
mesh, mesh,
IOobject::MUST_READ, IOobject::MUST_READ_IF_MODIFIED,
IOobject::NO_WRITE IOobject::NO_WRITE
) )
); );

View file

@ -6,7 +6,7 @@
"transportProperties", "transportProperties",
runTime.constant(), runTime.constant(),
mesh, mesh,
IOobject::MUST_READ, IOobject::MUST_READ_IF_MODIFIED,
IOobject::NO_WRITE, IOobject::NO_WRITE,
false false
) )

View file

@ -7,7 +7,7 @@
"transportProperties", "transportProperties",
runTime.constant(), runTime.constant(),
mesh, mesh,
IOobject::MUST_READ, IOobject::MUST_READ_IF_MODIFIED,
IOobject::NO_WRITE IOobject::NO_WRITE
) )
); );

View file

@ -7,7 +7,7 @@
"transportProperties", "transportProperties",
runTime.constant(), runTime.constant(),
mesh, mesh,
IOobject::MUST_READ, IOobject::MUST_READ_IF_MODIFIED,
IOobject::NO_WRITE IOobject::NO_WRITE
) )
); );

View file

@ -7,7 +7,7 @@
"transportProperties", "transportProperties",
runTime.constant(), runTime.constant(),
mesh, mesh,
IOobject::MUST_READ, IOobject::MUST_READ_IF_MODIFIED,
IOobject::NO_WRITE IOobject::NO_WRITE
) )
); );

View file

@ -7,7 +7,7 @@ IOdictionary gravitationalProperties
"gravitationalProperties", "gravitationalProperties",
runTime.constant(), runTime.constant(),
mesh, mesh,
IOobject::MUST_READ, IOobject::MUST_READ_IF_MODIFIED,
IOobject::NO_WRITE IOobject::NO_WRITE
) )
); );

View file

@ -7,7 +7,7 @@ IOdictionary chemistryProperties
"chemistryProperties", "chemistryProperties",
runTime.constant(), runTime.constant(),
mesh, mesh,
IOobject::MUST_READ, IOobject::MUST_READ_IF_MODIFIED,
IOobject::NO_WRITE, IOobject::NO_WRITE,
false false
) )

View file

@ -7,7 +7,7 @@ IOdictionary chemistryProperties
"chemistryProperties", "chemistryProperties",
runTime.constant(), runTime.constant(),
mesh, mesh,
IOobject::MUST_READ, IOobject::MUST_READ_IF_MODIFIED,
IOobject::NO_WRITE, IOobject::NO_WRITE,
false false
) )

View file

@ -7,7 +7,7 @@ IOdictionary chemistryProperties
"chemistryProperties", "chemistryProperties",
runTime.constant(), runTime.constant(),
mesh, mesh,
IOobject::MUST_READ, IOobject::MUST_READ_IF_MODIFIED,
IOobject::NO_WRITE, IOobject::NO_WRITE,
false false
) )

View file

@ -7,7 +7,7 @@
"transportProperties", "transportProperties",
runTime.constant(), runTime.constant(),
mesh, mesh,
IOobject::MUST_READ, IOobject::MUST_READ_IF_MODIFIED,
IOobject::NO_WRITE IOobject::NO_WRITE
) )
); );

View file

@ -39,7 +39,7 @@
"transportProperties", "transportProperties",
runTime.constant(), runTime.constant(),
mesh, mesh,
IOobject::MUST_READ, IOobject::MUST_READ_IF_MODIFIED,
IOobject::NO_WRITE IOobject::NO_WRITE
) )
); );

View file

@ -7,7 +7,7 @@
"thermodynamicProperties", "thermodynamicProperties",
runTime.constant(), runTime.constant(),
mesh, mesh,
IOobject::MUST_READ, IOobject::MUST_READ_IF_MODIFIED,
IOobject::NO_WRITE IOobject::NO_WRITE
) )
); );

View file

@ -7,7 +7,7 @@
"transportProperties", "transportProperties",
runTime.constant(), runTime.constant(),
mesh, mesh,
IOobject::MUST_READ, IOobject::MUST_READ_IF_MODIFIED,
IOobject::NO_WRITE IOobject::NO_WRITE
) )
); );

View file

@ -91,7 +91,7 @@
"transportProperties", "transportProperties",
runTime.constant(), runTime.constant(),
mesh, mesh,
IOobject::MUST_READ, IOobject::MUST_READ_IF_MODIFIED,
IOobject::NO_WRITE IOobject::NO_WRITE
) )
); );

View file

@ -5,7 +5,7 @@
"RASProperties", "RASProperties",
runTime.constant(), runTime.constant(),
mesh, mesh,
IOobject::MUST_READ, IOobject::MUST_READ_IF_MODIFIED,
IOobject::NO_WRITE IOobject::NO_WRITE
) )
); );

View file

@ -7,7 +7,7 @@
"thermodynamicProperties", "thermodynamicProperties",
runTime.constant(), runTime.constant(),
mesh, mesh,
IOobject::MUST_READ, IOobject::MUST_READ_IF_MODIFIED,
IOobject::NO_WRITE IOobject::NO_WRITE
) )
); );

View file

@ -43,7 +43,7 @@ Foam::phaseChangeTwoPhaseMixture::New
"transportProperties", "transportProperties",
U.time().constant(), U.time().constant(),
U.db(), U.db(),
IOobject::MUST_READ, IOobject::MUST_READ_IF_MODIFIED,
IOobject::NO_WRITE, IOobject::NO_WRITE,
false false
) )

View file

@ -50,7 +50,7 @@
"transportProperties", "transportProperties",
runTime.constant(), runTime.constant(),
mesh, mesh,
IOobject::MUST_READ, IOobject::MUST_READ_IF_MODIFIED,
IOobject::NO_WRITE IOobject::NO_WRITE
) )
); );

View file

@ -7,7 +7,7 @@
"transportProperties", "transportProperties",
runTime.constant(), runTime.constant(),
mesh, mesh,
IOobject::MUST_READ, IOobject::MUST_READ_IF_MODIFIED,
IOobject::NO_WRITE IOobject::NO_WRITE
) )
); );

View file

@ -5,7 +5,7 @@
"ppProperties", "ppProperties",
runTime.constant(), runTime.constant(),
mesh, mesh,
IOobject::MUST_READ, IOobject::MUST_READ_IF_MODIFIED,
IOobject::NO_WRITE IOobject::NO_WRITE
) )
); );

View file

@ -8,7 +8,7 @@
"U", "U",
runTime.timeName(), runTime.timeName(),
mesh, mesh,
IOobject::MUST_READ, IOobject::MUST_READ_IF_MODIFIED,
IOobject::AUTO_WRITE IOobject::AUTO_WRITE
), ),
mesh mesh
@ -23,7 +23,7 @@
"mechanicalProperties", "mechanicalProperties",
"constant", "constant",
mesh, mesh,
IOobject::MUST_READ, IOobject::MUST_READ_IF_MODIFIED,
IOobject::NO_WRITE IOobject::NO_WRITE
) )
); );

View file

@ -7,7 +7,7 @@
"transportProperties", "transportProperties",
runTime.constant(), runTime.constant(),
mesh, mesh,
IOobject::MUST_READ, IOobject::MUST_READ_IF_MODIFIED,
IOobject::NO_WRITE IOobject::NO_WRITE
) )
); );

View file

@ -6,7 +6,7 @@
"couplingProperties", "couplingProperties",
runTime.constant(), runTime.constant(),
mesh, mesh,
IOobject::MUST_READ, IOobject::MUST_READ_IF_MODIFIED,
IOobject::NO_WRITE IOobject::NO_WRITE
) )
); );

View file

@ -7,7 +7,7 @@
"mechanicalProperties", "mechanicalProperties",
runTime.constant(), runTime.constant(),
stressMesh, stressMesh,
IOobject::MUST_READ, IOobject::MUST_READ_IF_MODIFIED,
IOobject::NO_WRITE IOobject::NO_WRITE
) )
); );

View file

@ -7,7 +7,7 @@
"mechanicalProperties", "mechanicalProperties",
runTime.constant(), runTime.constant(),
mesh, mesh,
IOobject::MUST_READ, IOobject::MUST_READ_IF_MODIFIED,
IOobject::NO_WRITE IOobject::NO_WRITE
) )
); );

View file

@ -7,7 +7,7 @@
"thermalProperties", "thermalProperties",
runTime.constant(), runTime.constant(),
mesh, mesh,
IOobject::MUST_READ, IOobject::MUST_READ_IF_MODIFIED,
IOobject::NO_WRITE IOobject::NO_WRITE
) )
); );

View file

@ -7,7 +7,7 @@
"mechanicalProperties", "mechanicalProperties",
runTime.constant(), runTime.constant(),
mesh, mesh,
IOobject::MUST_READ, IOobject::MUST_READ_IF_MODIFIED,
IOobject::NO_WRITE IOobject::NO_WRITE
) )
); );

View file

@ -7,7 +7,7 @@
"thermalProperties", "thermalProperties",
runTime.constant(), runTime.constant(),
mesh, mesh,
IOobject::MUST_READ, IOobject::MUST_READ_IF_MODIFIED,
IOobject::NO_WRITE IOobject::NO_WRITE
) )
); );

View file

@ -7,7 +7,7 @@
"thermalProperties", "thermalProperties",
runTime.constant(), runTime.constant(),
mesh, mesh,
IOobject::MUST_READ, IOobject::MUST_READ_IF_MODIFIED,
IOobject::NO_WRITE IOobject::NO_WRITE
) )
); );

View file

@ -7,7 +7,7 @@
"transportProperties", "transportProperties",
runTime.constant(), runTime.constant(),
mesh, mesh,
IOobject::MUST_READ, IOobject::MUST_READ_IF_MODIFIED,
IOobject::NO_WRITE IOobject::NO_WRITE
) )
); );

View file

@ -6,7 +6,7 @@
"couplingProperties", "couplingProperties",
runTime.constant(), runTime.constant(),
mesh, mesh,
IOobject::MUST_READ, IOobject::MUST_READ_IF_MODIFIED,
IOobject::NO_WRITE IOobject::NO_WRITE
) )
); );

View file

@ -7,7 +7,7 @@
"mechanicalProperties", "mechanicalProperties",
runTime.constant(), runTime.constant(),
mesh, mesh,
IOobject::MUST_READ, IOobject::MUST_READ_IF_MODIFIED,
IOobject::NO_WRITE IOobject::NO_WRITE
) )
); );

View file

@ -28,7 +28,7 @@
"mrfProperties", "mrfProperties",
runTime.constant(), runTime.constant(),
mesh, mesh,
IOobject::MUST_READ, IOobject::MUST_READ_IF_MODIFIED,
IOobject::NO_WRITE IOobject::NO_WRITE
) )
); );

View file

@ -285,7 +285,7 @@ bool Foam::bubbleHistory::start()
} }
bool Foam::bubbleHistory::execute() bool Foam::bubbleHistory::execute(const bool forceWrite)
{ {
const fvMesh& mesh = const fvMesh& mesh =
time_.lookupObject<fvMesh>(regionName_); time_.lookupObject<fvMesh>(regionName_);
@ -401,6 +401,11 @@ bool Foam::bubbleHistory::execute()
} }
bool Foam::bubbleHistory::setTime()
{
return true;
}
bool Foam::bubbleHistory::read(const dictionary& dict) bool Foam::bubbleHistory::read(const dictionary& dict)
{ {
if (dict.found("region")) if (dict.found("region"))

View file

@ -109,10 +109,21 @@ public:
virtual bool start(); virtual bool start();
//- execute is called at each ++ or += of the time-loop //- execute is called at each ++ or += of the time-loop
virtual bool execute(); virtual bool execute(const bool forceWrite);
//- Called when time was set at the end of the Time::operator++
virtual bool setTime();
//- Read and set the function object if its data has changed //- Read and set the function object if its data has changed
virtual bool read(const dictionary& dict); virtual bool read(const dictionary& dict);
//- Update for changes of mesh
virtual void updateMesh(const mapPolyMesh&)
{}
//- Update for changes of mesh
virtual void movePoints(const pointField&)
{}
}; };

View file

@ -186,7 +186,7 @@ bool Foam::sloshingHistory::start()
} }
bool Foam::sloshingHistory::execute() bool Foam::sloshingHistory::execute(const bool forceWrite)
{ {
const fvMesh& mesh = const fvMesh& mesh =
time_.lookupObject<fvMesh>(regionName_); time_.lookupObject<fvMesh>(regionName_);
@ -209,6 +209,12 @@ bool Foam::sloshingHistory::execute()
} }
bool Foam::sloshingHistory::setTime()
{
return true;
}
bool Foam::sloshingHistory::read(const dictionary& dict) bool Foam::sloshingHistory::read(const dictionary& dict)
{ {
if (dict.found("region")) if (dict.found("region"))

View file

@ -114,10 +114,21 @@ public:
virtual bool start(); virtual bool start();
//- execute is called at each ++ or += of the time-loop //- execute is called at each ++ or += of the time-loop
virtual bool execute(); virtual bool execute(const bool forceWrite);
//- Called when time was set at the end of the Time::operator++
virtual bool setTime();
//- Read and set the function object if its data has changed //- Read and set the function object if its data has changed
virtual bool read(const dictionary& dict); virtual bool read(const dictionary& dict);
//- Update for changes of mesh
virtual void updateMesh(const mapPolyMesh&)
{}
//- Update for changes of mesh
virtual void movePoints(const pointField&)
{}
}; };

View file

@ -14,5 +14,4 @@ EXE_LIBS = \
-lmeshTools \ -lmeshTools \
-ldynamicMesh \ -ldynamicMesh \
-ldynamicFvMesh \ -ldynamicFvMesh \
-lautoMesh \ -lautoMesh
-L$(MESQUITE_LIB_DIR) -lmesquite

View file

@ -46,6 +46,7 @@ Description
#include "mapPolyMesh.H" #include "mapPolyMesh.H"
#include "directTopoChange.H" #include "directTopoChange.H"
#include "polyModifyFace.H" #include "polyModifyFace.H"
#include "wordReList.H"
using namespace Foam; using namespace Foam;
@ -698,7 +699,10 @@ int main(int argc, char *argv[])
if (sourceType == "patches") if (sourceType == "patches")
{ {
labelHashSet patchSources(patches.patchSet(dict.lookup("patches"))); labelHashSet patchSources
(
patches.patchSet(wordReList(dict.lookup("patches")))
);
// Repatch faces of the patches. // Repatch faces of the patches.
forAllConstIter(labelHashSet, patchSources, iter) forAllConstIter(labelHashSet, patchSources, iter)

View file

@ -95,7 +95,7 @@ using namespace Foam;
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
template<class GeoField> template<class GeoField>
void addPatchFields(fvMesh& mesh, const word& patchFieldType) void addPatchFields(const fvMesh& mesh, const word& patchFieldType)
{ {
HashTable<const GeoField*> flds HashTable<const GeoField*> flds
( (
@ -136,7 +136,7 @@ void addPatchFields(fvMesh& mesh, const word& patchFieldType)
// Remove last patch field // Remove last patch field
template<class GeoField> template<class GeoField>
void trimPatchFields(fvMesh& mesh, const label nPatches) void trimPatchFields(const fvMesh& mesh, const label nPatches)
{ {
HashTable<const GeoField*> flds HashTable<const GeoField*> flds
( (
@ -163,7 +163,7 @@ void trimPatchFields(fvMesh& mesh, const label nPatches)
// Reorder patch field // Reorder patch field
template<class GeoField> template<class GeoField>
void reorderPatchFields(fvMesh& mesh, const labelList& oldToNew) void reorderPatchFields(const fvMesh& mesh, const labelList& oldToNew)
{ {
HashTable<const GeoField*> flds HashTable<const GeoField*> flds
( (

View file

@ -90,7 +90,7 @@ int main(int argc, char *argv[])
// Set all times on processor meshes equal to decomposed mesh // Set all times on processor meshes equal to decomposed mesh
forAll (databases, procI) forAll (databases, procI)
{ {
databases[procI].setTime(runTime.timeName(), runTime.timeIndex()); databases[procI].setTime(runTime, runTime.timeIndex());
} }
// Read all meshes and addressing to reconstructed mesh // Read all meshes and addressing to reconstructed mesh

View file

@ -51,7 +51,7 @@ Description
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
// enable -constant ... if someone really wants it // enable -constant ... if someone really wants it
// enable -zeroTime to prevent accidentally trashing the initial fields // enable -noZero to prevent accidentally trashing the initial fields
timeSelector::addOptions(true, true); timeSelector::addOptions(true, true);
argList::noParallel(); argList::noParallel();
# include "addRegionOption.H" # include "addRegionOption.H"
@ -125,7 +125,7 @@ int main(int argc, char *argv[])
// Set all times on processor meshes equal to reconstructed mesh // Set all times on processor meshes equal to reconstructed mesh
forAll (databases, procI) forAll (databases, procI)
{ {
databases[procI].setTime(runTime.timeName(), runTime.timeIndex()); databases[procI].setTime(runTime);
} }
// Read all meshes and addressing to reconstructed mesh // Read all meshes and addressing to reconstructed mesh

View file

@ -50,8 +50,8 @@ Description
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
// enable -constant ... if someone really wants it // disable -constant
// enable -zeroTime to prevent accidentally trashing the initial fields // enable -noZero to prevent accidentally trashing the initial fields
timeSelector::addOptions(false, true); timeSelector::addOptions(false, true);
argList::noParallel(); argList::noParallel();
# include "addRegionOption.H" # include "addRegionOption.H"

View file

@ -74,7 +74,7 @@ using namespace Foam;
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
// enable -constant // enable -constant
// probably don't need -zeroTime though, since the fields are vetted // probably don't need -noZero though, since the fields are vetted
// afterwards anyhow // afterwards anyhow
timeSelector::addOptions(true, false); timeSelector::addOptions(true, false);
argList::noParallel(); argList::noParallel();

View file

@ -22,12 +22,14 @@ LINK_DIRECTORIES(
INCLUDE_DIRECTORIES( INCLUDE_DIRECTORIES(
$ENV{WM_PROJECT_DIR}/src/OpenFOAM/lnInclude $ENV{WM_PROJECT_DIR}/src/OpenFOAM/lnInclude
$ENV{WM_PROJECT_DIR}/src/OSspecific/$ENV{WM_OSTYPE}/lnInclude
$ENV{WM_PROJECT_DIR}/src/finiteVolume/lnInclude $ENV{WM_PROJECT_DIR}/src/finiteVolume/lnInclude
${PROJECT_SOURCE_DIR}/../vtkPV3Foam ${PROJECT_SOURCE_DIR}/../vtkPV3Foam
) )
ADD_DEFINITIONS( ADD_DEFINITIONS(
-DWM_$ENV{WM_PRECISION_OPTION} -DWM_$ENV{WM_PRECISION_OPTION}
-DWM_LABEL_SIZE=$ENV{WM_LABEL_SIZE}
) )
# Set output library destination to plugin folder # Set output library destination to plugin folder

View file

@ -22,12 +22,14 @@ LINK_DIRECTORIES(
INCLUDE_DIRECTORIES( INCLUDE_DIRECTORIES(
$ENV{WM_PROJECT_DIR}/src/foam/lnInclude $ENV{WM_PROJECT_DIR}/src/foam/lnInclude
$ENV{WM_PROJECT_DIR}/src/OSspecific/$ENV{WM_OSTYPE}/lnInclude
$ENV{WM_PROJECT_DIR}/src/finiteVolume/lnInclude $ENV{WM_PROJECT_DIR}/src/finiteVolume/lnInclude
${PROJECT_SOURCE_DIR}/../vtkPV4Foam ${PROJECT_SOURCE_DIR}/../vtkPV4Foam
) )
ADD_DEFINITIONS( ADD_DEFINITIONS(
-DWM_$ENV{WM_PRECISION_OPTION} -DWM_$ENV{WM_PRECISION_OPTION}
-DWM_LABEL_SIZE=$ENV{WM_LABEL_SIZE}
) )
# Set output library destination to plugin folder # Set output library destination to plugin folder

View file

@ -18,11 +18,16 @@ SET(PVFoamReader_LIBS
INCLUDE_DIRECTORIES( INCLUDE_DIRECTORIES(
$ENV{WM_PROJECT_DIR}/src/OpenFOAM/lnInclude $ENV{WM_PROJECT_DIR}/src/OpenFOAM/lnInclude
$ENV{WM_PROJECT_DIR}/src/OSspecific/$ENV{WM_OSTYPE}/lnInclude
$ENV{WM_PROJECT_DIR}/src/finiteVolume/lnInclude $ENV{WM_PROJECT_DIR}/src/finiteVolume/lnInclude
$ENV{ParaView_INST_DIR}/include $ENV{ParaView_INST_DIR}/include
../vtkFoam/lnInclude ../vtkFoam/lnInclude
) )
ADD_DEFINITIONS(-DWM_$ENV{WM_PRECISION_OPTION})
ADD_DEFINITIONS(
-DWM_$ENV{WM_PRECISION_OPTION}
-DWM_LABEL_SIZE=$ENV{WM_LABEL_SIZE}
)
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
# Most users should not need to change anything below this line. # Most users should not need to change anything below this line.

View file

@ -55,7 +55,7 @@ void parseOptions
token nextOption(optionsStream); token nextOption(optionsStream);
// Bug workaround // Bug workaround
if (nextOption.type() == token::FATALERROR) if (nextOption.type() == token::ERROR)
{ {
break; break;
} }
@ -89,7 +89,7 @@ void parseOptions
token nextOption(optionsStream); token nextOption(optionsStream);
// Bug workaround // Bug workaround
if (nextOption.type() == token::FATALERROR) if (nextOption.type() == token::ERROR)
{ {
break; break;
} }

View file

@ -49,7 +49,7 @@ int main(int argc, char *argv[])
( (
probes::typeName, probes::typeName,
mesh, mesh,
"probesDict", word("probesDict"),
IOobject::MUST_READ, IOobject::MUST_READ,
true true
); );

View file

@ -106,7 +106,7 @@ int main(int argc, char *argv[])
( (
sampledSets::typeName, sampledSets::typeName,
mesh, mesh,
"sampleDict", word("sampleDict"),
IOobject::MUST_READ, IOobject::MUST_READ,
true true
); );
@ -115,7 +115,7 @@ int main(int argc, char *argv[])
( (
sampledSurfaces::typeName, sampledSurfaces::typeName,
mesh, mesh,
"sampleDict", word("sampleDict"),
IOobject::MUST_READ, IOobject::MUST_READ,
true true
); );

View file

@ -47,7 +47,7 @@ export FOAM_DEV=1
# #
# Location of FOAM installation # Location of FOAM installation
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
foamInstall=$HOME/$WM_PROJECT foamInstall=$HOME/OpenFOAM
# foamInstall=~$WM_PROJECT # foamInstall=~$WM_PROJECT
# foamInstall=/usr/local/$WM_PROJECT # foamInstall=/usr/local/$WM_PROJECT
# foamInstall=/opt/$WM_PROJECT # foamInstall=/opt/$WM_PROJECT
@ -179,6 +179,9 @@ export WM_COMPILER_LIB_ARCH=
# WM_PRECISION_OPTION = LDP | DP | SP # WM_PRECISION_OPTION = LDP | DP | SP
: ${WM_PRECISION_OPTION:=DP}; export WM_PRECISION_OPTION : ${WM_PRECISION_OPTION:=DP}; export WM_PRECISION_OPTION
# WM_LABEL_SIZE = 32 | 64
: ${WM_LABEL_SIZE:=32}; export WM_LABEL_SIZE
# WM_COMPILE_OPTION = Opt | Debug | Prof # WM_COMPILE_OPTION = Opt | Debug | Prof
: ${WM_COMPILE_OPTION:=Opt}; export WM_COMPILE_OPTION : ${WM_COMPILE_OPTION:=Opt}; export WM_COMPILE_OPTION

240
etc/codeTemplates/BC/BC.C Normal file
View file

@ -0,0 +1,240 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | foam-extend: Open Source CFD
\\ / O peration | Version: 4.0
\\ / A nd | Web: http://www.foam-extend.org
\\/ M anipulation | For copyright notice see file Copyright
-------------------------------------------------------------------------------
License
This file is part of foam-extend.
foam-extend 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.
foam-extend 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 foam-extend. If not, see <http://www.gnu.org/licenses/>.
\*---------------------------------------------------------------------------*/
#include "CONSTRUCT.H"
#include "addToRunTimeSelectionTable.H"
#include "fvPatchFieldMapper.H"
#include "volFields.H"
#include "surfaceFields.H"
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
template<class Type>
Foam::scalar Foam::CLASS::t() const
{
return this->db().time().timeOutputValue();
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
template<class Type>
Foam::CLASS::
CONSTRUCT
(
const fvPatch& p,
const DimensionedField<TYPE, volMesh>& iF
)
:
PARENT(p, iF),
scalarData_(0.0),
data_(pTraits<TYPE>::zero),
fieldData_(p.size(), pTraits<TYPE>::zero),
timeVsData_(),
wordData_("wordDefault"),
labelData_(-1),
boolData_(false)
{
this->refValue() = pTraits<TYPE>::zero;
this->refGrad() = pTraits<TYPE>::zero;
this->valueFraction() = 0.0;
}
template<class Type>
Foam::CLASS::
CONSTRUCT
(
const fvPatch& p,
const DimensionedField<TYPE, volMesh>& iF,
const dictionary& dict
)
:
PARENT(p, iF),
scalarData_(readScalar(dict.lookup("scalarData"))),
data_(pTraits<TYPE>(dict.lookup("data"))),
fieldData_("fieldData", dict, p.size()),
timeVsData_(DataEntry<TYPE>::New("timeVsData", dict)),
wordData_(dict.lookupOrDefault<word>("wordName", "wordDefault")),
labelData_(-1),
boolData_(false)
{
this->refGrad() = pTraits<TYPE>::zero;
this->valueFraction() = 0.0;
this->refValue() = FIELD("fieldData", dict, p.size());
FVPATCHF::operator=(this->refValue());
PARENT::evaluate();
/*
//Initialise with the value entry if evaluation is not possible
FVPATCHF::operator=
(
FIELD("value", dict, p.size())
);
this->refValue() = *this;
*/
}
template<class Type>
Foam::CLASS::
CONSTRUCT
(
const CLASS& ptf,
const fvPatch& p,
const DimensionedField<TYPE, volMesh>& iF,
const fvPatchFieldMapper& mapper
)
:
PARENT(ptf, p, iF, mapper),
scalarData_(ptf.scalarData_),
data_(ptf.data_),
fieldData_(ptf.fieldData_, mapper),
timeVsData_(ptf.timeVsData_, false),
wordData_(ptf.wordData_),
labelData_(-1),
boolData_(ptf.boolData_)
{}
template<class Type>
Foam::CLASS::
CONSTRUCT
(
const CLASS& ptf
)
:
PARENT(ptf),
scalarData_(ptf.scalarData_),
data_(ptf.data_),
fieldData_(ptf.fieldData_),
timeVsData_(ptf.timeVsData_, false),
wordData_(ptf.wordData_),
labelData_(-1),
boolData_(ptf.boolData_)
{}
template<class Type>
Foam::CLASS::
CONSTRUCT
(
const CLASS& ptf,
const DimensionedField<TYPE, volMesh>& iF
)
:
PARENT(ptf, iF),
scalarData_(ptf.scalarData_),
data_(ptf.data_),
fieldData_(ptf.fieldData_),
timeVsData_(ptf.timeVsData_, false),
wordData_(ptf.wordData_),
labelData_(-1),
boolData_(ptf.boolData_)
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template<class Type>
void Foam::CLASS::autoMap
(
const fvPatchFieldMapper& m
)
{
PARENT::autoMap(m);
fieldData_.autoMap(m);
}
template<class Type>
void Foam::CLASS::rmap
(
const FVPATCHF& ptf,
const labelList& addr
)
{
PARENT::rmap(ptf, addr);
const CLASS& tiptf =
refCast<const CLASS>(ptf);
fieldData_.rmap(tiptf.fieldData_, addr);
}
template<class Type>
void Foam::CLASS::updateCoeffs()
{
if (this->updated())
{
return;
}
PARENT::operator==
(
data_
+ fieldData_
+ scalarData_*timeVsData_->value(t())
);
const scalarField& phip =
this->patch().template lookupPatchField<surfaceScalarField, scalar>("phi");
this->valueFraction() = 1.0 - pos(phip);
PARENT::updateCoeffs();
}
template<class Type>
void Foam::CLASS::write
(
Ostream& os
) const
{
FVPATCHF::write(os);
os.writeKeyword("scalarData") << scalarData_ << token::END_STATEMENT << nl;
os.writeKeyword("data") << data_ << token::END_STATEMENT << nl;
fieldData_.writeEntry("fieldData", os);
timeVsData_->writeData(os);
os.writeKeyword("wordData") << wordData_ << token::END_STATEMENT << nl;
this->writeEntry("value", os);
}
// * * * * * * * * * * * * * * Build Macro Function * * * * * * * * * * * * //
namespace Foam
{
makePatchTypeField
(
FVPATCHF,
CLASS
);
}
// ************************************************************************* //

246
etc/codeTemplates/BC/BC.H Normal file
View file

@ -0,0 +1,246 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | foam-extend: Open Source CFD
\\ / O peration | Version: 4.0
\\ / A nd | Web: http://www.foam-extend.org
\\/ M anipulation | For copyright notice see file Copyright
-------------------------------------------------------------------------------
License
This file is part of foam-extend.
foam-extend 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.
foam-extend 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 foam-extend. If not, see <http://www.gnu.org/licenses/>.
Class
Foam::CONSTRUCT
Group
grpGenericBoundaryConditions
Description
This boundary condition provides a NAME condition,
calculated as:
\f[
Q = Q_{0} + Q_{p} + s*Q_{t}
\f]
where
\vartable
s | single scalar value [units]
Q_{0} | single TYPE value [units]
Q_{p} | TYPE field across patch [units]
Q_{t} | TYPE function of time [units]
\endtable
\heading Patch usage
\table
Property | Description | Req'd? | Default
scalarData | single scalar value | yes |
data | single TYPE value | yes |
fieldData | TYPE field across patch | yes |
timeVsData | TYPE function of time | yes |
wordData | word, eg name of data object | no | wordDefault
\endtable
Example of the boundary condition specification:
\verbatim
myPatch
{
type NAME;
scalarData -1;
data ONE;
fieldData uniform THREE;
timeVsData table (
(0 ZERO)
(1 TWO)
);
wordName anotherName;
value uniform FOUR; // optional initial value
}
\endverbatim
SourceFiles
CONSTRUCT.C
\*---------------------------------------------------------------------------*/
#ifndef CONSTRUCT_H
#define CONSTRUCT_H
#include "BASEFvPatchFields.H"
#include "DataEntry.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
/*---------------------------------------------------------------------------*\
Class CONSTRUCT Declaration
\*---------------------------------------------------------------------------*/
template<class Type>
class CONSTRUCT
:
public PARENT
{
// Private data
//- Single valued scalar quantity, e.g. a coefficient
scalar scalarData_;
//- Single valued Type quantity, e.g. reference pressure pRefValue_
// Other options include vector, tensor
TYPE data_;
//- Field of Types, typically defined across patch faces
// e.g. total pressure p0_. Other options include vectorField
FIELD fieldData_;
//- Type specified as a function of time for time-varying BCs
autoPtr<DataEntry<TYPE> > timeVsData_;
//- Word entry, e.g. pName_ for name of the pressure field on database
word wordData_;
//- Label, e.g. patch index, current time index
label labelData_;
//- Boolean for true/false, e.g. specify if flow rate is volumetric_
bool boolData_;
// Private Member Functions
//- Return current time
scalar t() const;
public:
//- Runtime type information
TypeName("NAME");
// Constructors
//- Construct from patch and internal field
CONSTRUCT
(
const fvPatch&,
const DimensionedField<TYPE, volMesh>&
);
//- Construct from patch, internal field and dictionary
CONSTRUCT
(
const fvPatch&,
const DimensionedField<TYPE, volMesh>&,
const dictionary&
);
//- Construct by mapping given BASETypeFvPatchField
// onto a new patch
CONSTRUCT
(
const CLASS&,
const fvPatch&,
const DimensionedField<TYPE, volMesh>&,
const fvPatchFieldMapper&
);
//- Construct as copy
CONSTRUCT
(
const CLASS&
);
//- Construct and return a clone
virtual tmp<FVPATCHF> clone() const
{
return tmp<FVPATCHF>
(
new CLASS(*this)
);
}
//- Construct as copy setting internal field reference
CONSTRUCT
(
const CLASS&,
const DimensionedField<TYPE, volMesh>&
);
//- Construct and return a clone setting internal field reference
virtual tmp<FVPATCHF> clone
(
const DimensionedField<TYPE, volMesh>& iF
) const
{
return tmp<FVPATCHF>
(
new CLASS
(
*this,
iF
)
);
}
// Member functions
// Mapping functions
//- Map (and resize as needed) from self given a mapping object
virtual void autoMap
(
const fvPatchFieldMapper&
);
//- Reverse map the given fvPatchField onto this fvPatchField
virtual void rmap
(
const FVPATCHF&,
const labelList&
);
// Evaluation functions
//- Update the coefficients associated with the patch field
virtual void updateCoeffs();
//- Write
virtual void write(Ostream&) const;
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#ifdef NoRepository
# include "CONSTRUCT.C"
#endif
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View file

@ -23,10 +23,9 @@ License
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "objectRegistry.H" #include "CONSTRUCTs.H"
#include "dxSurfaceWriter.H"
#include "surfaceWriters.H"
#include "addToRunTimeSelectionTable.H" #include "addToRunTimeSelectionTable.H"
#include "volFields.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -35,7 +34,7 @@ namespace Foam
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
makeSurfaceWriters(dxSurfaceWriter); makePatchFields(NAME);
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View file

@ -23,23 +23,27 @@ License
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "objectRegistry.H" #ifndef CONSTRUCTs_H
#include "rawSurfaceWriter.H" #define CONSTRUCTs_H
#include "surfaceWriters.H"
#include "addToRunTimeSelectionTable.H" #include "CONSTRUCT.H"
#include "fieldTypes.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam namespace Foam
{ {
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
makeSurfaceWriterType(rawSurfaceWriter, bool); makePatchTypeFieldTypedefs(NAME);
makeSurfaceWriters(rawSurfaceWriter);
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam } // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* // // ************************************************************************* //

View file

@ -23,23 +23,28 @@ License
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "objectRegistry.H" #ifndef CONSTRUCTsFwd_H
#include "nullSurfaceWriter.H" #define CONSTRUCTsFwd_H
#include "surfaceWriters.H"
#include "addToRunTimeSelectionTable.H" #include "fieldTypes.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam namespace Foam
{ {
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
makeSurfaceWriterType(nullSurfaceWriter, bool); template<class Type> class CONSTRUCT;
makeSurfaceWriters(nullSurfaceWriter);
makePatchTypeFieldTypedefs(NAME);
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam } // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* // // ************************************************************************* //

View file

@ -0,0 +1,3 @@
COMPILED.C
LIB = $(FOAM_USER_LIBBIN)/libNAME

View file

@ -0,0 +1,7 @@
EXE_INC = \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude
LIB_LIBS = \
-lfiniteVolume \
-lmeshTools

View file

@ -0,0 +1,3 @@
NAME.C
EXE = $(FOAM_USER_APPBIN)/NAME

View file

@ -0,0 +1,7 @@
EXE_INC = \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude
EXE_LIBS = \
-lfiniteVolume \
-lmeshTools

View file

@ -0,0 +1,52 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | foam-extend: Open Source CFD
\\ / O peration | Version: 4.0
\\ / A nd | Web: http://www.foam-extend.org
\\/ M anipulation | For copyright notice see file Copyright
-------------------------------------------------------------------------------
License
This file is part of foam-extend.
foam-extend 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.
foam-extend 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 foam-extend. If not, see <http://www.gnu.org/licenses/>.
Application
NAME
Description
\*---------------------------------------------------------------------------*/
#include "fvCFD.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
int main(int argc, char *argv[])
{
#include "setRootCase.H"
#include "createTime.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Info<< nl << "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
<< nl << endl;
Info<< "End\n" << endl;
return 0;
}
// ************************************************************************* //

View file

@ -0,0 +1,65 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | foam-extend: Open Source CFD
\\ / O peration | Version: 4.0
\\ / A nd | Web: http://www.foam-extend.org
\\/ M anipulation | For copyright notice see file Copyright
-------------------------------------------------------------------------------
License
This file is part of foam-extend.
foam-extend 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.
foam-extend 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 foam-extend. If not, see <http://www.gnu.org/licenses/>.
\*---------------------------------------------------------------------------*/
#include "FilterFunctionObjectTemplate.H"
// * * * * * * * * * * * * * * * Global Functions * * * * * * * * * * * * * //
extern "C"
{
// dynamicCode:
// SHA1 = ${SHA1sum}
//
// unique function name that can be checked if the correct library version
// has been loaded
void ${typeName}_${SHA1sum}(bool load)
{
if (load)
{
// code that can be explicitly executed after loading
}
else
{
// code that can be explicitly executed before unloading
}
}
}
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam
{
defineNamedTemplateTypeNameAndDebug(${typeName}FilterFunctionObject, 0);
//addToRunTimeSelectionTable
addToRunTimeSelectionTable
(
functionObject,
${typeName}FilterFunctionObject,
dictionary
);
}
// ************************************************************************* //

View file

@ -0,0 +1,51 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | foam-extend: Open Source CFD
\\ / O peration | Version: 4.0
\\ / A nd | Web: http://www.foam-extend.org
\\/ M anipulation | For copyright notice see file Copyright
-------------------------------------------------------------------------------
License
This file is part of foam-extend.
foam-extend 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.
foam-extend 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 foam-extend. If not, see <http://www.gnu.org/licenses/>.
Description
FunctionObject wrapper around functionObjectTemplate to allow them
to be created via the functions entry within controlDict.
SourceFiles
FilterFunctionObject.C
\*---------------------------------------------------------------------------*/
#ifndef FilterFunctionObject_H
#define FilterFunctionObject_H
#include "functionObjectTemplate.H"
#include "OutputFilterFunctionObject.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
typedef OutputFilterFunctionObject<${typeName}FunctionObject>
${typeName}FilterFunctionObject;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View file

@ -0,0 +1,50 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | foam-extend: Open Source CFD
\\ / O peration | Version: 4.0
\\ / A nd | Web: http://www.foam-extend.org
\\/ M anipulation | For copyright notice see file Copyright
-------------------------------------------------------------------------------
License
This file is part of foam-extend.
foam-extend 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.
foam-extend 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 foam-extend. If not, see <http://www.gnu.org/licenses/>.
Typedef
Foam::IOfunctionObjectTemplate
Description
Instance of the generic IOOutputFilter for ${typeName}FunctionObject.
\*---------------------------------------------------------------------------*/
#ifndef IOfunctionObjectTemplate_H
#define IOfunctionObjectTemplate_H
#include "functionObjectTemplate.H"
#include "IOOutputFilter.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
typedef IOOutputFilter<${typeName}FunctionObject>
IO${typeName}FunctionObject;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View file

@ -21,47 +21,51 @@ License
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with foam-extend. If not, see <http://www.gnu.org/licenses/>. along with foam-extend. If not, see <http://www.gnu.org/licenses/>.
Primitive
ulong
Description Description
System unsigned long Template for use with codeStream.
SourceFiles
ulongIO.C
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef ulong_H #include "dictionary.H"
#define ulong_H #include "Ostream.H"
#include "Pstream.H"
#include "unitConversion.H"
#include "word.H" //{{{ begin codeInclude
${codeInclude}
//}}} end codeInclude
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam namespace Foam
{ {
class Istream; // * * * * * * * * * * * * * * * Local Functions * * * * * * * * * * * * * * //
class Ostream;
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // //{{{ begin localCode
${localCode}
//}}} end localCode
//- Return a string representation of a ulong
word name(const unsigned long);
// * * * * * * * * * * * * * * * IOstream Operators * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Global Functions * * * * * * * * * * * * * //
extern "C"
{
void ${typeName}
(
Ostream& os,
const dictionary& dict
)
{
//{{{ begin code
${code}
//}}} end code
}
}
unsigned long readUlong(Istream&);
Istream& operator>>(Istream&, unsigned long&);
Ostream& operator<<(Ostream&, const unsigned long);
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam } // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* // // ************************************************************************* //

View file

@ -0,0 +1,204 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | foam-extend: Open Source CFD
\\ / O peration | Version: 4.0
\\ / A nd | Web: http://www.foam-extend.org
\\/ M anipulation | For copyright notice see file Copyright
-------------------------------------------------------------------------------
License
This file is part of foam-extend.
foam-extend 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.
foam-extend 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 foam-extend. If not, see <http://www.gnu.org/licenses/>.
\*---------------------------------------------------------------------------*/
#include "codedFvOptionTemplate.H"
#include "addToRunTimeSelectionTable.H"
#include "fvPatchFieldMapper.H"
#include "volFields.H"
#include "surfaceFields.H"
#include "unitConversion.H"
#include "fvMatrix.H"
//{{{ begin codeInclude
${codeInclude}
//}}} end codeInclude
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
namespace fv
{
// * * * * * * * * * * * * * * * Local Functions * * * * * * * * * * * * * * //
//{{{ begin localCode
${localCode}
//}}} end localCode
// * * * * * * * * * * * * * * * Global Functions * * * * * * * * * * * * * //
extern "C"
{
// dynamicCode:
// SHA1 = ${SHA1sum}
//
// unique function name that can be checked if the correct library version
// has been loaded
void ${typeName}_${SHA1sum}(bool load)
{
if (load)
{
// code that can be explicitly executed after loading
}
else
{
// code that can be explicitly executed before unloading
}
}
}
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
//makeRemovablePatchTypeField
//(
// fvPatch${FieldType},
// ${typeName}FvOption${SourceType}
//);
defineTypeNameAndDebug(${typeName}FvOption${SourceType}, 0);
addToRunTimeSelectionTable
(
option,
${typeName}FvOption${SourceType},
dictionary
);
const char* const ${typeName}FvOption${SourceType}::SHA1sum =
"${SHA1sum}";
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
${typeName}FvOption${SourceType}::
${typeName}FvOption${SourceType}
(
const word& name,
const word& modelType,
const dictionary& dict,
const fvMesh& mesh
)
:
option(name, modelType, dict, mesh)
{
if (${verbose:-false})
{
Info<<"construct ${typeName} sha1: ${SHA1sum}"
" from components\n";
}
}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
${typeName}FvOption${SourceType}::
~${typeName}FvOption${SourceType}()
{
if (${verbose:-false})
{
Info<<"destroy ${typeName} sha1: ${SHA1sum}\n";
}
}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
void ${typeName}FvOption${SourceType}::correct
(
GeometricField<${TemplateType}, fvPatchField, volMesh>& fld
)
{
if (${verbose:-false})
{
Info<<"${typeName}FvOption${SourceType}::correct()\n";
}
//{{{ begin code
${codeCorrect}
//}}} end code
}
void ${typeName}FvOption${SourceType}::addSup
(
fvMatrix<${TemplateType}>& eqn,
const label fieldI
)
{
if (${verbose:-false})
{
Info<<"${typeName}FvOption${SourceType}::addSup()\n";
}
//{{{ begin code
${codeAddSup}
//}}} end code
}
void ${typeName}FvOption${SourceType}::addSup
(
const volScalarField& rho,
fvMatrix<${TemplateType}>& eqn,
const label fieldI
)
{
if (${verbose:-false})
{
Info<<"${typeName}FvOption${SourceType}::addSup()\n";
}
//{{{ begin code
${codeAddSup}
//}}} end code
}
void ${typeName}FvOption${SourceType}::setValue
(
fvMatrix<${TemplateType}>& eqn,
const label fieldI
)
{
if (${verbose:-false})
{
Info<<"${typeName}FvOption${SourceType}::setValue()\n";
}
//{{{ begin code
${codeSetValue}
//}}} end code
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
} // End namespace fv
// ************************************************************************* //

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