feat: Change to local Newell's normal#3977
Conversation
|
@jafranc Please confirm that the failing integrated tests are behaving as expected, and verify the new baselines so we can proceed with merging. |
I am looking into that |
Most of the failed test are exhibiting 1e-9 diff, which I would expect but the strangly enough when compared proposed and so I am looking into upwinding or a normal conditions that could flip |
…V/GEOS into jafranc/feat/localNewell
|
After discussion with @tjb-ltk, the discrepancy in baseline seems normally introduced by change of formula. I'll update baselines |
|
@OmarDuran @rrsettgast @jhuang2601 @bd713 can you have a look at it ? |
| EXPECT_LT( abs( faceNormal[1]-EXPECTED_NORMAL[1] ), 1e-6 ); | ||
| EXPECT_LT( abs( faceNormal[2]-EXPECTED_NORMAL[2] ), 1e-6 ); | ||
| EXPECT_LT( abs( faceCenter[0]-EXPECTED_CENTER[0] ), 1e-6 ); | ||
| EXPECT_LT( abs( faceCenter[0]-EXPECTED_CENTER[0] ), 1e-6 ); |
There was a problem hiding this comment.
| EXPECT_LT( abs( faceCenter[0]-EXPECTED_CENTER[0] ), 1e-6 ); |
This is the duplicate of the above line
…V/GEOS into jafranc/feat/localNewell
This PR draft a proposal for switching from Newell's normal method based on global coordinates to local, i.e. from
\mathbf{n} = \sum_i P_i x P_(i+1)%nto\mathbf{n} = \sum_i (P_i - P_0) x (P_(i+1)%n - P_0).This could avoid some precision loss when dealing with large coordinates.
Tests are also more complete.