Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove float in Triag2D intersection algorithm #203

Merged

Conversation

fmahebert
Copy link
Contributor

Most floating-point numbers in this context are double, but there's a surprise float in the Triag2D::intersects algorithm. This lowers the precision of the double u,v coordinates.

I tried writing my own interpolation algorithm from the intersection outputs, and found I needed looser tolerances everywhere as a result of this float when using LonLat/2D triangles as compared to the Spherical/3D triangles.

Assuming this to be an oversight, I'm making this PR... let me know if the float is intentional.

@wdeconinck
Copy link
Member

Hi @fmahebert indeed that's bizarre, and should be double. Thanks for spotting!

@wdeconinck wdeconinck merged commit 2c0ef04 into ecmwf:develop Jun 5, 2024
20 checks passed
wdeconinck added a commit that referenced this pull request Jun 20, 2024
* release/0.38.0: (47 commits)
  Update Changelog
  Version 0.38.0
  implement a procedure to carry out a regridding from high to low resolution (binning) (#191)
  Fixes opposite pole coordinates (#202)
  Avoid silent errors accessing Fieldset fields by ambiguous names (#210)
  Made sure cubed-sphere interpolation method always sets metadata. (#208)
  Add fortran interface for node-to-edge connectivity building (#209)
  Removed redundant headers.
  Fixed SphericalVector.
  Fixed StructuredInterpolation2D.
  Added failing tests.
  Update ci.yml to fix notification (#207)
  Add notifications to github workflows
  Remove float in Triag2D intersection algorithm (#203)
  Fixup: use C++17 uncaught_exceptions (extra s in exceptions)
  Disable logging of ATLAS_TRACE during stack unwinding (e.g. when exception is thrown)
  Add GPU offloading capability with OpenACC support to Native WrappedDataStore
  Add C++ OpenACC test for some sanity
  Refactor OpenACC support and implement for Native arrays
  Enable use of CUDA for Native arrays
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants