Chapter 1 parallel sparse solver - freeFEM.org
Chapter 1 parallel sparse solver - freeFEM.org
Chapter 1 parallel sparse solver - freeFEM.org
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
18 CHAPTER 1. PARALLEL SPARSE SOLVER<br />
9: iparm[1]=1; // PCG as Krylov method<br />
10:iparm[4]=0; // Matrix are symmetric<br />
11:iparm[5]=1; // Pattern are also symmetric<br />
12: iparm[9]=1; // Scale matrix<br />
13:dparm[0]=1e-13; // Tolerance to convergence<br />
14: dparm[1]=5e-4; // Threshold in ILUT<br />
15: dparm[2]=5e-4; // Threshold for Schur preconditionner<br />
16: mesh Th2=square(nn,nn);<br />
17: fespace Vh2(Th2,P2);<br />
18: Vh2 ux,uz,p2;<br />
19: int[int] rup=[0,2], rdown=[0,1], rmid=[1,1,2,1,3,1,4,1];<br />
20:real zmin=0,zmax=1;<br />
21: mesh3 Th=buildlayers(Th2,nn,<br />
zbound=[zmin,zmax],<br />
reffacemid=rmid,<br />
reffaceup = rup,<br />
reffacelow = rdown);<br />
22: savemesh(Th,"copie.mesh");<br />
23: mesh3 Th3("copie.mesh");<br />
24: fespace Vh(Th,P2);<br />
25: func ue = 2*x*x + 3*y*y + 4*z*z + 5*x*y+6*x*z+1;<br />
26: func uex= 4*x+ 5*y+6*z;<br />
27: func uey= 6*y + 5*x;<br />
28: func uez= 8*z +6*x;<br />
29: func f= -18. ;<br />
30: Vh uhe = ue; //<br />
31: cout