Skip to content

Conversation

@CyprienBosserelle
Copy link
Owner

@CyprienBosserelle CyprienBosserelle commented Jul 25, 2025

Add new engine suitable for multilayer/implicit timestep and non-hydrostatic.

This is the engine from Basilisk (Popinet 2020) that will allow BG_Flood to run with:

  • multi-layers
  • semi-implicit time step
  • non-hydrostatic

It is expected that this engine has much better dispersive property than the current ones available in BG_Flood and will be better even for hydrostatic tsunami simulations too.

Walking before running

This PR is only for the first part of this new engine where the engine is available with 1 layer and explicit time step.

To Do

  • back pull to be up to date with Dev branch
  • build a test using the output from Basilisk
  • add river injections
  • Fix boundary
  • check implicit rain and wind still work fine
  • Add Spherical grid capability

@CyprienBosserelle CyprienBosserelle marked this pull request as draft July 25, 2025 22:35
Replaces Fu and Fv with Fux, Fuy, Fvx, and Fvy to explicitly represent fluxes in x and y directions for both u and v components. Updates all relevant memory allocation, initialization, kernel logic, and supported variable lists to use the new naming and structure. This change clarifies the handling of fluxes and prepares the code for more accurate and flexible flux computations.
Updated the flux calculation logic in the AdvecFluxML CUDA kernel by introducing new variables for gradient terms and applying them to the flux updates. Also cleaned up commented code and added minor formatting improvements for clarity.
Introduces the FlowbndFluxML function and its GPU kernel calls to handle machine learning-based boundary fluxes. Updates FlowMLGPU to apply ML boundary fluxes for each boundary segment. Also adds the necessary function declaration in Boundary.h and ensures proper CUDA synchronization after bottom friction and cleanup steps.
Modified the Raintest function to take an additional 'engine' parameter, updated its usage in Testing.cu, and simplified the output variables. Added engine-specific parameter checks in checkparamsanity. These changes improve test flexibility and ensure correct engine configuration during testing.
@CyprienBosserelle CyprienBosserelle merged commit 2a3a6ab into development Sep 11, 2025
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