Contents     Functions     Index     Previous Next     PDF

fe_gmsh



Purpose

To call the GMSH mesher from SDT.

Syntax
  model=fe_gmsh(command,model,...);
Description

The main operation is the automatic meshing of surfaces.

Example

This example illustrates the automatic meshing of a plate
 FEnode = [1 0 0 0  0 0 0; 2 0 0 0  1 0 0; 3 0 0 0  0 2 0];
 femesh('objectholeinplate 1 2 3 .5 .5 3 4 4');
 model=femesh('model0');
 model.Elt=feutil('selelt seledge ',model);
 model.Node=feutil('getnode groupall',model);
 model=fe_gmsh('addline',model,'groupall');
 model.Node(:,4)=0; % reset default length
 mo1=fe_gmsh('write temp.msh -lc .3 -run -2 -v 0',model);delete('temp.msh')
To allow automated running of GMSH from MATLAB, this function uses a info,GMSH stack entry with the following fields


.Line one line per row referencing NodeId. Can be defined using addline commands.
.Circle define properties of circles
.LineLoop rows define a closed line as combination of elementary lines. Values are row indices in the .Line field.
.PlaneSurface rows define surfaces as a combination of line loops, values are row indices in the .LineLoop field. Negative values are used to reverse the line orientation.
.SurfaceLoop rows define a closed surface as combination of elementary surfaces. Values are row indices in the .PlaneSurface field.

The local mesh size is defined at nodes by GMSH. This is stored in column 4 of the model.Node. The -lc .3 in the command resets the value for all nodes that do not have a prior value.

config

The fe_gmsh function uses the OpenFEM preference to launch the GMSH mesher.
 setpref('OpenFEM','gmsh','$HOME_GMSH/gmsh.exe')

Read

fe_gmsh('read FileName.msh') reads a mesh from the GMSH output format.



See also

missread ©1991-2007 by SDTools
Previous Up Next