function pdemodel
[pde_fig,ax]=pdeinit;
pdetool('appl_cb',1);
pdetool('snapon','on');
set(ax,'DataAspectRatio',[1 0.59999999999999998 1]);
set(ax,'PlotBoxAspectRatio',[5 3.3333333333333335 1]);
set(ax,'XLim',[-5 5]);
set(ax,'YLim',[0 4]);
set(ax,'XTick',[ -5,...
 -4,...
 -3,...
 -2,...
 -1,...
 0,...
 1,...
 2,...
 3,...
 4,...
 5,...
]);
set(ax,'YTick',[ 0,...
 1,...
 2,...
 3,...
 4,...
]);
pdetool('gridon','on');

% Geometry description:
pderect([-5 5 1 0],'R1');
pderect([-1 1 4 1],'R2');
pderect([2 1 2 1],'SQ1');
pderect([-2 -1 2 1],'SQ2');
pdecirc(2,2,1,'C1');
pdecirc(-2,2,1,'C2');
set(findobj(get(pde_fig,'Children'),'Tag','PDEEval'),'String','(R1+R2+SQ1+SQ2)-(C1+C2)')

% Boundary conditions:
pdetool('changemode',0)
pdetool('removeb',[5 7 10 11 12 ]);
pdesetbd(10,...
'dir',...
1,...
'1',...
'0')
pdesetbd(9,...
'dir',...
1,...
'1',...
'0')
pdesetbd(8,...
'dir',...
1,...
'1',...
'0')
pdesetbd(7,...
'dir',...
1,...
'1',...
'0')
pdesetbd(6,...
'dir',...
1,...
'1',...
'0')
pdesetbd(5,...
'dir',...
1,...
'1',...
'0')
pdesetbd(4,...
'dir',...
1,...
'1',...
'0')
pdesetbd(3,...
'dir',...
1,...
'1',...
'0')
pdesetbd(2,...
'dir',...
1,...
'1',...
'0')
pdesetbd(1,...
'dir',...
1,...
'1',...
'0')

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

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

% Solve parameters:
setuprop(pde_fig,'solveparam',...
str2mat('0','1536','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 0 0 0 0 1]);
setuprop(pde_fig,'colstring','');
setuprop(pde_fig,'arrowstring','');
setuprop(pde_fig,'deformstring','');
setuprop(pde_fig,'heightstring','');

% Solve PDE:
pdetool('solve')
