File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ All notable changes to this project will be documented in this file.
2626
2727### Added
2828
29- - Element P1nc3d (crouzeix Raviart) in plugin Element_P1nc_3d
29+ - Element P1nc3d (crouzeix Raviart) in plugin Element_P1nc_3d in 3d and in Surface (meshS)
3030 and the test is testFE-P1nc3d.edp
3131
3232### Changed
Original file line number Diff line number Diff line change 11load "Element_P1nc_3d"
2+ { // 3d
23mesh3 Th=cube(10,10,10);
34macro grad(u) [dx(u),dy(u),dz(u)]//
4-
5+ func f = x+2*y+3*z;
56fespace Vh(Th,P1nc3d);
67fespace Wh(Th,P0face3d);
78cout << " Vh ndof "<< Vh.ndof << " == " << Wh.ndof << endl;
89Vh u,v;
9- Vh X,Y,Z;
10- /*X = x;
11- Y = y;
12- Z = z;
13- cout << X << endl;
14- cout << Y << endl;
15- cout << Z << endl; */
16- func f = x+2*y+3*z;
10+
1711
1812u = f;
1913cout << " err L1 : " << int3d(Th)( abs(f-u)) << endl;
@@ -23,4 +17,26 @@ plot(u,wait=1);
2317int[int] labs = labels(Th);
2418solve Pb(u,v)= int3d(Th)(grad(u)'*grad(v))- int3d(Th)(v)+ on(labs,u=0);
2519plot(u,wait=1);
26- cout << " u max "<< u[] .max << endl;
20+ cout << " u max "<< u[] .max << endl;
21+ }
22+
23+ { // Surf.
24+ meshS Th=square3(10,10);
25+ macro grad(u) [dx(u),dy(u),dz(u)]//
26+ func f = x+ 2*y;
27+ fespace Vh(Th,P1ncS);
28+ fespace Wh(Th,P0edgeS);
29+ cout << " Vh ndof "<< Vh.ndof << " == " << Wh.ndof << endl;
30+ Vh u,v;
31+
32+
33+ u = f;
34+ cout << "2Surf err L1 : " << int2d(Th)( abs(f-u)) << endl;
35+ plot(u,wait=1);
36+
37+
38+ int[int] labs = labels(Th);
39+ solve Pb(u,v)= int2d(Th)(grad(u)'*grad(v))- int2d(Th)(v)+ on(labs,u=0);
40+ plot(u,wait=1);
41+ cout << " u max "<< u[].max << endl;
42+ }
Original file line number Diff line number Diff line change @@ -52,7 +52,9 @@ LIST_COMPILE=myfunction.$(DYLIB_SUFFIX) BernardiRaugel.$(DYLIB_SUFFIX) \
5252 geophysics.$(DYLIB_SUFFIX ) CircumCenter.$(DYLIB_SUFFIX ) MatD-VFP0.$(DYLIB_SUFFIX ) \
5353 meshtools.$(DYLIB_SUFFIX ) Helmholtz_FD.$(DYLIB_SUFFIX ) Element_P3pnc.$(DYLIB_SUFFIX ) \
5454 vortextools.$(DYLIB_SUFFIX ) MatrixMarket.$(DYLIB_SUFFIX ) Element_P3nc.$(DYLIB_SUFFIX ) \
55- plotPDF.$(DYLIB_SUFFIX ) Element_P2pnc_3d.$(DYLIB_SUFFIX ) Element_P3pnc_3d.$(DYLIB_SUFFIX )
55+ plotPDF.$(DYLIB_SUFFIX ) Element_P2pnc_3d.$(DYLIB_SUFFIX ) Element_P3pnc_3d.$(DYLIB_SUFFIX ) \
56+ Element_P1nc_3d.$(DYLIB_SUFFIX )
57+
5658
5759# FFCS - some libraries are skipped because the corresponding tool is deactivated.
5860
You can’t perform that action at this time.
0 commit comments