godesim
godesim copied to clipboard
Timespan struct
Since it's inception, the Timespan
struct has been a patch to a bigger problem in godesim
. There really is not much control over the domain in which the equations are integrated. Steps are a fixed size unless using an adaptive timestep method, and even then the method will choose the domain division. One can get around this by using events, which is OK for the most part, except for all the extra code.
Timespan really does not do much, it just suggests a timestep and a end time. If there is a more elegant solution, and there most certainly is, the difficulty would probably be adapting present day godesim
's Timespan
API usage to a new API.
The name is also a source of bother to me, I wish I had named it Domain
, since there is no reason godesim
only solves time-domain problems.
This will be addressed when gonum develops the ode
package. Algorithm logic will be replaced by gonum's logic which would probably be better supported than what is seen here.