1. 01 May, 2020 1 commit
  2. 28 Apr, 2020 1 commit
  3. 12 Mar, 2020 1 commit
  4. 19 Feb, 2020 1 commit
  5. 31 Oct, 2019 1 commit
  6. 29 Jul, 2019 1 commit
    • Mark Olesen's avatar
      ENH: additional contiguous traits (#1378) · 1d79c045
      Mark Olesen authored
      - change contiguous from a series of global functions to separate
        templated traits classes:
      
          - is_contiguous
          - is_contiguous_label
          - is_contiguous_scalar
      
        The static constexpr 'value' and a constexpr conversion operator
        allow use in template expressions.  The change also makes it much
        easier to define general traits and to inherit from them.
      
        The is_contiguous_label and is_contiguous_scalar are special traits
        for handling data of homogeneous components of the respective types.
      1d79c045
  7. 18 Feb, 2019 2 commits
  8. 22 May, 2019 1 commit
  9. 07 Jan, 2019 1 commit
  10. 06 Feb, 2019 1 commit
  11. 09 Jan, 2019 1 commit
  12. 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
  13. 03 Dec, 2018 1 commit
    • sergio's avatar
      ENH: · 9893e623
      sergio authored
      Adding reflecting fluxes to Solar load radiation model.
      Adding functionality to the boundary radiation models and new
      place holder for basic wall types such as transparent, opaqueDiffusive,
      opaqueReflective,etc.
      Changing radiation wall models to run time selectable.
      Adding multi-band capabilities to VF model and improving the set up
      for using solar loads in VF and fvDOM radiation models.
      9893e623
  14. 18 Oct, 2018 1 commit
    • Mark Olesen's avatar
      ENH: cleanup of Enum class · 3b745122
      Mark Olesen authored
      - more dictionary-like methods, enforce keyType::LITERAL for all
        lookups to avoid any spurious keyword matching.
      
      - new readEntry, readIfPresent methods
      
      - The get() method replaces the now deprecate lookup() method.
      
      - Deprecate lookupOrFailsafe()
        Failsafe behaviour is now an optional parameter for lookupOrDefault,
        which makes it easier to tailor behaviour at runtime.
      
      - output of the names is now always flatted without line-breaks.
        Thus,
      
           os << flatOutput(someEnumNames.names()) << nl;
           os << someEnumNames << nl;
      
        both generate the same output.
      
      - Constructor now uses C-string (const char*) directly instead of
        Foam::word in its initializer_list.
      
      - Remove special enum + initializer_list constructor form since
        it can create unbounded lookup indices.
      
      - Removd old hasEnum, hasName forms that were provided during initial
        transition from NamedEnum.
      
      - Added static_assert on Enum contents to restrict to enum or
        integral values.  Should not likely be using this class to enumerate
        other things since it internally uses an 'int' for its values.
      
        Changed volumeType accordingly to enumerate on its type (enum),
        not the class itself.
      3b745122
  15. 17 Oct, 2018 1 commit
    • Mark Olesen's avatar
      ENH: simplify objectRegistry access names (issue #322) · 8fabc325
      Mark Olesen authored
        New name:  findObject(), cfindObject()
        Old name:  lookupObjectPtr()
      
            Return a const pointer or nullptr on failure.
      
        New name:  findObject()
        Old name:  --
      
            Return a non-const pointer or nullptr on failure.
      
        New name:  getObjectPtr()
        Old name:  lookupObjectRefPtr()
      
            Return a non-const pointer or nullptr on failure.
            Can be called on a const object and it will perform a
            const_cast.
      
      - use these updated names and functionality in more places
      
      NB: The older methods names are deprecated, but continue to be defined.
      8fabc325
  16. 12 Oct, 2018 1 commit
    • Mark Olesen's avatar
      ENH: avoid readScalar, readLabel etc from dictionary (#762, #1033) · 8eddcc07
      Mark Olesen authored
      - use the dictionary 'get' methods instead of readScalar for
        additional checking
      
           Unchecked:  readScalar(dict.lookup("key"));
           Checked:    dict.get<scalar>("key");
      
      - In templated classes that also inherit from a dictionary, an additional
        'template' keyword will be required. Eg,
      
           this->coeffsDict().template get<scalar>("key");
      
        For this common use case, the predefined getXXX shortcuts may be
        useful. Eg,
      
           this->coeffsDict().getScalar("key");
      8eddcc07
  17. 02 Aug, 2018 1 commit
    • Mark Olesen's avatar
      ENH: IOobject::selectIO helper method · 88e5334a
      Mark Olesen authored
      - centralizes IOobject handling and treatment of alternative locations.
        If an alternative file location is specified, it will be used instead.
      
      - provide decompositionMethod::canonicalName instead of using
        "decomposeParDict" in various places.
      88e5334a
  18. 10 Aug, 2018 1 commit
  19. 30 May, 2018 1 commit
  20. 28 Mar, 2018 1 commit
  21. 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
  22. 05 Mar, 2018 1 commit
  23. 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
  24. 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
  25. 26 Jan, 2018 1 commit
  26. 24 Oct, 2017 1 commit
  27. 03 Jul, 2017 1 commit
  28. 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
  29. 27 Mar, 2017 1 commit
  30. 10 Mar, 2017 1 commit
  31. 01 Feb, 2017 1 commit
    • Mark Olesen's avatar
      ENH: creating a bounding box without points yields an inverted box · 0ffae646
      Mark Olesen authored
      - The code create a box with a (0,0,0) point.
        The new definition is more logical and makes it very easy to grow
        the bounding box to include new points. It also simplifies much of
        the logic in the constructors.
      
      - Use ROOTVGREAT instead of VGREAT for sizing greatBox and invertedBox.
        Avoids some overflow issues reported by Mattijs (thus GREAT has been
        used in treeBoundBox), but might still need further revision.
      0ffae646
  32. 25 Jan, 2017 3 commits
    • Mark Olesen's avatar
    • Mark Olesen's avatar
      ENH: additional methods/operators for boundBox (related to #196) · 722d23f5
      Mark Olesen authored
      - Constructor for bounding box of a single point.
      
      - add(boundBox), add(point) ...
        -> Extend box to enclose the second box or point(s).
      
        Eg,
            bb.add(pt);
        vs.
            bb.min() = Foam::min(bb.min(), pt);
            bb.max() = Foam::max(bb.max(), pt);
      
      Also works with other bounding boxes.
        Eg,
            bb.add(bb2);
            // OR
            bb += bb2;
        vs.
            bb.min() = Foam::min(bb.min(), bb2.min());
            bb.max() = Foam::max(bb.max(), bb2.max());
      
      '+=' operator allows the reduction to be used in parallel
      gather/scatter operations.
      
      A global '+' operator is not currently needed.
      
      Note: may be useful in the future to have a 'clear()' method
      that resets to a zero-sized (inverted) box.
      
      STYLE: make many bounding box constructors explicit
      722d23f5
    • Mark Olesen's avatar
      ENH: boundBox 'reduce' method (related to #196) · 17d76e62
      Mark Olesen authored
      reduce()
      - parallel reduction of min/max values.
        Reduces coding for the callers.
      
        Eg,
            bb.reduce();
      
        instead of the previous method:
            reduce(bb.min(), minOp<point>());
            reduce(bb.max(), maxOp<point>());
      
      STYLE:
      
      - use initializer list for creating static content
      - use point::min/point::max when defining standard boxes
      17d76e62
  33. 24 Nov, 2016 1 commit
  34. 28 Sep, 2016 1 commit
  35. 18 May, 2016 1 commit
  36. 25 Apr, 2016 2 commits