Multiple substitutions can be made using the convenient -set "<substitutions>"
option which combines the selection of the entries with the substitutions made
on them using the same argument syntax used by #includeFunc, e.g.
foamDictionary system/controlDict -set "startTime=2000, endTime=3000"
so that foamDictionary conveniently supports the same format as the #includeFunc
argument list, e.g.
foamDictionary -set 'fieldAverage(U, p, prime2Mean = yes)' fieldAverage
The unnamed field arguments 'U' and 'p' are ignored by foamDictionary.
foamDictionary operates on individual dictionary files irrespective of their
location or case they may be associated with and hence a case database is not
needed to read them.
functionEntry expansion is enabled for dictionary expansion with the -expand
option. The disableFunctionEntries option is no longer needed and has been removed.
by introducing a new specialised type, variable, derived from word with
additional valid characters. This avoids some complex type-juggling in the
parser and keyType in which string was used to represent either a string or a
variable.
When running in parallel the decomposed dictionary files are read from the
case directory in either un-collated or collated format and changed dictionaries
written in the form specified by the selected fileHandler.
The instance directory of the dictionary file is obtained from the file path
argument, e.g.
mpirun -np 4 foamDictionary 0.5/U \
-entry boundaryField.movingWall.value \
-set "uniform (2 0 0)" -parallel
If the -case option is specified time is created from the case
system/controlDict enabling support for parallel operation, e.g.
mpirun -np 4 \
foamDictionary -case . 0/U -entry boundaryField.movingWall.value \
-set "uniform (2 0 0)" \
-parallel
This will read and modify the 0/U field file from the processor directories even
if it is collated. To also write the 0/U file in collated format the collated
fileHandler can be specified, e.g.
mpirun -np 4 \
foamDictionary -case . 0/U -entry boundaryField.movingWall.value \
-set "uniform (2 0 0)" \
-fileHandler collated -parallel
This provides functionality for field manipulation equivalent to that provided
by the deprecated changeDictionary utility but in a more flexible and efficient
manner and with the support of fileHandlers for collated parallel operation.
This generalizes and replaces the previous "noBanner" option provided by argList
and is extended to include the messages printed by Time.
Resolves bug-report https://bugs.openfoam.org/view.php?id=2782
- provides support for manipulating polyMesh/boundary
- changed behaviour of disableFunctionEntries option to preserve
#include
- dictionary: added reading of lists of dictionaries.
+ each list element may be accessed using the 'entryDDD' keyword
according to their list index.
Patch contributed by Mattijs Janssens
- Write differences with respect to the specified dictionary
(or sub entry if -entry specified)
- Write the differences with respect to a template dictionary:
foamDictionary 0/U -diff $FOAM_ETC/templates/closedVolume/0/U
- Write the differences in boundaryField with respect to a
template dictionary:
foamDictionary 0/U -diff $FOAM_ETC/templates/closedVolume/0/U \
-entry boundaryField
Patch contributed by Mattijs Janssens
Replaces the dictionary access functionality of foamInfoExec and
provides additional options to edit individual entries.
Contributed by Mattijs Janssens