Skip to content

Commit

Permalink
Reducing execution time by reducing calls to progress_txt
Browse files Browse the repository at this point in the history
  • Loading branch information
cultpenguin committed May 30, 2007
1 parent d428f69 commit d42cda4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion visim/G_to_visim.m
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,9 @@
k=0;

for i=1:nobs;
progress_txt(i,nobs,'setting up kernel')
if (((i/50)==round(i/50))|(i==nobs))
progress_txt(i,nobs,'setting up kernel')
end
for j=1:n(i);
k=k+1;
volgeom(k,1)=Gg_sparse{i}.x(j);
Expand Down
4 changes: 3 additions & 1 deletion visim/visim_to_G.m
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@
Gvol=zeros(nvol,nxyz);

for ivol=1:nvol;
progress_txt(ivol,nvol,'Setting up G')
if (((ivol/50)==round(ivol/50))|(ivol==nvol))
progress_txt(ivol,nvol,'Setting up G')
end
idata=find(V.fvolgeom.data(:,4)==ivol);
POS=V.fvolgeom.data(idata,[1 2 3]);
SENS=V.fvolgeom.data(idata,[5]);
Expand Down

0 comments on commit d42cda4

Please sign in to comment.