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

Better meshing around x0 for Gaussian initial condition.

parent 0e5cf66e
No related branches found
No related tags found
No related merge requests found
......@@ -25,9 +25,7 @@ if strcmp(T.mode, 'Constituent') || strcmp(T.mode, 'Const_mob') || T.v == 0
% Fine mesh close to x0 if ic = 'Gauss'
[~, ind] = min(abs(T.x-T.x0));
if (T.x(ind+20)-T.x(ind) > 0.1) && strcmp(T.ic, 'Gauss')
T.x = [T.x(1:ind-21), linspace(T.x(ind-20), T.x(ind+20),...
ceil((T.x(ind+20)-T.x(ind-20))*200)),...
T.x(ind+21:end)];
T.x = unique(sort([T.x, linspace(T.x0-0.099, T.x0+0.099, 200)]));
end
elseif strcmp(T.mode, 'Client') && T.v ~= 0
% T.x = linspace(0, T.system_size, 24000);
......
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