% Nodal coordinates (PDETOOL - Export mesh)
X = pst(1,:)';
Y = pst(2,:)';

%time
% t=1;

% Conectividades
T = tst(1:3,:)';

% Numerical solution (PDETOOL - Export solution)
Sol = ust(:,end);

% Analytical solution
SolA = X.^2+X.*Y-Y.^2;

% Norm of the maximum error
errMaxst = max(abs(Sol-SolA))






% Post-process
figure(1)
trisurf(T,X,Y,Sol)
set(gca,'FontWeight','bold');
set(gca,'FontSize',16);
title('Numerical solution for steady state using mesh3','FontSize',18,'FontWeight','bold')

figure(2)
trisurf(T,X,Y,SolA)
set(gca,'FontWeight','bold');
set(gca,'FontSize',16);
title('Analytical Solution for steady state using mesh3','FontSize',18,'FontWeight','bold')

figure(3)
trisurf(T,X,Y,abs(Sol-SolA))
set(gca,'FontWeight','bold');
set(gca,'FontSize',16);
title('Error for steady state using mesh3','FontSize',18,'FontWeight','bold')