mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
* added '#remove' function * changed insert() method name to more general execute() * using #inputMode or #remove within a primitiveEntry now provokes an error * adjusted the dictionaryTest accordingly
99 lines
2.1 KiB
C++
99 lines
2.1 KiB
C++
/*-------------------------------*- C++ -*---------------------------------*\
|
|
| ========= |
|
|
| \\ / OpenFOAM |
|
|
| \\ / |
|
|
| \\ / The Open Source CFD Toolbox |
|
|
| \\/ http://www.OpenFOAM.org |
|
|
\*-------------------------------------------------------------------------*/
|
|
FoamFile
|
|
{
|
|
version 2.0;
|
|
format ascii;
|
|
class dictionary;
|
|
object testDict;
|
|
}
|
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
#inputMode merge
|
|
|
|
dimensions [ 0 2 -2 0 0 0 0 ];
|
|
internalField uniform 1;
|
|
|
|
active
|
|
{
|
|
type turbulentIntensityKineticEnergyInlet;
|
|
intensity 0.1;
|
|
value $internalField;
|
|
}
|
|
|
|
|
|
inactive
|
|
{
|
|
type zeroGradient;
|
|
}
|
|
|
|
boundaryField
|
|
{
|
|
Default_Boundary_Region
|
|
{
|
|
type zeroGradient;
|
|
}
|
|
|
|
inlet_1 { $active }
|
|
inlet_2 { $inactive }
|
|
inlet_3 { $inactive }
|
|
inlet_4 { $inactive }
|
|
inlet_5 "a primitiveEntry is squashed by a directory entry";
|
|
inlet_5 { $inactive }
|
|
inlet_6 { $inactive }
|
|
inlet_7 { $inactive }
|
|
inlet_8 { $inactive }
|
|
|
|
#include "testDictInc"
|
|
|
|
outlet
|
|
{
|
|
type inletOutlet;
|
|
inletValue $internalField;
|
|
value #include "value";
|
|
// error #remove self;
|
|
x 5;
|
|
y 6;
|
|
another #calc{x $x; y $y;};
|
|
}
|
|
|
|
// this should have no effect
|
|
#remove inactive
|
|
|
|
inlet_7 { $active }
|
|
#inputMode overwrite
|
|
inlet_8 { $active }
|
|
}
|
|
|
|
// NB: the inputMode has a global scope
|
|
#inputMode merge
|
|
#include "testDict2"
|
|
|
|
foo
|
|
{
|
|
$active
|
|
}
|
|
|
|
bar
|
|
{
|
|
$active
|
|
}
|
|
|
|
baz
|
|
{
|
|
$active
|
|
}
|
|
|
|
|
|
// this should work
|
|
#remove active
|
|
|
|
// this should work too
|
|
#remove ( bar baz )
|
|
|
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|