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:
parent
ec83275923
commit
67ab0b5abd
929 changed files with 73958 additions and 8367 deletions
|
@ -7,7 +7,7 @@
|
|||
"transportProperties",
|
||||
runTime.constant(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::MUST_READ_IF_MODIFIED,
|
||||
IOobject::NO_WRITE
|
||||
)
|
||||
);
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
"turbulenceProperties",
|
||||
runTime.constant(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::MUST_READ_IF_MODIFIED,
|
||||
IOobject::NO_WRITE
|
||||
)
|
||||
);
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
"transportProperties",
|
||||
runTime.constant(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::MUST_READ_IF_MODIFIED,
|
||||
IOobject::NO_WRITE
|
||||
)
|
||||
);
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
"transportProperties",
|
||||
runTime.constant(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::MUST_READ_IF_MODIFIED,
|
||||
IOobject::NO_WRITE
|
||||
)
|
||||
);
|
||||
|
|
|
@ -50,10 +50,12 @@ PDRkEpsilon::PDRkEpsilon
|
|||
const volScalarField& rho,
|
||||
const volVectorField& U,
|
||||
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_
|
||||
(
|
||||
|
|
|
@ -112,7 +112,9 @@ public:
|
|||
const volScalarField& rho,
|
||||
const volVectorField& U,
|
||||
const surfaceScalarField& phi,
|
||||
const basicThermo& thermophysicalModel
|
||||
const basicThermo& thermophysicalModel,
|
||||
const word& turbulenceModelName = turbulenceModel::typeName,
|
||||
const word& modelName = typeName
|
||||
);
|
||||
|
||||
|
||||
|
|
|
@ -110,7 +110,7 @@
|
|||
"PDRProperties",
|
||||
runTime.constant(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::MUST_READ_IF_MODIFIED,
|
||||
IOobject::NO_WRITE
|
||||
)
|
||||
);
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
"combustionProperties",
|
||||
runTime.constant(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::MUST_READ_IF_MODIFIED,
|
||||
IOobject::NO_WRITE
|
||||
)
|
||||
);
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
"combustionProperties",
|
||||
runTime.constant(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::MUST_READ_IF_MODIFIED,
|
||||
IOobject::NO_WRITE
|
||||
)
|
||||
);
|
||||
|
|
|
@ -7,7 +7,7 @@ IOdictionary combustionProperties
|
|||
"combustionProperties",
|
||||
runTime.constant(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::MUST_READ_IF_MODIFIED,
|
||||
IOobject::NO_WRITE
|
||||
)
|
||||
);
|
||||
|
|
|
@ -65,7 +65,7 @@ IOdictionary combustionProperties
|
|||
"combustionProperties",
|
||||
runTime.constant(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::MUST_READ_IF_MODIFIED,
|
||||
IOobject::NO_WRITE
|
||||
)
|
||||
);
|
||||
|
|
|
@ -7,7 +7,7 @@ IOdictionary chemistryProperties
|
|||
"chemistryProperties",
|
||||
runTime.constant(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::MUST_READ_IF_MODIFIED,
|
||||
IOobject::NO_WRITE,
|
||||
false
|
||||
)
|
||||
|
|
|
@ -7,7 +7,7 @@ IOdictionary chemistryProperties
|
|||
"chemistryProperties",
|
||||
runTime.constant(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::MUST_READ_IF_MODIFIED,
|
||||
IOobject::NO_WRITE,
|
||||
false
|
||||
)
|
||||
|
|
|
@ -9,7 +9,7 @@ IOdictionary thermophysicalProperties
|
|||
"thermophysicalProperties",
|
||||
runTime.constant(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::MUST_READ_IF_MODIFIED,
|
||||
IOobject::NO_WRITE
|
||||
)
|
||||
);
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
"thermodynamicProperties",
|
||||
runTime.constant(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::MUST_READ_IF_MODIFIED,
|
||||
IOobject::NO_WRITE
|
||||
)
|
||||
);
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
"thermodynamicProperties",
|
||||
runTime.constant(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::MUST_READ_IF_MODIFIED,
|
||||
IOobject::NO_WRITE
|
||||
)
|
||||
);
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
"transportProperties",
|
||||
runTime.constant(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::MUST_READ_IF_MODIFIED,
|
||||
IOobject::NO_WRITE
|
||||
)
|
||||
);
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
"thermodynamicProperties",
|
||||
runTime.constant(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::MUST_READ_IF_MODIFIED,
|
||||
IOobject::NO_WRITE
|
||||
)
|
||||
);
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
"transportProperties",
|
||||
runTime.constant(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::MUST_READ_IF_MODIFIED,
|
||||
IOobject::NO_WRITE
|
||||
)
|
||||
);
|
||||
|
|
|
@ -69,7 +69,7 @@
|
|||
"transportProperties",
|
||||
runTime.constant(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::MUST_READ_IF_MODIFIED,
|
||||
IOobject::NO_WRITE
|
||||
)
|
||||
);
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
"transportProperties",
|
||||
runTime.constant(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::MUST_READ_IF_MODIFIED,
|
||||
IOobject::NO_WRITE
|
||||
)
|
||||
);
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
"transportProperties",
|
||||
runTime.constant(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::MUST_READ_IF_MODIFIED,
|
||||
IOobject::NO_WRITE
|
||||
)
|
||||
);
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
"physicalProperties",
|
||||
runTime.constant(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::MUST_READ_IF_MODIFIED,
|
||||
IOobject::NO_WRITE
|
||||
)
|
||||
);
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
"transportProperties",
|
||||
runTime.constant(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::MUST_READ_IF_MODIFIED,
|
||||
IOobject::NO_WRITE
|
||||
)
|
||||
);
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
"transportProperties",
|
||||
runTime.constant(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::MUST_READ_IF_MODIFIED,
|
||||
IOobject::NO_WRITE
|
||||
)
|
||||
);
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
"financialProperties",
|
||||
runTime.constant(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::MUST_READ_IF_MODIFIED,
|
||||
IOobject::NO_WRITE
|
||||
)
|
||||
);
|
||||
|
|
|
@ -5,7 +5,7 @@ IOdictionary transportProperties
|
|||
"transportProperties",
|
||||
runTime.constant(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::MUST_READ_IF_MODIFIED,
|
||||
IOobject::NO_WRITE
|
||||
)
|
||||
);
|
||||
|
|
|
@ -21,7 +21,7 @@ IOdictionary transportProperties
|
|||
"transportProperties",
|
||||
runTime.constant(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::MUST_READ_IF_MODIFIED,
|
||||
IOobject::NO_WRITE
|
||||
)
|
||||
);
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
"transportProperties",
|
||||
runTime.constant(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::MUST_READ_IF_MODIFIED,
|
||||
IOobject::NO_WRITE
|
||||
)
|
||||
);
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
"transportProperties",
|
||||
runTime.constant(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::MUST_READ_IF_MODIFIED,
|
||||
IOobject::NO_WRITE
|
||||
)
|
||||
);
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
"transportProperties",
|
||||
runTime.constant(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::MUST_READ_IF_MODIFIED,
|
||||
IOobject::NO_WRITE
|
||||
)
|
||||
);
|
||||
|
|
|
@ -1,25 +1,25 @@
|
|||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
\\ / 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 OpenFOAM.
|
||||
This file is part of foam-extend.
|
||||
|
||||
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.
|
||||
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.
|
||||
|
||||
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.
|
||||
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 OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
along with foam-extend. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Application
|
||||
RichardsFoam
|
||||
|
|
|
@ -1,25 +1,25 @@
|
|||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
\\ / 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 OpenFOAM.
|
||||
This file is part of foam-extend.
|
||||
|
||||
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.
|
||||
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.
|
||||
|
||||
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.
|
||||
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 OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
along with foam-extend. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Global
|
||||
setDeltaT
|
||||
|
|
|
@ -1,25 +1,25 @@
|
|||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
\\ / 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 OpenFOAM.
|
||||
This file is part of foam-extend.
|
||||
|
||||
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.
|
||||
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.
|
||||
|
||||
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.
|
||||
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 OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
along with foam-extend. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Application
|
||||
spatialMeanValue
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
"U",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::MUST_READ_IF_MODIFIED,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh
|
||||
|
@ -44,7 +44,7 @@
|
|||
"transportProperties",
|
||||
runTime.constant(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::MUST_READ_IF_MODIFIED,
|
||||
IOobject::NO_WRITE
|
||||
)
|
||||
);
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
"transportProperties",
|
||||
runTime.constant(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::MUST_READ_IF_MODIFIED,
|
||||
IOobject::NO_WRITE,
|
||||
false
|
||||
)
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
"transportProperties",
|
||||
runTime.constant(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::MUST_READ_IF_MODIFIED,
|
||||
IOobject::NO_WRITE
|
||||
)
|
||||
);
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
"transportProperties",
|
||||
runTime.constant(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::MUST_READ_IF_MODIFIED,
|
||||
IOobject::NO_WRITE
|
||||
)
|
||||
);
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
"transportProperties",
|
||||
runTime.constant(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::MUST_READ_IF_MODIFIED,
|
||||
IOobject::NO_WRITE
|
||||
)
|
||||
);
|
||||
|
|
|
@ -7,7 +7,7 @@ IOdictionary gravitationalProperties
|
|||
"gravitationalProperties",
|
||||
runTime.constant(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::MUST_READ_IF_MODIFIED,
|
||||
IOobject::NO_WRITE
|
||||
)
|
||||
);
|
||||
|
|
|
@ -7,7 +7,7 @@ IOdictionary chemistryProperties
|
|||
"chemistryProperties",
|
||||
runTime.constant(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::MUST_READ_IF_MODIFIED,
|
||||
IOobject::NO_WRITE,
|
||||
false
|
||||
)
|
||||
|
|
|
@ -7,7 +7,7 @@ IOdictionary chemistryProperties
|
|||
"chemistryProperties",
|
||||
runTime.constant(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::MUST_READ_IF_MODIFIED,
|
||||
IOobject::NO_WRITE,
|
||||
false
|
||||
)
|
||||
|
|
|
@ -7,7 +7,7 @@ IOdictionary chemistryProperties
|
|||
"chemistryProperties",
|
||||
runTime.constant(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::MUST_READ_IF_MODIFIED,
|
||||
IOobject::NO_WRITE,
|
||||
false
|
||||
)
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
"transportProperties",
|
||||
runTime.constant(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::MUST_READ_IF_MODIFIED,
|
||||
IOobject::NO_WRITE
|
||||
)
|
||||
);
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
"transportProperties",
|
||||
runTime.constant(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::MUST_READ_IF_MODIFIED,
|
||||
IOobject::NO_WRITE
|
||||
)
|
||||
);
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
"thermodynamicProperties",
|
||||
runTime.constant(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::MUST_READ_IF_MODIFIED,
|
||||
IOobject::NO_WRITE
|
||||
)
|
||||
);
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
"transportProperties",
|
||||
runTime.constant(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::MUST_READ_IF_MODIFIED,
|
||||
IOobject::NO_WRITE
|
||||
)
|
||||
);
|
||||
|
|
|
@ -91,7 +91,7 @@
|
|||
"transportProperties",
|
||||
runTime.constant(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::MUST_READ_IF_MODIFIED,
|
||||
IOobject::NO_WRITE
|
||||
)
|
||||
);
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
"RASProperties",
|
||||
runTime.constant(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::MUST_READ_IF_MODIFIED,
|
||||
IOobject::NO_WRITE
|
||||
)
|
||||
);
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
"thermodynamicProperties",
|
||||
runTime.constant(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::MUST_READ_IF_MODIFIED,
|
||||
IOobject::NO_WRITE
|
||||
)
|
||||
);
|
||||
|
|
|
@ -43,7 +43,7 @@ Foam::phaseChangeTwoPhaseMixture::New
|
|||
"transportProperties",
|
||||
U.time().constant(),
|
||||
U.db(),
|
||||
IOobject::MUST_READ,
|
||||
IOobject::MUST_READ_IF_MODIFIED,
|
||||
IOobject::NO_WRITE,
|
||||
false
|
||||
)
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
"transportProperties",
|
||||
runTime.constant(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::MUST_READ_IF_MODIFIED,
|
||||
IOobject::NO_WRITE
|
||||
)
|
||||
);
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
"transportProperties",
|
||||
runTime.constant(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::MUST_READ_IF_MODIFIED,
|
||||
IOobject::NO_WRITE
|
||||
)
|
||||
);
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
"ppProperties",
|
||||
runTime.constant(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::MUST_READ_IF_MODIFIED,
|
||||
IOobject::NO_WRITE
|
||||
)
|
||||
);
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
"U",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::MUST_READ_IF_MODIFIED,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh
|
||||
|
@ -23,7 +23,7 @@
|
|||
"mechanicalProperties",
|
||||
"constant",
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::MUST_READ_IF_MODIFIED,
|
||||
IOobject::NO_WRITE
|
||||
)
|
||||
);
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
"transportProperties",
|
||||
runTime.constant(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::MUST_READ_IF_MODIFIED,
|
||||
IOobject::NO_WRITE
|
||||
)
|
||||
);
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
"couplingProperties",
|
||||
runTime.constant(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::MUST_READ_IF_MODIFIED,
|
||||
IOobject::NO_WRITE
|
||||
)
|
||||
);
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
"mechanicalProperties",
|
||||
runTime.constant(),
|
||||
stressMesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::MUST_READ_IF_MODIFIED,
|
||||
IOobject::NO_WRITE
|
||||
)
|
||||
);
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
"mechanicalProperties",
|
||||
runTime.constant(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::MUST_READ_IF_MODIFIED,
|
||||
IOobject::NO_WRITE
|
||||
)
|
||||
);
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
"thermalProperties",
|
||||
runTime.constant(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::MUST_READ_IF_MODIFIED,
|
||||
IOobject::NO_WRITE
|
||||
)
|
||||
);
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
"mechanicalProperties",
|
||||
runTime.constant(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::MUST_READ_IF_MODIFIED,
|
||||
IOobject::NO_WRITE
|
||||
)
|
||||
);
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
"thermalProperties",
|
||||
runTime.constant(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::MUST_READ_IF_MODIFIED,
|
||||
IOobject::NO_WRITE
|
||||
)
|
||||
);
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
"thermalProperties",
|
||||
runTime.constant(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::MUST_READ_IF_MODIFIED,
|
||||
IOobject::NO_WRITE
|
||||
)
|
||||
);
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
"transportProperties",
|
||||
runTime.constant(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::MUST_READ_IF_MODIFIED,
|
||||
IOobject::NO_WRITE
|
||||
)
|
||||
);
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
"couplingProperties",
|
||||
runTime.constant(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::MUST_READ_IF_MODIFIED,
|
||||
IOobject::NO_WRITE
|
||||
)
|
||||
);
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
"mechanicalProperties",
|
||||
runTime.constant(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::MUST_READ_IF_MODIFIED,
|
||||
IOobject::NO_WRITE
|
||||
)
|
||||
);
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
"mrfProperties",
|
||||
runTime.constant(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::MUST_READ_IF_MODIFIED,
|
||||
IOobject::NO_WRITE
|
||||
)
|
||||
);
|
||||
|
|
|
@ -285,7 +285,7 @@ bool Foam::bubbleHistory::start()
|
|||
}
|
||||
|
||||
|
||||
bool Foam::bubbleHistory::execute()
|
||||
bool Foam::bubbleHistory::execute(const bool forceWrite)
|
||||
{
|
||||
const fvMesh& mesh =
|
||||
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)
|
||||
{
|
||||
if (dict.found("region"))
|
||||
|
|
|
@ -109,10 +109,21 @@ public:
|
|||
virtual bool start();
|
||||
|
||||
//- 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
|
||||
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&)
|
||||
{}
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -186,7 +186,7 @@ bool Foam::sloshingHistory::start()
|
|||
}
|
||||
|
||||
|
||||
bool Foam::sloshingHistory::execute()
|
||||
bool Foam::sloshingHistory::execute(const bool forceWrite)
|
||||
{
|
||||
const fvMesh& mesh =
|
||||
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)
|
||||
{
|
||||
if (dict.found("region"))
|
||||
|
|
|
@ -114,10 +114,21 @@ public:
|
|||
virtual bool start();
|
||||
|
||||
//- 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
|
||||
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&)
|
||||
{}
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -14,5 +14,4 @@ EXE_LIBS = \
|
|||
-lmeshTools \
|
||||
-ldynamicMesh \
|
||||
-ldynamicFvMesh \
|
||||
-lautoMesh \
|
||||
-L$(MESQUITE_LIB_DIR) -lmesquite
|
||||
-lautoMesh
|
||||
|
|
|
@ -46,6 +46,7 @@ Description
|
|||
#include "mapPolyMesh.H"
|
||||
#include "directTopoChange.H"
|
||||
#include "polyModifyFace.H"
|
||||
#include "wordReList.H"
|
||||
|
||||
using namespace Foam;
|
||||
|
||||
|
@ -698,7 +699,10 @@ int main(int argc, char *argv[])
|
|||
|
||||
if (sourceType == "patches")
|
||||
{
|
||||
labelHashSet patchSources(patches.patchSet(dict.lookup("patches")));
|
||||
labelHashSet patchSources
|
||||
(
|
||||
patches.patchSet(wordReList(dict.lookup("patches")))
|
||||
);
|
||||
|
||||
// Repatch faces of the patches.
|
||||
forAllConstIter(labelHashSet, patchSources, iter)
|
||||
|
|
|
@ -95,7 +95,7 @@ using namespace Foam;
|
|||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
template<class GeoField>
|
||||
void addPatchFields(fvMesh& mesh, const word& patchFieldType)
|
||||
void addPatchFields(const fvMesh& mesh, const word& patchFieldType)
|
||||
{
|
||||
HashTable<const GeoField*> flds
|
||||
(
|
||||
|
@ -136,7 +136,7 @@ void addPatchFields(fvMesh& mesh, const word& patchFieldType)
|
|||
|
||||
// Remove last patch field
|
||||
template<class GeoField>
|
||||
void trimPatchFields(fvMesh& mesh, const label nPatches)
|
||||
void trimPatchFields(const fvMesh& mesh, const label nPatches)
|
||||
{
|
||||
HashTable<const GeoField*> flds
|
||||
(
|
||||
|
@ -163,7 +163,7 @@ void trimPatchFields(fvMesh& mesh, const label nPatches)
|
|||
|
||||
// Reorder patch field
|
||||
template<class GeoField>
|
||||
void reorderPatchFields(fvMesh& mesh, const labelList& oldToNew)
|
||||
void reorderPatchFields(const fvMesh& mesh, const labelList& oldToNew)
|
||||
{
|
||||
HashTable<const GeoField*> flds
|
||||
(
|
||||
|
|
|
@ -90,7 +90,7 @@ int main(int argc, char *argv[])
|
|||
// Set all times on processor meshes equal to decomposed mesh
|
||||
forAll (databases, procI)
|
||||
{
|
||||
databases[procI].setTime(runTime.timeName(), runTime.timeIndex());
|
||||
databases[procI].setTime(runTime, runTime.timeIndex());
|
||||
}
|
||||
|
||||
// Read all meshes and addressing to reconstructed mesh
|
||||
|
|
|
@ -51,7 +51,7 @@ Description
|
|||
int main(int argc, char *argv[])
|
||||
{
|
||||
// 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);
|
||||
argList::noParallel();
|
||||
# include "addRegionOption.H"
|
||||
|
@ -125,7 +125,7 @@ int main(int argc, char *argv[])
|
|||
// Set all times on processor meshes equal to reconstructed mesh
|
||||
forAll (databases, procI)
|
||||
{
|
||||
databases[procI].setTime(runTime.timeName(), runTime.timeIndex());
|
||||
databases[procI].setTime(runTime);
|
||||
}
|
||||
|
||||
// Read all meshes and addressing to reconstructed mesh
|
||||
|
|
|
@ -50,8 +50,8 @@ Description
|
|||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
// enable -constant ... if someone really wants it
|
||||
// enable -zeroTime to prevent accidentally trashing the initial fields
|
||||
// disable -constant
|
||||
// enable -noZero to prevent accidentally trashing the initial fields
|
||||
timeSelector::addOptions(false, true);
|
||||
argList::noParallel();
|
||||
# include "addRegionOption.H"
|
||||
|
|
|
@ -74,7 +74,7 @@ using namespace Foam;
|
|||
int main(int argc, char *argv[])
|
||||
{
|
||||
// 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
|
||||
timeSelector::addOptions(true, false);
|
||||
argList::noParallel();
|
||||
|
|
|
@ -22,12 +22,14 @@ LINK_DIRECTORIES(
|
|||
|
||||
INCLUDE_DIRECTORIES(
|
||||
$ENV{WM_PROJECT_DIR}/src/OpenFOAM/lnInclude
|
||||
$ENV{WM_PROJECT_DIR}/src/OSspecific/$ENV{WM_OSTYPE}/lnInclude
|
||||
$ENV{WM_PROJECT_DIR}/src/finiteVolume/lnInclude
|
||||
${PROJECT_SOURCE_DIR}/../vtkPV3Foam
|
||||
)
|
||||
|
||||
ADD_DEFINITIONS(
|
||||
-DWM_$ENV{WM_PRECISION_OPTION}
|
||||
-DWM_LABEL_SIZE=$ENV{WM_LABEL_SIZE}
|
||||
)
|
||||
|
||||
# Set output library destination to plugin folder
|
||||
|
|
|
@ -22,12 +22,14 @@ LINK_DIRECTORIES(
|
|||
|
||||
INCLUDE_DIRECTORIES(
|
||||
$ENV{WM_PROJECT_DIR}/src/foam/lnInclude
|
||||
$ENV{WM_PROJECT_DIR}/src/OSspecific/$ENV{WM_OSTYPE}/lnInclude
|
||||
$ENV{WM_PROJECT_DIR}/src/finiteVolume/lnInclude
|
||||
${PROJECT_SOURCE_DIR}/../vtkPV4Foam
|
||||
)
|
||||
|
||||
ADD_DEFINITIONS(
|
||||
-DWM_$ENV{WM_PRECISION_OPTION}
|
||||
-DWM_LABEL_SIZE=$ENV{WM_LABEL_SIZE}
|
||||
)
|
||||
|
||||
# Set output library destination to plugin folder
|
||||
|
|
|
@ -18,11 +18,16 @@ SET(PVFoamReader_LIBS
|
|||
|
||||
INCLUDE_DIRECTORIES(
|
||||
$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{ParaView_INST_DIR}/include
|
||||
../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.
|
||||
|
|
|
@ -55,7 +55,7 @@ void parseOptions
|
|||
token nextOption(optionsStream);
|
||||
|
||||
// Bug workaround
|
||||
if (nextOption.type() == token::FATALERROR)
|
||||
if (nextOption.type() == token::ERROR)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
@ -89,7 +89,7 @@ void parseOptions
|
|||
token nextOption(optionsStream);
|
||||
|
||||
// Bug workaround
|
||||
if (nextOption.type() == token::FATALERROR)
|
||||
if (nextOption.type() == token::ERROR)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -49,7 +49,7 @@ int main(int argc, char *argv[])
|
|||
(
|
||||
probes::typeName,
|
||||
mesh,
|
||||
"probesDict",
|
||||
word("probesDict"),
|
||||
IOobject::MUST_READ,
|
||||
true
|
||||
);
|
||||
|
|
|
@ -106,7 +106,7 @@ int main(int argc, char *argv[])
|
|||
(
|
||||
sampledSets::typeName,
|
||||
mesh,
|
||||
"sampleDict",
|
||||
word("sampleDict"),
|
||||
IOobject::MUST_READ,
|
||||
true
|
||||
);
|
||||
|
@ -115,7 +115,7 @@ int main(int argc, char *argv[])
|
|||
(
|
||||
sampledSurfaces::typeName,
|
||||
mesh,
|
||||
"sampleDict",
|
||||
word("sampleDict"),
|
||||
IOobject::MUST_READ,
|
||||
true
|
||||
);
|
||||
|
|
|
@ -47,7 +47,7 @@ export FOAM_DEV=1
|
|||
#
|
||||
# Location of FOAM installation
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
foamInstall=$HOME/$WM_PROJECT
|
||||
foamInstall=$HOME/OpenFOAM
|
||||
# foamInstall=~$WM_PROJECT
|
||||
# foamInstall=/usr/local/$WM_PROJECT
|
||||
# foamInstall=/opt/$WM_PROJECT
|
||||
|
@ -179,6 +179,9 @@ export WM_COMPILER_LIB_ARCH=
|
|||
# WM_PRECISION_OPTION = LDP | DP | SP
|
||||
: ${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}; export WM_COMPILE_OPTION
|
||||
|
||||
|
|
240
etc/codeTemplates/BC/BC.C
Normal file
240
etc/codeTemplates/BC/BC.C
Normal 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
246
etc/codeTemplates/BC/BC.H
Normal 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
|
||||
|
||||
// ************************************************************************* //
|
|
@ -23,10 +23,9 @@ License
|
|||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "objectRegistry.H"
|
||||
#include "dxSurfaceWriter.H"
|
||||
#include "surfaceWriters.H"
|
||||
#include "CONSTRUCTs.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
#include "volFields.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
@ -35,7 +34,7 @@ namespace Foam
|
|||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
makeSurfaceWriters(dxSurfaceWriter);
|
||||
makePatchFields(NAME);
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
|
@ -23,23 +23,27 @@ License
|
|||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "objectRegistry.H"
|
||||
#include "rawSurfaceWriter.H"
|
||||
#include "surfaceWriters.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
#ifndef CONSTRUCTs_H
|
||||
#define CONSTRUCTs_H
|
||||
|
||||
#include "CONSTRUCT.H"
|
||||
#include "fieldTypes.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
makeSurfaceWriterType(rawSurfaceWriter, bool);
|
||||
makeSurfaceWriters(rawSurfaceWriter);
|
||||
makePatchTypeFieldTypedefs(NAME);
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
|
@ -23,23 +23,28 @@ License
|
|||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "objectRegistry.H"
|
||||
#include "nullSurfaceWriter.H"
|
||||
#include "surfaceWriters.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
#ifndef CONSTRUCTsFwd_H
|
||||
#define CONSTRUCTsFwd_H
|
||||
|
||||
#include "fieldTypes.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
makeSurfaceWriterType(nullSurfaceWriter, bool);
|
||||
makeSurfaceWriters(nullSurfaceWriter);
|
||||
template<class Type> class CONSTRUCT;
|
||||
|
||||
makePatchTypeFieldTypedefs(NAME);
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
3
etc/codeTemplates/BC/Make/files
Normal file
3
etc/codeTemplates/BC/Make/files
Normal file
|
@ -0,0 +1,3 @@
|
|||
COMPILED.C
|
||||
|
||||
LIB = $(FOAM_USER_LIBBIN)/libNAME
|
7
etc/codeTemplates/BC/Make/options
Normal file
7
etc/codeTemplates/BC/Make/options
Normal file
|
@ -0,0 +1,7 @@
|
|||
EXE_INC = \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude
|
||||
|
||||
LIB_LIBS = \
|
||||
-lfiniteVolume \
|
||||
-lmeshTools
|
3
etc/codeTemplates/app/Make/files
Normal file
3
etc/codeTemplates/app/Make/files
Normal file
|
@ -0,0 +1,3 @@
|
|||
NAME.C
|
||||
|
||||
EXE = $(FOAM_USER_APPBIN)/NAME
|
7
etc/codeTemplates/app/Make/options
Normal file
7
etc/codeTemplates/app/Make/options
Normal file
|
@ -0,0 +1,7 @@
|
|||
EXE_INC = \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude
|
||||
|
||||
EXE_LIBS = \
|
||||
-lfiniteVolume \
|
||||
-lmeshTools
|
52
etc/codeTemplates/app/app.C
Normal file
52
etc/codeTemplates/app/app.C
Normal 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;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
65
etc/codeTemplates/dynamicCode/FilterFunctionObjectTemplate.C
Normal file
65
etc/codeTemplates/dynamicCode/FilterFunctionObjectTemplate.C
Normal 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
|
||||
);
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
51
etc/codeTemplates/dynamicCode/FilterFunctionObjectTemplate.H
Normal file
51
etc/codeTemplates/dynamicCode/FilterFunctionObjectTemplate.H
Normal 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
|
||||
|
||||
// ************************************************************************* //
|
50
etc/codeTemplates/dynamicCode/IOfunctionObjectTemplate.H
Normal file
50
etc/codeTemplates/dynamicCode/IOfunctionObjectTemplate.H
Normal 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
|
||||
|
||||
// ************************************************************************* //
|
|
@ -21,47 +21,51 @@ 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/>.
|
||||
|
||||
Primitive
|
||||
ulong
|
||||
|
||||
Description
|
||||
System unsigned long
|
||||
|
||||
SourceFiles
|
||||
ulongIO.C
|
||||
Template for use with codeStream.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef ulong_H
|
||||
#define ulong_H
|
||||
#include "dictionary.H"
|
||||
#include "Ostream.H"
|
||||
#include "Pstream.H"
|
||||
#include "unitConversion.H"
|
||||
|
||||
#include "word.H"
|
||||
//{{{ begin codeInclude
|
||||
${codeInclude}
|
||||
//}}} end codeInclude
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
class Istream;
|
||||
class Ostream;
|
||||
// * * * * * * * * * * * * * * * Local Functions * * * * * * * * * * * * * * //
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
//{{{ 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
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
204
etc/codeTemplates/dynamicCode/codedFvOptionTemplate.C
Normal file
204
etc/codeTemplates/dynamicCode/codedFvOptionTemplate.C
Normal 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
Reference in a new issue