function pdemodel [pde_fig,ax]=pdeinit; pdetool('appl_cb',1); set(ax,'DataAspectRatio',[1 1 1]); set(ax,'PlotBoxAspectRatio',[1.5 1 1]); set(ax,'XLim',[-1.5 1.5]); set(ax,'YLim',[-1 1]); set(ax,'XTickMode','auto'); set(ax,'YTickMode','auto'); % Geometry description: pderect([-1.1886446886446886 -0.082417582417582347 0.097069597069597169 -0.55860805860805862],'R1'); pderect([-0.4780219780219781 0.70879120879120894 -0.067765567765567747 -0.55860805860805862],'R2'); pderect([0.31684981684981706 0.70879120879120894 0.012820512820512775 -0.55860805860805862],'R3'); set(findobj(get(pde_fig,'Children'),'Tag','PDEEval'),'String','R1+R2+R3') % Boundary conditions: pdetool('changemode',0) pdetool('removeb',[3 12 13 15 16 ]); pdesetbd(12,'neu',1,'0','0') pdesetbd(11,'neu',1,'0','0') pdesetbd(10,'neu',1,'0','0') pdesetbd(9,'neu',1,'0','0') pdesetbd(8,'neu',1,'0','0') pdesetbd(7,'neu',1,'0','0') pdesetbd(6,'neu',1,'0','0') pdesetbd(5,'neu',1,'0','0') pdesetbd(4,'neu',1,'0','0') pdesetbd(3,'dir',1,'1','1') pdesetbd(2,'neu',1,'0','0') pdesetbd(1,'dir',1,'1','2') % Mesh generation: setappdata(pde_fig,'Hgrad',1.3); setappdata(pde_fig,'refinemethod','regular'); pdetool('initmesh') pdetool('refine') pdetool('refine') pdetool('refine') pdetool('jiggle') % PDE coefficients: pdeseteq(1,'1.0','0.0','0','1.0','0:10','0.0','0.0','[0 100]') setappdata(pde_fig,'currparam',['1.0';'0.0';'0 ';'1.0']) % Solve parameters: setappdata(pde_fig,'solveparam',... str2mat('0','13536','10','pdeadworst',... '0.5','longest','0','1E-4','','fixed','Inf')) % Plotflags and user data strings: setappdata(pde_fig,'plotflags',[1 1 1 1 1 2 1 1 1 0 0 1 1 1 0 1 0 1]); setappdata(pde_fig,'colstring',''); setappdata(pde_fig,'arrowstring',''); setappdata(pde_fig,'deformstring',''); setappdata(pde_fig,'heightstring',''); % Solve PDE: pdetool('solve')