FreeFem / FreeFem-sources

FreeFEM source code
https://freefem.org/
Other
770 stars 191 forks source link

Help : heat conduction problem with interface #226

Open Endermel opened 2 years ago

Endermel commented 2 years ago

Hello,

I'm a french beginner student on Freefem++ and I have to make research on Nitsche's method for elliptic problem by Hansbo P. and A. (link : https://hal.archives-ouvertes.fr/hal-01352903 ). I'm trying to resolve the example 7.1 (page 12) and this is my code :

int Nbnoeuds=10; func f=1; real alpha1=1/2; real alpha2=3; real pena=10*2; border bord1(t=0.,1){x=t; y=0; label=1;} border bord2(t=0.,1){x=1; y=t; label=2;} border bord3(t=0,1){x=1-t; y=1; label=3;} border bord4(t=0,1){x=0; y=1-t; label=4;} border cross(t=0,1){x=0.5; y=t; label=5;}

mesh Th = buildmesh(bord1(Nbnoeuds)+bord2(Nbnoeuds)+bord3(Nbnoeuds)+bord4(Nbnoeuds)+cross(Nbnoeuds)); //plot(Th); fespace Vh(Th,P1); Vh u1,u2; Vh v1,v2; solve projet([u1,u2],[v1,v2],solver=LU)=int2d(Th)(alpha1dx(u1)dx(v1)) + int2d(Th)(alpha2dx(u2)dx(v2)) - intalledges(Th)([jump(u1),jump(u2)](alpha1dx(v1)+alpha2dx(v2))) - intalledges(Th)([jump(v1),jump(v2)](alpha1dx(u1)+alpha2dx(u2)))

I have many errors and I don't know how to fix it. If someone can me advice please.

Best Regards, Mel