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()
Showing
- src/finiteArea/faMesh/faMesh.C 14 additions, 3 deletionssrc/finiteArea/faMesh/faMesh.C
- src/finiteArea/faMesh/faMesh.H 10 additions, 5 deletionssrc/finiteArea/faMesh/faMesh.H
- src/finiteArea/faMesh/faMeshDemandDrivenData.C 430 additions, 108 deletionssrc/finiteArea/faMesh/faMeshDemandDrivenData.C
- src/finiteArea/faMesh/faPatches/faPatch/faPatch.C 26 additions, 84 deletionssrc/finiteArea/faMesh/faPatches/faPatch/faPatch.C
- src/finiteArea/faMesh/faPatches/faPatch/faPatch.H 1 addition, 3 deletionssrc/finiteArea/faMesh/faPatches/faPatch/faPatch.H
Please register or sign in to comment