function pdemodel
[pde_fig,ax]=pdeinit;
pdetool('appl_cb',1);
pdetool('snapon','on');
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,'XTick',[ -1.5,...
 -1.3999999999999999,...
 -1.3,...
 -1.2,...
 -1.1000000000000001,...
 -1,...
 -0.89999999999999991,...
 -0.79999999999999993,...
 -0.69999999999999996,...
 -0.59999999999999998,...
 -0.5,...
 -0.39999999999999991,...
 -0.29999999999999982,...
 -0.19999999999999996,...
 -0.099999999999999867,...
 0,...
 0.099999999999999867,...
 0.19999999999999996,...
 0.29999999999999982,...
 0.39999999999999991,...
 0.5,...
 0.59999999999999998,...
 0.69999999999999996,...
 0.79999999999999993,...
 0.89999999999999991,...
 1,...
 1.1000000000000001,...
 1.2,...
 1.3,...
 1.3999999999999999,...
 1.5,...
]);
set(ax,'YTick',[ -1,...
 -0.90000000000000002,...
 -0.80000000000000004,...
 -0.69999999999999996,...
 -0.59999999999999998,...
 -0.5,...
 -0.39999999999999991,...
 -0.29999999999999993,...
 -0.19999999999999996,...
 -0.099999999999999978,...
 0,...
 0.099999999999999978,...
 0.19999999999999996,...
 0.29999999999999993,...
 0.39999999999999991,...
 0.5,...
 0.59999999999999998,...
 0.69999999999999996,...
 0.80000000000000004,...
 0.90000000000000002,...
 1,...
]);
pdetool('gridon','on');

% Geometry description:
pderect([-1 0.5 0.5 -0.5],'R1');
pdecirc(0.5,0,0.5,'C1');
pderect([-1 -0.89999999999999991 0.5 0.39999999999999991],'SQ1');
pderect([-1 -0.89999999999999991 -0.5 -0.39999999999999991],'SQ2');
pdecirc(-0.89999999999999991,0.39999999999999991,0.10000000000000009,'C2');
pdecirc(-0.89999999999999991,-0.39999999999999991,0.10000000000000009,'C3');
set(findobj(get(pde_fig,'Children'),'Tag','PDEEval'),'String','R1-(SQ1+SQ2)+C1+C2+C3')

% Boundary conditions:
pdetool('changemode',0)
pdetool('removeb',[1 2 3 6 7 9 12 13 14 15 18 19 20 ]);
pdesetbd(7,...
'dir',...
1,...
'1',...
'300')
pdesetbd(6,...
'dir',...
1,...
'1',...
'300')
pdesetbd(5,...
'dir',...
1,...
'1',...
'300')
pdesetbd(4,...
'dir',...
1,...
'1',...
'300')
pdesetbd(3,...
'dir',...
1,...
'1',...
'300+300*exp(-20*y.^2)')
pdesetbd(2,...
'dir',...
1,...
'1',...
'300')
pdesetbd(1,...
'dir',...
1,...
'1',...
'300')

% Mesh generation:
setuprop(pde_fig,'Hgrad',1.3);
setuprop(pde_fig,'refinemethod','regular');
pdetool('initmesh')

% PDE coefficients:
pdeseteq(1,...
'0.001',...
'0.0',...
'0.0',...
'1.0',...
'0:10',...
'0.0',...
'0.0',...
'[0 100]')
setuprop(pde_fig,'currparam',...
['0.001';...
'0.0  ';...
'0.0  ';...
'1.0  '])

% Solve parameters:
setuprop(pde_fig,'solveparam',...
str2mat('0','1000','10','pdeadworst',...
'0.5','longest','0','1E-4','','fixed','Inf'))

% Plotflags and user data strings:
setuprop(pde_fig,'plotflags',[1 1 1 1 1 1 1 1 0 0 0 1 1 1 0 1 0 1]);
setuprop(pde_fig,'colstring','');
setuprop(pde_fig,'arrowstring','');
setuprop(pde_fig,'deformstring','');
setuprop(pde_fig,'heightstring','');

% Solve PDE:
pdetool('solve')
