diff --git a/@Ternary_model/create_mesh.m b/@Ternary_model/create_mesh.m index f29f7b8f9c45095dcdd983ef38dd5167c54d9d67..8ffca12721f07dc4c36146a2308313d76b781ddd 100644 --- a/@Ternary_model/create_mesh.m +++ b/@Ternary_model/create_mesh.m @@ -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);