whether meshes affect computational step lengths in pdepe

In pdepe the user specifies an xmesh and tmesh. Do these meshes affect what meshes and computational step lengths adopted by the solver and hence the error? In other words are the computational step lengths self adaptive as in ode23 etc?

 Accepted Answer

Torsten
Torsten on 19 Jan 2024
Edited: Torsten on 19 Jan 2024
Adaptive in x: no. Adaptive in t: yes. Thus the x-mesh affects computational accuracy, the t-mesh not. The accuracy in t is influenced as usual by the relative and absolute tolerances in the "odeset".

4 Comments

Thanks a lot for your answer, that makes a lot of sense. If only this can be clearly written in some documentation, which I've never found.
As I can imagine the xmesh can only affect the accuracy but not convergence. So if pdepe returns a divergent solution, any finer xmesh won't help the convergence?
So if pdepe returns a divergent solution, any finer xmesh won't help the convergence?
It can. The xmesh is used to approximate spatial derivatives. Imagine for a problem over 100 m you only have two spatial discretization points. This won't suffice to approximate spatial derivatives and thus to reconstruct the function from values in discrete points.
Maybe you are talking about accuracy rather than convergence? As I understand it spatial discretization affects accuracy but not convergence. To have two spatial discretization points over 100 m won't yield divergence if a fine mesh is convergent.
A complicated profile of a function can only be reconstructed by its spatial derivatives if there are enough supporting points. Thus convergence to the solution of a complicated function can only be achieved if the x-mesh is chosen fine enough.

Sign in to comment.

More Answers (0)

Tags

Asked:

on 19 Jan 2024

Edited:

on 20 Jan 2024

Community Treasure Hunt

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

Start Hunting!