1. 30 Jan, 2019 1 commit
  2. 23 Jan, 2019 1 commit
  3. 21 Jan, 2019 4 commits
  4. 16 Jan, 2019 1 commit
  5. 21 Dec, 2018 1 commit
    • Mark Olesen's avatar
      ENH: use Zero when zero-initializing types · e23bd3bb
      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)
  6. 24 Nov, 2018 2 commits
    • Mark Olesen's avatar
      ENH: use some updated vtk output methods · 99b376bd
      Mark Olesen authored
    • Mark Olesen's avatar
      ENH: improvements for foamVtkOutput, foamVtkFormatter (issue #926) · 1b4fe17a
      Mark Olesen authored
      - parallel list output for foamVtkOutput
      - simplified '.series' file output
      - beginDataArray() method instead of openDataArray() + closeTag()
        since this seems to be the most common use anyhow.
        With an optional argument for leaving the tag open, this works the
        same as openDataArray() which may be deprecated in the future.
      - begin/end methods for CellData, PointData, FieldData (commonly used)
      - templating parameters for file headers, content version,
        legacy fields. This improves coding robustness and convenience of use.
      - use formatter and higher-level methods for legacy output
      - attribute quoting character now part of the formatter itself
        instead of as an argument for xmlAttr().
        Toggle with quoting() method.
      - pair-wise processing of xml attributes, which also allows them to be
        passed as optional entries when creating an xml tag.
      - xmlComment with multiple arguments
  7. 03 Nov, 2018 1 commit
    • Mark Olesen's avatar
      BUG: eof errors in the STARCD, VTK file reader (#1059) · e7fe651e
      Mark Olesen authored
      - previously simply read files until the input stream went bad and no
        more lines could be read.  With the more stringent checking of
        values read (commit f32ed9ff) this approach causes problems.
        Use the underlying tokenizer instead to decide about termination.
  8. 01 Nov, 2018 1 commit
  9. 19 Oct, 2018 1 commit
  10. 17 Oct, 2018 1 commit
    • Mark Olesen's avatar
      ENH: simplify objectRegistry access names (issue #322) · 3a3e954b
      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
      - use these updated names and functionality in more places
      NB: The older methods names are deprecated, but continue to be defined.
  11. 27 Sep, 2018 1 commit
    • Mark Olesen's avatar
      STYLE: add nBoundaryFaces() method to primitiveMesh · 0d94a97f
      Mark Olesen authored
      - nBoundaryFaces() is often used and is identical to
        (nFaces() - nInternalFaces()).
      - forward the mesh nInternalFaces() and nBoundaryFaces() to
        polyBoundaryMesh as nFaces() and start() respectively,
        for use when operating on a polyBoundaryMesh.
      - use identity() function with starting offset when creating boundary maps.
           labelList map
               identity(mesh.nBoundaryFaces(), mesh.nInternalFaces())
           labelList map(mesh.nBoundaryFaces());
           forAll(map, i)
               map[i] = mesh.nInternalFaces() + i;
  12. 13 Aug, 2018 1 commit
  13. 09 Aug, 2018 1 commit
    • Mark Olesen's avatar
      ENH: add missing Hash function for List/UList (issue #966) · 10029b20
      Mark Olesen authored
      - there were previously no hashing mechanisms for lists so they
        would fall back to the definition for primitives and hash the
        memory location of the allocated List object.
      - provide a UList::Hash<> sub-class for inheritance, and also a global
        specialization for UList<T>, List<T> such that the hash value for
        List<List<T>> cascades properly.
      - provide similar function in triFace to ensure that it remains
        similar in behaviour to face.
      - added SymmHash to Pair, for use when order is unimportant.
      STYLE: use string::hash() more consistently
      - no particular reason to use Hash<word>() which forwards to
        string::hash() anyhow
  14. 18 Jul, 2018 1 commit
  15. 12 Jun, 2018 1 commit
  16. 30 May, 2018 2 commits
  17. 11 May, 2018 1 commit
  18. 07 May, 2018 1 commit
    • Mark Olesen's avatar
      ENH: improvements in the surface sampling infrastructure · 6baffa13
      Mark Olesen authored
      - improvement documentation for surface sampling.
      - can now specify alternative sampling scheme for obtaining the
        face values instead of just using the "cell" value. For example,
            sampleScheme    cellPoint;
        This can be useful for cases when the surface is close to a boundary
        cell and there are large gradients in the sampled field.
      - distanceSurface now handles non-closed surfaces more robustly.
        Unknown regions (not inside or outside) are marked internally and
        excluded from consideration. This allows use of 'signed' surfaces
        where not previously possible.
  19. 27 Apr, 2018 1 commit
  20. 24 Apr, 2018 1 commit
    • Mark Olesen's avatar
      ENH: new bitSet class and improved PackedList class (closes #751) · 430d0f62
      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
        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
                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,
            if (isA<processorPolyPatch>(pp))
                forAll(pp, i)
            if (isA<processorPolyPatch>(pp))
  21. 17 Apr, 2018 1 commit
  22. 16 Apr, 2018 1 commit
    • Mark Olesen's avatar
      ENH: add alternative STL ASCII parsers · 2e38a9b8
      Mark Olesen authored
      - In addition to the traditional Flex-based parser, added a Ragel-based
        parser and a handwritten one.
        Some representative timings for reading 5874387 points (1958129 tris):
            Flex   Ragel   Manual
            5.2s   4.8s    6.7s         total reading time
            3.8s   3.4s    5.3s         without point merging
  23. 12 Apr, 2018 1 commit
  24. 03 Apr, 2018 1 commit
  25. 13 Mar, 2018 1 commit
  26. 07 Mar, 2018 4 commits
    • Mark Olesen's avatar
      ENH: remove reliance on the Xfer class (issue #639) · ad33d01a
      Mark Olesen authored
      This class is largely a pre-C++11 holdover. It is now possible to
      simply use move construct/assignment directly.
      In a few rare cases (eg, polyMesh::resetPrimitives) it has been
      replaced by an autoPtr.
    • Mark Olesen's avatar
    • Mark Olesen's avatar
      ENH: cleanup autoPtr class (issue #639) · a2d43901
      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_();
    • Mark Olesen's avatar
      ENH: improvements for labelRange · 7bedbeea
      Mark Olesen authored
      - constexpr, noexcept.
        Added an 'at()' method for returning an iterator within the range
        and changed operator()(label) to have behaviour as per found().
        This makes the labelRange usable as a unary predicate.
      - added templated conversion class 'toLabelRange'
      - add range() method to polyPatch and surfZone classes, and corresponding
        templated conversion functors.
        For example,
            auto patchDims = ListOps::create<labelRange>
        to create a List<labelRange> representing the patch extents.
  27. 22 Feb, 2018 1 commit
  28. 17 Jan, 2018 1 commit
    • Mark Olesen's avatar
      ENH: SubStrings::str(int) method for similarity with std::smatch · 629bead3
      Mark Olesen authored
      - define regExp::results_type using SubStrings container for handling
        groups. This makes a later shift to std::smatch easier, but changes
        the regExp API for matching with groups. Previously had list element
        0 for regex group 1, now list element 0 is the entire match and list
        element 1 is regex group 1.
            List<std::string> mat;
            if (re.match(text, mat))  Info<< "group 1: " << mat[0] << nl;
            regExp::results_type mat;
            if (re.match(text, mat))  Info<< "group 1: " << mat.str(1) << nl;
  29. 16 Jan, 2018 1 commit
    • Mark Olesen's avatar
      BUG: spurious empty surface zones added (fixes #706) · 72ace852
      Mark Olesen authored
      - problems were introduced by the change 50ddd2ed (issue #686).
        Affected reading of OBJ files.
        The fallback zone (used to catch unnamed groups/zones), which was
        previously filtered away when not needed. Now handle more explicitly.
      ENH: use stringOps::split and low-level read{Label,Scalar} for parsing OBJ file
  30. 03 Jan, 2018 1 commit
  31. 24 Nov, 2017 1 commit
  32. 20 Nov, 2017 1 commit