mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge branch 'dict-lookup' into 'develop'
Dict lookup See merge request !105
This commit is contained in:
53
applications/test/dictionary/testSubkeyword
Normal file
53
applications/test/dictionary/testSubkeyword
Normal file
@ -0,0 +1,53 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: plus |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
format ascii;
|
||||
class dictionary;
|
||||
object testDict;
|
||||
note "test with foamDictionary -expand";
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
// #inputMode overwrite
|
||||
|
||||
key1 val1;
|
||||
|
||||
subdict
|
||||
{
|
||||
key1 a;
|
||||
key2 b;
|
||||
}
|
||||
|
||||
update
|
||||
{
|
||||
key1 val1b;
|
||||
key2 val2;
|
||||
|
||||
subdict
|
||||
{
|
||||
key2 $key1;
|
||||
key3 val3;
|
||||
key2b ${..key2};
|
||||
key3b $^key1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$update
|
||||
|
||||
// Can a leading '^' or ':' as anchor for scoping
|
||||
key3 $^subdict.key1;
|
||||
key3 ${^update.subdict.key3};
|
||||
key4 ${:update.subdict...subdict.key1};
|
||||
|
||||
// This is currently not working
|
||||
#remove update.key1
|
||||
// #remove update
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
Reference in New Issue
Block a user