-
Notifications
You must be signed in to change notification settings - Fork 7
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
Make ode45reg work in reverse time #18
Comments
@pgagarinov Should such behaviour affects VecOde45RegInterp.evaluate() method (instance of VecOde45RegInterp is returned from ode45reg as 4th output) ? |
I hope a more detailed description above answers this question. |
@pgagarinov Thanks for the reply. BTW getTStart/getTEnd methods are not strictly required, because we can do the time convertation by using only |
I rebooted the Jenkins server so now the tests in your branch should be started. Please monitor the failing tests in the corresponding email group. |
|
or use Once you are done with 4) you can merge to master using the following procedure: Then wait for the test results - if all tests pass (and only if they pass) - merge to master.
|
Instead of assigning a single big task as a main task I assigned 3 small tasks which is fair. Please start with task #46 |
Deadline - 27th of October, by that time both changes and tests should be merged into "master" branch
As opposed to built-in ode45 function gras.ode.ode45reg cannot handle reverse time just yet. The solution is to replace t with -t using anonymous functions inside ode45reg and then apply fliplr just before returning the output arguments. Once this is done one needs to write a test inside products+gras+ode+test+mlunit\SuiteOde45Reg.m that iterates through a few different systems (functions for right hand side of ode equation) and compares that a solution in a direct time on [0,T] coincides with a flipped solution of the system where we substitute t with T-t. Comparison should be done with modgen.common.absrelcompare (see how existing tests in SuiteOde45Reg test case work).
I think the best way would be doing this as the following sequence of steps:
a) if tSpanVec is in forward time - ode45regdir directly OR
b) if tSpanVec is in opposite time - adjusts input arguments (timeVec,fOdeReg,tSpanVec,y0Vec as mentioned above), then calls ode45regdir and finally adjusts the output arguments back (this includes interpObj of gras.ode.VecOde45RegInterp class - see step 3).
The text was updated successfully, but these errors were encountered: