# Fitting ODE models: best/efficient practices?

**URL:** <https://discourse.mc-stan.org/t/fitting-ode-models-best-efficient-practices/21018>\
**Category:** General\
**Tags:** ode\
**Created:** [February 26, 2021, 7:16pm UTC](https://discourse.mc-stan.org/t/fitting-ode-models-best-efficient-practices/21018 "2021-02-26T19:16:16Z")\
**Posts on this page:** 1\
**Showing post:** 40

<div class="post-metadata">

**Author:** ![yizhang](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/yizhang/32/15673_2.png) [@yizhang](https://discourse.mc-stan.org/u/yizhang)\
**Post date:** [March 2, 2021, 4:42pm UTC](https://discourse.mc-stan.org/t/fitting-ode-models-best-efficient-practices/21018/40 "2021-03-02T16:42:15Z")

</div>

> [@wds15](#):
>
> To me this sounds infeasible, but maybe I am wrong.

No you’re not. Math’s infrastructure is not designed for PDE.

> [@wds15](#):
>
> I was thinking to expose is according to CVODES useful in PDE applications (the so-called STALD option for bdf)

I’m glad you’re dropping STALD for the moment. The original STALD paper(I think it’s in the reference of cvode user guide) shows that it’s designed for specific problems (advection-convection) where spurious oscillations could happen when certain BDF methods are used, so it will unlikely benefit problems like the heat equation @jtimonen posted earlier, and most flow solvers nowadays no longer practice this anyway. In addition, by assuming small problems size and using serial vector, Stan’s CVODES and adjoint implementation becomes irrelevant for most real-world PDE problems. Again, it comes down to infrastructure.

IMO the best bet is to interfacing external solvers, as we’ve seen [here](https://discourse.mc-stan.org/t/using-petsc-library-together-with-stan/17550).

---

_[View the full topic](https://discourse.mc-stan.org/t/fitting-ode-models-best-efficient-practices/21018)._
