foamDictionary: Moved the dictionary tests/examples to applications/test/dictionary
This commit is contained in:
9
test/dictionary/Allrun
Executable file
9
test/dictionary/Allrun
Executable file
@ -0,0 +1,9 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # Run from this directory
|
||||
|
||||
# Source tutorial run functions
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
runApplication foamDictionary -expand testDict
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
74
test/dictionary/testDict
Normal file
74
test/dictionary/testDict
Normal file
@ -0,0 +1,74 @@
|
||||
/*--------------------------------*- 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;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
// To expand this dictionary run
|
||||
// foamDictionary -expand testDict
|
||||
|
||||
internalField 3.4;
|
||||
|
||||
active
|
||||
{
|
||||
type fixedValue;
|
||||
value.air $internalField;
|
||||
}
|
||||
|
||||
inactive
|
||||
{
|
||||
type anotherFixedValue;
|
||||
|
||||
value $../active/value.air;
|
||||
anotherValue $!active/value.air;
|
||||
|
||||
sub
|
||||
{
|
||||
value $../../active/value.air;
|
||||
anotherValue $!active/value.air;
|
||||
}
|
||||
}
|
||||
|
||||
"U.*"
|
||||
{
|
||||
solver GAMG;
|
||||
}
|
||||
|
||||
e.air
|
||||
{
|
||||
// This does expand
|
||||
$U.air;
|
||||
}
|
||||
|
||||
external
|
||||
{
|
||||
value $testDict2!active/value.air;
|
||||
}
|
||||
|
||||
activeWater
|
||||
{
|
||||
$testDict2!active;
|
||||
value.water 1000;
|
||||
}
|
||||
|
||||
activeAir
|
||||
{
|
||||
${${FOAM_CASE}/testDict2!active};
|
||||
}
|
||||
|
||||
whichActive activeWater;
|
||||
|
||||
active2
|
||||
{
|
||||
${${FOAM_CASE}/testDict2!$whichActive};
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
31
test/dictionary/testDict2
Normal file
31
test/dictionary/testDict2
Normal file
@ -0,0 +1,31 @@
|
||||
/*--------------------------------*- 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 testDict2;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
// This dictionary is read by entries in testDict
|
||||
|
||||
internalField 5.6;
|
||||
|
||||
active
|
||||
{
|
||||
type fixedValue;
|
||||
value.air $internalField;
|
||||
}
|
||||
|
||||
activeWater
|
||||
{
|
||||
type fixedValue;
|
||||
value.water 1000;
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
Reference in New Issue
Block a user