foamDictionary: Moved the dictionary tests/examples to applications/test/dictionary

This commit is contained in:
Henry Weller
2023-07-03 13:38:37 +01:00
parent ae3bd90630
commit 835ef31a1d
5 changed files with 58 additions and 31 deletions

9
test/dictionary/Allrun Executable file
View 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
View 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
View 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;
}
// ************************************************************************* //