Skip to content

Merge hotfixes for remapping and nans in meltponds#708

Open
tdcwilliams wants to merge 20 commits intodevelopfrom
develop-merge-hotfixes-remapping-nans
Open

Merge hotfixes for remapping and nans in meltponds#708
tdcwilliams wants to merge 20 commits intodevelopfrom
develop-merge-hotfixes-remapping-nans

Conversation

@tdcwilliams
Copy link
Copy Markdown
Contributor

Compiles and seems to run OK

einola and others added 20 commits March 18, 2026 06:58
Backporting of fixes in 64c7d97 and
bc3d8be. Here, we use the cross product
to determine if a point is inside or not. If there is uncertainty about
this, the caller must decide (i.e. if the point is too close to the
boundary to reliably tell). We assume an uncertain point is inside if
the caller is checking if a grid corner is inside a triangle, but
outside if the caller is checking if a triangle vertex is inside a grid
cell.
A backport of e494fbd, which says: A
comparison with zero is not very useful on a finite-precision machine!
Using 1e-6 seems to work well.
A backport of d391780, which says:
checkIfIntersecting now ignores intersections that are exactly on the
vertex. It never should have included those, and doing it like this is
very marginally better in terms of total error.
A backport of 90855a1, which says: I
was fiddling with it ans saw that I had already done something
similar in ConservativeRemappingFromMeshToMesh. It probably won't have
much of an effect. Putting it here, since these functions have been
massively rewritten anyway.
It's a good thing, and helped catching two very minor bugs.
This is just to make comparison with the work in PR #684 easier.
Propably not very useful, but helps with comparing with the work in PR
It doesn't make very much difference, but using continue is correct.
PR fixes bug in conservative remapping which only appeared with some meshes and some compiler environments
change NEXTSIM_BUILD_TYPE: now can be VALGRIND, DEBUG, PROFILE or not
set. VALGRIND has no optimisation; DEBUG has some optimisation and uses
flags to give line numbers for memory errors/segmentation faults.
PROFILE is the same as before. It can't be lower case or mixed case
anymore.
(gcc thing meaning "not debugging", which disables assert's)
Remove Bouillon one since it is never used.
@tdcwilliams tdcwilliams requested a review from einola March 24, 2026 12:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants