Skip to content

Snapwave neumann convergence - #455

Draft
Leynse wants to merge 2 commits into
mainfrom
snapwave_neumann_convergence
Draft

Leynse wants to merge 2 commits into
mainfrom
snapwave_neumann_convergence

Conversation

@Leynse

@Leynse Leynse commented Nov 19, 2026

Copy link
Copy Markdown
Collaborator

Description

Please briefly describe the purpose of this pull request and the main changes introduced.

Checklist

Before marking this PR as Ready for Review, please confirm:

Compilation

  • Compiles and runs successfully on Windows
  • Compiles and runs successfully on Linux (CPU)
  • Compiles and runs successfully on Linux (GPU)

Testing (for additions to the code)

If this PR modifies model functionality:
 

  • Testbed has been run, and significant performance change has been adressed

If this PR adds model functionality:
 

  • A conceptual test has been added to the testbed.
  • A real-world test case has been added to the testbed.

Documentation

  • Relevant documentation has been updated to reflect the changes.
  • Examples, tutorials, or user guides have been updated where necessary.

HydroMT-SFINCS

Self Review

  • I have reviewed my own changes.
  • Fortran changes follow the coding style.

Additional Notes

Leynse and others added 2 commits November 19, 2026 17:54
- neuboundaries_light: connect each Neumann node to its quadtree
  neighbour opposite the open side, instead of the nearest inner node.
  At a refinement transition the nearest inner node was the fine node
  diagonally inward; when downwave it used the Neumann node as upwind
  point and so fed on its own energy, giving a shadow wedge in Hm0 and
  Hm0_ig. Corner nodes keep the nearest-node connection.
- Solver: update Neumann nodes directly after their inner node within
  each sweep (inverse map neu_start/neu_list), so energy travels along a
  Neumann edge in one sweep instead of one node per sweep.

Flat-bed tests (refinement touching the Neumann edge): 1st percentile
Hm0/Hs 0.915 -> 0.998 at 270 deg, 0.557 -> 0.916 at 300 deg. Unchanged
for closed edges. Rotated test model now uniform Hm0 within 0.3 %.

Co-Authored-By: SFINCS <sfincs@deltares.nl>
For wave directions entering through a Neumann edge, the upwind point
of the node next to the edge lies mostly on the Neumann node connected
to that same node, which holds a copy of the node's own energy. Treated
explicitly, this made the update a slow fixed-point iteration of the
node on itself (about 150 iterations at 300 deg in the flat-bed tests).
These contributions are now moved to the diagonal of the directional
system, for ee and ee_ig, which gives the zero-gradient result at once.
Only nodes with connected Neumann nodes are affected.

Flat-bed tests: strict runs converge in 6 instead of about 150
iterations; 1st percentile Hm0/Hs at 300 deg 0.916 -> 1.000. Unchanged
for closed edges.

Co-Authored-By: SFINCS <sfincs@deltares.nl>
@Leynse
Leynse marked this pull request as draft November 19, 2026 16: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.

1 participant