Skip to content
Snippets Groups Projects
Commit a95427c2 authored by Mark OLESEN's avatar Mark OLESEN Committed by Andrew Heather
Browse files

ENH: improve handling of area calculations in faMesh (#2233)

- 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()
parent ea92cb82
Branches
Tags
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment