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)
      9423d2bd
    • 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)
      fbfcdfc7
  2. 03 Sep, 2020 1 commit
  3. 01 Sep, 2020 1 commit
  4. 11 Aug, 2020 1 commit
  5. 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
        unique_ptr.
      
      - 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
        Make/options.
      
        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
      6e2b7be9
  6. 07 Aug, 2020 1 commit
  7. 05 Aug, 2020 4 commits
    • Mark Olesen's avatar
    • Mark Olesen's avatar
      ENH: avoid phaseSystem cyclic dependencies, reduce number of libraries · 915c0785
      Mark Olesen authored
      Reduce the number of phaseSystems libraries:
      
      - phaseSystems previously had a number of smaller libraries to provide
        interface and model properties, etc. This potential flexibility was
        never actually used anywhere, but causes cyclic dependencies between
        phaseSystem and the models (and turbulence) that causes extreme
        difficulty for mingw linking (issue #1238).
      
      - libincompressibleMultiphaseSystems
        - removed: libmassTransferModels
      
      - libmultiphaseSystem
        - removed: libcompressibleMultiphaseEulerianInterfacialModels
      
      - libreactingMultiphaseSystem
        - removed: libreactingPhaseSystem
        - removed: libreactingEulerianFvPatchFields
        - removed: libreactingEulerianInterfacialCompositionModels
        - removed: libreactingEulerianInterfacialModels
        - removed: libmultiphaseReactingTurbulenceModels
      
      - libreactingTwoPhaseSystem
        - removed: libreactingPhaseSystem
        - removed: libreactingEulerianFvPatchFields
        - removed: libreactingEulerianInterfacialCompositionModels
        - removed: libreactingEulerianInterfacialModels
      
      Avoid duplicate symbol for phaseCompressibleTurbulenceModels
      
        Common turbulence models are defined in libreactingMultiphaseSystem,
        and libmultiphaseReactingTurbulenceModels is now redundant.
      
        The libtwoPhaseReactingTurbulenceModels extends the common models
        for reactingTwoPhaseSystem.
      915c0785
    • Mark Olesen's avatar
      ENH: centralize more libraries in src/phaseSystemModels · 03526e20
      Mark Olesen authored
      - prelude to code refactoring
      
      NOTE
          no source code change in this commit, only relocation,
          renaming and adjustment of Make/{files,options}
      03526e20
    • Mark Olesen's avatar
      ENH: prefer 'model' keyword instead of 'RASModel',... (#149) · 42ce617b
      Mark Olesen authored
      - since the context (laminar/RAS/LES) is already given by the
        sub-dictionary, it is redundant to use as prefix as well.
      
      - silently support the longer names as compat methods
      42ce617b
  8. 04 Aug, 2020 1 commit
  9. 03 Aug, 2020 1 commit
  10. 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)
            {
                ptr->method();
            }
      
        vs.
            if (list.set(10))
            {
                list[10].method();
            }
      
        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)
            {
                ptr->method();
            }
      
        vs.
            if (list.found("key"))
            {
                // Fails on null pointer!!
                list["key"].method();
            }
      
      Use of get() is largely a matter of taste or local coding requirements
      fa71840d
    • Mark Olesen's avatar
      ENH: support emplace methods and std::unique_ptr for PtrList-derivatives · 872c9d37
      Mark Olesen authored
      - emplace methods
        Eg,
            m.internalCoeffs().emplace(patchi, fc.size(), Zero);
        vs.
            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
      872c9d37
    • 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);
      
        vs
            if (!table.found("list1"))
            {
                table.set("list1", new labelList(1000));
            }
        or
            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);
      
        vs
            table.set("list1", new labelList(15));
      4110699d
  11. 27 Jul, 2020 1 commit
  12. 24 Jul, 2020 1 commit
  13. 23 Jul, 2020 2 commits
  14. 16 Jul, 2020 3 commits
  15. 14 Jul, 2020 2 commits
    • Mark Olesen's avatar
    • 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.
      41d3e6f1
  16. 13 Jul, 2020 2 commits
  17. 01 Jul, 2020 1 commit
  18. 29 Jun, 2020 2 commits
  19. 26 Jun, 2020 1 commit
  20. 25 Jun, 2020 1 commit
  21. 24 Jun, 2020 2 commits
  22. 22 Jun, 2020 3 commits
  23. 19 Jun, 2020 1 commit
    • Mark Olesen's avatar
      ENH: add foamHasLibrary to test for availability of libraries (#1735) · 2dcbc09b
      Mark Olesen authored
      - For some cases it can be helpful to test if additional libraries can
        be properly resolved.
      
        This can be useful in scripts to test for additional capability:
      
            if foamHasLibrary geometricVoF
            then ...
            fi
      
        But also directly from the command-line to help resolve configuration
        issues:
      
            foamHasLibrary -verbose petscFoam
      
        Could not load "petscFoam"
        libpetsc.so.3.13: cannot open shared object file: No such file or directory
      2dcbc09b
  24. 17 Jun, 2020 2 commits
    • Mark Olesen's avatar
      ENH: lumped point motion using local linear basic functions (#1341) · b0136d83
      Mark Olesen authored
      - the earlier implementation of externally controlled lumped point
        motion (see merge request !120 and OpenFOAM-v1706 release notes) was
        conceived for the motion of simple structures such as buildings or
        simple beams. The motion controller was simply defined in terms of
        an orientation axis and divisions along that axis.
      
        To include complex structures, multiple motion controllers are
        defined in terms of support points and connectivity.
      
        The points can have additional node Ids associated with them, which
        makes it easier to map to/from FEA models.
      
        OLD system/lumpedPointMovement specification
        --------------------------------------------
      
            //- Reference axis for the locations
            axis            (0 0 1);
      
            //- Locations of the lumped points
            locations       (0 0.05 .. 0.5);
      
        NEW system/lumpedPointMovement specification
        --------------------------------------------
      
            // Locations of the lumped points
            points
            (
                (0  0  0.00)
                (0  0  0.05)
                ...
                (0  0  0.50)
            );
      
            //- Connectivity for motion controllers
            controllers
            {
                vertical
                {
                    pointLabels (0 1 2 3 4 5 6 7 8 9 10);
                }
            }
      
        And the controller(s) must be associated with the given
        pointDisplacement patch. Eg,
      
           somePatch
           {
               type            lumpedPointDisplacement;
               value           uniform (0 0 0);
               controllers     ( vertical );   // <-- NEW
           }
      
      TUT: adjust building motion tutorial
      
      - use new controllor definitions
      - replace building response file with executable
      - add updateControl in dynamicMeshDict for slowly moving structure
      b0136d83
    • OpenFOAM bot's avatar