openfoam/tutorials/IO/dictionary
Mark Olesen 1804d3fed5 ENH: additional #word and #message dictionary directives (#2276)
- use `#word` to concatenate, expand content with the resulting string
  being treated as a word token. Can be used in dictionary or
  primitive context.

  In dictionary context, it fills the gap for constructing dictionary
  names on-the-fly. For example,

  ```
  #word "some_prefix_solverInfo_${application}"
  {
      type    solverInfo;
      libs    (utilityFunctionObjects);
      ...
  }
  ```

  The '#word' directive will automatically squeeze out non-word
  characters. In the block content form, it will also strip out
  comments. This means that this type of content should also work:

  ```
  #word {
     some_prefix_solverInfo
     /* Appended with application name (if defined) */
     ${application:+_}  // Use '_' separator
     ${application}     // The application
  }
  {
      type    solverInfo;
      libs    (utilityFunctionObjects);
      ...
  }
  ```
  This is admittedly quite ugly, but illustrates its capabilities.

- use `#message` to report expanded string content to stderr.
  For example,

  ```
  T
  {
     solver          PBiCG;
     preconditioner  DILU;
     tolerance       1e-10;
     relTol          0;
     #message "using solver: $solver"
  }
  ```
  Only reports on the master node.
2021-11-25 17:05:37 +01:00
..
Allclean STYLE: regularize quoting and exit on failed 'cd' 2019-11-13 13:19:16 +01:00
Allrun STYLE: regularize quoting and exit on failed 'cd' 2019-11-13 13:19:16 +01:00
Alltest STYLE: regularize quoting and exit on failed 'cd' 2019-11-13 13:19:16 +01:00
fatal-ending1.dict CONFIG: Updated headers to v2106 2021-06-28 09:14:42 +01:00
fatal-ending2.dict CONFIG: Updated headers to v2106 2021-06-28 09:14:42 +01:00
fatal-ending3.dict CONFIG: Updated headers to v2106 2021-06-28 09:14:42 +01:00
fatal-ending4.dict CONFIG: Updated headers to v2106 2021-06-28 09:14:42 +01:00
fatal-premature-ending1.dict CONFIG: Updated headers to v2106 2021-06-28 09:14:42 +01:00
fatal-premature-ending2.dict CONFIG: Updated headers to v2106 2021-06-28 09:14:42 +01:00
fatal-primitive-ending1.dict CONFIG: Updated headers to v2106 2021-06-28 09:14:42 +01:00
fatal-primitive-ending2.dict CONFIG: Updated headers to v2106 2021-06-28 09:14:42 +01:00
fatal-primitive-ending3.dict CONFIG: Updated headers to v2106 2021-06-28 09:14:42 +01:00
good-empty1.dict ENH: improve detection of EOF missing/additional braces (issue #762) 2018-07-04 09:24:43 +02:00
good-empty2.dict CONFIG: Updated headers to v2106 2021-06-28 09:14:42 +01:00
good-ending1.dict CONFIG: Updated headers to v2106 2021-06-28 09:14:42 +01:00
good-if1.dict CONFIG: Updated headers to v2106 2021-06-28 09:14:42 +01:00
good-if2.dict CONFIG: Updated headers to v2106 2021-06-28 09:14:42 +01:00
good-if3.dict CONFIG: Updated headers to v2106 2021-06-28 09:14:42 +01:00
good-primitive-ending1.dict CONFIG: Updated headers to v2106 2021-06-28 09:14:42 +01:00
good-word-expand.dict ENH: additional #word and #message dictionary directives (#2276) 2021-11-25 17:05:37 +01:00
missed-ending3.dict CONFIG: Updated headers to v2106 2021-06-28 09:14:42 +01:00
TestParsing TUT: skip some tutorials when dynamicCode is not available 2020-08-06 19:34:20 +02:00