1. 31 Oct, 2019 1 commit
  2. 13 Mar, 2019 1 commit
    • Mark Olesen's avatar
      ENH: minor improvements for plane · c2f59af0
      Mark Olesen authored
      - comparison operator, for sorting based on the position of the origin.
      
      - allow modification of the origin.
      
      - zero-initialise for null constructor: base components are vectors
        and cheap to initialise.
      
      - 'unfriend' the output operator: it uses public access methods
      c2f59af0
  3. 17 May, 2019 1 commit
  4. 06 Feb, 2019 1 commit
  5. 09 Jan, 2019 1 commit
    • Mark Olesen's avatar
      STYLE: add compile-time deprecated message for face/triangle normal() · c350a127
      Mark Olesen authored
      - in 1812 propagated through the distinction between areaNormal and
        unitNormal (issue #885).
      
        In older versions, the normal() always meant the area-normal for
        certain of these primitive.
      
        However, the .org version changed this to now return the unit-normal
        instead, but with the same method name. Thus add the deprecated
        message to avoid future inadvertent uses of normal() without being
        certain which one is being meant.
      c350a127
  6. 08 Jan, 2019 1 commit
  7. 03 Jan, 2019 1 commit
  8. 11 Nov, 2018 1 commit
  9. 18 Oct, 2018 1 commit
    • 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 this class to enumerate
        other things since it internally uses an 'int' for its values.
      
        Changed volumeType accordingly to enumerate on its type (enum),
        not the class itself.
      3b745122
  10. 03 Aug, 2018 1 commit
    • Mark Olesen's avatar
      ENH: additional methods and improvements to plane · de2eed3e
      Mark Olesen authored
      - signedDistance() method is like distance() but retains
        the positive/negative sign for the side of the plane.
      
      - the sign() method returns the sign as -1,0,+1 integer for
        classification purposes where it is important to distinguish between
        a zero value and a positive value (eg, for cutting). Optional
        tolerance can be supplied to round for zero.
      
      - refactor and inlined simple and frequently used methods.
      
      - add boundBox faceCentre() method, which can be useful for creating
        clipping planes from a bounding box.
        Relocated treeBoundBox faceNormals to boundBox since they apply
        equally there - the meaning of the faces (x-min, x-max, etc)
        is the same, even if the point addressing for the faces differs.
      de2eed3e
  11. 20 Jun, 2018 1 commit
  12. 14 Aug, 2018 1 commit
  13. 10 Aug, 2018 2 commits
  14. 07 May, 2018 1 commit
    • Mark Olesen's avatar
      ENH: improvements in the surface sampling infrastructure · b0648f2b
      Mark Olesen authored
      - improvement documentation for surface sampling.
      
      - can now specify alternative sampling scheme for obtaining the
        face values instead of just using the "cell" value. For example,
      
            sampleScheme    cellPoint;
      
        This can be useful for cases when the surface is close to a boundary
        cell and there are large gradients in the sampled field.
      
      - distanceSurface now handles non-closed surfaces more robustly.
        Unknown regions (not inside or outside) are marked internally and
        excluded from consideration. This allows use of 'signed' surfaces
        where not previously possible.
      b0648f2b
  15. 04 Jan, 2018 1 commit
  16. 18 Nov, 2017 1 commit
    • Mark Olesen's avatar
      ENH: enumerations for known cell models in cellModel, ptr/ref lookups · 8730a762
      Mark Olesen authored
      - this provides a better typesafe means of locating predefined cell
        models than relying on strings. The lookup is now ptr() or ref()
        directly. The lookup functions behave like on-demand singletons when
        loading "etc/cellModels".
      
        Functionality is now located entirely in cellModel but a forwarding
        version of cellModeller is provided for API (but not ABI) compatibility
        with older existing user code.
      
      STYLE: use constexpr for cellMatcher constants
      8730a762
  17. 06 Oct, 2017 1 commit
  18. 04 Oct, 2017 2 commits
  19. 03 Jul, 2017 1 commit
  20. 26 May, 2017 1 commit
  21. 07 May, 2017 1 commit
  22. 04 May, 2017 1 commit
  23. 05 Sep, 2017 1 commit
  24. 06 Jun, 2017 1 commit
  25. 22 May, 2017 1 commit
  26. 28 Apr, 2017 1 commit
  27. 24 Apr, 2017 1 commit
  28. 23 Apr, 2017 1 commit
  29. 25 Jan, 2017 1 commit
    • Mark Olesen's avatar
      ENH: additional methods/operators for boundBox (related to #196) · 722d23f5
      Mark Olesen authored
      - Constructor for bounding box of a single point.
      
      - add(boundBox), add(point) ...
        -> Extend box to enclose the second box or point(s).
      
        Eg,
            bb.add(pt);
        vs.
            bb.min() = Foam::min(bb.min(), pt);
            bb.max() = Foam::max(bb.max(), pt);
      
      Also works with other bounding boxes.
        Eg,
            bb.add(bb2);
            // OR
            bb += bb2;
        vs.
            bb.min() = Foam::min(bb.min(), bb2.min());
            bb.max() = Foam::max(bb.max(), bb2.max());
      
      '+=' operator allows the reduction to be used in parallel
      gather/scatter operations.
      
      A global '+' operator is not currently needed.
      
      Note: may be useful in the future to have a 'clear()' method
      that resets to a zero-sized (inverted) box.
      
      STYLE: make many bounding box constructors explicit
      722d23f5
  30. 23 Nov, 2016 1 commit
  31. 06 Oct, 2016 1 commit
  32. 05 Oct, 2016 1 commit
  33. 30 Sep, 2016 1 commit
  34. 11 Aug, 2016 1 commit
  35. 30 Jun, 2016 1 commit
  36. 29 Jun, 2016 1 commit
  37. 06 Jun, 2016 1 commit
    • Mark Olesen's avatar
      ENH: cleanup Ostream to ease usage (issue #254) · 06f22a9b
      Mark Olesen authored
      - Include newline in beginBlock/endBlock, since this corresponds to
        the standard usage. The beginBlock now takes keyType instead of word.
      
      - Provide Ostream::writeEntry method to reduce clutter and simplify
        writing of entries.
      
        Before
        ======
            os << indent << "name" << nl
               << indent << token::BEGIN_BLOCK << incrIndent << nl;
            os.writeKeyword("key1") << val1 << token::END_STATEMENT << nl;
            os.writeKeyword("key2") << val2 << token::END_STATEMENT << nl;
            os << decrIndent << indent << token::END_BLOCK << nl;
      
        After
        =====
            os.beginBlock("name");
            os.writeEntry("key1", val1);
            os.writeEntry("key2", val2);
            os.endBlock();
      
      - For completeness, support inline use of various Ostream methods.
        For example,
      
            os << beginBlock;
            os.writeEntry("key1", val1);
            os.writeEntry("key2", val2);
            os << endBlock;
      
      - For those who wish to write in long form, can also use endEntry inline:
      
            os.beginBlock("name");
            os.writeKeyword("key1") << val2 << endEntry;
            os.writeKeyword("key2") << val2 << endEntry;
            os.endBlock();
      
      The endEntry encapsulates a semi-colon, newline combination.
      06f22a9b
  38. 28 Apr, 2016 1 commit