Make regular mesh on rectangular geometry
[p,e,t] = poimesh(g,nx,ny) [p,e,t] = poimesh(g,n) [p,e,t] = poimesh(g)
[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
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
= ny = n, and
[p,e,t] = poimesh(g) uses
= ny = 1.
The triangular mesh is described by the mesh data
t. For details on the mesh data representation,
For best performance with
poisolv, the larger
ny should be a power
g does not seem to describe a rectangle,
zero on return.
Try the command
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)