Skip to content
  • Mark OLESEN's avatar
    ENH: improve handling of area calculations in faMesh (#2233) · a95427c2
    Mark OLESEN authored and Andrew Heather's avatar Andrew Heather committed
    - previous handling did not correctly account for off-processor
      connections (SEGFAULT).
    - revised the point/area normal calculations to use the dual of the
      faces. This simplifies the logic and reduces the depth of loops.
      Point corrections from the neighbouring patches is handled
      centrally by the new halo face information, which properly handles
      on-processor or off-processor faces irrespective of any explicit
      processor patches.
    STYLE: local function and add comments for finiteArea area weighting
    - following the original Tukovic code, the area-weighted normal
      for a vector pair (defining a triangle) is weighted by
        (1) area : larger weight for larger areas
        (2) sin  : lower weight for narrow angles (eg, shards)
        (3) invDist squared : lower weights for distant points
      Refactored to eliminate intermediate operations, some additional
      divide-by-zero protection - similar to vector normalise()