function [meshnodnew]= pullnods(meshele,meshnod,bndele,Radius,Xc,Yc)
%  [meshnodnew]= pullnods(meshele,meshnod,bndele,Radius,Xc,Yc);
%    pullnods.m
%  This pulls the boundary nodes out to an outer circle
% A circle of Radius,  Xc, Yc
% Radius = 8000;
% Xc = 11500;
% Yc = 7000;
l = bndele(:,2);
Xn = meshnod(l,2);
Yn = meshnod(l,3);
the = atan2(Yn-Yc, Xn-Xc);
Xnn = Xc + Radius*cos(the);
Ynn = Yc + Radius*sin(the);
meshnod(l,2) = Xnn;
meshnod(l,3) = Ynn;

figure(1)
x3 =  meshele;
x3(:,1) = meshele(:,4);
x3(:) = meshnod(x3,2);
y3 =  meshele;
y3(:,1) = meshele(:,4);
y3(:) = meshnod(y3,3);
x3 = [ x3 NaN*meshele(:,1)]';
y3 = [ y3 NaN*meshele(:,1)]';
plot(x3,y3,'w')
axis('equal')
title('new nodes')
meshnodnew = meshnod;

