smmills / Phodymm

Photodynamics Code v1
2 stars 2 forks source link

Error catching after reading in files #19

Closed smmills closed 5 years ago

smmills commented 5 years ago

Many of the parameters from the .in files (and .pldin files) have well-defined limits and/or types. Right now I am trusting the user to correctly enter the reasonable values, but this is generally not a good idea.

I would like to make sure each value is in the acceptable range and throw an easy-to-understand error message if it is not before aborting the program. Currently, I assume the values are sensible and plow forward, often leading to confusing segfault/core-dump errors later on in the code if you don't know what you are doing.

smmills commented 5 years ago

This has been partially addressed in d3ef4f912a23b3b75981393a63fa3b2ee17e0253. I will close this for now unless more issues arise.