1. 19 Oct, 2018 1 commit
    • Mark Olesen's avatar
      ENH: minor changes to rationalize sampledSurface · d63b4cd4
      Mark Olesen authored
      - make hasFaceId a top-level virtual method and remove keepIds
        equivalent from sampledTriSurfaceMesh. This makes the property
        available without casting.
      
      - New sampling type 'none'.
        Can be used to temporarily disable a sampling surface definition,
        or to provide boilerplate for overwriting later.
      d63b4cd4
  2. 10 Oct, 2018 1 commit
  3. 19 Oct, 2018 2 commits
  4. 18 Oct, 2018 4 commits
    • Mark Olesen's avatar
      STYLE: use dictionary writeEntry for output · 4ad73873
      Mark Olesen authored
      4ad73873
    • Mark Olesen's avatar
    • Mark Olesen's avatar
      ENH: cleanup of Enum class · 3b745122
      Mark Olesen authored
      - more dictionary-like methods, enforce keyType::LITERAL for all
        lookups to avoid any spurious keyword matching.
      
      - new readEntry, readIfPresent methods
      
      - The get() method replaces the now deprecate lookup() method.
      
      - Deprecate lookupOrFailsafe()
        Failsafe behaviour is now an optional parameter for lookupOrDefault,
        which makes it easier to tailor behaviour at runtime.
      
      - output of the names is now always flatted without line-breaks.
        Thus,
      
           os << flatOutput(someEnumNames.names()) << nl;
           os << someEnumNames << nl;
      
        both generate the same output.
      
      - Constructor now uses C-string (const char*) directly instead of
        Foam::word in its initializer_list.
      
      - Remove special enum + initializer_list constructor form since
        it can create unbounded lookup indices.
      
      - Removd old hasEnum, hasName forms that were provided during initial
        transition from NamedEnum.
      
      - Added static_assert on Enum contents to restrict to enum or
        integral values.  Should not likely be using ...
      3b745122
    • Mark Olesen's avatar
      CONFIG: default to using logical value for cwd() · f2c78362
      Mark Olesen authored
      - this helps for many cases outlined in issue #1007, but can also be
        useful when simply using symlinks for shorter or reorganized
        directory structures.
      f2c78362
  5. 17 Oct, 2018 6 commits
    • sergio's avatar
    • sergio's avatar
      ENH: · 5daa38d5
      sergio authored
      Update of overRhoPimpleDyMFoam and overInterDyMFoam solvers.
      Adding corresponding tutorials with best possible settings
      The main effort was put on reducing pressure spikes as the
      stencil change with hole cells on the background mesh.
      5daa38d5
    • Mark Olesen's avatar
      ENH: simple dataCloud function object (issue #1044) · 14a39405
      Mark Olesen authored
      - writes positions and a single field (eg, diameter) in plain ASCII files,
        suitable for importing in a spreadsheet or manipulation with
        scripting tools.
      
      - code integrated from
        https://develop.openfoam.com/Community/OpenFOAM-addOns
      14a39405
    • Mark Olesen's avatar
      ENH: simplify objectRegistry access names (issue #322) · 8fabc325
      Mark Olesen authored
        New name:  findObject(), cfindObject()
        Old name:  lookupObjectPtr()
      
            Return a const pointer or nullptr on failure.
      
        New name:  findObject()
        Old name:  --
      
            Return a non-const pointer or nullptr on failure.
      
        New name:  getObjectPtr()
        Old name:  lookupObjectRefPtr()
      
            Return a non-const pointer or nullptr on failure.
            Can be called on a const object and it will perform a
            const_cast.
      
      - use these updated names and functionality in more places
      
      NB: The older methods names are deprecated, but continue to be defined.
      8fabc325
    • Mark Olesen's avatar
      ENH: add compareOp for three-way comparison · e0255cff
      Mark Olesen authored
      - similar to the \c <=> operator in C++20.
        Primarily for use when defining cascaded sort function objects.
      e0255cff
    • Mark Olesen's avatar
      STYLE: logical ops return bool (issue #1043) · 8b569b16
      Mark Olesen authored
      - these currently only with bool parameters, but the return value should
        nonetheless always be a bool value:
      
            andOp(), orOp(), lessOp(), lessEqOp(), greaterOp(), greaterEqOp()
      
      - renamed the unused eqEqOp() to equalOp() for naming consistency with
        the equal() global function.
      
      ENH: equalOp() specialization for scalars
      
      - function object version of the equal() function.
        The default constructor uses the same tolerance (VSMALL),
        but can also supply an alternative tolerance on construction.
      8b569b16
  6. 16 Oct, 2018 1 commit
  7. 17 Oct, 2018 3 commits
  8. 15 Oct, 2018 2 commits
  9. 16 Oct, 2018 5 commits
    • Andrew Heather's avatar
      ENH: Added new fieldExtents function object · 1eba7093
      Andrew Heather authored
      Description
          Calculates the spatial minimum and maximum extents of a field
      
          The extents are derived from the bound box limits after identifying
          the locations where field values exceed the user-supplied threshold
          value.
      
      Usage
          Example of function object specification:
      
          fieldExtents1
          {
              type        fieldExtents;
              libs        ("libfieldFunctionObjects.so");
              ...
              writeToFile yes;
              log         yes;
              fields      (alpha);
              threshold   0.5;
              patches     ();
          }
      
          Where the entries comprise:
      
              Property      | Description              | Required   | Default
              type          | type name: fieldExtents  | yes        |
              writeToFile   | write extents data to file | no       | yes
              log           | write extents data to standard output | no | yes
              internalField | Process the internal field | no       | yes
              threshold     | Field value to identify extents boundary | yes |
              referencePosition | Reference position   | no         | (0 0 0)
              fields        | list of fields to process | yes       |
              patches       | list of patches to process | no       | <all>
      
          Output data is written to the file \<timeDir\>/fieldExtents.dat
      
      Note
          For non-scalar fields, the magnitude of the field is employed and
          compared to the threshold value.
      1eba7093
    • Mark Olesen's avatar
      STYLE: use range-for in dictionary internals · 5d7b2329
      Mark Olesen authored
      5d7b2329
    • Mark Olesen's avatar
      ENH: support token stream checking to entry (issue #762) · 77017e58
      Mark Olesen authored
      - Eg,
          scalar val(-GREAT);
      
          const entry* eptr = dict.findEntry(k);
      
          if (eptr)
          {
              val = eptr.get<scalar>();
      
              // Or
              eptr.readEntry(val);
          }
      77017e58
    • Mark Olesen's avatar
      STYLE: mark compatibility change in motionSolver keyword · 8a923518
      Mark Olesen authored
      - was "solver" in 1612 and "motionSolver" for later versions
      8a923518
    • Mark Olesen's avatar
      STYLE: use explicit dictionary access for dictionaryEntry · 873b2f0a
      Mark Olesen authored
      - clarifies the meanings of get<T> etc, avoids later ambiguities.
      
      ENH: simplify phaseProperties construction, add input checks
      873b2f0a
  10. 15 Oct, 2018 5 commits
    • Mark Olesen's avatar
      ENH: make cwd() behaviour user-adjustable (issue #1007) · 7864672c
      Mark Olesen authored
      - with the 'cwd' optimization switch it is possible to select the
        preferred behaviour for the cwd() function.
      
        A value of 0 causes cwd() to return the physical directory,
        which is what getcwd() and `pwd -P` return.
        Until now, this was always the standard behaviour.
      
        With a value of 1, cwd() instead returns the logical directory,
        which what $PWD contains and `pwd -L` returns.
        If any of the sanity checks fail (eg, PWD points to something other
        than ".", etc), a warning is emitted and the physical cwd() is
        returned instead.
      
        Apart from the optical difference in the output, this additional
        control helps workaround file systems with whitespace or other
        characters in the directory that normally cause OpenFOAM to balk.
        Using a cleaner symlink elsewhere should skirt this issue.
      
        Eg,
            cd $HOME
            ln -s "/mounted volume/user/workdir"  workdir
            cd workdir
            # start working with OpenFOAM
      7864672c
    • Mark Olesen's avatar
      CONFIG: improve shell env handling of paths with spaces (#1007, #1008) · 50852b33
      Mark Olesen authored
      - foamCleanPath now only splits the environment variable on ':', which
        allows other directories with spaces or '(..)' etc to pass through
        without major issue.
      
      - The filter arguments are split on whitespace, colons or semi-colons.
      50852b33
    • Mark Olesen's avatar
    • Mark Olesen's avatar
      ENH: rationalize dictionary access methods · c6520033
      Mark Olesen authored
      - use keyType::option enum to consolidate searching options.
        These enumeration names should be more intuitive to use
        and improve code readability.
      
          Eg,   lookupEntry(key, keyType::REGEX);
          vs    lookupEntry(key, false, true);
      
        or
      
          Eg,   lookupEntry(key, keyType::LITERAL_RECURSIVE);
          vs    lookupEntry(key, true, false);
      
      - new findEntry(), findDict(), findScoped() methods with consolidated
        search options for shorter naming and access names more closely
        aligned with other components. Behave simliarly to the
        methods lookupEntryPtr(), subDictPtr(), lookupScopedEntryPtr(),
        respectively. Default search parameters consistent with lookupEntry().
      
          Eg, const entry* e = dict.findEntry(key);
          vs  const entry* e = dict.lookupEntryPtr(key, false, true);
      
      - added '*' and '->' dereference operators to dictionary searchers.
      c6520033
    • Andrew Heather's avatar
      4f9e45fb
  11. 12 Oct, 2018 5 commits
  12. 11 Oct, 2018 5 commits