1. 02 Jun, 2020 1 commit
    • 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).
      3e43edf0
  2. 19 Feb, 2020 1 commit
  3. 31 Oct, 2019 1 commit
  4. 02 Aug, 2019 1 commit
    • Mark Olesen's avatar
      ENH: rationalize cloud method inheritance · e90eafcf
      Mark Olesen authored
      - a top-level cloud::nParcels() virtual, which is overloaded by the
        first level of Cloud inheritance. This permits quick determination of
        cloud sizes, even when retrieved from registry with the base level.
        Eg,
            cloud* cldPtr = mesh.cfindObject<cloud>("myCloud");
            label nParcels = (cldPtr ? cldPtr->nParcels() : 0);
      
      - make writeLagrangianPositions on by default unless explicitly
        disabled in the InfoSwitches.
      
        Flag output errors (where neither coordinates nor positions are
        written) with Fatal.
      
      - additional IOField helper functions in cloud
      
      STYLE: simplify iterator inheritance
      e90eafcf
  5. 30 Jul, 2019 1 commit
  6. 06 Feb, 2019 1 commit
  7. 11 Dec, 2018 1 commit
    • Mark Olesen's avatar
      ENH: use Zero when zero-initializing types · 1d85fecf
      Mark Olesen authored
      - makes the intent clearer and avoids the need for additional
        constructor casting. Eg,
      
            labelList(10, Zero)    vs.  labelList(10, 0)
            scalarField(10, Zero)  vs.  scalarField(10, scalar(0))
            vectorField(10, Zero)  vs.  vectorField(10, vector::zero)
      1d85fecf
  8. 22 Dec, 2017 1 commit
  9. 28 Mar, 2018 1 commit
  10. 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
  11. 19 Feb, 2018 1 commit
  12. 09 Nov, 2017 1 commit
  13. 13 Sep, 2017 1 commit
    • Andrew Heather's avatar
      ENH: Lagrangian - provided backwards compatibility for cases using the · 2defba00
      Andrew Heather authored
      old "positions" file form
      
      The change to barycentric-based tracking changed the contents of the
      cloud "positions" file to a new format comprising the barycentric
      co-ordinates and other cell position-based info.  This broke
      backwards compatibility, providing no option to restart old cases
      (v1706 and earlier), and caused difficulties for dependent code, e.g.
      for post-processing utilities that could only infer the contents only
      after reading.
      
      The barycentric position info is now written to a file called
      "coordinates" with provision to restart old cases for which only the
      "positions" file is available. Related utilities, e.g. for parallel
      running and data conversion have been updated to be able to support both
      file types.
      
      To write the "positions" file by default, use set the following option
      in the InfoSwitches section of the controlDict:
      
          writeLagrangianPositions 1;
      2defba00
  14. 23 Aug, 2017 1 commit
  15. 22 Aug, 2017 2 commits
    • Will Bainbridge's avatar
      22bd3919
    • Will Bainbridge's avatar
      lagrangian: Un-templated the tracking data · 87c15bf1
      Will Bainbridge authored
      Tracking data classes are no longer templated on the derived cloud type.
      The advantage of this is that they can now be passed to sub models. This
      should allow continuous phase data to be removed from the parcel
      classes. The disadvantage is that every function which once took a
      templated TrackData argument now needs an additional TrackCloudType
      argument in order to perform the necessary down-casting.
      87c15bf1
  16. 26 May, 2017 1 commit
  17. 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 (Ne...
      d8d6030a
  18. 28 Apr, 2017 1 commit
    • Will Bainbridge's avatar
      Lagrangian: Rewrite of the particle tracking algorithm to function in · 743dea87
      Will Bainbridge authored
      terms of the local barycentric coordinates of the current tetrahedron,
      rather than the global coordinate system.
      
      Barycentric tracking works on any mesh, irrespective of mesh quality.
      Particles do not get "lost", and tracking does not require ad-hoc
      "corrections" or "rescues" to function robustly, because the calculation
      of particle-face intersections is unambiguous and reproducible, even at
      small angles of incidence.
      
      Each particle position is defined by topology (i.e. the decomposed tet
      cell it is in) and geometry (i.e. where it is in the cell). No search
      operations are needed on restart or reconstruct, unlike when particle
      positions are stored in the global coordinate system.
      
      The particle positions file now contains particles' local coordinates
      and topology, rather than the global coordinates and cell. This change
      to the output format is not backwards compatible. Existing cases with
      Lagrangian data will not restart, but they will still run from time
      zero without any modification. This change was necessary in order to
      guarantee that the loaded particle is valid, and therefore
      fundamentally prevent "loss" and "search-failure" type bugs (e.g.,
      2517, 2442, 2286, 1836, 1461, 1341, 1097).
      
      The tracking functions have also been converted to function in terms
      of displacement, rather than end position. This helps remove floating
      point error issues, particularly towards the end of a tracking step.
      
      Wall bounded streamlines have been removed. The implementation proved
      incompatible with the new tracking algorithm. ParaView has a surface
      LIC plugin which provides equivalent, or better, functionality.
      
      Additionally, bug report <https://bugs.openfoam.org/view.php?id=2517>
      is resolved by this change.
      743dea87
  19. 10 Mar, 2017 1 commit
  20. 21 Nov, 2016 1 commit
  21. 05 Nov, 2016 1 commit
  22. 21 Sep, 2016 1 commit
  23. 16 Aug, 2016 3 commits
  24. 25 Apr, 2016 1 commit
  25. 02 Apr, 2016 1 commit
    • Henry Weller's avatar
      Pstream: optimisation of data exchange · 88bd9123
      Henry Weller authored
      Contributed by Mattijs Janssens.
      
      1. Any non-blocking data exchange needs to know in advance the sizes to
         receive so it can size the buffer.  For "halo" exchanges this is not
         a problem since the sizes are known in advance but or all other data
         exchanges these sizes need to be exchanged in advance.
      
         This was previously done by having all processors send the sizes of data to
         send to the master and send it back such that all processors
         - had the same information
         - all could work out who was sending what to where and hence what needed to
           be received.
      
         This is now changed such that we only send the size to the
         destination processor (instead of to all as previously). This means
         that
         - the list of sizes to send is now of size nProcs v.s. nProcs*nProcs before
         - we cut out the route to the master and back by using a native MPI
           call
      
         It causes a small change to the API of exchange and PstreamBuffers -
         they now return the sizes of the local buffers only (a labelList) and
         not the sizes of the buffers on all processors (labelListList)
      
      2. Reversing the order of the way in which the sending is done when
         scattering information from the master processor to the other
         processors. This is done in a tree like fashion. Each processor has a
         set of processors to receive from/ send to. When receiving it will
         first receive from the processors with the least amount of
         sub-processors (i.e. the ones which return first). When sending it
         needs to do the opposite: start sending to the processor with the
         most amount of sub-tree since this is the critical path.
      88bd9123
  26. 29 Feb, 2016 1 commit
  27. 25 Jan, 2016 1 commit
    • mattijs's avatar
      ENH: glboal file handling: initial commit · e4240592
      mattijs authored
      Moved file path handling to regIOobject and made it type specific so
      now every object can have its own rules. Examples:
      - faceZones are now processor local (and don't search up anymore)
      - timeStampMaster is now no longer hardcoded inside IOdictionary
        (e.g. uniformDimensionedFields support it as well)
      - the distributedTriSurfaceMesh is properly processor-local; no need
        for fileModificationChecking manipulation.
      e4240592
  28. 20 Jan, 2016 1 commit
  29. 10 Jan, 2016 1 commit
  30. 04 Jan, 2016 1 commit
  31. 11 Nov, 2015 1 commit
  32. 09 Jun, 2014 1 commit
  33. 19 Dec, 2013 1 commit
  34. 14 Aug, 2013 1 commit
  35. 10 Aug, 2012 1 commit
  36. 20 Mar, 2012 1 commit
  37. 23 Feb, 2012 1 commit