Skip to content
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

TS? #60

Closed
mauro3 opened this issue Feb 15, 2016 · 10 comments
Closed

TS? #60

mauro3 opened this issue Feb 15, 2016 · 10 comments

Comments

@mauro3
Copy link

mauro3 commented Feb 15, 2016

I might do some work on ODE/DAE time steppers coming spring or summer. I was wondering whether it is planned to wrap TS and, if so, any idea when? (BTW, thanks for all the good work so far!)

@JaredCrean2
Copy link
Contributor

There are a few things in the queue ahead of TS (some Matrix and KSP items), but getting the basic TS functionality working shouldn't be too difficult. Are there any features you are particularly interesting in?

@mauro3
Copy link
Author

mauro3 commented Feb 16, 2016

Two things:

I'm implementing/porting some of the PETSc-ODE solvers to Julia (SciML/ODE.jl#72) and it would be good to check them.

I'd be generally interested in making some/all of the PETSc-ODE solvers available in Julia, similarly to the Sundials.jl package.

Thanks for the quick reply!

@JaredCrean2
Copy link
Contributor

Sounds reasonable. I will update this issue once work on TS gets started.

@JaredCrean2
Copy link
Contributor

Everything needed to do explicit time marching methods for ODEs is in place. Implicit should be ready in a week or two. See src/ts.jl.

@mauro3
Copy link
Author

mauro3 commented Mar 27, 2016

Cool, thanks!

@JaredCrean2
Copy link
Contributor

Sorry this took so long, but implicit works now. Take a look and let me know if anything else is needed.

@mauro3
Copy link
Author

mauro3 commented May 23, 2016

Thanks so much!

My GSoC student @obiajulu may try to wrap the PETSc ODE-solvers such that they can be compared to others using https://github.com/mauro3/IVPTestSuite.jl . We'll have a look at the tests in https://github.com/JuliaParallel/PETSc.jl/blob/master/test/ts.jl and see whether we can make sense of them. Otherwise we might request some more examples ;-)

@mauro3 mauro3 closed this as completed May 23, 2016
@JaredCrean2
Copy link
Contributor

Cool. IVPTestSuite looks interesting. It will be nice to have a good comparison of the available methods and packages.

@ChrisRackauckas
Copy link

So TS is now available? What does the interface look like? I'd like to wrap it into DifferentialEquations.jl to test with everything else.

@JaredCrean2
Copy link
Contributor

That's right. The interface is all in ts.jl. You have to cast your equation in a particular form described in the TS chapter of the Petsc manual, but the main idea is you have to supply Petsc with functions to evaluate the right hand side and left hand side functions, and possibly their jacobians (depending on what method you use). This is done with the functions set_rhs_function, set_rhs_jac, set_lhs_function, set_lhs_jac. You will need to create a TS object, set the time-stepping parameters (using set_times), and call solve! to execute the time-stepping. The tests contain examples of solving the 1D heat equation using forward and backward Euler here. You can use the Petsc options database to set the type of problem (linear of nonlinear) and method (forward Euler, backward Euler, etc), or you can pass them into the TS constructor.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants