Can relative and absolute tolerances be set for the solvepde function?
    5 vues (au cours des 30 derniers jours)
  
       Afficher commentaires plus anciens
    
I am using solvepde function to solve a system of pdes. The code is not running for the entire time. I think it will run if I set the relative and absolute tolerances. Is there a way to do this for the solvepde function?
0 commentaires
Réponses (1)
  michio
    
 le 13 Sep 2016
        Yes you can through SolverOptions property of PDEModel.
>> pdemodel = createpde
pdemodel = 
  PDEModel with properties:
             PDESystemSize: 1
           IsTimeDependent: 0
                  Geometry: []
      EquationCoefficients: []
        BoundaryConditions: [0x0 BoundaryCondition]
         InitialConditions: []
                      Mesh: []
             SolverOptions: [1x1 PDESolverOptions]
>> pdemodel.SolverOptions
ans = 
  PDESolverOptions with properties:
      AbsoluteTolerance: 1.0000e-06
      RelativeTolerance: 1.0000e-03
      ResidualTolerance: 1.0000e-04
          MaxIterations: 25
                MinStep: 1.5259e-05
           ResidualNorm: Inf
       ReportStatistics: 'off'
The relative and absolute tolerances can be set by
pdemodel.SolverOptions.AbsoluteTolerance = 1e-3
for example.
0 commentaires
Voir également
Catégories
				En savoir plus sur General PDEs dans Help Center et File Exchange
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!