-- FreeFem++ v4.6 (Thu Apr 2 15:47:38 CEST 2020 - git v4.6) Load: lg_fem lg_mesh lg_mesh3 eigenvalue 1 : // Discussion: 2 : // 3 : // Generate a 3D mesh using the buildlayers() command, view it with medit. 4 : // 5 : // Location: 6 : // 7 : // http://people.sc.fsu.edu/~jburkardt/freefem_src/buildlayers/buildlayers.edp 8 : // 9 : // Licensing: 10 : // 11 : // This code is distributed under the GNU LGPL license. 12 : // 13 : // Modified: 14 : // 15 : // 22 June 2015 16 : // 17 : // Author: 18 : // 19 : // John Burkardt 20 : // 21 : cout << "\n"; 22 : cout << "buildlayers\n"; 23 : // 24 : // Create a 2D mesh on [0,1]x[0,1] into 5 by 5 elements. 25 : // 26 : mesh Th2d = square ( 5, 5 ); 27 : plot ( Th2d, wait = 0, ps = "base_mesh.ps" ); 28 : // 29 : // Create a 3D mesh on [0,1]x[0,1]x[0,1] by stacking 5 element layers 30 : // using the 2D mesh. 31 : // 32 : // There is no command to save the display from MEDIT. 33 : // This may be done interactively, however. 34 : // 35 : load "medit" 36 : load "msh3" 37 : 38 : int nz = 5; 39 : 40 : mesh3 Th3d = buildlayers ( 41 : Th2d, nz, zbound = [ 0.0, 1.0 ] ); 42 : 43 : medit ( "Th3d", Th3d ); 44 : // 45 : // Terminate. 46 : // 47 : cout << "\n"; 48 : cout << "buildlayers:\n"; 49 : cout << " Normal end of execution.\n"; 50 : 51 : exit ( 0 ); 52 : 53 : sizestack + 1024 =1448 ( 424 ) buildlayers -- Square mesh : nb vertices =36 , nb triangles = 50 , nb boundary edges 20 -- Medit, Release 3.0a (Nov. 30, 2007) Copyright (c) LJLL, 1999-2007. compiled: Thu Apr 2 15:52:17 CEST 2020 (with ff++ 4.6). medit with binary version of popen : mesh(es) mesh_name= Th3d Loading data file(s) End of mesh Input seconds: 0.00 medit1() Building scene(s) Creating scene 1 Loading default options Scene seconds: 0.05 Rendering scene(s) Total running seconds: 0.06 Thank you for using Medit. version de medit ffmedit -popen -filebin 1 Th3d buildlayers: Normal end of execution. current line = 51 exit(0) err code 0 , mpirank 0 CodeAlloc : nb ptr 3542, size :479848 mpirank: 0 Ok: Normal End