From 9b987e10ab05e81bfe63ccc406196c17eb9db418 Mon Sep 17 00:00:00 2001 From: Christophe Geuzaine <cgeuzaine@ulg.ac.be> Date: Tue, 24 Nov 2015 07:59:25 +0000 Subject: [PATCH] accept format 2.2 --- utils/converters/matlab/load_gmsh2.m | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/utils/converters/matlab/load_gmsh2.m b/utils/converters/matlab/load_gmsh2.m index 7226204285..9ec9cc2c9d 100644 --- a/utils/converters/matlab/load_gmsh2.m +++ b/utils/converters/matlab/load_gmsh2.m @@ -1,18 +1,18 @@ -function msh = load_gmsh4(filename, which) +function msh = load_gmsh2(filename, which) %% Reads a mesh in msh format, version 1 or 2 % Usage: % To define all variables m.LINES, M.TRIANGLES, etc % (Warning: This creates a very large structure. Do you really need it?) -% m = load_gmsh4('a.msh') +% m = load_gmsh2('a.msh') % % To define only certain variables (for example TETS and HEXS) -% m = load_gmsh4('a.msh', [ 5 6]) +% m = load_gmsh2('a.msh', [ 5 6]) % % To define no variables (i.e. if you prefer to use m.ELE_INFOS(i,2)) -% m = load_gmsh4('a.msh', -1) -% m = load_gmsh4('a.msh', []) +% m = load_gmsh2('a.msh', -1) +% m = load_gmsh2('a.msh', []) % % Copyright (C) 2007 JP Moitinho de Almeida (moitinho@civil.ist.utl.pt) % and R Lorphevre(r(point)lorphevre(at)ulg(point)ac(point)be) @@ -111,7 +111,7 @@ elseif (strcmp(tline, '$MeshFormat')) fileformat = 0; end [ form ] = sscanf( tline, '%f %d %d'); - if (form(1) ~= 2) + if (form(1) < 2 || form(1) > 2.2) disp (sprintf('Unknown mesh format: %s', tline)); fileformat = 0; end -- GitLab