Changeset 3006
- Timestamp:
- 02/10/10 11:42:27 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/m/partition/adjacency_matrix.m
r2915 r3006 28 28 disp('Creating unique sorted vertex list.'); 29 29 vlist=unique(nonzeros(elem_con)); 30 fprintf(' Found %d vertices numbered from %d to %d.\n',... 31 length(vlist),vlist(1),vlist(end)); 30 32 31 33 %% create edge list and vertex weights … … 44 46 % loop over elements 45 47 48 fprintf(' Processing %d elements with a maximum of %d vertices.\n',... 49 size(elem_con,1),size(elem_con,2)); 50 hwbar=waitbar(0); 46 51 for i=1:size(elem_con,1) 47 52 elem=nonzeros(elem_con(i,:)); … … 125 130 error(['Unrecognized element of length' length(elem) '.']); 126 131 end 127 end 128 129 disp(sprintf('Total area=%f; min area=%f, max area=%f, ratio=%f.',... 130 asum,amin,amax,amax/amin)); 131 disp(sprintf('Total volume=%f; min volume=%f, max volume=%f, ratio=%f.',... 132 vsum,vmin,vmax,vmax/vmin)); 133 disp(sprintf('Total weight=%f; min weight=%f, max weight=%f, ratio=%f.',... 134 sum(vwgt),min(vwgt),max(vwgt),max(vwgt)/min(vwgt))); 132 if (i/100 == floor(i/100)) 133 % fprintf(' %d elements processed.\n',i); 134 waitbar(i/size(elem_con,1),hwbar,sprintf('%d elements processed.',i)); 135 end 136 end 137 fprintf(' %d total elements processed.\n\n',i); 138 waitbar(1,hwbar,sprintf('%d total elements processed.',i)); 139 close(hwbar) 140 141 if (asum > 0) 142 fprintf('Total area=%f; min area=%f, max area=%f, ratio=%f.\n',... 143 asum,amin,amax,amax/amin); 144 end 145 if (vsum > 0) 146 fprintf('Total volume=%f; min volume=%f, max volume=%f, ratio=%f.\n',... 147 vsum,vmin,vmax,vmax/vmin); 148 end 149 fprintf('Total weight=%f; min weight=%f, max weight=%f, ratio=%f.\n',... 150 sum(vwgt),min(vwgt),max(vwgt),max(vwgt)/min(vwgt)); 135 151 136 152 elist=elist(1:nedge,:); … … 144 160 %% create adjacency matrix and make symmetric 145 161 146 disp('Creating adjacency matrix.');147 162 adj_mat=sparse(elist(:,1),elist(:,2),1,length(vlist),length(vlist)); 148 163 adj_mat=double(adj_mat | adj_mat');
Note:
See TracChangeset
for help on using the changeset viewer.