FEATool  v1.8
Finite Element Analysis Toolbox
 All Files Functions Pages
geom2geo.m File Reference


GEOM2GEO Generate GEO geometry data for use with Gmsh.

[ GEO ] = GEOM2GEO( SIN, HMAX, HMAXB, HMAXP, FILE_NAME, FID_LOG, TOL, USE_COMPOUND ) Generate GEO data for use with the grid generator Gmsh.

SIN can either be a valid geometry or precomputed GEO struct, HMAX, and HMAXB are scalars or arrays indicating grid sizes for subdomains and boundaries. FILE_NAME is optional and enables output to file (writes a geo file, default featool_gmsh). FID_LOG specifies a message log file handle (negative for gui output or empty for no output). The optional input argument TOL defines the tolerance for deduplication and zeroing vertex coordinates (default eps*1e3).

HMAX, HMAXB, and HMAXP are used to calculate and prescribe the mesh sizes. HMAX is a scalar or array prescribing mesh sizes for subdomains, while HMAXB and HMAXP corresponds to boundary and vertex mesh sizes. Mesh sizes are prescribed in Gmsh Restrict Fields for edges and faces, respectively. A non-zero and non-empty HMAX assigns mesh size values to boundary fields connected to subdomains. If HMAX is an array with positive values the minimum value will be used, while negative HMAX values prescribes the mean absolute for each boundary. If HMAXB is given the corresponding boundary values are overwritten (HMAXB overrides HMAX).

The USE_COMPOUND flag indicates if Gmsh compound lines and surfaces should be used (default true).

BIX output GEO struct field contains boundary numbers matching to physical followed by additional compound line entries in 2D and surfaces in 3D. BIX can thus be used to set geometrical boundary numbers during import.