mesh2d

Upload: phuong2311

Post on 03-Apr-2018

219 views

Category:

Documents


0 download

TRANSCRIPT

  • 7/28/2019 mesh2D

    1/2

    [p, t] = mesh2d ( vertices, edge, hdata, options );

    where:

    vertices, required input, a V by 2 list of (X,Y) coordinates of vertices of theboundary. Ifvertices is the only input argument, then it must be the case thatthe vertices are listed consecutively. Otherwise, assuming edge is supplied,the vertices can be given in any order.

    edge, optional input, a V by 2 list of pairs of indices in the vertices array thatconstitute the edges of the polygonal boundary. Ifvertices is actuallyalready in order, then edge, if specified, would contain the values [1,2; 2,3;

    3,4; ... ; V,1]. hdata, optional input, a structure containing element size information (see

    below).

    options, optional input that allows the user to modify the default behavior ofthe solver (see below).

    p, (output), an N by 2 list of node coordinates. The number of nodesgenerated, N, is determined in part by the size of the edges along the

    boundary, and by other user input such as the maximum element size, and

    the user size function, if supplied. t, (output), an M by 3 list of node indices, forming counterclockwise

    triangles. The number of triangles created depends on the number of nodes

    created.

    hdata, the element size information. This structure, if supplied, can include thefollowing information:

    hdata.hmax, the maximum allowable global element size. hdata.edgeh, an array of element sizes on specified geometry edges,

    where e1 is an index into the edge array. The edgeh component would have

    the form [e1,h1; e2,h2; ...], where the user has specified a certain number ofsizes.

    hdata.fun, the name of a function preceded by an AT sign, which is theuser-defined size function. fun must have the form

    h = fun ( x, y, args{} )

    wherex andy are vectors of point coordinates, and args is an optional

    addition set of input set in hdata.args. The function returns the user-desiredelementsize at the given points.

    hdata.args = {arg1, arg2, ...} contains additional arguments, if any,forhdata.fun.

    options allows the user to modify the default behavior of the solver. This structure,if supplied, can include the following information:

  • 7/28/2019 mesh2D

    2/2

    options.mlim is the convergence tolerance. The maximum relative change inedge length per iteration must be less than this value, which defaults to 0.02.

    options.maxit, the maximum allowable number of iterations, which defaultsto 20.

    options.dhmax, the maximum allowable (relative) gradient in the sizefunction, which defaults to 0.3.

    options.output, a "logical" variable which displays the mesh and the meshstatistics upon completion, and defaults to "TRUE", that is, 1.