MshFileVersion='4.1';
fprintf('--------------- demo21\n')
fprintf('2D meshing using ''MshFileVersion''=''%s''(default)\n',MshFileVersion)
fprintf('---------------\n')
geofile='condenser';
fprintf('1. Building a mesh file by using :\n')
fprintf('   -> gmsh version %s\n',fc_oogmsh.gmsh.version())
fprintf('   -> geo file : %s\n',geofile);
meshfile=fc_oogmsh.gmsh.buildmesh2d(geofile,4,'verbose',4,'force',true,'MshFileVersion',MshFileVersion);
fprintf('   -> msh file : %s\n',fc_oogmsh.pathrep(meshfile));
fprintf('2. Reading mesh file\n')
Gh=fc_oogmsh.ooGmsh4(meshfile)

if fc_oogmsh.isgraphics()
  Gh.plotPhysicalElements()
  Gh.plotElementaryElements()
end
--------------- demo21
2D meshing using 'MshFileVersion'='4.1'(default)
---------------
1. Building a mesh file by using :
   -> gmsh version 4.5.1
   -> geo file : condenser
[fc-oogmsh] Input file : <fc-oogmsh>/geodir/2d/condenser.geo
[fc-oogmsh] Overwritting mesh file <fc-oogmsh>/meshes/condenser-4.msh
[fc-oogmsh] Starting building mesh <fc-oogmsh>/meshes/condenser-4.msh with gmsh 4.5.1
[fc-oogmsh]  Using command : gmsh -2 -setnumber N 4 -string "Mesh.MshFileVersion=4.1;"   <fc-oogmsh>/geodir/2d/condenser.geo -o <fc-oogmsh>/meshes/condenser-4.msh
 Be patient...
[fc-oogmsh] gmsh output :
Info    : Running '/fcopt/GMSH/64bit/4.5.1/bin/gmsh -2 -setnumber N 4 -string Mesh.MshFileVersion=4.1; <fc-oogmsh>/geodir/2d/condenser.geo -o <fc-oogmsh>/meshes/condenser-4.msh' [Gmsh 4.5.1, 1 node, max. 1 thread]
Info    : Started on Sun Jan 26 09:49:30 2020
Info    : Reading '<fc-oogmsh>/geodir/2d/condenser.geo'...
Info    : Reading '<fc-oogmsh>/geodir/2d/options01_data.geo'...
Info    : Done reading '<fc-oogmsh>/geodir/2d/options01_data.geo'
Info    : Done reading '<fc-oogmsh>/geodir/2d/condenser.geo'
Info    : Meshing 1D...
Info    : [  0 %] Meshing curve 1 (Circle)
Info    : [ 10 %] Meshing curve 2 (Circle)
Info    : [ 20 %] Meshing curve 3 (Line)
Info    : [ 30 %] Meshing curve 4 (Line)
Info    : [ 40 %] Meshing curve 5 (Line)
Info    : [ 50 %] Meshing curve 6 (Line)
Info    : [ 60 %] Meshing curve 7 (Line)
Info    : [ 70 %] Meshing curve 8 (Line)
Info    : [ 80 %] Meshing curve 9 (Line)
Info    : [ 90 %] Meshing curve 10 (Line)
Info    : Done meshing 1D (0.004672 s)
Info    : Meshing 2D...
Info    : Meshing surface 14 (Plane, Frontal)
Info    : Done meshing 2D (0.238956 s)
Info    : 1414 nodes 2839 elements
Info    : Writing '<fc-oogmsh>/meshes/condenser-4.msh'...
Info    : Done writing '<fc-oogmsh>/meshes/condenser-4.msh'
Info    : Stopped on Sun Jan 26 09:49:30 2020

[fc-oogmsh] Using gmsh 4.5.1 to write MSH file format version 4.1 in <fc-oogmsh>/meshes/condenser-4.msh
   -> msh file : <fc-oogmsh>/meshes/condenser-4.msh
2. Reading mesh file

Gh = 

  fc_oogmsh.ooGmsh4 with properties:
                      q: (2x1413 double)
                     nq: 1413 double
                    dim: 2 double
                      d: 2 double
               toGlobal: (1x1413 double)
               meshfile: (1x71 char)
       partitionnedfile: 0 logical
             MeshFormat: (1x1 struct)
          PhysicalNames: []
               Entities: (1x1 struct)
    PartitionedEntities: []
                  Nodes: (1x1 struct)
               Elements: (1x1 struct)
          PeriodicLinks: []
                   Info: (1x1 struct)
                 orders: 1 double