rbmatlab 0.10.01
|
00001 function inspect(grid, params) 00002 %function inspect(grid, params) 00003 % function plotting various properties of the current grid. 00004 % 00005 % The following plots are generated: 00006 % - element numbers 00007 % - the neighbour types and 00008 % - neighbour indices 00009 % - cog-coordinates 00010 % - edge-midpoint-coordinates 00011 % 00012 % Parameters: 00013 % params: structure holding control fields for the functions 00014 % plot_element_data() and plot_sequence() used by this method. 00015 00016 % Bernard Haasdonk 9.5.2007 00017 00018 %set element-data plot function for sequence plots 00019 00020 params.title = 'element indices'; 00021 params.plot = @plot_element_data; 00022 plot_sequence((1:grid.nelements)',grid,params); 00023 %plot_fv_data([1:grid.nelements; 1:grid.nelements]', params, ... 00024 % 'element indices'); 00025 00026 params.title = 'boundary types'; 00027 plot_sequence(grid.NBI.*(grid.NBI<0),grid,params); 00028 %plot_fv_data(grid.NBI.*(grid.NBI<0), params, ... 00029 % 'boundary types'); 00030 00031 params.title = 'neighbour indices'; 00032 plot_sequence(grid.NBI,grid,params); 00033 %plot_fv_data(grid.NBI, params, ... 00034 % 'neigbour indices'); 00035 00036 params.title = 'cog coordinates'; 00037 plot_sequence([grid.CX,grid.CY],grid,params); 00038 %plot_fv_data([grid.CX,grid.CY], params, ... 00039 % 'cog coordinates'); 00040 00041 params.title = 'edge midpoint x-coordinates'; 00042 plot_sequence(grid.ECX,grid,params); 00043 %plot_fv_data([grid.ECX], params, ... 00044 % 'edge midpoint x-coordinates'); 00045 00046 params.title = 'edge midpoint y-coordinates'; 00047 plot_sequence(grid.ECY,grid,params); 00048 %plot_fv_data([grid.ECY], params, ... 00049 % 'edge midpoint y-coordinates'); 00050 00051 % additional check of consistency 00052 %res = check_consistency(grid); 00053 00054 figure; 00055 subplot(2,2,1),plot(grid),hold on, plot(grid.CX,grid.CY,'or'); 00056 title('centroids') 00057 00058 subplot(2,2,2),plot(grid),hold on, plot(grid.SX,grid.SY,'ob'); 00059 title('circumcenters') 00060 00061 subplot(2,2,3),plot(grid),hold on, plot(grid.ECX(:),grid.ECY(:),'og'); 00062 title('edge centroids') 00063 00064 subplot(2,2,4),plot(grid),hold on, plot(grid.ESX(:),grid.ESY(:),'ok'); 00065 title('circumcenter-edge intersections') 00066 00067