Documentation Center

  • Trial Software
  • Product Updates


Make regular mesh on rectangular geometry




[p,e,t]=poimesh(g,nx,ny) constructs a regular mesh on the rectangular geometry specified by g, by dividing the "x edge" into nx pieces and the "y edge" into ny pieces, and placing (nx+1)*(ny+1) points at the intersections.

The "x edge" is the one that makes the smallest angle with the x-axis.

[p,e,t]=poimesh(g,n) uses nx=ny=n, and [p,e,t]=poimesh(g) uses nx=ny=1.

The triangular mesh is described by the mesh data p, e, and t. For details on the mesh data representation, see initmesh.

For best performance with poisolv, the larger of nx and ny should be a power of 2.

If g does not seem to describe a rectangle, p is zero on return.


Try the command pdedemo8. The solution of Poisson's equation over a rectangular grid with boundary condition given by the file squareb4 is returned. The solution time is compared to the usual Finite Element Method (FEM) approach.

See Also


Was this topic helpful?