mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: support "one-shot" changes to the dictionary inputMode (issue #429)
- Instead of relying on #inputMode to effect a global change it is now
possible (and recommended) to a temporary change in the inputMode
for the following entry.
#default : provide default value if entry is not already defined
#overwrite : silently remove a previously existing entry
#warn : warn about duplicate entries
#error : error if any duplicate entries occur
#merge : merge sub-dictionaries when possible (the default mode)
This is generally less cumbersome than the switching the global
inputMode. For example to provide a set of fallback values.
#includeIfPresent "user-files"
...
#default value uniform 10;
vs.
#includeIfPresent "user-files"
#inputMode protect
...
value uniform 10;
#inputMode merge // _Assuming_ we actually had this before
These directives can also be used to suppress the normal dictionary
merge semantics:
#overwrite dict { entry val; ... }
This commit is contained in:
@ -12,6 +12,4 @@ maxCo 12;
|
||||
|
||||
maxDeltaT 1;
|
||||
|
||||
#inputMode merge
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -12,6 +12,4 @@ maxCo 2.5;
|
||||
|
||||
maxDeltaT 0.3;
|
||||
|
||||
#inputMode merge
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -12,6 +12,4 @@ maxCo 8;
|
||||
|
||||
maxDeltaT 1;
|
||||
|
||||
#inputMode merge
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -12,6 +12,4 @@ maxCo 5;
|
||||
|
||||
maxDeltaT 1;
|
||||
|
||||
#inputMode merge
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -12,6 +12,4 @@ maxCo 12;
|
||||
|
||||
maxDeltaT 1;
|
||||
|
||||
#inputMode merge
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -12,6 +12,4 @@ turbulentKE 37;
|
||||
turbulentOmega 32;
|
||||
turbulentEpsilon 30;
|
||||
|
||||
#inputMode merge
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -10,6 +10,5 @@ flowVelocity (10 0 0);
|
||||
pressure 0;
|
||||
turbulentKE 1.5;
|
||||
turbulentEpsilon 0.88;
|
||||
#inputMode merge
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
@ -11,6 +11,5 @@ pressure 0;
|
||||
turbulentKE 0.375;
|
||||
turbulentOmega 3.6;
|
||||
turbulentEpsilon 0.12;
|
||||
#inputMode merge
|
||||
|
||||
// ************************************************************************* //
|
||||
|
||||
Reference in New Issue
Block a user