FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Add fenicsx and simplified Landlab solvers by joargu · Pull Request #889 · precice/tutorials · GitHub

Add fenicsx and simplified Landlab solvers - #889

Draft
joargu wants to merge 21 commits into
precice:developfrom
joargu:develop
Draft

Add fenicsx and simplified Landlab solvers#889
joargu wants to merge 21 commits into
precice:developfrom
joargu:develop

Conversation

joargu commented Jul 27, 2026
edited
Loading

Copy link
Copy Markdown
Contributor

I added simplified Landlab and FEniCSx soil-creep participants.

The simplified Landlab implementation is standalone and exposes the inner workings of Landlab for this specific example. It produces the same results as the Landlab implementation without depending on it.

Landlab uses a finite-difference method, while FEniCSx provides a finite-element alternative. The FEniCSx participant solves the same soil-diffusion equation as the Landlab participant, but uses a triangular mesh instead of Landlab's regular grid and backward Euler instead of Landlab's forward Euler time integration.

The Landlab and FEniCSx participants produce similar results with uni-directional coupling, but diverge under bi-directional coupling due to the differences in spatial and temporal discretization. These are the resulting FEniCSx plots, showing the visible differences from Landlab:

The discrepancy is caused by the influence of the soil-creep participant on the grass map in the bidirectional coupling. The grass, which determines the diffusivity of the soil creep, is limited by soil depth from the soil-creep participant based on the minimum soil-depth threshold. If soil depth at a cell is below the threshold, a grass patch that is fully grown will be reset.

Because the Landlab and FEniCSx implementations use different spatial and temporal discretizations, one participant can cross the minimum soil-depth threshold earlier than the other. The grass can therefore be limited in one simulation while remaining fully grown in the other.

Once the grass maps begin to differ, their evolution also diverges because the wolf-sheep-grass ABM participant is stochastic. The grass map starts getting limited in the FEniCSx-coupled simulation once the soil depth falls below the threshold.

After four steps, a fully grown grass patch is reset for the first time, and the Landlab and FEniCSx simulations begin to diverge.

TODO: Summarize and motivate the changes, link to issues, remove the checklist entries that are not relevant.

Checklist

  • I added a summary of any user-facing changes (compared to the last release) in the changelog-entries/<PRnumber>.md.
  • If I changed requirements.txt files, I regenerated sibling requirements-reference.txt files with python3 tools/releasing/update-requirements-reference.py (pass a path to update only that directory, or --all to refresh everything).

For new tutorials or tutorial cases:

MakisH marked this pull request as draft July 30, 2026 09:43

MakisH commented Jul 30, 2026

Copy link
Copy Markdown
Member

Thank you for the updates, @joargu! Since I see that the PR description is missing and the CI is failing, I marked this as draft. Let me know once you need a review, or if you need any help.

uekerman left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Thanks for the update!
Structure looks good, a few minor comments below. I have not yet run things, but I want to do so once the README is updated.

MakisH left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I know this is still a draft, but I did a first review pass as well. Happy to look over it again later.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

self-note: I could not install FEniCSx on my system at the moment. In any case, we should test it on the system tests once the respective entries are there (see the checklist in the PR description).

MakisH commented Aug 15, 2026

Copy link
Copy Markdown
Member

FYI: tools/tests/ is now tests/. I recommend updating your branch before adding new tests.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants


Back | FazBrowse Home | New Git URL