getf('../../../../srcdoc/numerique/diffusion/scilab/equationDiffusion1D.sci');
N=100;
X=linspace(0,1,N).';
Y=zeros(N,1);
S=zeros(N,1);
coef=[[1,1]];
t=0;
[Y1,t]=diffusion(N,"dirichlet",1,"dirichlet",0,coef,S,Y,t,0.0001,0.001);
[Y2,t]=diffusion(N,"dirichlet",1,"dirichlet",0,coef,S,Y1,t,0.001,0.01);
[Y3,t]=diffusion(N,"dirichlet",1,"dirichlet",0,coef,S,Y2,t,0.01,0.1);
[Y4,t]=diffusion(N,"dirichlet",1,"dirichlet",0,coef,S,Y3,t,0.1,1);
M=[X,Y1,Y2,Y3,Y4];
e=logspace(-6,-1,100).';
D=1e-6;
tau=e^2/D;
M=[log10(e),log10(tau)];
N=500;
Y=zeros(N,1);
X=linspace(0,1,N).';
for j=1:int(N/2),
Y(j)=1;
end;
S=zeros(N,1);
coef=[[0.45,1];[0.55,0.1];[1,1]];
t=0;
[Y1,t]=diffusion(N,"neumann",0,"neumann",0,coef,S,Y,t,0.00001,0.001);
[Y2,t]=diffusion(N,"neumann",0,"neumann",0,coef,S,Y1,t,0.001,0.01);
[Y3,t]=diffusion(N,"neumann",0,"neumann",0,coef,S,Y2,t,0.01,0.1);
[Y4,t]=diffusion(N,"neumann",0,"neumann",0,coef,S,Y3,t,0.1,1);
M=[X,Y1,Y2,Y3,Y4];
N=1000;
Y=zeros(N,1);
X=linspace(0,1,N).';
for j=1:int(N*0.99),
Y(j)=1;
end;
S=zeros(N,1);
coef=[[1,1]];
t=0;
[Y1,t]=diffusion(N,"neumann",0,"neumann",0,coef,S,Y,t,0.0000001,0.00001);
[Y2,t]=diffusion(N,"neumann",0,"neumann",0,coef,S,Y1,t,0.00001,0.0001);
[Y3,t]=diffusion(N,"neumann",0,"neumann",0,coef,S,Y2,t,0.0001,0.001);
[Y4,t]=diffusion(N,"neumann",0,"neumann",0,coef,S,Y3,t,0.001,0.01);
[Y5,t]=diffusion(N,"neumann",0,"neumann",0,coef,S,Y4,t,0.01,0.1);
n=int(N/2);M=[X(n:N),Y1(n:N),Y2(n:N),Y3(n:N),Y4(n:N),Y5(n:N)];