awickert / gFlex

Multiple methods to solve elastic plate flexure, designed for applications to Earth's lithosphere.
http://csdms.colorado.edu/wiki/Model:gFlex
GNU General Public License v3.0
21 stars 12 forks source link

BMI Fix #1

Closed mcflugen closed 9 years ago

mcflugen commented 9 years ago

@awickert, I fixed the BMI implementation in gflex_bmi.py. I don't think it's completely working yet so maybe you want to hold off on merging this PR. I've really only tested it with F1D. Please let me know if you have any questions about why I did things the way I did. Because of my lack of understanding of your model, it's quite possible I did things inefficiently or incorrectly.

Input and output names

I removed nearly all of your input and output names and left only the overlying load (input and output) and the deflection of the lithosphere (output). If you want other components getting or setting other variables, you can add them back in as needed. These seemed to be the basic ones that applied to all of gFlex's flexure models.

Input files

You asked about input file formats. I would suggest you have a look at YAML. It's readable and easy to read from and write to. The Python package for it is also extremely easy to use.

awickert commented 9 years ago

@mcflugen: Merged; some comments and further questions for when you have a chance: I manually merged it because I had made some edits too. Thanks for the note on YAML. My input files are hard to read right now, so I will look into making the switch. Was the input file reader you had in the heat_bmi example designed for YAML?

Could you show me how you tested if the model would work with the BMI?

Input and output names

I added the elastic thickness I/O back in, in case another model (e.g., thermal) creates that. I am guessing though that the BMI is just for things you might get from another model or give to another model (and hence you had all of the inputs as outputs as well). Boundary conditions would be set externally dx, dy, ... would be set for the whole system, right, so not passed from another model? I had just thought that the CSDMS interface would require the ability to set these basic model parameters.