Merge hotfixes for remapping and nans in meltponds#708
Open
tdcwilliams wants to merge 20 commits intodevelopfrom
Open
Merge hotfixes for remapping and nans in meltponds#708tdcwilliams wants to merge 20 commits intodevelopfrom
tdcwilliams wants to merge 20 commits intodevelopfrom
Conversation
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.
nans in meltponds
einola
approved these changes
Mar 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Compiles and seems to run OK