-
Notifications
You must be signed in to change notification settings - Fork 195
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
Update TimeStepWizard
#3248
Update TimeStepWizard
#3248
Conversation
Co-authored-by: Navid C. Constantinou <navidcy@users.noreply.github.com>
Co-authored-by: Navid C. Constantinou <navidcy@users.noreply.github.com>
Co-authored-by: iury simoes-sousa <iuryt@pm.me>
Right, it doesn't make sense. But I think we should |
Some stuff later in the docstring is also weird. For example it says
I don't know what it means to "adapt" a function in a callback. There's no adaptation, |
Good catch! I will work on the docstring and error after the weekend. |
TimeStepWizard
TimeStepWizard
and raise error for invalid min_change
or max_change
values
TimeStepWizard
and raise error for invalid min_change
or max_change
valuesTimeStepWizard
I believe I implemented everything we discussed. Please, let me know if that's seems fine to be merged. |
Co-authored-by: Navid C. Constantinou <navidcy@users.noreply.github.com>
Co-authored-by: Navid C. Constantinou <navidcy@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great improvement in docs and input validation
One of the errors is for the Stratified Couette flow validation. I suggest to add in the error output which value was given by the user. |
Co-authored-by: Simone Silvestri <silvestri.simone0@gmail.com>
How does that work for Julia? |
Sorry that was my bad for the error. This
means that https://docs.julialang.org/en/v1/manual/control-flow/#Short-Circuit-Evaluation But to answer your question: yes lets keep it like that. User will get another error next time :) |
Ok. I was thinking that if, for some reason, the user giver both |
Co-authored-by: Gregory L. Wagner <gregory.leclaire.wagner@gmail.com>
Note this is common. If your code has many bugs, you'll typically only be able to receive errors from one at a time. |
@iuryt do you have write rights? |
nope |
Co-authored-by: Navid C. Constantinou <navidcy@users.noreply.github.com>
* Update docstring of the TimeStepWizard * Update TimeStepWizard explanation in the horizontal_convection example * Change symbol for 'less than or equal' and 'greater than or equal' Co-authored-by: Navid C. Constantinou <navidcy@users.noreply.github.com> * Change symbol for 'less than or equal' and 'greater than or equal' Co-authored-by: Navid C. Constantinou <navidcy@users.noreply.github.com> * better phrasing Co-authored-by: iury simoes-sousa <iuryt@pm.me> * Update docstring of the TimeStepWizard * Raise ArgumentError for invalid max_change or min_change values * Fix wording in the docstring * Fix grammar for the docstring Co-authored-by: Navid C. Constantinou <navidcy@users.noreply.github.com> * Make max_change and min_change error simpler Co-authored-by: Navid C. Constantinou <navidcy@users.noreply.github.com> * Update output error for TimeStepWizard * Fix to the correct sign for the error message Co-authored-by: Simone Silvestri <silvestri.simone0@gmail.com> * Update docstring Co-authored-by: Gregory L. Wagner <gregory.leclaire.wagner@gmail.com> * Remove extra space Co-authored-by: Navid C. Constantinou <navidcy@users.noreply.github.com> --------- Co-authored-by: Navid C. Constantinou <navidcy@users.noreply.github.com> Co-authored-by: Simone Silvestri <silvestri.simone0@gmail.com> Co-authored-by: Gregory L. Wagner <gregory.leclaire.wagner@gmail.com>
Reopens #3244 and #3245
If I understand it correctly, it does not make sense to have
min_change > 1
ormax_change < 1
. Am I right?If so, should we add at least a warning for those cases?
Please, let me know if I 'reopened' the PR correctly.