FEATool  v1.7.1
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, FILE_NAME, FID_LOG, TOL ) 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 and HMAXB are used to calculate and prescribe the mesh size for boundaries. HMAX is a scalar or array prescribing mesh sizes for subdomains, while HMAXB corresponds do boundary 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).