Skip to content
Snippets Groups Projects
  1. Nov 28, 2017
    • Mark OLESEN's avatar
      ENH: minor improvements for Enum · b6e0f06d
      Mark OLESEN authored
      - found() method for consistency with other classes
      
      - operator()(name, deflt) for similarity to lookupOrDefault,
        but without a dictionary
      b6e0f06d
  2. Nov 26, 2017
  3. Nov 24, 2017
  4. Nov 23, 2017
  5. Nov 22, 2017
  6. Nov 20, 2017
  7. Nov 18, 2017
    • Mark OLESEN's avatar
      ENH: improved zone constructors · 7a5e7bd4
      Mark OLESEN authored
      - constructor for empty cell/face/point Zones, with contents to be
        transferred in later.
      
      - ZoneMesh::operator(const word&) to return existing zone or a new empty one.
      7a5e7bd4
    • Mark OLESEN's avatar
      ENH: enumerations for known cell models in cellModel, ptr/ref lookups · e4b6387a
      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
      e4b6387a
  8. Nov 13, 2017
  9. Nov 09, 2017
  10. Nov 08, 2017
    • Mark OLESEN's avatar
      ENH: additional dictionary compatibility/migration methods · 78caeb61
      Mark OLESEN authored
      - when dictionary keywords change between versions, the programmer
        can use these compatibility methods to help with migration.
      
          * csearchCompat, foundCompat, lookupEntryPtrCompat, lookupEntryCompat,
            lookupCompat, lookupOrDefaultCompat, readIfPresentCompat, ...
      
        They behave like their similarly named base versions, but accept an
        additional list of older keyword names augmented by a version number.
        For example,
      
            dict.readIfPresentCompat
            (
                "key", {{"olderName", 1612}, {"veryOld", 240}},
                myscalar
            );
      
         where 1612=OpenFOAM-v1612, 240=OpenFOAM-v2.4.x, etc.
      78caeb61
    • Mark OLESEN's avatar
      ENH: dictionary add/set methods now return a pointer to the entry · 4daa5752
      Mark OLESEN authored
      - If the entry could be directly inserted: a pointer to the inserted entry.
      - If a dictionary merge was required: a pointer to the dictionary that
        received the entry.
      - Return nullptr on any type of insertion failure.
      
      This change is code compatible with existing code since it only alters
      a bool return value to be a pointer return value.
      4daa5752
    • Mark OLESEN's avatar
    • Andrew Heather's avatar
      STYLE: Header clean-up · 8e65dd2d
      Andrew Heather authored
      8e65dd2d
  11. Nov 07, 2017
  12. Nov 04, 2017
  13. Nov 03, 2017
  14. Oct 29, 2017
    • Mark OLESEN's avatar
      ENH: consistent reverse iterator definitions for UList and FixedList · 6d32d95d
      Mark OLESEN authored
      - consistent with C++ STL conventions, the reverse iterators should
        use operator++ to transit the list from rbegin() to rend().
      
        The previous implementation used raw pointers, which meant that they
        had the opposite behaviour: operator-- to transit from rbegin() to
        rend().
      
        The updated version only has operator++ defined, thus the compiler
        should catch any possible instances where people were using the old
        (incorrect) versions.
      
      - updated forAllReverseIters() and forAllConstReverseIters() macros to
        be consistent with new implementation and with C++ STL conventions.
      6d32d95d
    • Mark OLESEN's avatar
      ENH: add reverse iteration macros · d09303ec
      Mark OLESEN authored
      - forAllReverseIters and forAllReverseConstIters macros
      - stdFoam::rbegin(), stdFoam::rend()
        stdFoam::crbegin(), stdFoam::crend()
      d09303ec
    • Mark OLESEN's avatar
      ENH: support "one-shot" changes to the dictionary inputMode (issue #429) · d06b5ea8
      Mark OLESEN authored
      - 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; ... }
      d06b5ea8