cd "/Users/jburkardt/public_html/examples/freefem++";/usr/local/bin/FreeFem++ "/Users/jburkardt/public_html/examples/freefem++/example_2.1.edp" OSX> cd "/Users/jburkardt/public_html/examples/freefem++";/usr/local/bin/FreeFem++ "/Users/jburkardt/public_html/examples/freefem++/example_2.1.edp" -- FreeFem++ v 3.310001 (date Jeu 10 jul 2014 21:47:51 CEST) Load: lg_fem lg_mesh lg_mesh3 eigenvalue 1 : // Discussion: 2 : // 3 : // Example_2.1 solves the Poisson equation in a circular domain C. 4 : // 5 : // - uxx - uyy = x * y in the interior of C 6 : // u(x,y) = 0 on the boundary of C. 7 : // 8 : // Location: 9 : // 10 : // http://people.sc.fsu.edu/~jburkardt/examples/freefem++/example_2.1.edp 11 : // 12 : // Modified: 13 : // 14 : // 04 December 2014 15 : // 16 : // Reference: 17 : // 18 : // Frederic Hecht, 19 : // Freefem++, 20 : // Third Edition, version 3.22 21 : // 22 : 23 : // 24 : // Define C, the boundary. 25 : // 26 : border C ( t = 0, 2 * pi ) { x = cos ( t ); y = sin ( t ); } 27 : // 28 : // Define Th, the triangulation of the "left" side of the boundary. 29 : // 30 : mesh Th = buildmesh (C(50)); 31 : // 32 : // Define Vh, the finite element space defined over Th, using P1 basis functions. 33 : // 34 : fespace Vh ( Th, P1 ); 35 : // 36 : // Define u and v, piecewise P1 continuous functions over Th. 37 : // 38 : Vh u, v; 39 : // 40 : // Define f, the right hand side function. 41 : // 42 : func f = x * y; 43 : // 44 : // Request the current CPU time in seconds. 45 : // 46 : real cpu1 = clock ( ); 47 : // 48 : // Request a solution of the discrete weak system. 49 : // Note that the boundary condition is included, 50 : // defined "on C", the boundary. 51 : // 52 : solve Poisson ( u, v, solver = LU ) 53 : = int2d(Th) ( dx(u)*dx(v) + dy(u)*dy(v) ) 54 : - int2d(Th) ( f*v ) 55 : + on(C,u=0) ; 56 : // 57 : // Plot the solution. 58 : // 59 : plot ( u ); 60 : // 61 : // Get final CPU clock reading. 62 : // 63 : real cpu2 = clock ( ); 64 : cout << " CPU time = " << cpu2 - cpu1 << endl; 65 : 66 : sizestack + 1024 =1928 ( 904 ) -- mesh: Nb of Triangles = 446, Nb of Vertices 249 -- Solve : min -0.0103435 max 0.0103461 CPU time = 0.005583 times: compile 0.013653s, execution 0.009004s, mpirank:0