-
-
Notifications
You must be signed in to change notification settings - Fork 166
Add fenicsx and simplified Landlab solvers #889
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
joargu
wants to merge
21
commits into
precice:develop
Choose a base branch
from
joargu:develop
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
59f942f
Add files via upload
joargu 523bb41
Change order of positions
joargu e1f50aa
Use one mesh for read and write
joargu 7b317e8
Change order of positions
joargu e7d3a33
Add fenicsx and simplified Landlab solvers
joargu 3da0c2d
Merge branch 'precice:develop' into develop
joargu aa045df
Delete wolf-sheep-soil-creep/solver-fenicsx directory
joargu 942a8ad
Delete wolf-sheep-soil-creep/soil-creep-fenicsx directory
joargu 92ed024
Combine solver-fenicsx and soil-creep-fenicsx
joargu 5b6f010
Clarify boundary comment
joargu 00c74f0
Add alpha variable for description
joargu 7d3f1e3
Clarify internal stability substeps with comments
joargu 39969a5
Merge branch 'precice:develop' into develop
joargu 06a2b44
Add FEniCSx to README
joargu b593136
Update keywords in README
joargu 67fe19e
Add simplified Landlab to README
joargu 0c8c9d7
Fix ALPHA variable reference in simplified Landlab
joargu 33af58a
Fix diffusion equation comment
joargu 24e1dcb
Make clean and run scripts executable
joargu f7f7634
Add Python bindings to requirements
joargu 0f9c76b
Clarify boundary comment
joargu File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Binary file modified
BIN
-10.5 KB
(89%)
wolf-sheep-soil-creep/images/tutorials-wolf-sheep-soil-creep-precice-config.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,69 +1,61 @@ | ||
| <?xml version="1.0" encoding="UTF-8" ?> | ||
| <precice-configuration> | ||
|
|
||
| <log> | ||
| <sink | ||
| filter="%Severity% > debug" | ||
| format="---[precice] %ColorizedSeverity% %Message%" | ||
| enabled="true" /> | ||
| </log> | ||
|
|
||
|
|
||
| <data:scalar name="Grass" /> | ||
| <data:scalar name="Soil" /> | ||
|
|
||
| <mesh name="Wolf-Sheep-Grass-Mesh" dimensions="2"> | ||
| <use-data name="Grass" /> | ||
| <use-data name="Soil" /> | ||
| </mesh> | ||
|
|
||
| <mesh name="Soil-Creep-Mesh" dimensions="2"> | ||
| <use-data name="Grass" /> | ||
| </mesh> | ||
|
|
||
| <mesh name="Soil-Grass-Mesh" dimensions="2"> | ||
| <use-data name="Soil" /> | ||
| </mesh> | ||
|
|
||
| <mesh name="Soil-Depth-Mesh" dimensions="2"> | ||
| <use-data name="Soil" /> | ||
| </mesh> | ||
|
|
||
| <participant name="Wolf-Sheep-Grass"> | ||
| <receive-mesh name="Soil-Depth-Mesh" from="Soil-Creep" /> | ||
| <receive-mesh name="Soil-Creep-Mesh" from="Soil-Creep" /> | ||
| <provide-mesh name="Wolf-Sheep-Grass-Mesh" /> | ||
| <provide-mesh name="Soil-Grass-Mesh" /> | ||
| <write-data name="Grass" mesh="Wolf-Sheep-Grass-Mesh" /> | ||
| <read-data name="Soil" mesh="Soil-Grass-Mesh" /> | ||
| <read-data name="Soil" mesh="Wolf-Sheep-Grass-Mesh" /> | ||
| <mapping:nearest-neighbor | ||
| direction="read" | ||
| from="Soil-Depth-Mesh" | ||
| to="Soil-Grass-Mesh" | ||
| from="Soil-Creep-Mesh" | ||
| to="Wolf-Sheep-Grass-Mesh" | ||
| constraint="consistent" /> | ||
| </participant> | ||
|
|
||
| <participant name="Soil-Creep"> | ||
| <receive-mesh name="Wolf-Sheep-Grass-Mesh" from="Wolf-Sheep-Grass" /> | ||
| <provide-mesh name="Soil-Creep-Mesh" /> | ||
| <provide-mesh name="Soil-Depth-Mesh" /> | ||
| <read-data name="Grass" mesh="Soil-Creep-Mesh" /> | ||
| <write-data name="Soil" mesh="Soil-Depth-Mesh" /> | ||
| <write-data name="Soil" mesh="Soil-Creep-Mesh" /> | ||
| <mapping:nearest-neighbor | ||
| direction="read" | ||
| from="Wolf-Sheep-Grass-Mesh" | ||
| to="Soil-Creep-Mesh" | ||
| constraint="consistent" /> | ||
| </participant> | ||
|
|
||
|
|
||
| <m2n:sockets acceptor="Wolf-Sheep-Grass" connector="Soil-Creep" exchange-directory=".." /> | ||
|
|
||
|
|
||
| <coupling-scheme:serial-explicit> | ||
| <participants first="Soil-Creep" second="Wolf-Sheep-Grass" /> | ||
| <time-window-size value="2" /> | ||
| <max-time value="100" /> | ||
| <exchange | ||
| data="Grass" | ||
| mesh="Wolf-Sheep-Grass-Mesh" | ||
| from="Wolf-Sheep-Grass" | ||
| to="Soil-Creep" | ||
| initialize="true" /> | ||
| <exchange data="Soil" mesh="Soil-Depth-Mesh" from="Soil-Creep" to="Wolf-Sheep-Grass" /> | ||
| <exchange data="Grass" mesh="Wolf-Sheep-Grass-Mesh" from="Wolf-Sheep-Grass" to="Soil-Creep" initialize="true"/> | ||
| <exchange data="Soil" mesh="Soil-Creep-Mesh" from="Soil-Creep" to="Wolf-Sheep-Grass" /> | ||
| </coupling-scheme:serial-explicit> | ||
|
|
||
| </precice-configuration> |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| #!/usr/bin/env sh | ||
| set -e -u | ||
|
|
||
| SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)" | ||
| cd "$SCRIPT_DIR" | ||
|
|
||
| rm -rfv ./output/ | ||
|
|
||
| . ../../tools/cleaning-tools.sh | ||
|
|
||
| clean_fenicsx . |
19 changes: 19 additions & 0 deletions
19
wolf-sheep-soil-creep/soil-creep-fenicsx/precice-adapter-config.json
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| { | ||
| "participant_name": "Soil-Creep", | ||
| "precice_config_file_path": "../precice-config.xml", | ||
| "interfaces": [ | ||
| { | ||
| "mesh_name": "Soil-Creep-Mesh", | ||
| "write_data": [ | ||
| { | ||
| "name": "Soil" | ||
| } | ||
| ], | ||
| "read_data": [ | ||
| { | ||
| "name": "Grass" | ||
| } | ||
| ] | ||
| } | ||
| ] | ||
| } |
|
joargu marked this conversation as resolved.
|
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| numpy >1, <2 | ||
| fenicsxprecice~=1.0 | ||
| matplotlib>=3,<4 | ||
| pyprecice~=3.0 |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| #!/usr/bin/env bash | ||
| set -e -u | ||
|
|
||
| . ../../tools/log.sh | ||
|
|
||
| exec > >(tee --append "$LOGFILE") 2>&1 | ||
|
|
||
| if [ ! -v PRECICE_TUTORIALS_NO_VENV ]; then | ||
|
|
||
| if [ ! -d ".venv" ]; then | ||
| python3 -m venv --system-site-packages .venv | ||
| source .venv/bin/activate | ||
| pip install -r requirements.txt && pip freeze > pip-installed-packages.log | ||
| else | ||
| source .venv/bin/activate | ||
| fi | ||
|
|
||
| fi | ||
|
|
||
| mkdir -p output | ||
| python3 soil_creep.py | ||
|
|
||
| close_log |
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.