Documentation

pdemesh

Syntax

pdemesh(p,e,t)
pdemesh(p,e,t,u)
pdemesh(model)
pdemesh(model,u)
h = pdemesh(___)

Description

pdemesh(p,e,t) plots the mesh specified by the mesh data p, e, and t.

pdemesh(p,e,t,u) plots PDE node or triangle data u using a mesh plot. If u is a column vector, node data is assumed. If u is a row vector, triangle data is assumed. This command plots substantially faster than the pdesurf command.

The geometry of the PDE problem is given by the mesh data p, e, and t. For details on the mesh data representation, see Mesh Data.

This command is just shorthand for the calls

pdeplot(p,e,t) % 2-D mesh
pdeplot3D(p,e,t) % 3-D mesh
pdeplot(p,e,t,'zdata',u) % 2-D only

If you want to have more control over your mesh plot, use pdeplot or pdeplot3D instead of pdemesh.

pdemesh(model) plots the mesh contained in a 2-D or 3-D model object of type PDEModel.

For 2-D geometry only, pdemesh(model,u) plots solution data u as a 3-D plot.

For any input arguments, h = pdemesh(___) additionally returns handles to the plotted axes objects.

Examples

Plot the mesh for the geometry of the L-shaped membrane.

[p,e,t] = initmesh('lshapeg');
[p,e,t] = refinemesh('lshapeg',p,e,t); 
pdemesh(p,e,t)

Now solve Poisson's equation –Δu = 1 over the geometry defined by the L-shaped membrane. Use Dirichlet boundary conditions u = 0 on ∂Ω, and plot the result.

u = assempde('lshapeb',p,e,t,1,0,1); 
pdemesh(p,e,t,u) 

See Also

| |

Introduced before R2006a

Was this topic helpful?