Navigation

Operators and Keywords

Function List:

C++ API

Function File: h = pdesurf (p, t, u)

Plot a 3D surface given node or element data on a triangular mesh. p, t are the mesh vertices and connectivity, u node or element data.

See also: fpl_dx_write_field, fpl_vtk_write_field.

Demonstration 1

The following code

 msh = msh2m_structured_mesh ([0:.05:1], [0:.1:1], 1, 1:4, 'random');
 x = msh.p(1,:)'; xm = sum(x(msh.t(1:3,:)),1)/3;
 y = msh.p(2,:)'; ym = sum(y(msh.t(1:3,:)),1)/3;
 pdesurf (msh.p, msh.t, x.*(1-x).*y.*(1-y))
 title ('node data')
 view(3)
 figure ()
 pdesurf (msh.p, msh.t, xm.*(1-xm).*ym.*(1-ym))
 title ('element data')
 view(3)

Produces the following figures

Figure 1 Figure 2

Package: fpl