Skip to content
Snippets Groups Projects
  1. Apr 29, 2022
  2. Apr 28, 2022
    • Mark OLESEN's avatar
      ENH: additional Field normalise method (#2444) · 8e6f2ca5
      Mark OLESEN authored
      - for most field types this is a no-op, but for a field of floatVector
        or doubleVector (eg, vector and solveVector) it will normalise each
        element with divide-by-zero protection.
      
        More reliable and efficient than dividing a field by the mag of itself
        (even with VSMALL protection).
        Applied to FieldField and GeometricField as well.
      
        Eg,
            fld.normalise();
        vs.
            fld /= mag(fld) + VSMALL;
      
      ENH: support optional tolerance for vector::normalise
      
      - for cases where tolerances larger than ROOTVSMALL are preferable.
        Not currently available for the field method (a templating question).
      
      ENH: vector::removeCollinear method
      
      - when working with geometries it is frequently necessary to have a
        normal vector without any collinear components. The removeCollinear
        method provides for clearer, compacter code.
      
        Eg,
            vector edgeNorm = ...;
      
            const vector edgeDirn = e.unitVec(points());
      
            edgeNorm.removeCollinear(edgeDirn);
            edgeNorm.normalise();
      
        vs.
            vector edgeNorm = ...;
      
            const vector edgeDirn = e.unitVec(points());
      
            edgeNorm -= edgeDirn*(edgeDirn & edgeNorm);
            edgeNorm /= mag(edgeNorm);
      8e6f2ca5
    • Mark OLESEN's avatar
      ENH: additional BitOps::toc, BitOps::sortedToc · b59a5b11
      Mark OLESEN authored
      - for obtaining set entries from a boolList
      
      - BitOps::select to mirror bitSet constructor but returning a boolList
      
      - BitOps::set/unset for boolList
      
      ENH: construct bitSet from a labelRange
      
      - useful, for example, when marking up patch slices
      
      ENH: ListOps methods
      
      - ListOps::count_if to mirror std::count_if but with list indexing.
      - ListOps::find_if to mirror std::find_if but with list indexing.
      
      ENH: UPtrList::test() method.
      
      - includes bounds checks, which means it can be used in more places
        (eg, even if the storage is empty).
      b59a5b11
  3. Apr 25, 2022
  4. Apr 22, 2022
  5. Apr 19, 2022
  6. Apr 14, 2022
  7. Apr 13, 2022
  8. Apr 12, 2022
  9. Apr 08, 2022
  10. Apr 07, 2022
  11. Mar 31, 2022
    • Mark OLESEN's avatar
      DOC: fixed documented use of expression functions · ecf8d260
      Mark OLESEN authored
      - `functions<scalar>` and `functions<vector>` were erroneously
         documented in header as `lookup<scalar>` etc.
      
      INT: handle fluent square brackets (fixes #2429)
      
      - patch applied from openfoam.org
      ecf8d260
    • Mark OLESEN's avatar
      ENH: memory/efficiency improvements: renumbering, bandCompression (#2430) · c7f4ba19
      Mark OLESEN authored
      - support direct processing of CompactListList instead of requiring
        a conversion to labelListList for bandCompression and renumbering
        methods.
      
      - manage FIFO with CircularBuffer instead of SLList (avoids
        allocations in inner loops). Invert logic to use a bitSet of
        unvisited cells, which improves looping as the matrix becomes more
        sparse.
      
      - fix missed weighting in bandCompression (same as #1376).
        In polyTopoChange, handle removed cells immediately to simplify
        the logic and align more closely with bandCompression.
      
      STYLE: enclose bandCompression within meshTools namespace
      
      ENH: PrimitivePatch pointFaces with DynamicList instead of SLList
      c7f4ba19
    • Mark OLESEN's avatar
      3721a61f
    • Mark OLESEN's avatar
      ENH: extend globalIndex mpiGather to use scalar/label components · 6fa23bd7
      Mark OLESEN authored
      - MPI_Gatherv requires contiguous data, but a byte-wise transfer can
        quickly exceed the 'int' limits used for MPI sizes/offsets. Thus
        gather label/scalar components when possible to increase the
        effective size limit.
      
        For non-contiguous types (or large contiguous data) now also
        reverts to manual handling
      
      ENH: handle contiguous data in GAMGAgglomeration gather values
      
      - delegate to globalIndex::gatherValues static method (new)
      6fa23bd7
    • Mark OLESEN's avatar
      ENH: extend wrapping of MPI calls to more data types · 87e3b196
      Mark OLESEN authored
      - supports gatherv of label and scalar types
      
      - combine blocking and non-blocking interfaces in UPstreamWrapping
        (code reduction).
      
      DEFEATURE: remove unused UPstream allToAllv wrapping
      
      - backend interface preserved in UPstreamWrapping
      
      COMP: add genericListBroadcast - simplifies code
      87e3b196
    • Mark OLESEN's avatar
      ENH: bundle Pstream:: AllGather methods · d38de84d
      Mark OLESEN authored
      - bundles frequently used 'gather/scatter' patterns more consistently.
      
        - combineAllGather     -> combineGather + broadcast
        - listCombineAllGather -> listCombineGather + broadcast
        - mapCombineAllGather  -> mapCombineGather + broadcast
        - allGatherList        -> gatherList + scatterList
        - reduce               -> gather + broadcast (ie, allreduce)
      
      - The allGatherList currently wraps gatherList/scatterList, but may be
        replaced with a different algorithm in the future.
      
      STYLE: PstreamCombineReduceOps.H is mostly unneeded now
      d38de84d
  12. Mar 30, 2022
  13. Mar 25, 2022
  14. Mar 24, 2022
  15. Mar 23, 2022
  16. Mar 17, 2022
  17. Mar 16, 2022
    • Mark OLESEN's avatar
      ENH: limitVelocity, report count and percent of cells/faces (#2414) · 55f287cd
      Mark OLESEN authored
      - percent of cells is taken relative to selection size.
      - percent of faces is taken relative to the number of boundary faces
        that do not fix velocity themselves.
      
      ENH: avoid correctBoundaryConditions() if values were not limited
      55f287cd
    • Mark OLESEN's avatar
      ENH: avoid redundant IOobjectList use · 4495db03
      Mark OLESEN authored
      - areaWrite and fileFieldSelection
      4495db03
    • Mark OLESEN's avatar
      ENH: mergePoints and patch gatherAndMerge improvements (#2402) · 24c0b30d
      Mark OLESEN authored
      - when writing surface formats (eg, vtk, ensight etc) the sampled
        surfaces merge the faces/points originating from different
        processors into a single surface (ie, patch gatherAndMerge).
      
        Previous versions of mergePoints simply merged all points possible,
        which proves to be rather slow for larger meshes. This has now been
        modified to only consider boundary points, which reduces the number
        of points to consider. As part of this change, the reference point
        is now always equivalent to the min of the bounding box, which
        reduces the number of search loops. The merged points retain their
        original order.
      
      - inplaceMergePoints version to simplify use and improve code
        robustness and efficiency.
      
      ENH: make PrimitivePatch::boundaryPoints() less costly
      
      - if edge addressing does not already exist, it will now simply walk
        the local face edges directly to define the boundary points.
      
        This avoids a rather large overhead of the full faceFaces,
        edgeFaces, faceEdges addressing.
      
        This operation is now more important since it is used in the revised
        patch gatherAndMerge.
      
      ENH: topological merge for mesh-based surfaces in surfaceFieldValue
      24c0b30d