rtqichen / torchdiffeq

Differentiable ODE solvers with full GPU support and O(1)-memory backpropagation.
MIT License
5.59k stars 925 forks source link

Boundary conditions support in solvers #111

Closed feribg closed 3 years ago

feribg commented 4 years ago

I was wondering if the library supports bound conditions in the diff eq., for instance in pricing path dependent financial derivatives (http://www.math.yorku.ca/~hmzhu/Math-6911/lectures/Lecture6/6_BlkSch_FDM_Amer.pdf). The typical approach there is some iterative solver like (P)SOR.

rtqichen commented 4 years ago

I only skimmed the pdf and didn't fully understand it, but hopefully the following answers your question. Let me know if it doesn't.

We don't handle partial differential equations, since those typically require their own specialized solvers. There are some libraries that combine PDE solvers with PyTorch such as https://github.com/barkm/torch-fenics that you might be interested in looking at. For ODEs, an initial value is the standard boundary condition, and we probably won't support other boundary conditions in the near future.