How can I modify the default options (like RelTol' and 'AbsTol') of the pde solver when using the PDE toolbox?

조회 수: 4 (최근 30일)
When working in 1D, I can modify the default options of the solver by using odeset and then calling the 'options' with pdepe, for example:
options = odeset('RelTol',1e-13,'AbsTol',1e-13);
sol = pdepe(m,'pde','ic','bc',x,t,options)
Now I am working in a 2D probelm and I am using the PDE toolbox. How can I especify options when working with the PDE toolbox? I use the command line function solvepde and I I would like to set more strict Relative error tolerance and Absolute error tolerance.
Apparently, the function solvepde calls ode15s which allows the especification of 'options'.
Thank you.

채택된 답변

Ravi Kumar
Ravi Kumar 2019년 12월 5일
You can edit those tolerances directly using the model object properties. Say,
model = createpde(...
User model the set RelTol as:
model.SolverOptions.RelativeTolerance = 1E-6
Regards,
Ravi
  댓글 수: 5
Hitesh Saini
Hitesh Saini 2020년 2월 19일
편집: Hitesh Saini 2020년 2월 19일
Can Someone please elaborate the meathod?
i am not getting what is this.
model = createpde(...
this is for model Right?
i mean how can i change the relTol if i am using the equations to get results.
Ravi Kumar
Ravi Kumar 2020년 2월 24일
Post details of your question and what you have tried so far. Quickly: You can set up a model, define the equaion using various coefficients, while soliving you can also assign value of tolerances to be used. Check help and documenation on PDEModel. I would also suggest creating a new post if your question in not related to the one posted here.
Regards,
Ravi

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 General PDEs에 대해 자세히 알아보기

제품


릴리스

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by