소스 검색

use nstack only when walkers output needed (#332)

Anna Petrasova 5 년 전
부모
커밋
1c7d321ef1
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      raster/r.sim/simlib/hydro.c

+ 1 - 1
raster/r.sim/simlib/hydro.c

@@ -375,7 +375,7 @@ void main_loop(void)
             /* Changes made by Soeren 8. Mar 2011 to replace the site walker output implementation */
             /* Save all walkers located within the computational region and with valid 
                z coordinates */
-            if ((i == miter || i == iter1)) {	
+            if (outwalk != NULL && (i == miter || i == iter1)) {
                 nstack = 0;
                 
                 for (lw = 0; lw < nwalk; lw++) {