-- FreeFem++ v4.14 (mer. 06 mars 2024 16:59:04 CET - git v4.14-1-g2b2052ae) file : read_mesh.edp Load: lg_fem lg_mesh lg_mesh3 eigenvalue 1 : // read_mesh.edp 2 : // 3 : // Discussion: 4 : // 5 : // This example reads pre-existing mesh files. 6 : // 7 : // Licensing: 8 : // 9 : // This code is distributed under the MIT license. 10 : // 11 : // Modified: 12 : // 13 : // 18 February 2015 14 : // 15 : // Author: 16 : // 17 : // John Burkardt 18 : // 19 : // Reference: 20 : // 21 : // Frederic Hecht, 22 : // Freefem++, 23 : // Third Edition, version 3.22 24 : // 25 : cout << "\n"; 26 : cout << "read_mesh():\n"; 27 : cout << " FreeFem++ version.\n"; 28 : cout << " Read meshes defined by BAMG, GMSH, MEDIT, MESH2 ... : D, SAVEMESH.\n"; 29 : // 30 : // Read a mesh that was created by FreeFem++'s SAVEMESH. 31 : // 32 : cout << "\n"; 33 : cout << " Read savemesh.msh, created by FreeFem++ savemes ... : h() command.\n"; 34 : 35 : mesh Th1 = readmesh ( "savemesh.msh" ); 36 : plot ( Th1, wait = true, ps = "savemesh.ps" ); 37 : // 38 : // Read a mesh that was created by BAMG and saved in MSH format. 39 : // The BAMG mesh includes two parts, bamg_g.msh and bamg_o.msh. 40 : // 41 : cout << " Read bamg_o.msh + bamg_g.msh, created by the ba ... : mg program.\n"; 42 : 43 : mesh Th2 = readmesh ( "bamg_o.msh" ); 44 : plot ( Th2, wait = true, ps = "bamg.ps" ); 45 : // 46 : // Read a mesh that was created by MEDIT and saved in MESH format. 47 : // 48 : cout << " Read medit.mesh, created by the medit program.\n"; 49 : 50 : mesh Th3 = readmesh ( "medit.mesh" ); 51 : plot ( Th3, wait = true, ps = "medit.ps" ); 52 : // 53 : // Read a mesh that was created by GMSH and saved in MESH format. 54 : // 55 : // This has been surprisingly miserably difficult. 56 : // For one thing, GMSH seems to assume you want a 3D mesh. 57 : // If you save your data as an INRIA MESH file, it will internally 58 : // list dimension 3, and have a bogus 0 Z coordinate, AND all the 59 : // triangles may have negative area, requiring a reordering of the 60 : // indices. NOT CONVENIENT is hardly the description. 61 : // 62 : cout << " Read gmsh.mesh, created by the gmsh program.\n"; 63 : 64 : mesh Th4 = readmesh ( "gmsh.mesh" ); 65 : plot ( Th4, wait = true, ps = "gmsh.ps" ); 66 : // 67 : // Read a mesh that was created by MESH2D, 68 : // converted by MESH2D_TO_MEDIT and saved in MESH format. 69 : // 70 : cout << " Read mesh2d.mesh, created by mesh2d\n"; 71 : cout << " and converted by mesh2d_to_medit.\n"; 72 : 73 : mesh Th5 = readmesh ( "mesh2d.mesh" ); 74 : plot ( Th5, wait = true, ps = "mesh2d.ps" ); 75 : // 76 : // Terminate. 77 : // 78 : cout << "\n"; 79 : cout << "read_mesh():\n"; 80 : cout << " FreeFem++ version.\n"; 81 : 82 : exit ( 0 ); 83 : sizestack + 1024 =1992 ( 968 ) read_mesh(): FreeFem++ version. Read meshes defined by BAMG, GMSH, MEDIT, MESH2D, SAVEMESH. Read savemesh.msh, created by FreeFem++ savemesh() command. -- mesh: Nb of Triangles = 18, Nb of Vertices 15 Read bamg_o.msh + bamg_g.msh, created by the bamg program. -- mesh: Nb of Triangles = 1799, Nb of Vertices 966 Read medit.mesh, created by the medit program. ## Warning: Mesh without geometry we construct a geometry (theta =-57.2958 degres ) -- mesh: Nb of Triangles = 96, Nb of Vertices 65 Read gmsh.mesh, created by the gmsh program. ## Warning: Mesh without geometry we construct a geometry (theta =-57.2958 degres ) -- mesh: Nb of Triangles = 605, Nb of Vertices 367 Read mesh2d.mesh, created by mesh2d and converted by mesh2d_to_medit. ## Warning: Mesh without geometry we construct a geometry (theta =-57.2958 degres ) -- mesh: Nb of Triangles = 384, Nb of Vertices 225 read_mesh(): FreeFem++ version. current line = 82 exit(0) err code 0 , mpirank 0 CodeAlloc : nb ptr 3870, size :518528 mpirank: 0 Ok: Normal End