Partial Differential Equations Toolbox    
poimesh

Make regular mesh on a rectangular geometry.

Synopsis

Description
[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. Details on the mesh data representation can be found in the entry on 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.

Examples
Try the demo 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 FEM approach.

See Also
initmesh, poisolv



poiindex poisolv