Commit Graph

42 Commits

Author SHA1 Message Date
61f3662b0a foamDictionary: Added writePrecision option 2021-04-30 09:14:44 +01:00
bf7ac24e9f foamDictionary: Improved the -set "<substitutions>" option
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"
2021-03-28 13:32:37 +01:00
93a0dd2f99 foamDictionary: Updated examples to 'slash' syntax which is the new default 2020-11-17 14:14:42 +00:00
560fb1a64b foamDictionary: Ignore function name in substitution list
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.
2020-09-20 09:28:20 +01:00
560db98b34 dictionary: Standardised and centralised the argument list parser
to simplify maintenance
2020-09-19 15:52:09 +01:00
ad33cc2cc8 functionObject: Added support for scoped keyword lookup in the argument list
functions
{
    #includeFunc        singleGraph(setConfig/axis = y)
    .
    .
    .
}
2020-09-18 21:39:40 +01:00
312a56e7e3 foamDictionary: Extended the -set option to support a substitution list
e.g.

    foamDictionary -set '(purgeWrite=3, maxDeltaT=0.1, functions/rho/writeControl=writeTime)' controlDict

or

    foamDictionary -set 'purgeWrite=3, maxDeltaT=0.1, functions/rho/writeControl=writeTime' controlDict

are equivalent to

    foamDictionary -entry purgeWrite -set 3 controlDict
    foamDictionary -entry maxDeltaT -set 0.1 controlDict
    foamDictionary -entry functions/rho/writeControl -set writeTime controlDict
2020-09-18 18:25:51 +01:00
ea036dfec8 foamDictionary: Set expanded dictionary format to ascii 2020-09-14 12:13:09 +01:00
517270e215 foamDictionary: Removed documentation for the unused -case option
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.
2020-06-04 10:19:06 +01:00
d8209247b1 foamDictionary: Allow functionEntry expansion with -entry option
Resolves bug-report https://bugs.openfoam.org/view.php?id=3422
2020-01-07 21:25:09 +00:00
c1edb022b0 foamDictionary: Disabled functionEntry expansion by default
functionEntry expansion is enabled for dictionary expansion with the -expand
option.  The disableFunctionEntries option is no longer needed and has been removed.
2019-11-19 11:42:33 +00:00
cbae0c8cc0 foamDictionary: Improved handling of header for binary files 2019-09-07 20:55:23 +01:00
7350f07582 foamDictionary: improved checking for FoamFile 2019-08-19 09:20:05 +01:00
3f7c575816 foamDictionary: Avoid expanding the first entry when checking for FoamFile 2019-08-16 15:23:37 +01:00
3192d64875 dictionary: Rationalised the handling of dictionary variable
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.
2019-08-15 09:16:45 +01:00
33d6d49321 foamDictionary: Simplified the handling of the dictionary file type
Also added the header separator comment for serial operation.
2019-08-08 15:41:44 +01:00
9bbc338b3e foamDictionary: Set the type of the dictionary to that specified in the header 2019-08-08 10:27:51 +01:00
0dbeb66ba9 foamDictionary: Improved parallel operation
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
2019-08-07 16:22:15 +01:00
2bd1913fd2 foamDictionary: Added support for reading files as case IOdictionary in 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.
2019-08-06 19:20:51 +01:00
163324d837 foamDictionary: Added support for the new dictionary "slash" syntax
Maintains backward compatibility with the current "dot" syntax.
2019-07-11 19:43:40 +01:00
a88405a138 foamDictionary: Added support for writing dictionaries containing binary entries 2019-02-22 15:59:55 +00:00
a4e6adcd54 foamDictionary: Added initial support for dictionaries containing binary data
The dictionary read is set to binary if there is a "FoamFile" header present
which specifies binary format.
2019-02-21 20:02:13 +00:00
d61ca8d8d8 foamDictionary: Added -dict option to set, add and merge
With the -dict option the set, add and merge options read the entry from the
dictionary name argument rather than directly from the argument string.
2018-12-06 23:07:53 +00:00
abde9a8a7c foamDictionary: Added -merge option
which merges the new entry with the corresponding entry in the dictionary
2018-12-05 15:04:01 +00:00
bf54ab67e1 Updated OpenFOAM Foundation web-link in headers 2018-07-06 21:42:54 +01:00
7e466cfbd7 foamDictionary, adiabaticFlameT, equilibriumFlameT: remove unused case related options 2018-06-11 14:31:36 +01:00
dc2c1e2d6d foamDictionary: Removed unused -case option
Resolves bug-report https://bugs.openfoam.org/view.php?id=2974
2018-06-11 10:33:59 +01:00
b0a414b5d6 foamDictionary: Remove the printing of the entry added or set by the -add and -set options 2018-06-01 09:55:10 +01:00
ad32e5ceb9 bin/tools/RunFunctions: avoid messages from codeStream causing getApplication to fail
Resolves bug-report https://bugs.openfoam.org/view.php?id=2933
2018-05-15 17:07:53 +01:00
cc4d4433b8 messageStream: Added support for suppressing the printing of log header
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
2017-12-06 11:58:35 +00:00
d05ef92a47 Other utilities: standardised argument naming for files 2017-05-12 15:16:29 +01:00
695466a3cd foamDictionary: Removed unnecessary spaces and blank lines from output
Resolves bug-report https://bugs.openfoam.org/view.php?id=2422
2017-01-05 20:19:30 +00:00
a7256d6fa9 foamDictionary: Added support for manipulating lists of dictionaries
- 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
2016-11-25 20:33:03 +00:00
c73f1fa5b1 foamDictionary: Corrected error message type 2016-11-11 17:21:13 +00:00
bf8e1ba036 foamDictionary: Added '-diff <dict>' option
- 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
2016-10-18 18:23:24 +01:00
cc9aba2426 foamDictionary: New '-remove' to remove a dictionary entry
Patch contributed by Mattijs Janssens
2016-10-07 17:35:39 +01:00
7b75d81269 Rationalized Doxygen documentation of command-line options 2016-06-17 09:11:58 +01:00
f0d81461f9 foamDictionary: Added -value option to print the value associated with an entry 2016-06-10 20:23:46 +01:00
dbcb0553b5 foamDictionary: Added -expand and -includes options
Replaces expandDictionary utility
2016-06-10 17:39:16 +01:00
bc6d6f5fa3 applications/utilities: FOAM_USER_APPBIN -> FOAM_APPBIN 2016-06-10 10:35:57 +01:00
5f950e6aa3 applications/utilities/miscellaneous/foamDictionary/Make/options: Removed debug options 2016-06-07 16:27:22 +01:00
615edfbc7d foamDictionary: New utility to print and manipulate dictionary entries
Replaces the dictionary access functionality of foamInfoExec and
provides additional options to edit individual entries.
Contributed by Mattijs Janssens
2016-06-03 19:24:05 +01:00