BVP4c repeating calculations (to mimic time stepping)

4 次查看(过去 30 天)
I am working on solving a ODE using several different methods and I would like to use MATLAB's BVP4c too. Currently my ODE is steady but eventually I will be solving some time depending ODE's. To mimic time calculation I repeat my solving step in other solvers, i.e., for Finite Volume;
I have D2 FV Matrix and my solution is u with RHS being Right hand side of differential equation. I do the following
tic for i=1:1:1000 u=D2\RHS end toc
and I would like to do the same thing for BVP4c but it is really slow tic for i=1:1:1000
sol = bvp4c (@odes, @bcs, solinit,options); % bvp solved, end toc
But I think I am not being fair to MATLAB by doing this, because bvp4c is doing much more than u=D2/RHS compare to Finite Volume. Is there any way to mimic time stepping with bvp4c?
Thank you
  1 个评论
Bill Greene
Bill Greene 2014-8-26
If you have a pde (function of time and space) rather than a boundary value problem, why don't you take a look at the pdepe function instead?

请先登录,再进行评论。

回答(0 个)

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by