1. 30 May, 2018 1 commit
  2. 05 Mar, 2018 1 commit
    • Mark Olesen's avatar
      STYLE: use direct iteration for HashSet · 4fe8ed82
      Mark Olesen authored
      - The iterator for a HashSet dereferences directly to its key.
      
      - Eg,
      
            for (const label patchi : patchSet)
            {
                ...
            }
        vs.
            forAllConstIter(labelHashSet, patchSet, iter)
            {
                const label patchi = iter.key();
                ...
            }
      4fe8ed82
  3. 21 Mar, 2018 1 commit
  4. 07 Mar, 2018 1 commit
    • Mark Olesen's avatar
      ENH: new bitSet class and improved PackedList class (closes #751) · bac943e6
      Mark Olesen authored
      - The bitSet class replaces the old PackedBoolList class.
        The redesign provides better block-wise access and reduced method
        calls. This helps both in cases where the bitSet may be relatively
        sparse, and in cases where advantage of contiguous operations can be
        made. This makes it easier to work with a bitSet as top-level object.
      
        In addition to the previously available count() method to determine
        if a bitSet is being used, now have simpler queries:
      
          - all()  - true if all bits in the addressable range are empty
          - any()  - true if any bits are set at all.
          - none() - true if no bits are set.
      
        These are faster than count() and allow early termination.
      
        The new test() method tests the value of a single bit position and
        returns a bool without any ambiguity caused by the return type
        (like the get() method), nor the const/non-const access (like
        operator[] has). The name corresponds to what std::bitset uses.
      
        The new find_first(), find_last(), find_next() methods provide a faster
        means of searching for bits that are set.
      
        This can be especially useful when using a bitSet to control an
        conditional:
      
        OLD (with macro):
      
            forAll(selected, celli)
            {
                if (selected[celli])
                {
                    sumVol += mesh_.cellVolumes()[celli];
                }
            }
      
        NEW (with const_iterator):
      
            for (const label celli : selected)
            {
                sumVol += mesh_.cellVolumes()[celli];
            }
      
            or manually
      
            for
            (
                label celli = selected.find_first();
                celli != -1;
                celli = selected.find_next()
            )
            {
                sumVol += mesh_.cellVolumes()[celli];
            }
      
      - When marking up contiguous parts of a bitset, an interval can be
        represented more efficiently as a labelRange of start/size.
        For example,
      
        OLD:
      
            if (isA<processorPolyPatch>(pp))
            {
                forAll(pp, i)
                {
                    ignoreFaces.set(i);
                }
            }
      
        NEW:
      
            if (isA<processorPolyPatch>(pp))
            {
                ignoreFaces.set(pp.range());
            }
      bac943e6
  5. 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 const T&() const { return operator*(); }
      
        which means that the following code works:
      
             autoPtr<mapPolyMesh> map = ...;
             updateMesh(*map);    // OK: explicit dereferencing
             updateMesh(map());   // OK: explicit dereferencing
             updateMesh(map);     // OK: implicit dereferencing
      
        for clarity it may preferable to avoid the implicit dereferencing
      
      - prefer operator* to operator() when deferenced a return value
        so it is clearer that a pointer is involve and not a function call
        etc    Eg,   return *meshPtr_;  vs.  return meshPtr_();
      660f3e54
  6. 19 Nov, 2017 2 commits
  7. 10 Aug, 2017 1 commit
  8. 03 Jul, 2017 1 commit
  9. 19 May, 2017 1 commit
  10. 07 Jul, 2017 1 commit
    • Andrew Heather's avatar
      INT: Integration of Mattijs' collocated parallel IO additions · d8d6030a
      Andrew Heather authored
      Original commit message:
      ------------------------
      
      Parallel IO: New collated file format
      
      When an OpenFOAM simulation runs in parallel, the data for decomposed fields and
      mesh(es) has historically been stored in multiple files within separate
      directories for each processor.  Processor directories are named 'processorN',
      where N is the processor number.
      
      This commit introduces an alternative "collated" file format where the data for
      each decomposed field (and mesh) is collated into a single file, which is
      written and read on the master processor.  The files are stored in a single
      directory named 'processors'.
      
      The new format produces significantly fewer files - one per field, instead of N
      per field.  For large parallel cases, this avoids the restriction on the number
      of open files imposed by the operating system limits.
      
      The file writing can be threaded allowing the simulation to continue running
      while the data is being written to file.  NFS (Network File System) is not
      needed when using the the collated format and additionally, there is an option
      to run without NFS with the original uncollated approach, known as
      "masterUncollated".
      
      The controls for the file handling are in the OptimisationSwitches of
      etc/controlDict:
      
      OptimisationSwitches
      {
          ...
      
          //- Parallel IO file handler
          //  uncollated (default), collated or masterUncollated
          fileHandler uncollated;
      
          //- collated: thread buffer size for queued file writes.
          //  If set to 0 or not sufficient for the file size threading is not used.
          //  Default: 2e9
          maxThreadFileBufferSize 2e9;
      
          //- masterUncollated: non-blocking buffer size.
          //  If the file exceeds this buffer size scheduled transfer is used.
          //  Default: 2e9
          maxMasterFileBufferSize 2e9;
      }
      
      When using the collated file handling, memory is allocated for the data in the
      thread.  maxThreadFileBufferSize sets the maximum size of memory in bytes that
      is allocated.  If the data exceeds this size, the write does not use threading.
      
      When using the masterUncollated file handling, non-blocking MPI communication
      requires a sufficiently large memory buffer on the master node.
      maxMasterFileBufferSize sets the maximum size in bytes of the buffer.  If the
      data exceeds this size, the system uses scheduled communication.
      
      The installation defaults for the fileHandler choice, maxThreadFileBufferSize
      and maxMasterFileBufferSize (set in etc/controlDict) can be over-ridden within
      the case controlDict file, like other parameters.  Additionally the fileHandler
      can be set by:
      - the "-fileHandler" command line argument;
      - a FOAM_FILEHANDLER environment variable.
      
      A foamFormatConvert utility allows users to convert files between the collated
      and uncollated formats, e.g.
          mpirun -np 2 foamFormatConvert -parallel -fileHandler uncollated
      
      An example case demonstrating the file handling methods is provided in:
      $FOAM_TUTORIALS/IO/fileHandling
      
      The work was undertaken by Mattijs Janssens, in collaboration with Henry Weller.
      d8d6030a
  11. 29 Apr, 2017 1 commit
    • Mark Olesen's avatar
      ENH: improve HashSet construction and assignment · 6a5ea9a2
      Mark Olesen authored
      - make construct from UList explicit and provide corresponding
        assignment operator.
      
      - add construct,insert,set,assignment from FixedList.
        This is convenient when dealing with things like edges or triFaces.
      6a5ea9a2
  12. 28 Nov, 2016 1 commit
  13. 25 Nov, 2016 1 commit
    • Henry Weller's avatar
      topoSet: cellZoneSet, pointZoneSet extensions · 81de1dc9
      Henry Weller authored
      cellZones and pointZones can now be created in one action without the
      need to first create a cellSet or pointSet and converting that to the
      corresponding zone, e.g.
      
      actions
      (
          // Example: create cellZone from a box region
          {
              name    c0;
              type    cellZoneSet;
              action  new;
              source  boxToCell;
              sourceInfo
              {
                  box   (0.04 0 0)(0.06 100 100);
              }
          }
      );
      81de1dc9
  14. 16 Nov, 2016 1 commit
  15. 05 Aug, 2016 1 commit
  16. 18 May, 2016 1 commit
  17. 25 Apr, 2016 2 commits
  18. 29 Feb, 2016 1 commit
  19. 11 Nov, 2015 1 commit
  20. 01 Nov, 2015 1 commit
  21. 21 Jan, 2015 1 commit
    • Henry's avatar
      Updated the whole of OpenFOAM to use the new templated TurbulenceModels library · 2aec2496
      Henry authored
      The old separate incompressible and compressible libraries have been removed.
      
      Most of the commonly used RANS and LES models have been upgraded to the
      new framework but there are a few missing which will be added over the
      next few days, in particular the realizable k-epsilon model.  Some of
      the less common incompressible RANS models have been introduced into the
      new library instantiated for incompressible flow only.  If they prove to
      be generally useful they can be templated for compressible and
      multiphase application.
      
      The Spalart-Allmaras DDES and IDDES models have been thoroughly
      debugged, removing serious errors concerning the use of S rather than
      Omega.
      
      The compressible instances of the models have been augmented by a simple
      backward-compatible eddyDiffusivity model for thermal transport based on
      alphat and alphaEff.  This will be replaced with a separate run-time
      selectable thermal transport model framework in a few weeks.
      
      For simplicity and ease of maintenance and further development the
      turbulent transport and wall modeling is based on nut/nuEff rather than
      mut/muEff for compressible models so that all forms of turbulence models
      can use the same wall-functions and other BCs.
      
      All turbulence model selection made in the constant/turbulenceProperties
      dictionary with RAS and LES as sub-dictionaries rather than in separate
      files which added huge complexity for multiphase.
      
      All tutorials have been updated so study the changes and update your own
      cases by comparison with similar cases provided.
      
      Sorry for the inconvenience in the break in backward-compatibility but
      this update to the turbulence modeling is an essential step in the
      future of OpenFOAM to allow more models to be added and maintained for a
      wider range of cases and physics.  Over the next weeks and months more
      turbulence models will be added of single and multiphase flow, more
      additional sub-models and further development and testing of existing
      models.  I hope this brings benefits to all OpenFOAM users.
      
      Henry G. Weller
      2aec2496
  22. 25 Oct, 2013 1 commit
  23. 17 Aug, 2013 1 commit
  24. 03 May, 2013 1 commit
  25. 16 Apr, 2013 1 commit
  26. 25 Mar, 2013 1 commit
  27. 14 May, 2012 1 commit
  28. 01 Dec, 2011 1 commit
  29. 15 Nov, 2011 1 commit
  30. 14 Aug, 2011 1 commit
  31. 04 Apr, 2011 1 commit
  32. 19 Jan, 2011 1 commit
  33. 14 Jan, 2011 1 commit
  34. 07 Jan, 2011 1 commit
  35. 05 Jan, 2011 2 commits
  36. 28 Jul, 2010 1 commit
  37. 02 Jun, 2010 1 commit