View Issue Details

IDProjectCategoryView StatusLast Update
0004046OpenFOAMBugpublic2024-01-12 14:50
Reportercgoessni Assigned Tohenry  
PrioritylowSeverityminorReproducibilityalways
Status closedResolutionnot fixable 
Platformamd64OSDebianOS Versionstable
Product Versiondev 
Summary0004046: foamDictionary returns first entry when keyword specified more than once
DescriptionAccording to https://doc.cfd.direct/openfoam/user-guide-v11/basic-file-format, and behaviour of allmost all OpenFOAM tools, if there is a keyword specified more than once, the last entry is used. However, foamDictionary does not follow this practise when using

> foamDictionary -entry multipleDefinedEntry dictFile

which shows the first entry, not the last. When using the -expand option, the documented behaviour (last entry displayed) is observed.
Steps To ReproduceE.g., add "application test" to any of the tutorials controlDict to the end of the file, and run:

> foamDictionary -entry application system/controlDict
application foamRun;

> foamDictionary -expand -entry application system/controlDict
application test;
TagsNo tags attached.

Activities

henry

2024-01-12 14:16

manager   ~0013182

To get exactly the same behaviour as a lookup in the code the dictionary need to be expanded first. Lookup of entries without expansion will indeed behave differently.

cgoessni

2024-01-12 14:38

reporter   ~0013183

Okay, thank you for the clarification.

Issue History

Date Modified Username Field Change
2024-01-12 13:03 cgoessni New Issue
2024-01-12 14:16 henry Note Added: 0013182
2024-01-12 14:38 cgoessni Note Added: 0013183
2024-01-12 14:50 henry Assigned To => henry
2024-01-12 14:50 henry Status new => closed
2024-01-12 14:50 henry Resolution open => not fixable