-- FreeFem++ v4.6 (Thu Apr 2 15:47:38 CEST 2020 - git v4.6) Load: lg_fem lg_mesh lg_mesh3 eigenvalue 1 : // laplace.edp 2 : // 3 : // Discussion: 4 : // 5 : // Solve the Poisson equation on the unit disk. 6 : // 7 : // Robin boundary conditions are applied. 8 : // 9 : // Location: 10 : // 11 : // http://people.sc.fsu.edu/~jburkardt/freefem++/laplace/laplace.edp 12 : // 13 : // Modified: 14 : // 15 : // 19 August 2015 16 : // 17 : // Author: 18 : // 19 : // Florian De Vuyst 20 : // 21 : // Reference: 22 : // 23 : // Numerical modeling of transport problems using freefem++ software - 24 : // with examples in biology, CFD, traffic flow and energy transfer, 25 : // HAL id: cel-00842234 26 : // https://cel.archives-ouvertes.fr/cel-00842234 27 : // 28 : cout << "\n"; 29 : cout << "LAPLACE:\n"; 30 : cout << " FreeFem++ version:\n"; 31 : 32 : real epsilon = 1.0E-02; 33 : // 34 : // Define the region. 35 : // 36 : border domega ( t = 0.0, 2.0 * pi ) { x = cos(t); y = sin(t); } 37 : 38 : mesh Th = buildmesh ( domega ( 100 ) ); 39 : 40 : plot ( Th, wait = 1, ps = "laplace_mesh.ps" ); 41 : // 42 : // Define the finite element space. 43 : // 44 : fespace Vh ( Th, P1 ); 45 : Vh uh; 46 : Vh vh; 47 : 48 : func f = 1.0; 49 : real cpu1 = clock ( ); 50 : 51 : solve poisson ( uh, vh, solver = LU ) = 52 : int2d ( Th ) ( dx ( uh ) * dx ( vh ) + dy ( uh ) * dy ( vh ) ) 53 : + int1d ( Th, domega ) ( epsilon * uh * vh ) 54 : - int2d ( Th ) ( f * vh ); 55 : 56 : real cpu2 = clock ( ); 57 : 58 : cout << " CPU seconds = " << cpu2 - cpu1 << "\n"; 59 : 60 : plot ( uh, nbiso = 50, fill = 0, value = 1.0, wait = 1, ps = "laplace_uh.ps" ); 61 : // 62 : // Terminate. 63 : // 64 : cout << "\n"; 65 : cout << "LAPLACE:\n"; 66 : cout << " Normal end of execution.\n"; 67 : 68 : sizestack + 1024 =1856 ( 832 ) LAPLACE: FreeFem++ version: -- mesh: Nb of Triangles = 1750, Nb of Vertices 926 SkyLineMatrix: size pL/pU: 926 28862 28862 moy=31.1685 -- Solve : min 49.9751 max 50.2254 CPU seconds = 0.006555 LAPLACE: Normal end of execution. times: compile 0.004267s, execution 0.026989s, mpirank:0 CodeAlloc : nb ptr 3551, size :474888 mpirank: 0 Ok: Normal End