Skip to content
Snippets Groups Projects
  1. May 26, 2021
  2. May 20, 2021
  3. May 19, 2021
  4. May 18, 2021
    • Mark OLESEN's avatar
      ENH: improve stream handling of expansions (#2095) · 44a243a9
      Mark OLESEN authored
      * removed internal upper limit on word/string length for parsed input.
      
        - Although it has not caused many problems, no reason to retain
          these limits.
        - simplify some of the internal logic for reading string-like items.
        - localize parsers for better separation from the header
      
        - expose new function seekCommentEnd_Cstyle(), as useful
          handler of C-style comments
      
      * exclude imbalanced closing ')' from word/variable
      
        - previously included this into the word/variable, but makes more
          sense to leave on the parser for the following token.
      
          Prevents content like 'vector (10 20 $zmax);' from being parsed
          as '$zmax)' instead of as '$zmax' followed by a ')'.
          No conceivable reason that the former would actually be desirable,
          but can still be obtained with brace notation: Eg, '${zmax)}'
      
      * consistent handling of ${{ ... }} expressions
      
        - within a dictionary content, the following construct was
          incorrectly processed:
      
              value ${{2*sqrt(0.5)}};
      
          Complains about no dictionary/env variable "{2*sqrt(0.5)}"
      
          Now trap expressions directly and assign their own token type
          while reading. Later expansion can then be properly passed to
          the exprDriver (evalEntry) instead of incorrectly trying
          variable expansion.
      
          Does not alter the use of expressions embedded within other
          expansions. Eg, "file${{10*2}}"
      
      * improve #eval { ... } brace slurping
      
        - the initial implementation of this was rudimentary and simply
          grabbed everything until the next '}'.  Now continue to grab
          content until braces are properly balanced
      
          Eg, the content:   value #eval{${radius}*2};
      
          would have previously terminated prematurely with "${radius" for
          the expression!
      
      NOTE:
          both the ${{ expr }} parsed input and the #eval { ... } input
          discard C/C++ comments during reading to reduce intermediate
          overhead for content that will be discarded before evaluation
          anyhow.
      
      * tighten recognition of verbatim strings and expressions.
      
        - parser was previously sloppy and would have accepted content such
          as "# { ..." (for example) as an verbatim string introducer.
          Now only accept parse if there are no intermediate characters
          discarded.
      44a243a9
    • Mark OLESEN's avatar
      ENH: adjust token in preparation for separate expression tokenization · efd1ac4b
      Mark OLESEN authored
      - minor simplification of #if/#endif handling
      
      ENH: improve input robustness with negative-prefixed expansions (#2095)
      
      - especially in blockMeshDict it is useful to negate an value directly.
        Eg,
        ```
           xmax  100;
           xmin  -$xmax;
        ```
        However, this fails since the dictionary expansion is a two-step
        process of tokenization followed by expansion. After the expansion
        the given input would now be the following:
        ```
           xmax  100;
           xmin  - 100;
        ```
        and retrieving a scalar value for 'xmin' fails.
      
        Counteract this by being more generous on tokenized input when
        attempting to retrieve a label or scalar value.
        If a '-' is found where a number is expected, use it to negate the
        subsequent value.
      
        The previous solution was to invoke an 'eval':
        ```
           xmax  100;
           xmin  #eval{-$xmax};
        ```
        which adds additional clutter.
      efd1ac4b
  5. May 17, 2021
  6. May 14, 2021
  7. May 13, 2021
  8. May 12, 2021
  9. May 10, 2021
    • Mark OLESEN's avatar
      ENH: change location of static ensight geometry (#2079) · 4d14c955
      Mark OLESEN authored
      Historically the "geometry" for static meshes was placed under
      directly in the EnSight case directory.
      
      Eg,
      
           ensight/ensight.case
           ensight/geometry
           ensight/data/000001
           ensight/data/000002 ...
      
      This generally works ok, but relocating it to a constant data directory
      Eg
           ensight/ensight.case
           ensight/data/constant/geometry
           ensight/data/000001
           ensight/data/000002 ...
      
      Improves handling and avoids potential collisions when adding in
      additional mesh regions
      4d14c955
    • Mark OLESEN's avatar
      ENH: introduce intermediate vtk::polyWriter class · 0a78e685
      Mark OLESEN authored
      - reduces code, simplifies creation of new, specialized polyData
        writers.
      
      - new templated vtk::GenericPatchWriter, which adds support for
        writing both uindirectPrimitivePatch + indirectPrimitivePatch types.
      
      - handle geometric fields separately from regular fields with
          * vtk:GenericPatchGeoFieldsWriter
          * vtk:indirectPatchGeoFieldsWriter
          * vtk:uindirectPatchGeoFieldsWriter
      0a78e685
    • Mark OLESEN's avatar
      ENH: support 'transform' specification for geometric decomposition · 492d5cb6
      Mark OLESEN authored
      - can be used for block-like meshes that are not aligned with the global
        coordinate directions. Alternatively, for general testing purposes.
      
        Example,
      
          method  simple;
          coeffs
          {
              n       ( 2 2 2 );
              transform
              {
                  origin  (-0.15 0.15 0);
                  e1      (1 1 0);
                  e3      (0 0 1);
              }
          }
      492d5cb6
    • Andrew Heather's avatar
  10. May 07, 2021
    • Andrew Heather's avatar
      Merge branch 'feature-allRegions' into 'develop' · ac2dee91
      Andrew Heather authored
      add multi-region handling for checkMesh etc,  centralized the region handling #2072
      
      See merge request !445
      ac2dee91
    • mattijs's avatar
      ENH: checkMesh: -allRegions. See #2072 · 1177dbd1
      mattijs authored and Mark OLESEN's avatar Mark OLESEN committed
      1177dbd1
    • Mark OLESEN's avatar
      ENH: centralized handling of -allRegions, -regions, -region (#2072) · c410edf9
      Mark OLESEN authored
      Step 1.
          include "addAllRegionOptions.H"
      
          Adds the -allRegions, -regions and -region options to argList.
      
      Step 2.
          include "getAllRegionOptions.H"
      
          Processes the options with -allRegions selecting everything
          from the regionProperties.
      
          OR use -regions to specify multiple regions (from
             regionProperties), and can also contain regular expressions
      
          OR use the -region option
      
          Specifying a single -regions NAME (not a regular expresssion)
          is the same as -region NAME and doesn't use regionProperties
      
          Creates a `wordList regionNames`
      
      Step 3.
          Do something with the region names.
          Either directly, or quite commonly with the following
      
          include "createNamedMeshes.H"
      
          Creates a `PtrList<fvMesh> meshes`
      
      STYLE: add description to some central include files
      c410edf9
    • Mark OLESEN's avatar
      ENH: add maxSize() and maxNonLocalSize() to globalIndex · 86a2ae4f
      Mark OLESEN authored
      - useful for establishing and preallocating a max buffer size
        when reading from sub-procs
      86a2ae4f
  11. May 06, 2021