1. 02 Aug, 2019 1 commit
  2. 28 Apr, 2019 1 commit
  3. 25 May, 2019 1 commit
    • Mark Olesen's avatar
      COMP: force dlOpen for windows application binaries (#1238) · 66a10099
      Mark Olesen authored
      - when windows portable executables (.exe or .dll) files are loaded,
        their dependent libraries not fully loaded. For OpenFOAM this means
        that the static constructors which are responsible for populating
        run-time selection tables are not triggered, and most of the run-time
        selectable models will simply not be available.
      
      Possible Solution
      =================
      
        Avoid this problem by defining an additional library symbol such as
        the following:
      
            extern "C" void libName_Load() {}
      
        in the respective library, and tag this symbol as 'unresolved' for
        the linker so that it will attempt to resolve it at run-time by
        loading the known libraries until it finds it. The link line would
        resemble the following:
      
            -L/some/path -llibName -ulibName_Load
      
        Pros:
          - Allows precise control of forced library loading
      
        Cons:
          - Moderately verbose adjustment of some source files (even with macro
            wrapping for the declaration).
          - Adjustment of numerous Make/options files and somewhat ad hoc
            in nature.
          - Requires additional care when implementing future libraries and/or
            applications.
      
        - This is the solution taken by the symscape patches (Richard Smith)
      
      Possible Solution
      =================
      
        Avoid this problem by simply force loading all linked libraries.
        This is done by "scraping" the information out of the respective
        Make/options file (after pre-processing) and using that to define
        the library list that will be passed to Foam::dlOpen() at run-time.
      
        Pros:
          - One-time (very) minimal adjustment of the sources and wmake toolchain
          - Automatically applies to future applications
      
        Cons:
          - Possibly larger memory footprint of application (since all dependent
            libraries are loaded).
          - Possible impact on startup time (while loading libraries)
          - More sensitive to build failures. Since the options files are
            read and modified based on the existence of the dependent
            libraries as a preprocessor step, if the libraries are initially
            unavailable for the first attempt at building the application,
            the dependencies will be inaccurate for later (successful) builds.
      
        - This is solution taken by the bluecape patches (Bruno Santos)
      
      Adopted Solution
      ================
      
        The approach taken by Bruno was adopted in a modified form since
        this appears to be the most easily maintained.
      
      Additional Notes
      ================
      
        It is always possible to solve this problem by defining a corresponding
        'libs (...)' entry in the case system/controlDict, which forces a dlOpen
        of the listed libraries. This is obviously less than ideal for large-scale
        changes, but can work to resolve an individual problem.
      
        The peldd utility (https://github.com/gsauthof/pe-util), which is
        also packaged as part of MXE could provide yet another alternative.
        Like ldd it can be used to determine the library dependencies of
        binaries or libraries. This information could be used to define an
        additional load layer for Windows.
      66a10099
  4. 07 Feb, 2019 1 commit
    • Mark Olesen's avatar
      ENH: code adjustments for updated NullObject · 078e3474
      Mark Olesen authored
      - can now safely use labelList::null() instead of emptyLabelList for
        return values. No special treatment required for lists.
      
        Possible replacements:
      
            if (notNull(list) && list.size())  ->  if (list.size())
            if (isNull(list) || list.empty())  ->  if (list.empty())
      
        The receiver may still wish to handle differently to distinguish
        between a null list and an empty list, but no additional special
        protection is required when obtaining sizes, traversing, outputting
        etc.
      078e3474
  5. 06 Feb, 2019 1 commit
  6. 07 Jan, 2019 2 commits
  7. 11 Dec, 2018 2 commits
  8. 12 Dec, 2018 1 commit
  9. 28 Nov, 2018 1 commit
  10. 19 Oct, 2018 1 commit
  11. 11 Oct, 2018 1 commit
  12. 01 Oct, 2018 1 commit
  13. 28 Sep, 2018 1 commit
  14. 27 Sep, 2018 1 commit
    • Mark Olesen's avatar
      STYLE: add nBoundaryFaces() method to primitiveMesh · 64c3e484
      Mark Olesen authored
      - nBoundaryFaces() is often used and is identical to
        (nFaces() - nInternalFaces()).
      
      - forward the mesh nInternalFaces() and nBoundaryFaces() to
        polyBoundaryMesh as nFaces() and start() respectively,
        for use when operating on a polyBoundaryMesh.
      
      STYLE:
      
      - use identity() function with starting offset when creating boundary maps.
      
           labelList map
           (
               identity(mesh.nBoundaryFaces(), mesh.nInternalFaces())
           );
      
        vs.
      
           labelList map(mesh.nBoundaryFaces());
           forAll(map, i)
           {
               map[i] = mesh.nInternalFaces() + i;
           }
      64c3e484
  15. 09 Aug, 2018 1 commit
  16. 08 Aug, 2018 1 commit
    • Mark Olesen's avatar
      ENH: ignore -noFunctionObjects option when disabled · e0f83938
      Mark Olesen authored
      - With argList::noFunctionObjects() we use the logic added in
        4b933332 (issue #352)
      
        By removing the '-noFunctionObjects' option, we automatically
        suppress the creation of function-objects via Time (with argList
        as a parameter).
        There is generally no need in these cases for an additional
      
            runTime.functionObjects().off()  statement
      
        Use the argList::noFunctionObjects() for more direct configuration
        and reduce unnecessary clutter in the -help information.
      
        In previous versions, the -noFunctionObjects would have been redundant
        anyhow, so we can also just ignore it now instead.
      e0f83938
  17. 02 Aug, 2018 1 commit
  18. 31 Jul, 2018 1 commit
  19. 30 Jul, 2018 1 commit
  20. 26 Jul, 2018 1 commit
  21. 25 Jul, 2018 1 commit
    • Mark Olesen's avatar
      ENH: fvMeshSubset improvements (issue #951) · dbe0db1d
      Mark Olesen authored
      - what was previously termed 'setLargeCellSubset()' is now simply
        'setCellSubset()' and supports memory efficient interfaces.
      
        The new parameter ordering avoids ambiguities caused by default
        parameters.
      
        Old parameter order:
      
            setLargeCellSubset
            (
                const labelList& region,
                const label currentRegion,
                const label patchID = -1,
                const bool syncCouples = true
            );
      
        New parameter order:
      
            setCellSubset
            (
                const label regioni,
                const labelUList& regions,
                const label patchID = -1,
                const bool syncCouples = true
            );
      
         And without ambiguity:
      
            setCellSubset
            (
                const labelUList& selectedCells,
                const label patchID = -1,
                const bool syncCouples = true
            );
      
      - support bitSet directly for specifying the selectedCells for
        memory efficiency and ease of use.
      
      - Additional constructors to perform setCellSubset() immediately,
        which simplifies coding.
      
        For example,
      
            meshParts.set
            (
                zonei,
                new fvMeshSubset(mesh, selectedCells)
            );
      
        Or even
      
            return autoPtr<fvMeshSubset>::New(mesh, selectedCells);
      dbe0db1d
  22. 24 Jul, 2018 1 commit
  23. 30 May, 2018 1 commit
  24. 22 Dec, 2017 1 commit
  25. 05 Mar, 2018 1 commit
  26. 26 Feb, 2018 1 commit
    • Mark Olesen's avatar
      ENH: cleanup autoPtr class (issue #639) · 660f3e54
      Mark Olesen authored
      Improve alignment of its behaviour with std::unique_ptr
      
        - element_type typedef
        - release() method - identical to ptr() method
        - get() method to get the pointer without checking and without releasing it.
        - operator*() for dereferencing
      
      Method name changes
      
        - renamed rawPtr() to get()
        - renamed rawRef() to ref(), removed unused const version.
      
      Removed methods/operators
      
        - assignment from a raw pointer was deleted (was rarely used).
          Can be convenient, but uncontrolled and potentially unsafe.
          Do allow assignment from a literal nullptr though, since this
          can never leak (and also corresponds to the unique_ptr API).
      
      Additional methods
      
        - clone() method: forwards to the clone() method of the underlying
          data object with argument forwarding.
      
        - reset(autoPtr&&) as an alternative to operator=(autoPtr&&)
      
      STYLE: avoid implicit conversion from autoPtr to object type in many places
      
      - existing implementation has the following:
      
           operator c...
      660f3e54
  27. 01 Mar, 2018 1 commit
    • Mark Olesen's avatar
      ENH: cleanup of ListOps, ListListOps. Adjustments to List, PackedList. · 15f72608
      Mark Olesen authored
      - relocated ListAppendEqOp and ListUniqueEqOp to ListOps::appendEqOp
        and ListOps::UniqueEqOp, respectively for better code isolation and
        documentation of purpose.
      
      - relocated setValues to ListOps::setValue() with many more
        alternative selectors possible
      
      - relocated createWithValues to ListOps::createWithValue
        for better code isolation. The default initialization value is itself
        now a default parameter, which allow for less typing.
      
        Negative indices in the locations to set are now silently ignored,
        which makes it possible to use an oldToNew mapping that includes
        negative indices.
      
      - additional ListOps::createWithValue taking a single position to set,
        available both in copy assign and move assign versions.
        Since a negative index is ignored, it is possible to combine with
        the output of List::find() etc.
      
      STYLE: changes for PackedList
      
      - code simplication in the PackedList iterators, including dropping
        the unused operator() on iterators, which is not available in plain
        list versions either.
      
      - improved sizing for PackedBoolList creation from a labelUList.
      
      ENH: additional List constructors, for handling single element list.
      
      - can assist in reducing constructor ambiguity, but can also helps
        memory optimization when creating a single element list.
        For example,
      
          labelListList labels(one(), identity(mesh.nFaces()));
      15f72608
  28. 20 Feb, 2018 1 commit
  29. 19 Feb, 2018 1 commit
  30. 08 Jan, 2018 1 commit
    • Mark Olesen's avatar
      ENH: simplify method names for reading argList options and arguments · 345a2a42
      Mark Olesen authored
      - use succincter method names that more closely resemble dictionary
        and HashTable method names. This improves method name consistency
        between classes and also requires less typing effort:
      
          args.found(optName)        vs.  args.optionFound(optName)
          args.readIfPresent(..)     vs.  args.optionReadIfPresent(..)
          ...
          args.opt<scalar>(optName)  vs.  args.optionRead<scalar>(optName)
          args.read<scalar>(index)   vs.  args.argRead<scalar>(index)
      
      - the older method names forms have been retained for code compatibility,
        but are now deprecated
      345a2a42
  31. 11 Dec, 2017 1 commit
  32. 08 Dec, 2017 1 commit
  33. 13 Jul, 2018 1 commit
  34. 02 Jul, 2018 1 commit
    • Mark Olesen's avatar
      ENH: improve controls for Time (issue #910) · 2662042d
      Mark Olesen authored
      - relocate some standard functionality to TimePaths to allow a lighter
        means of managing time directories without using the entire Time
        mechanism.
      
      - optional enableLibs for Time construction (default is on)
        and a corresponding argList::noLibs() and "-no-libs" option
      
      STYLE:
      
      - mark Time::outputTime() as deprecated MAY-2016
      
      - use pre-increment for runTime, although there is no difference in
        behaviour or performance.
      2662042d
  35. 10 Nov, 2017 1 commit
    • Mark Olesen's avatar
      ENH: improved zone constructors · a59c87d5
      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.
      a59c87d5
  36. 28 Sep, 2017 1 commit
  37. 29 May, 2018 1 commit
  38. 26 Oct, 2017 1 commit