Navigation

Operators and Keywords

Function List:

C++ API

Function File: GetMeshOpt( cFileName , dim, ...)

Definition of the mesh structure

Parameters

cFileName: mesh file name (string)

dim: space dimension (integer)

Optional parameters (of type addParameter)

'd'

simplex dimension (integer)

'format'

mesh type (string). Only possible values are ’freefem’ (default), ’gmsh’, ’medit’, ’triangle’.

Return values

Th: mesh structure. See the report

Example

Th=GetMeshOpt('disk4-1-50.msh',2);

Demonstration 1

The following code

 Th=GetMeshOpt('disk4-1-50.msh',2);
 PrintMesh(Th);

Produces the following output

---------------
Mesh: disk4-1-50.msh
dim=2, d=2, format=freefem
nq=3576, nme=6950, nbe=200
hmax=0.055886, hmin=0.022214
---------------

Demonstration 2

The following code

 Th=GetMeshOpt('box.1',2,'format','triangle');
 PrintMesh(Th);

Produces the following output

---------------
Mesh: box.1
dim=2, d=2, format=triangle
nq=12, nme=12, nbe=12
hmax=1.500000, hmin=1.000000
---------------

Demonstration 3

The following code

 Th=GetMeshOpt('magnetism.msh',2, 'format','gmsh');
 PrintMesh(Th);

Produces the following output

---------------
Mesh: magnetism.msh
dim=2, d=2, format=gmsh
nq=1924, nme=3720, nbe=126
hmax=0.068956, hmin=0.022419
---------------

Demonstration 4

The following code

 Th=GetMeshOpt('sphere8-4.msh',3, 'format','gmsh');
 PrintMesh(Th);

Produces the following output

---------------
Mesh: sphere8-4.msh
dim=3, d=3, format=gmsh
nq=1769, nme=7214, nbe=2022
hmax=0.322268, hmin=0.067119
---------------

Demonstration 5

The following code

 Th=GetMeshOpt('rect_bis2.mesh',2, 'format','medit');
 PrintMesh(Th);

Produces the following output

---------------
Mesh: rect_bis2.mesh
dim=2, d=2, format=medit
nq=2691, nme=5192, nbe=188
hmax=0.023424, hmin=0.009316
---------------

Demonstration 6

The following code

 Th=GetMeshOpt('cube6-1-3.mesh',3);
 PrintMesh(Th);

Produces the following output

---------------
Mesh: cube6-1-3.mesh
dim=3, d=3, format=medit
nq=64, nme=162, nbe=108
hmax=0.577351, hmin=0.333333
---------------

Package: ovisumesh