Coastal flows involve water, air and solid structures such as vegetation, logs, buoys and mangrove roots. Simulating them with body-fitted meshes means remeshing every time the free surface moves, which quickly becomes impractical for complex geometries. I develop a finite element method that keeps a single fixed, unfitted mesh and tracks every interface with a level set. The two kinds of interface are treated differently:
- Fluid-solid interface (embedded): the solid is removed from the domain, and its boundary condition is imposed weakly with Nitsche’s method. This is the cut finite element method (CutFEM).
- Fluid-fluid interface (immersed): the free surface carries jumps in the solution and the flux. These are built into the shape functions of the immersed finite element method (IFEM).

Higher-order IFEM basis
The IFEM side of the method uses higher-order immersed finite elements, which resolve interfaces and complex geometries accurately without body-fitted meshes. On each element cut by the interface, the basis functions are built to satisfy the jump conditions, which improves accuracy and numerical stability while keeping the cost of a fixed mesh.
The six quadratic (P2) IFEM basis functions on an element cut by the interface.
Cells cut by both interfaces
The difficult part is where the free surface meets the structure. There, a single cell is cut by both interfaces, a triply-cut cell. We integrate these cells with a composite equivalent-polynomial representation of the Heaviside and Dirac delta functions. We also enrich the IFEM basis with lift functions that represent the solution and flux jumps exactly.

Results and software
With manufactured solutions, the method converges at the optimal order for linear and quadratic elements, including at a coefficient contrast of 1000. Its accuracy matches that of a mesh fitted to both interfaces.

The method is implemented in the open-source Proteus toolkit and ships in release 1.9.1 (doi: 10.5281/zenodo.24201047). The preprint is arXiv:2610.38271.