Navigation

Operators and Keywords

Function List:

C++ API

Function File: [mesh] = msh2m_structured_mesh(x,y,region,sides,string)

Construct a structured triangular 2D mesh on a rectangular domain.

  • x and y are the one dimensional mesh vector of the corresponding Cartesian axis.
  • region is a number identifying the geometrical surface region, while sides is a 4 components vector containing the numbers used to identify the geometrical side edges.
  • string is an optional value specifying the orientation of the diagonal edge of the structured mesh. It may take the value "right" (default), "left", "random".

The returned value mesh is a PDE-tool like mesh structure composed of the following fields:

  • p: matrix with size 2 times number of mesh points.
    • 1st row: x-coordinates of the points.
    • 2nd row: y-coordinates of the points.
  • e: matrix with size 7 times number of mesh side edges.
    • 1st row: number of the first vertex of the side edge.
    • 2nd row: number of the second vertex of the side edge.
    • 3rd row: set to 0, present for compatibility with MatLab PDE-tool.
    • 4th row: set to 0, present for compatibility with MatLab PDE-tool.
    • 5th row: number of the geometrical border containing the side edge.
    • 6th row: number of the geometrical surface to the right of side edge.
    • 7th row: number of the geometrical surface to the left of the side edge.
  • t: matrix with size 4 times number of mesh elements.
    • 1st row: number of the first vertex of the element.
    • 2nd row: number of the second vertex of the element.
    • 3rd row: number of the third vertex of the element.
    • 4th row: number of the geometrical surface containing the element.

See also: msh3m_structured_mesh, msh2m_gmsh, msh2m_mesh_along_spline, msh2m_join_structured_mesh, msh2m_submesh.

Package: msh