1 function inspect(grid, params)
2 %
function inspect(grid, params)
3 %
function plotting various properties of the current grid.
5 % The following plots are generated:
7 % - the neighbour types and
10 % - edge-midpoint-coordinates
13 % params: structure holding control fields
for the functions
14 % plot_element_data() and
plot_sequence() used by this method.
16 % Bernard Haasdonk 9.5.2007
18 %set element-data plot function for sequence plots
20 params.title = 'element indices';
21 params.plot = @plot_element_data;
23 %plot_fv_data([1:grid.nelements; 1:grid.nelements]', params, ...
26 params.title = 'boundary types';
28 %plot_fv_data(grid.NBI.*(grid.NBI<0), params, ...
31 params.title = 'neighbour indices';
33 %plot_fv_data(grid.NBI, params, ...
34 % 'neigbour indices');
36 params.title = 'cog coordinates';
38 %plot_fv_data([grid.CX,grid.CY], params, ...
41 params.title = 'edge midpoint x-coordinates';
43 %plot_fv_data([grid.ECX], params, ...
44 % 'edge midpoint x-coordinates');
46 params.title = 'edge midpoint y-coordinates';
48 %plot_fv_data([grid.ECY], params, ...
49 % 'edge midpoint y-coordinates');
51 % additional check of consistency
52 %res = check_consistency(grid);
55 subplot(2,2,1),plot(grid);
56 hold on, plot(grid.CX,grid.CY,'or');
59 subplot(2,2,2),plot(grid);
60 hold on, plot(grid.SX,grid.SY,'ob');
61 title('circumcenters')
63 subplot(2,2,3),plot(grid);
64 hold on, plot(grid.ECX(:),grid.ECY(:),'og');
65 title('edge centroids')
67 subplot(2,2,4),plot(grid);
68 hold on, plot(grid.ESX(:),grid.ESY(:),'ok');
69 title('circumcenter-edge intersections')
function p = plot_sequence(varargin)
plotting a sequence of data slices on polygonal 2d grid (constructed from params if empty) and provid...