Files
OpenFOAM-12/applications/test/codeStream/codeStreamDict1
Henry Weller 01494463d0 FoamFile: 'version' entry is now optional, defaulting to 2.0
The FOAM file format has not changed from version 2.0 in many years and so there
is no longer a need for the 'version' entry in the FoamFile header to be
required and to reduce unnecessary clutter it is now optional, defaulting to the
current file format 2.0.
2021-06-23 20:50:10 +01:00

58 lines
1.3 KiB
C++

/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Version: dev
\\/ M anipulation |
\*---------------------------------------------------------------------------*/
FoamFile
{
format ascii;
class dictionary;
object testDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// values from outer-scope
begIter 0;
endIter 200;
writeInterval #codeStream
{
// values from inner-scope
nDumps 5;
codeInclude
#{
#include "fvCFD.H"
#};
codeOptions
#{
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude
#};
localCode
#{
static int someCode()
{
Info<<"called someCode\n";
return 10;
}
#};
code
#{
label interval = ($endIter - $begIter);
// label nDumps = $nDumps;
label nDumps = someCode();
os << (interval / nDumps);
#};
};
// play with cleanup
#remove begIter
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //