inlabru-org / inlabru

inlabru
https://inlabru-org.github.io/inlabru/
76 stars 21 forks source link

Prevent negative integration weights/exposure #41

Closed finnlindgren closed 6 years ago

finnlindgren commented 6 years ago

In int.polygon, the integration weight construction may end up constructing small negative integration weights, which are then used as exposure input to INLA:

ERROR INLA.Data1: Poisson data[16366] (e,y) = (-6.58365e-12,0) is void

Causes may include degenerate triangles, and/or sampling domains that extend outside the domain mesh.

finnlindgren commented 6 years ago

Since the weights are constructed based on the existing mesh points, the construction should use the mesh boundary to limit the integration domain to the intersection between the mesh and samplers.

finnlindgren commented 6 years ago

The mesh/polygon intersection code was non-robust and has been replaced by an more approximate but highly robust construction. Fixed in 98337a2