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

Support IVP for dsolve #307

Merged
merged 34 commits into from Sep 19, 2016

Conversation

2 participants
@skirpichev
Copy link
Collaborator

skirpichev commented Jul 5, 2016

based on sympy/sympy#11264

  • coverage tests
  • partial solutions
  • better place for solve_ics? (i.e. not _helper_simplify)
  • rebase
  • ask for permission to merge
  • rename kwarg to be consistent with rsolve?
  • adapt existing test (e.g. Wester's) to use initial conditions

@skirpichev skirpichev added this to the First public release milestone Jul 5, 2016

@skirpichev skirpichev force-pushed the skirpichev:dsolve-ics branch 2 times, most recently from e40853c to 9dafec4 Jul 22, 2016

asmeurer and others added some commits Jun 20, 2016

Add initial version of solve_ics in ode.py
So far, it only works for single solutions, and non-derivative initial
conditions.

// edited by skirpichev

Signed-off-by: Sergey B Kirpichev <skirpichev@gmail.com>
Fix an error message about dsolve ics
Signed-off-by: Sergey B Kirpichev <skirpichev@gmail.com>
Extend solve_ics to work with multiple solutions (systems of ODEs)
// edited by skirpichev

Signed-off-by: Sergey B Kirpichev <skirpichev@gmail.com>
Change solve_ics to return the constant solution
The caller can then substitute these into the solution, or do something else
with them.

Signed-off-by: Sergey B Kirpichev <skirpichev@gmail.com>
Use a better variable name in solve_ics
Signed-off-by: Sergey B Kirpichev <skirpichev@gmail.com>
Enable initial condition solving from dsolve (both systems and single…
… ODE)

// edited by skirpichev

Signed-off-by: Sergey B Kirpichev <skirpichev@gmail.com>
Don't try to solve for ics with power series hints
They do their own thing with initial conditions.

Signed-off-by: Sergey B Kirpichev <skirpichev@gmail.com>
Update ics information in docstring of dsolve
Signed-off-by: Sergey B Kirpichev <skirpichev@gmail.com>
Add docstring to solve_ics()
Signed-off-by: Sergey B Kirpichev <skirpichev@gmail.com>
Add support for derivative initial conditions in solve_ics()
Signed-off-by: Sergey B Kirpichev <skirpichev@gmail.com>
Check for some additional cases of invalid ics in classify_ode()
// edited by skirpichev

Signed-off-by: Sergey B Kirpichev <skirpichev@gmail.com>
Add tests for invalid ics checking in classify_ode()
Signed-off-by: Sergey B Kirpichev <skirpichev@gmail.com>
Add tests that don't raise to test_classify_ode_ics()
Signed-off-by: Sergey B Kirpichev <skirpichev@gmail.com>
Add comment about NotImplementedError
Signed-off-by: Sergey B Kirpichev <skirpichev@gmail.com>
Update classify_ode to handle ics of type Derivative
Previously it only worked with Subs of Derivative, but f(x).diff(x).subs(x, y)
gives Derivative(f(y), y), not Subs(Derivative(f(x), x), x, 0), so it was
updated to handle this.

// edited by skirpichev

Signed-off-by: Sergey B Kirpichev <skirpichev@gmail.com>
Handle non-Subs Derivative ics in solve_ics()
Signed-off-by: Sergey B Kirpichev <skirpichev@gmail.com>
Unrecognized initial conditions are NotImplementedError
Signed-off-by: Sergey B Kirpichev <skirpichev@gmail.com>
Add some tests for solve_ics()
// edited by skirpichev

Signed-off-by: Sergey B Kirpichev <skirpichev@gmail.com>
Fix some issues with dsolve and initial conditions
- When simplify=False, some variables were not defined

- Constants for solve_ics should have been generated from the integrated
  solution. Otherwise, dummy variables would be included.

// edited by skirpichev

Signed-off-by: Sergey B Kirpichev <skirpichev@gmail.com>
Disallow ics where the point contains the function
These are not mathematically invalid, but the ics solver doesn't handle them
yet.

// edited by skirpichev

Signed-off-by: Sergey B Kirpichev <skirpichev@gmail.com>
Handle under-specified case
Now we don't raise ValueError, but instead keep
constants from general solution (like Mathematica or Maple).

skirpichev added some commits Jul 30, 2016

Merge branch 'master' into dsolve-ics
Conflicts:
	diofant/solvers/tests/test_ode.py
@skirpichev

This comment has been minimized.

Copy link
Collaborator

skirpichev commented Sep 16, 2016

@asmeurer, please reply here in case you are not ok with merging this stuff in my project. I'm asking because your work wasn't merged to sympy yet.

@skirpichev skirpichev changed the title [wip] Support IVP(BVP?) for dsolve Support IVP(BVP?) for dsolve Sep 16, 2016

@skirpichev skirpichev changed the title Support IVP(BVP?) for dsolve Support IVP for dsolve Sep 16, 2016

@asmeurer

This comment has been minimized.

Copy link
Contributor

asmeurer commented Sep 16, 2016

You can take any of my PRs. As soon as I make a PR it's licensed the same as SymPy.

@skirpichev

This comment has been minimized.

Copy link
Collaborator

skirpichev commented Sep 16, 2016

Thank you.

@skirpichev skirpichev force-pushed the skirpichev:dsolve-ics branch from 8034fd9 to 7be95d7 Sep 16, 2016

@skirpichev skirpichev merged commit d13b6b0 into diofant:master Sep 19, 2016

3 checks passed

codecov/patch 94% of diff hit (target 90%)
Details
codecov/project Absolute coverage decreased by -<1% but relative coverage increased by +3% compared to 80d18c6
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@skirpichev skirpichev deleted the skirpichev:dsolve-ics branch Sep 19, 2016

@skirpichev skirpichev referenced this pull request Feb 22, 2017

Merged

Correct check in try_polynomial() #446

1 of 1 task complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment