Skip to content
Snippets Groups Projects
Commit 32cdd0c8 authored by Lars Hubatsch's avatar Lars Hubatsch
Browse files

Increase mesh resolution outside boundary.

parent 87a31be3
No related branches found
No related tags found
No related merge requests found
......@@ -3,7 +3,7 @@ function create_mesh(T)
% Mesh density larger for steeper gradients.
% Start with left side of mesh, at r=0/x=0, with a given step size
x = [0, 0.01/T.precision];%/10
x = [0, 0.01/T.precision/10];%/10
while x<-2*T.a
x_temp = x(end)-x(end-1);
......@@ -23,8 +23,8 @@ while x<-2*T.a
end
x = [x, x(end)+x_temp];
end
x_middle = linspace(-2*T.a+x(end)-x(end-1), -10*T.a, 200*T.precision);
x_right = linspace(-10*T.a+0.1, T.system_size, 200*T.precision);
x_middle = linspace(-2*T.a+x(end)-x(end-1), -10*T.a, 600*T.precision);
x_right = linspace(-10*T.a+0.1, T.system_size, 600*T.precision);
T.x = [x, x_middle, x_right];
T.x = T.x(1:find(T.x-T.system_size>=0, 1)-1);
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment