Add Landlab Mesh Deformation Plugin - #7213
Conversation
0d75ee2 to
62560bd
Compare
|
|
||
|
|
||
|
|
||
| mesh_deformation_landlab_01.py |
There was a problem hiding this comment.
Interesting that the python output appears but only at the end. Any idea why?
There was a problem hiding this comment.
I think I fixed this, pushing the new tests in a sec
62560bd to
cd9f3bc
Compare
|
@tjhei Thanks for taking a look at this! I addressed your comments on the code, I'll add a couple more tests later today for spherical and more than 1 ASPECT process |
|
Awesome. Otherwise, I think this is good to go. I would prefer if someone else would take a look and merge though, as I wrote large parts of this. |
| # Test "landlab" mesh deformation Landlab Python module in a | ||
| # 3d box | ||
| # | ||
| # Enable if: ASPECT_WITH_PYTHON |
There was a problem hiding this comment.
| # Enable if: ASPECT_WITH_PYTHON | |
| # Enable if: ASPECT_WITH_LANDLAB |
There was a problem hiding this comment.
I'm not sure if it's the right syntax, but I made it # Enable if: ASPECT_WITH_LANDLAB && ASPECT_WITH_PYTHON. They should both be true right?
There was a problem hiding this comment.
Well, WITH_LANDLAB can only be true if we have python so it is enough to just do # Enable if: ASPECT_WITH_LANDLAB
and if you take a look at
Lines 137 to 153 in bf1b061
# Enable if: ASPECT_WITH_PYTHON
# Enable if: ASPECT_WITH_LANDLAB
355c7ee to
805329f
Compare
|
Correct |
| The names of the boundaries listed here can either be numbers (in which case they correspond to the numerical boundary indicators assigned by the geometry object), or they can correspond to any of the symbolic names the geometry object may have provided for each part of the boundary. You may want to compare this with the documentation of the geometry model you use in your model. | ||
|
|
||
| The format is id1: object1 \& object2, id2: object3 \& object2, where objects are one of ‘ascii data’: Implementation of a model in which the initial mesh deformation (initial topography) is derived from a file containing data in ascii format. The following geometry models are currently supported: box, chunk, spherical. Note the required format of the input data: The first lines may contain any number of comments if they begin with ‘#’, but one of these lines needs to contain the number of grid points in each dimension as for example ‘# POINTS: 3 3’. The order of the data columns has to be ‘x’, ‘Topography [m]’ in a 2d model and ‘x’, ‘y’, ‘Topography [m]’ in a 3d model, which means that there has to be a single column containing the topography. Note that the data in the input file needs to be sorted in a specific order: the first coordinate needs to ascend first, followed by the second in order to assign the correct data to the prescribed coordinates. If you use a spherical model, then the assumed grid changes. ‘x’ will be replaced by the azimuth angle in radians and ‘y’ by the polar angle in radians measured positive from the north pole. The grid will be assumed to be a longitude-colatitude grid. Note that the order of spherical coordinates is ‘phi’, ‘theta’ and not ‘theta’, ‘phi’, since this allows for dimension independent expressions. | ||
| The format is id1: object1 \& object2, id2: object3 \& object2, where objects are one of ‘Landlab’: A mesh deformation plugin that lets a Python script control the deformation of the surface. It is meant for coupling with the landscape evolution code Landlab, but any other script that provides the necessary functions can be used. It is necessary to have Python and numpy with their C APIs installed and that ASPECT_WITH_PYTHON and ASPECT_WITH_LANDLAB are enabled when ASPECT is configured with CMake. |
There was a problem hiding this comment.
Now it shows up in the documentation. 👍
|
Could you squash please? |
Co-authored-by: Timo Heister <heister@clemson.edu>
f9eb608 to
7b4e952
Compare
|
@tjhei Squashed! |
|
This is ready for review by someone else! @geodynamics/aspect-developers |
This PR adds a Landlab mesh deformation plugin. This enables ASPECT to interface with the landscape evolution library Landlab to deform the surface of the ASPECT model based on an arbitrary landscape evolution model run in a python script.