1. 07 Sep, 2020 2 commits
    • Mark Olesen's avatar
      CONFIG: improve support for compiler/link options (#1830) · 9423d2bd
      Mark Olesen authored
      - introduce WM_COMPILE_CONTROL variable to convey control information
        into the build rules.
        The convention (as per spack):
            - '+' to select a feature
            - '~' to deselect a feature
        Eg, to select the gold linker, and disable openmp
        (spaces are not required):
            WM_COMPILE_CONTROL="+gold ~openmp"
      CONFIG: accept FOAM_EXTRA_LDFLAGS for AMD, gold, Mingw linkers
      CONFIG: generalize PROJECT_LIBS (-ldl used almost universally)
    • Mark Olesen's avatar
      ENH: allow default parameter for Tuple2 (#1827) · fbfcdfc7
      Mark Olesen authored
      - simplifies cases where Tuple2 is used as a Pair replacement
        (for output format reasons)
  2. 11 Aug, 2020 1 commit
  3. 10 Aug, 2020 1 commit
    • Mark Olesen's avatar
      ENH: direct access to wrapped ifstream/ofstream with compression (#1805) · 6e2b7be9
      Mark Olesen authored
      - previously hidden as Detail::[IO]FstreamAllocator, now exposed
        directly as [io]fstreamPointer, which allows reuse for
        std::ifstream, std::ofstream wrapping, without the additional
        ISstream, OSstream layers.
        These stream pointers have some characteristics similar to a
      - restrict direct gzstream usage to two files (fstreamPointers.C,
        gzstream.C) which improves localization and makes it simpler to
        enable/disable with the `HAVE_LIBZ` define.
        The HAVE_LIBZ define is currently simply hard-coded in the
        If compiled WITHOUT libz support:
          - reading gz files : FatalError
          - writing gz files : emit warning and downgrade to uncompressed
          - warn if compression is specified in the case controlDict
            and downgrade to uncompressed
      ENH: minor updates to gzstream interface for C++11
      - support construct/open with std::string for the file names.
      CONFIG: provisioning for have_libz detection as wmake/script
  4. 07 Aug, 2020 1 commit
  5. 04 Aug, 2020 1 commit
  6. 28 Jul, 2020 3 commits
    • Mark Olesen's avatar
      ENH: add get() retrieval of a pointer from PtrLists, HashPtrTable · fa71840d
      Mark Olesen authored
      - naming similarity with autoPtr, unique_ptr and other containers.
        For UPtrList derivatives, this is equivalent to the existing
        operator(). The read-only variant is also equivalent to the
        single-parameter 'set(label)' method.
        With PtrList<T> list(...) :
            const T* ptr = list.get(10);
            if (ptr)
            if (list.set(10))
        For HashPtrTable there is only a read-only variant which is equivalent
        to testing for existence and for value.
        With HashPtrTable<T> hash(...) :
            const T* ptr = list.get("key");
            if (ptr)
            if (list.found("key"))
                // Fails on null pointer!!
      Use of get() is largely a matter of taste or local coding requirements
    • Mark Olesen's avatar
      ENH: support emplace methods and std::unique_ptr for PtrList-derivatives · 872c9d37
      Mark Olesen authored
      - emplace methods
            m.internalCoeffs().emplace(patchi, fc.size(), Zero);
            m.internalCoeffs().set(patchi, new Field<Type>(fc.size(), Zero));
      - handle insert/append of refPtr wherever tmp was already supported
      COMP: incorrect variable names in PtrListOpsTemplates.C
    • Mark Olesen's avatar
      ENH: HashTable::emplace_set() method, HashPtrTable support for unique_ptr · 4110699d
      Mark Olesen authored
      - forwarding like the emplace() method, but overwriting existing
        entries as required
      - propagate similar changes to HashPtrTable
        For example, with HashPtrTable<labelList> table(...) :
        With 'insert' semantics
            table.emplace("list1", 1000);
            if (!table.found("list1"))
                table.set("list1", new labelList(1000));
            table.insert("list1", autoPtr<labelList>::New(1000));
        Note that the last example invokes an unnecessary allocation/deletion
        if the insertion is unsuccessful.
        With 'set' semantics:
            table.emplace_set("list1", 15);
            table.set("list1", new labelList(15));
  7. 24 Jul, 2020 1 commit
  8. 16 Jul, 2020 2 commits
    • Mark Olesen's avatar
      STYLE: check autoPtr as plain bool instead of valid() · 12c91b94
      Mark Olesen authored
      - cleaner code, more similarity with unique_ptr
            if (ptr)
            if (!ptr)
            if (ptr.valid())
            if (!ptr.valid())
    • Mark Olesen's avatar
      STYLE: simplify short-circuit involving autoPtr (#1775) · 9af3f85c
      Mark Olesen authored
      - with '&&' conditions, often better to check for non-null autoPtr
        first (it is cheap)
      - check as bool instead of valid() method for cleaner code, especially
        when the wrapped item itself has a valid/empty or good.
        Also when handling multiple checks.
            if (ptr && ptr->valid())
            if (ptr1 || ptr2)
            if (ptr.valid() && ptr->valid())
            if (ptr1.valid() || ptr2.valid())
  9. 14 Jul, 2020 1 commit
    • Mark Olesen's avatar
      ENH: various dlLibraryTable improvements/refinements (#1737) · 41d3e6f1
      Mark Olesen authored
      - libs() singleton method for global library handling
      - explicit handling of empty filename for dlLibraryTable open/close.
        Largely worked before, but now be more explicit about its behaviour.
      - add (key, dict) constructor and open() methods.
        More similarity to dimensionedType, Enum etc, and there is no
        ambiguity with the templated open().
      - construct or open from initializer_list of names
      - optional verbosity when opening with auxiliary table,
        avoid duplicate messages or spurious messages for these.
      - basename and fullname methods (migrated from dynamicCode).
      - centralise low-level load/unload hooks
      - adjust close to also dlclose() aliased library names.
  10. 29 Jun, 2020 1 commit
  11. 17 Jun, 2020 2 commits
  12. 11 Jun, 2020 1 commit
  13. 10 Jun, 2020 1 commit
  14. 09 Jun, 2020 1 commit
    • Henning Scheufler's avatar
      CONT: Addition of compressibleIsoInterFOam and PLIC · 44a84d47
      Henning Scheufler authored
         1) Implementation of the compressibleIsoInterFOam solver
         2) Implementation of a new PLIC interpolation scheme.
         3) New tutorials associated with the solvers
      This implementation was carried out by Henning Scheufler (DLR) and Johan
      Roenby (DHI), following :
      Henning Scheufler, Johan Roenby,
      Accurate and efficient surface reconstruction from volume fraction data
      on general meshes, Journal of Computational Physics, 2019, doi
      The integration of the code was carried out by Andy Heather and Sergio
      Ferraris from OpenCFD Ltd.
  15. 05 Jun, 2020 3 commits
  16. 04 Jun, 2020 2 commits
    • Mark Olesen's avatar
      ENH: boolVector for specialized bundling of boolean values · ea4c8f4b
      Mark Olesen authored
      - bundled of boolean values as a vector of 3 components with
        element access using x(), y() and z() member functions.
        It also has some methods similar to bitSet.
      - Not derived from Vector or VectorSpace since it does not share very
        many vector-like characteristics.
    • Mark Olesen's avatar
      ENH: additional polynomial constructors, improved I/O · bc9e97cf
      Mark Olesen authored
      - support construct from initializer_list, which can help simplify
        code with constant coefficients.
      - add default constructor for polynomialFunction and Istream reading
        to support resizable lists of polynomialFunction.
        A default constructed polynomialFunction is simply equivalent to
        a constant zero.
      - no special IO handling for Polynomial required,
        it is the same as VectorSpace anyhow.
  17. 02 Jun, 2020 3 commits
    • Mark Olesen's avatar
      ENH: unify use of dictionary method names · 3e43edf0
      Mark Olesen authored
      - previously introduced `getOrDefault` as a dictionary _get_ method,
        now complete the transition and use it everywhere instead of
        `lookupOrDefault`. This avoids mixed usage of the two methods that
        are identical in behaviour, makes for shorter names, and promotes
        the distinction between "lookup" access (ie, return a token stream,
        locate and return an entry) and "get" access (ie, the above with
        conversion to concrete types such as scalar, label etc).
    • Mark Olesen's avatar
    • Mark Olesen's avatar
      ENH: support predicate checks for argList (similar to dictionary methods) · 31b17221
      Mark Olesen authored
      - Favour use of argList methods that are more similar to dictionary
        method names with the aim of reducing the cognitive load.
        * Silently deprecate two-parameter get() method in favour of the
          more familiar getOrDefault.
        * Silently deprecate opt() method in favour of get()
        These may be verbosely deprecated in future versions.
  18. 29 May, 2020 4 commits
    • Mark Olesen's avatar
      STYLE: include scalar.H instead of floatScalar.H/doubleScalar.H separately · 727ea48e
      Mark Olesen authored
      STYLE: adjust code comments
    • Mark Olesen's avatar
      ENH: add swallow assignment to nullObject · 1d2391e0
      Mark Olesen authored
      - similar to the behaviour of std::ignore and consistent with the
        no input / no output nature of nullObject. Similarly accept a
        const reference for its Istream operator.
      - make most nullObject methods constexpr
    • Mark Olesen's avatar
      ENH: inline and extend clockValue, clockTime · e3367dbd
      Mark Olesen authored
      - mostly wraps std::chrono so can inline much of it, which is potentially
        helpful when used for inner timings.
      - add elapsedTime() method for direct cast to double and for
        naming similarity with wall-clock method.
      Potential breaking change (minor):
      - clockValue construct with a bool parameter is now simply tagged
        dispatch (value is ignored) and always queries the current clock
        value. This avoids needless branching.
        Since this constructor form has primarily been used internally (eg,
        clockTime), breakages in user code are not expected.
    • Mark Olesen's avatar
      ENH: reduce dependencies for foamVersion.H · 5eebe505
      Mark Olesen authored
      - have printBuildInfo output to std::ostream
      - removed extraneous include "stdFoam.H"
      ENH: revert to pre-processor defines for hard-coded paths (#1712)
      - redundant information, but more robust at run-time without relying
        on initialization order
  19. 23 May, 2020 2 commits
  20. 11 May, 2020 2 commits
  21. 04 May, 2020 1 commit
  22. 30 Apr, 2020 1 commit
    • Mark Olesen's avatar
      STYLE: update PrimitivePatch (#1648) · 8a5d108f
      Mark Olesen authored
      - simplified templating, which cleans up code and does not appear to
        break any normal user coding.
      ENH: unique_ptr instead of homegrown demand-driven handling.
  23. 28 Apr, 2020 2 commits
    • Mark Olesen's avatar
      ENH: add string replaceAny() method · 14e2dbfb
      Mark Olesen authored
      - takes a search string and a replacement character.
        The replacement character can also be a nul char ('\0'), which
        simply removes the characters.
        Possible uses:
        * Replace reserved characters
            str.replaceAny("<>:", '_');
        * Remove shell meta-characters or reserved filesystem characters
            str.replaceAny("*?<>{}[]:", '\0');
    • Mark Olesen's avatar
      STYLE: use writeEntry(), beginBlock(), endBlock() methods · 79048eb6
      Mark Olesen authored
      - use dictionary::get<..> instead of lookup in a few more places
  24. 03 Apr, 2020 1 commit
    • Mark Olesen's avatar
      ENH: support independent specification of surface read/write format (#1600) · 560c053b
      Mark Olesen authored
      - adjustments to internal handling to improve run-time addition of
        other formats (eg, with additional user library)
        For example, to write a binary STL with a '.stl' extension:
          $ surfaceMeshConvert input.obj  -write-format stlb  output.stl
        Or in a sampler,
        to specify the input type without ambiguity:
            type        meshedSurface;
            surface     sampling.inp;
            fileType    starcd;
            scale       0.001;
      STYLE: regularize naming for input/output scaling
        * -read-scale   (compat: -scaleIn)
        * -write-scale  (compat: -scaleOut)
      CONFIG: change edge/surface selection name for STARCD format
      - now select as "starcd" instead of "inp" to avoid naming ambiguity
        with abaqus