Skip to content
Snippets Groups Projects
  1. Nov 26, 2022
  2. Nov 25, 2022
  3. Nov 24, 2022
    • mattijs's avatar
      adf95d48
    • Kutalmış Berçin's avatar
      8c02820d
    • Andrew Heather's avatar
      Merge branch 'feature-filtered-mapfile' into 'develop' · 9d212dfd
      Andrew Heather authored
      Add spatial filtering and ensight support to MappedFile and external file source (#2609)
      
      See merge request !568
      9d212dfd
    • Mark OLESEN's avatar
      126d831f
    • Mark OLESEN's avatar
      ENH: add support for additional filter/mapping (#2609) · cb4e026a
      Mark OLESEN authored
      - comprises a few different elements:
      
      FilterField (currently packaged in PatchFunction1Types namespace)
      ~~~~~~~~~~~
      
        The FilterField helper class provides a multi-sweep median filter
        for a Field of data associated with a geometric point cloud.
      
        The points can be freestanding or the faceCentres (or points)
        of a meshedSurface, for example.
      
        Using an initial specified search radius, the nearest point
        neighbours are gathered and addressing/weights are built for them.
        This currently uses an area-weighted, linear RBF interpolator
        with provision for quadratic RBF interpolator etc.
      
        After the weights and addressing are established,
        the evaluate() method can be called to apply a median filter
        to data fields, with a specified number of sweeps.
      
      boundaryDataSurfaceReader
      ~~~~~~~~~~~~~~~~~~~~~~~~~
      
      - a surfaceReader (similar to ensightSurfaceReader) when a general
        point data reader is needed.
      
      MappedFile
      ~~~~~~~~~~
      - has been extended to support alternative surface reading formats.
        This allows, for example, sampled ensight data to be reused for
        mapping.  Cavaet: multi-patch entries may still needs some work.
      
      - additional multi-sweep median filtering of the input data.
        This can be used to remove higher spatial frequencies when
        sampling onto a coarse mesh.
      
      smoothSurfaceData
      ~~~~~~~~~~~~~~~~~
      - standalone application for testing of filter radii/sweeps
      cb4e026a
    • Andrew Heather's avatar
      Merge branch 'feature-updated-core' into 'develop' · 2984d1e3
      Andrew Heather authored
      Feature updated core
      
      See merge request !573
      2984d1e3
    • Mark OLESEN's avatar
      ENH: use simpler constructor forms for treeData types · 98598ba0
      Mark OLESEN authored and Andrew Heather's avatar Andrew Heather committed
      98598ba0
    • Mark OLESEN's avatar
      BUG: avoid infinite recursion in AABBTree (fixes #2616) · fc0b9803
      Mark OLESEN authored and Andrew Heather's avatar Andrew Heather committed
      - since bounding boxes overlap, need to verify the splitting actually
        did something. Problem only really evident with higher tree depths.
      fc0b9803
    • Mark OLESEN's avatar
      ffbad655
    • Mark OLESEN's avatar
      ENH: add boundBox/triangle intersection test to boundBox · 38b663b6
      Mark OLESEN authored and Andrew Heather's avatar Andrew Heather committed
      - replaces edge by edge tests with separating axis tests
      38b663b6
    • Mark OLESEN's avatar
      ENH: cleanup treeData items (#2609) · ac4f580d
      Mark OLESEN authored and Andrew Heather's avatar Andrew Heather committed
      Changes / Improvements
      
      - more consistent subsetting, interface
      
        * Extend the use of subset and non-subset collections with uniform
          internal getters to ensure that the subset/non-subset versions
          are robustly handled.
      
        * operator[](label) and objectIndex(label) for standardized access
          to the underlying item, or the original index, regardless of
          subsetting or not.
      
        * centres() and centre(label) for representative point cloud
          information.
      
        * nDim() returns the object dimensionality (0: point, 1: line, etc)
          these can be used to determine how 'fat' each shape may be
          and whether bounds(labelList) may contribute any useful information.
      
        * bounds(labelList) to return the full bound box required for
          specific items. Eg, the overall bounds for various 3D cells.
      
      - easier construction of non-caching versions. The bounding boxes are
        rarely cached, so simpler constructors without the caching bool
        are provided.
      
      - expose findNearest (bound sphere) method to allow general use
        since this does not actually need a tree.
      
      - static helpers
      
        The boxes() static methods can be used by callers that need to build
        their own treeBoundBoxList of common shapes (edge, face, cell)
        that are also available as treeData types.
      
        The bounds() static methods can be used by callers to determine the
        overall bound-box size prior to constructing an indexedOctree
        without writing ad hoc code inplace.
      
        Not implemented for treeDataPrimitivePatch since similiar
        functionality is available directly from the PrimitivePatch::box()
        method with less typing.
      
      ========
      BREAKING: cellLabels(), faceLabels(), edgeLabel() access methods
      
      - it was always unsafe to use the treeData xxxLabels() methods without
        subsetting elements. However, since the various classes
        (treeDataCell, treeDataEdge, etc) automatically provided
        an identity lookup, this problem was not apparent.
      
        Use objectIndex(label) to safely de-reference to the original index
        and operator[](index) to de-reference to the original object.
      ac4f580d
    • Mark OLESEN's avatar
      ENH: octree findBox, findSphere with external storage of results · f638db48
      Mark OLESEN authored and Andrew Heather's avatar Andrew Heather committed
      - more memory efficient within loops
      
      - octree/boundBox overlaps().
        Like findBox(), findSphere() but early exit if any shapes overlap.
      
      ENH: additional query for nLeafs()
      f638db48
    • Mark OLESEN's avatar
      ENH: setter/getter for octree permutation tolerance · b8d01a88
      Mark OLESEN authored and Andrew Heather's avatar Andrew Heather committed
      - make template invariant
      b8d01a88
    • Mark OLESEN's avatar
      ENH: reduce some internal overhead when splitting octree nodes (#2609) · 3d7dc6a8
      Mark OLESEN authored and Andrew Heather's avatar Andrew Heather committed
      - don't need separate scratch arrays (avoids possible reallocations
        when split is imbalanced)
      
      ENH: upgrade dynamicIndexedOctree to use DynamicList directly
      
      - with C++11 move semantics don't need lists of autoPtr
        for efficient transfers
      3d7dc6a8
    • Mark OLESEN's avatar
      ENH: simplify sub-octant bound-box search · b1294462
      Mark OLESEN authored and Andrew Heather's avatar Andrew Heather committed
      - basic support for splitting into two at a given position and face to keep
      b1294462
    • Mark OLESEN's avatar
      STYLE: octree pushPoint with local constexpr (more readable code) · fc9311ba
      Mark OLESEN authored and Andrew Heather's avatar Andrew Heather committed
      fc9311ba
    • Mark OLESEN's avatar
      ENH: split off template-invariant part of indexedOctree node indexing · 3384747f
      Mark OLESEN authored and Andrew Heather's avatar Andrew Heather committed
      - code reduction, reinherit for dynamicIndexedOctree
      
      ENH: additional OBJ writing, statistics
      3384747f
    • Mark OLESEN's avatar
      ENH: use simpler boundBox handling · e5006a62
      Mark OLESEN authored and Andrew Heather's avatar Andrew Heather committed
      - use default initialize boundBox instead of invertedBox
      - reset() instead of assigning from invertedBox
      - extend (three parameter version) and grow method
      - inflate(Random) instead of extend + re-assigning
      e5006a62
    • Mark OLESEN's avatar
      ENH: general boundBox/treeBoundBox improvements · 1339c335
      Mark OLESEN authored and Andrew Heather's avatar Andrew Heather committed
      - null() static method
        * as const reference to the invertedBox with the appropriate casting.
      
      - boundBox inflate(random)
        * refactored from treeBoundBox::extend, but allows in-place modification
      
      - boundBox::hexFaces() instead of boundBox::faces
        * rarely used, but avoids confusion with treeBoundBox::faces
          and reuses hexCell face definitions without code duplication
      
      - boundBox::hexCorners() for corner points corresponding to a hexCell.
        Can also be accessed from a treeBoundBox without ambiguity with
        points(), which could be hex corners (boundBox) or octant corners
        (treeBoundBox)
      
      - boundBox::add with pairs of points
        * convenient (for example) when adding edges or a 'box' that has
          been extracted from a primitive mesh shape.
      
      - declare boundBox nPoints(), nFaces(), nEdges() as per hexCell
      
      ENH: return invertedBox instead of FatalError for empty trees
      
      - similar to #2612
      
      ENH: cellShape(HEX, ...) + boundBox hexCorners for block meshes
      
      STYLE: cellModel::ref(...) instead of de-reference cellModel::ptr(...)
      1339c335
    • Mark OLESEN's avatar
      ENH: add primitiveMesh cellBb() · 0ba458fd
      Mark OLESEN authored and Andrew Heather's avatar Andrew Heather committed
      - the boundBox for a given cell, using the cheapest calculation:
      
        - cellPoints if already available, since this will involve the
          fewest number of min/max comparisions.
      
        - otherwise walk the cell faces: via the cell box() method
          to avoid creating demand-driven cellPoints etc.
      0ba458fd
    • Mark OLESEN's avatar
      ENH: vector mag(), magSqr() methods - complementary to dist(), distSqr() · 27c2cdc0
      Mark OLESEN authored and Andrew Heather's avatar Andrew Heather committed
      ENH: use direct access to pointHit as point(), use dist(), distSqr()
      
      - if the pointHit has already been checked for hit(), can/should
        simply use point() noexcept access subsequently to avoid redundant
        checks. Using vector distSqr() methods provides a minor optimization
        (no itermediate temporary), but can also make for clearer code.
      
      ENH: copy construct pointIndexHit with different index
      
      - symmetric with constructing from a pointHit with an index
      
      STYLE: prefer pointHit point() instead of rawPoint()
      27c2cdc0
    • Mark OLESEN's avatar
      ENH: base classes for wave algorithms (manage non-templated parts) · 5ec435ac
      Mark OLESEN authored and Andrew Heather's avatar Andrew Heather committed
      ENH: use DynamicList instead of List + size for point wave
      
      - consistent with previous updates for the other algorithms
      
      STYLE: unique_ptr instead of raw pointer in wave algorithms
      5ec435ac
    • Mark OLESEN's avatar
      STYLE: use stack-like naming for ifEntry handling · c33167dc
      Mark OLESEN authored and Andrew Heather's avatar Andrew Heather committed
      STYLE: unique_ptr instead of autoPtr for holding std::thread
      c33167dc
    • Mark OLESEN's avatar
      ENH: face::connected() method · e4139898
      Mark OLESEN authored and Andrew Heather's avatar Andrew Heather committed
      - return true if two faces share a common vertex.
      
        Same idea as the existing edge::connected() method
        (previously spelled 'connects()')
      e4139898
    • Mark OLESEN's avatar
      ENH: add FixedList templated get<unsigned>() methods · d3e285b4
      Mark OLESEN authored and Andrew Heather's avatar Andrew Heather committed
      - provides fast compile-time indexing for FixedList
        (invalid indices trigger a compiler error).
      
        This enables noexcept access, which can propagate into various
        other uses (eg, triFace, triPoints, ...)
      
      ENH: add triangle edge vectors
      d3e285b4
    • Mark OLESEN's avatar
      ENH: add front(), back() methods to List containers · c7e6ae30
      Mark OLESEN authored and Andrew Heather's avatar Andrew Heather committed
      - traditionally used first(), last() methods,
        but front(), back() are well-known from std::vector etc
        which makes the access more familiar.
      
      - support push_back() method for containers that already had append().
        This increases name familiar and can help when porting between
        different C++ code bases.
      
      - support pop_back() method for List containers.
        This is similar to std::vector
      c7e6ae30
    • Mark OLESEN's avatar
      ENH: use CircularBuffer instead SLList for FIFO-style handling · db882651
      Mark OLESEN authored and Andrew Heather's avatar Andrew Heather committed
      - PrimitivePatch localPointOrder
      - enrichedPatch
      - polyMeshZipUpCells
      db882651
    • Mark OLESEN's avatar
      ENH: linked-lists accept more familiar STL method names · f3ba6c6d
      Mark OLESEN authored and Andrew Heather's avatar Andrew Heather committed
      - ie, front(), back(), push_front(), push_back(), pop_front()
      
      ENH: add CircularBuffer flattening operator() and list() method
      
      - useful if assigning content to a List etc
      
      BUG: CircularBuffer find() did not return logical index
      f3ba6c6d
  4. Nov 23, 2022