demo16
fprintf('--------------- %s\n',mfilename())
fprintf('3D surface meshing: mesh and partitioned mesh using ''MshFileVersion''=''4.1''\n')
fprintf('---------------\n')
geofile='sphere8surf.geo';
np=5;
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.buildmesh3ds(geofile,20,'verbose',2,'force',true,'MshFileVersion','4.1');
fprintf(' -> msh file : %s\n',fc_oogmsh.pathrep(meshfile));
fprintf('2. Reading the mesh file\n')
Gh=fc_oogmsh.ooGmsh4(meshfile)
fprintf('3. Building partitioned mesh file\n')
fprintf(' -> number of partitions : %d\n',np);
pmfile=fc_oogmsh.gmsh.buildpartmesh(meshfile,np,'verbose',2,'force',true,'MshFileVersion','4.1');
fprintf(' -> partitioned msh file : %s\n',fc_oogmsh.pathrep(pmfile));
fprintf('4. Reading the partitioned mesh file\n')
pGh=fc_oogmsh.ooGmsh4(pmfile)
if fc_oogmsh.isgraphics()
Gh.plotPhysicalElements()
Gh.plotElementaryElements()
pGh.plotPhysicalElements()
pGh.plotElementaryElements()
pGh.plotPartitionElements()
pGh.plotInterfaceElements()
end
error: legend: no valid object to label
in:
fprintf('--------------- %s\n',mfilename())
fprintf('3D surface meshing: mesh and partitioned mesh using ''MshFileVersion''=''4.1''\n')
fprintf('---------------\n')
geofile='sphere8surf.geo';
np=5; % number of partitions
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.buildmesh3ds(geofile,20,'verbose',2,'force',true,'MshFileVersion','4.1');
fprintf(' -> msh file : %s\n',fc_oogmsh.pathrep(meshfile));
fprintf('2. Reading the mesh file\n')
Gh=fc_oogmsh.ooGmsh4(meshfile)
fprintf('3. Building partitioned mesh file\n')
fprintf(' -> number of partitions : %d\n',np);
pmfile=fc_oogmsh.gmsh.buildpartmesh(meshfile,np,'verbose',2,'force',true,'MshFileVersion','4.1');
fprintf(' -> partitioned msh file : %s\n',fc_oogmsh.pathrep(pmfile));
fprintf('4. Reading the partitioned mesh file\n')
pGh=fc_oogmsh.ooGmsh4(pmfile)
if fc_oogmsh.isgraphics()
Gh.plotPhysicalElements()
Gh.plotElementaryElements()
pGh.plotPhysicalElements()
pGh.plotElementaryElements()
pGh.plotPartitionElements()
pGh.plotInterfaceElements()
end


