Skip to content

Commit

Permalink
change the loop ordering
Browse files Browse the repository at this point in the history
  • Loading branch information
lyc102 committed Aug 11, 2021
1 parent 57fc647 commit 842ba40
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mesh/cubemesh.m
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,9 @@
indexMap = reshape(1:nx*ny*nz,nx,ny,nz);
localIndex = zeros(8,1);
idx = 1;
for i = 1:nx-1
for k = 1:nz-1
for j = 1:ny-1
for k = 1:nz-1
for i = 1:nx-1
localIndex(1) = indexMap(i,j,k);
localIndex(2) = indexMap(i+1,j,k);
localIndex(3) = indexMap(i+1,j+1,k);
Expand Down

0 comments on commit 842ba40

Please sign in to comment.