Conversation
|
Relative tolerances are now specified by |
| idas->setTolerance(rel_tol); | ||
| idas->setMaxSteps(SCALE_MICROGRID_MAX_STEPS); |
There was a problem hiding this comment.
Why not provide option to set global absolute tolerance?
There was a problem hiding this comment.
Similar to other instances in the code.
| template <class ScalarT, typename IdxT> | ||
| int Branch<ScalarT, IdxT>::setAbsoluteTolerance() | ||
| { | ||
| return 0; | ||
| } |
There was a problem hiding this comment.
It would be good to provide an instance of setting absolute tolerances. My suggestion would be to have nominal values for variables defined in each component model and then absolute tolerance computed as abs_tol[i] = rel_tol*y_nominal[i].
There should be an option to set global absolute tolerance directly in the solver circumventing component local settings imho.
| const std::vector<ScalarT>& absoluteTolerance() const override | ||
| { | ||
| msa = max_steps_; | ||
| return abs_tol_; | ||
| } |
There was a problem hiding this comment.
What happens if component does not set its absolute values?
My suggestion would be to return default abs_tol_[i] == rel_tol, i.e. assuming that the nominal value of the variable is ~1.
I am in favor of getter/setters. |
I would suggest |
Description
Adds option to run IDA with fixed time steps
Closes #326
Proposed changes
Adds
dtargument to IDA constructor. If nonzero, that fixed time step will be used, otherwise the time step is adaptive.Checklist
-Wall -Wpedantic -Wconversion -Wextra.Further comments
Any preference on passing
dtvia constructor versus getter/setter @pelesh? Whatever we decide fordtI can do for tolerances and max steps too.