Skip to content
Snippets Groups Projects
  1. Sep 07, 2021
    • Mark OLESEN's avatar
      CONFIG: adjust ordering of library paths (#2200) · f89fb3e0
      Mark OLESEN authored
      - previously OpenFOAM library paths were set before adding in
        MPI-specific elements. However, this may mask some libraries.
      
        |  New library order  |  Old library order  |
        |---------------------|---------------------|
        |  user-lib (serial)  |  various 3rd-party  |
        |  site-lib (serial)  |  foam-lib (mpi)     |
        |  foam-lib (mpi)     |  ext-lib (mpi)      |
        |  foam-lib (serial)  |  system mpi-libs    |
        |  ext-lib  (mpi)     |  user-lib (serial)  |
        |  ext-lib  (serial)  |  site-lib (serial)  |
        |  various 3rd-party  |  foam-lib (serial)  |
        |  system mpi-libs    |  ext-lib (serial)   |
        |  dummy              |  dummy              |
      f89fb3e0
  2. Aug 02, 2021
  3. Jun 28, 2021
  4. Jun 18, 2021
    • Mark OLESEN's avatar
      CONFIG: inline _foamEval within <etc/config.sh/setup> · e2148b58
      Mark OLESEN authored
      - previously a function (unlike the csh version) but since bashrc and
        setup have been split -> replace with inline definition
      
      STYLE: formatting/wording for openfoam starters
      
      TUT: simplify controlDict modification, add default substitution
      
      ENH: accept '/' for end-of-options terminator (etc/openfoam)
      
      - makes the application or service more apparent.
        * eg.  /usr/bin/openfoam / blockMesh
        * vs.  /usr/bin/openfoam -- blockMesh
      
        Accept lone '-' as the end-of-options terminator, as per bash
      
      - Adjust handling of openfoam '-c' option to flag that a command-string
        will appear, but continue with option parsing.
        Consistent with bash definition.
      e2148b58
    • Mark OLESEN's avatar
      TUT: add parallel version for various squareBend cases · 096b9dc5
      Mark OLESEN authored
      - adjust commented-out evaluation to avoid warnings.
      
        With code like this
        ```
        #if 0
        nxin    #eval{ round($nxin / 5) };
        #endif
        ```
      
        The handling of the "#if 0 / #endif" clause uses the plain ISstream
        parser to tokenize. This means that the "round(" is parsed as a word
        with a mismatched closing ')', whereas the "#eval" parser will slurp
        everything in until the closing brace and send it off as a string
        to the expression parser.
      096b9dc5
  5. Jun 16, 2021
    • Andrew Heather's avatar
      ENH: new multiFieldValue function object · ea12bfdb
      Andrew Heather authored and Mark OLESEN's avatar Mark OLESEN committed
          Computes a selected operation between multiple \c fieldValue function
          objects.
      
          The operation is applied to all results of each \c fieldValue object.
      
      Note
          Each object must generate the same number and type of results.
      
      Usage
          Minimal example by using \c system/controlDict.functions:
      
          multiFieldValue1
          {
              // Mandatory entries (unmodifiable)
              type            multiFieldValue;
              libs            (fieldFunctionObjects);
      
              // Mandatory entries (runtime modifiable)
              operation       subtract;
      
              // List of fieldValue function objects as dictionaries
              functions
              {
                  region1
                  {
                      ...
                  }
                  region2
                  {
                      ...
                  }
      
                  ...
      
                  regionN
                  {
                      ...
                  }
              }
      
              // Optional (inherited) entries
              ...
          }
      
          where the entries mean:
      
            Property     | Description                         | Type | Req'd | Dflt
            type         | Type name: multiFieldValue          | word |  yes  | -
            libs         | Library name: fieldFunctionObjects  | word |  yes  | -
            operation    | Operation type to apply to values   | word |  yes  | -
            functions    | List of fieldValue function objects | dict |  yes  | -
          \endtable
      
          Options for the \c operation entry:
      
             add           | add
             subtract      | subtract
             min           | minimum
             max           | maximum
             average       | average
      
      Deprecated fieldValueDelta
      
      - The fieldValueDelta function object was originally written to compute the
      difference between two fieldValue-type function objects. The multiFieldValue
      object name better describes its purpose whilst being able to operate on an
      arbitrary number of fieldValue-type objects.
      ea12bfdb
  6. Jun 14, 2021
  7. Jun 11, 2021
  8. Jun 10, 2021
  9. Jun 07, 2021
    • Mark OLESEN's avatar
      ENH: provide dictionary access for coded BCs etc (#1922) · b59ae32d
      Mark OLESEN authored
      - in some cases, additional dictionary inputs are useful for extending
        the input parameters or functionality of dynamic coded conditions.
      
        Typically this can be used to provide a simple set of dictionary
        inputs that are used to drive specific code, but allows changing the
        inputs without causing a recompilation.
      
        Accessed with this type of code:
        ```
        const dictionary& dict = this->codeContext();
        ```
      
      boundary conditions and function objects:
      
      * specify an additional codeContext dictionary entry:
        ```
        codeContext
        {
            ...
        }
        ```
      
      PatchFunction1:
      
      * The code context dictionary is simply the dictionary used to specify
        the PatchFunction1 coefficients.
      
        To replicated persistant data, use local member static data.
        Eg,
        ```
        code
        #{
            // Persistent (Member) Data
            static autoPtr<Function1<scalar>> baseVel;
            static autoPtr<Function1<vector>> baseDir;
            ...
        #}
        ```
      
      fvOptions:
      
      * currently not applicable
      b59ae32d
    • Mark OLESEN's avatar
      ENH: improve codeTemplates · b0891824
      Mark OLESEN authored
      - meshTools include/library for many (most) coded items
      
      - add PatchFunction1 include for coded BCs to provide ready access
        to Function1 and PatchFunction1
      b0891824
  10. May 19, 2021
  11. May 13, 2021
  12. Apr 23, 2021
    • Mark OLESEN's avatar
      CONFIG: adjust intel compiler and mpi settings (#2056) · d5498265
      Mark OLESEN authored
      - largely as per patch from Jong-Gwan (Jason) Do
      
      NB: the intel-one setup adds in paths for intelmpi.
          Its mpicc version does not harmonize with the OpenFOAM
          system openmpi setup (using mpicc --showme:link).
      
          Needs adjustment, or use intelmpi instead.
      
      - update name mappings for newer gcc, clang versions
      d5498265
  13. Apr 19, 2021
  14. Mar 31, 2021
    • mattijs's avatar
      BUG: primitiveMesh: incorrect uncached edgeFaces. Fixes #2047. · c9c85d9a
      mattijs authored
      It was only looking for faces that were used in both
      endpoints but not actually checking whether they were indeed
      an edge (== consecutive vertex) in all faces. So if one
      face had an additional crossing edge and another didn't it
      would find more edgeFaces than the proper
      'primitiveMesh::edgeFaces()' routine.
      This occasionally happened inside snappyHexMesh
      (e.g. motorBike tutorial)
      c9c85d9a
  15. Mar 29, 2021
  16. Mar 22, 2021
  17. Mar 17, 2021
    • Mark OLESEN's avatar
      ENH: support preloading fields for setExpr* utilities (#2014) · cd1350a8
      Mark OLESEN authored
      - can use either command-line option "-load-fields" or dictionary
        entry "readFields" to specify field names to be preloaded.
      
        Essentially the same functionality as with a readFields function
        object but with a lot less typing.
      
      - tutorial examples provided by Ryan Danks <ryan.danks@rwdi.com>
        illustrate using setExpr* utilities to calculate a quantity
        as a post-processing step.
      cd1350a8
  18. Feb 16, 2021
  19. Feb 10, 2021
  20. Feb 03, 2021
  21. Jan 22, 2021
  22. Dec 23, 2020
  23. Dec 18, 2020
  24. Dec 16, 2020
    • Mark OLESEN's avatar
      ENH: lazier handling of dynamic libraries · 2811c054
      Mark OLESEN authored
      - previously always called dlclose on opened libraries when destroying
        the dlLibraryTable. However, by force closing the libraries the
        situation can arise that the library is missing its own code that it
        needs on unload (#1524). This is also sometimes evident when closing
        VTK libraries for runTimePostProcessing (#354, #1585).
      
      - The new default is to not forcibly dlclose any libraries, unless
        the dlcloseOnTerminate OptimisationSwitch specifies otherwise.
      
        - The dlLibraryTable::close() method can be used to explicitly close
          all libraries and clear the list.
      
        - The dlLibraryTable::clear() method now only clears the entries,
          without a dlclose.
      2811c054
  25. Dec 14, 2020
  26. Dec 11, 2020
  27. Dec 08, 2020
  28. Nov 26, 2020
  29. Nov 19, 2020
    • Mark OLESEN's avatar
      ENH: Function1 and PatchFunction1 improvements (#1917) · 2f2dcdcf
      Mark OLESEN authored
      - easier support for non-mandatory functions.
      
        In some boundary conditions it can be desirable to support
        additional functions, but not necessarily require them. Make this
        easier to support with a Function1, PatchFunction1 NewIfPresent()
        selector.
      
      - support for compatibility lookups
      
      - harmonize branching logic and error handling between Function1 and
        PatchFunction1.
      
      ENH: refactor a base class for Function1, PatchFunction1
      
      - includes base characteristics, patch or scalar information
      
      ENH: additional creation macros
      
      - makeConcreteFunction1, makeConcretePatchFunction1Type for adding a
        non-templated function into the correct templated selection table.
        makeScalarPatchFunction1 for similarity with makeScalarFunction1
      2f2dcdcf
  30. Nov 11, 2020
    • Mark OLESEN's avatar
      CONFIG: rationalize mpi config tuning (#1910) · c91fc6f4
      Mark OLESEN authored
      - prefix FOAM_MPI and library directories with 'sys-' for system
        versions for uniform identication.
      
        WM_MPLIB      | libdir (FOAM_MPI)  | old naming |
        SYSTEMMPI     | sys-mpi            | mpi        |
        SYSTEMOPENMPI | sys-openmpi        | openmpi-system |
      
      - prefix preferences with 'prefs.' to make them more easily
        identifiable, and update bin/tools/create-mpi-config accordingly
      
            Old name: config.{csh,sh}/openmpi
            New name: config.{csh,sh}/prefs.openmpi
      
      - additional mpi preferences now available:
          * prefs.intelmpi
          * prefs.mpich
          ...
      
      CONFIG: added hook for EASYBUILDMPI (eb-mpi), somewhat like USERMPI
      
      - EasyBuild uses mpicc when compiling, so no explicit wmake rules are
        used
      
      ENH: support different major versions for system openmpi
      
      - for example, with
      
           WM_MPLIB=SYSTEMOPENMPI2
      
        defines FOAM_MPI=sys-openmpi2 and thus creates lib/sys-openmpi2
      
      ENH: centralize handling of mpi as 'mpi-rules'
      
          Before:
              sinclude $(GENERAL_RULES)/mplib$(WM_MPLIB)
              sinclude $(DEFAULT_RULES)/mplib$(WM_MPLIB)
      
              ifeq (,$(FOAM_MPI_LIBBIN))
                  FOAM_MPI_LIBBIN := $(FOAM_LIBBIN)/$(FOAM_MPI)
              endif
      
          After:
              include $(GENERAL_RULES)/mpi-rules
      
      - also allows variants such as SYSTEMOPENMPI2 to be handled separately
      c91fc6f4
    • Mark OLESEN's avatar
      CONFIG: rationalize compiler tuning · 26ec9b5a
      Mark OLESEN authored
      - support prefs.compiler with better possibilities to provide
        overload values
      
      STYLE: reduce code for WM_ARCH_OPTION (seldom-used)
      26ec9b5a
  31. Nov 04, 2020
    • Mark OLESEN's avatar
      ENH: handle wmake -debug option via FOAM_EXTRA_CXX_FLAGS · 1d544540
      Mark OLESEN authored
      - ensures that subsequent Allwmake scripts know about it.
      
      ENH: add bin/tools/query-detect wrapper for wmake have_* scripts
      
      CONFIG: use project/ThirdParty without additional sanity checks
      
      - no need to test for Allwmake or platforms/ if ThirdParty is located
        within the project directory itself.
      
      COMP: add simple mpi test to 00-dummy
      
      - for testing library linkage, etc.
      1d544540