-- FreeFem++ v4.14 (mer. 06 mars 2024 16:59:04 CET - git v4.14-1-g2b2052ae) file : laplace_circle.edp Load: lg_fem lg_mesh lg_mesh3 eigenvalue 1 : // laplace_circle.edp 2 : // 3 : // Discussion: 4 : // 5 : // Solve the Poisson equation on the unit disk. 6 : // 7 : // Robin boundary conditions are applied. 8 : // 9 : // Licensing: 10 : // 11 : // This code is distributed under the MIT license. 12 : // 13 : // Modified: 14 : // 15 : // 01 October 2024 16 : // 17 : // Author: 18 : // 19 : // Original FreeFem++ version by Florian De Vuyst. 20 : // This version by John Burkardt. 21 : // 22 : // Reference: 23 : // 24 : // Numerical modeling of transport problems using freefem++ software - 25 : // with examples in biology, CFD, traffic flow and energy transfer, 26 : // HAL id: cel-00842234 27 : // https://cel.archives-ouvertes.fr/cel-00842234 28 : // 29 : cout << "\n"; 30 : cout << "laplace_circle():\n"; 31 : cout << " FreeFem++ version:\n"; 32 : cout << " Solve the Laplace equation inside the unit circ ... : le.\n"; 33 : 34 : real epsilon = 1.0E-02; 35 : // 36 : // Define the region. 37 : // 38 : border domega ( t = 0.0, 2.0 * pi ) { x = cos(t); y = sin(t); } 39 : // 40 : // Mesh the region. 41 : // 42 : mesh Th = buildmesh ( domega ( 100 ) ); 43 : // 44 : // Plot the mesh. 45 : // 46 : plot ( Th, wait = true, ps = "laplace_circle_mesh.ps" ); 47 : // 48 : // Define the finite element space. 49 : // 50 : fespace Vh ( Th, P1 ); 51 : Vh uh; 52 : Vh vh; 53 : 54 : func f = 1.0; 55 : 56 : real cpu1 = clock ( ); 57 : 58 : solve poisson ( uh, vh, solver = LU ) = 59 : int2d ( Th ) ( dx ( uh ) * dx ( vh ) + dy ( uh ) * dy ( vh ) ) 60 : + int1d ( Th, domega ) ( epsilon * uh * vh ) 61 : - int2d ( Th ) ( f * vh ); 62 : 63 : real cpu2 = clock ( ); 64 : 65 : cout << " CPU seconds = " << cpu2 - cpu1 << "\n"; 66 : // 67 : // Plot the solution. 68 : // 69 : plot ( uh, nbiso = 50, fill = false, value = 1.0, wait = true, 70 : ps = "laplace_circle_uh.ps" ); 71 : // 72 : // Terminate. 73 : // 74 : cout << "\n"; 75 : cout << "laplace_circle():\n"; 76 : cout << " Normal end of execution.\n"; 77 : 78 : exit ( 0 ); 79 : 80 : sizestack + 1024 =1856 ( 832 ) laplace_circle(): FreeFem++ version: Solve the Laplace equation inside the unit circle. -- 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.053975 laplace_circle(): Normal end of execution. current line = 78 exit(0) err code 0 , mpirank 0 CodeAlloc : nb ptr 3920, size :522976 mpirank: 0 Ok: Normal End