Suppose that I have triangular mesh as follows:
and the mesh data structure is like
element = [nodeTag1 nodeTag2 nodeTag3];
I can use
patch('Vertices', coordinate, 'Faces', element)
to plot the mesh (the above plot).
After FEM analysis, I can get the values at each node (vertices of each triangle), like
To plot the field, I can use
patch('Vertices', coordinate, 'Faces', element, 'FaceVertexCData', Data, 'FaceColor', 'interp');
to interpolate the values (field) on such a domain, with a colormap, and the results is like the following plot
My questions are
- If I can only get the values on the each edge of triangles (i.e. centers of edges), how can I plot the result?
- If I can only get the values on the center of triangles, how to plot the result?
Besides, the domain can be very irregular. I am affrid that
and
are not applicable.