Commits

Rio Yokota committed e1ae40e

Bugfix in fmm.c, now converging for unpreconditioned norm.

Comments (0)

Files changed (2)

-#include <cassert>
+#include <assert.h>
 #include "petiga.h"
 #include "fmm.h"
 #include "nbody.h"
 
   ic = 0;
   for (i=info.xs+1; i<info.xs+info.xm-1; i++) {
-    for (j=info.ys+1; j<info.ys+info.ym-1; j++) {
+    for (j=info.ys+1; j<info.ys+info.ym-1; j++,ic++) {
       Y[j][i] = ui[ic];
     }
   }
   ic = 0;
   j = 0;
   for (i=info.xs; i<info.xs+info.xm-1; i++,ic++) { // Bottom points                                                                                          
-    Y[j][i] = ub[ic];                                                                                                                                    
+    Y[j][i] = ub[ic];
   }
   i = info.xs+info.xm-1;
   for (j=info.ys; j<info.ys+info.ym-1; j++,ic++) { // Right points                                                                                           
 
 all: ${TARGETS}
 
-Poisson2D: Poisson2D.o fmm.o chkopts
-	${CLINKER} -o $@ $< ${PETIGA_LIB} fmm.o
+Poisson2D: Poisson2D.o fmm.o
+	${CLINKER} $^ -o $@ ${PETIGA_LIB}
 	${RM} -f $<
-	./Poisson2D -ksp_monitor -draw_pause 1
+	./Poisson2D -ksp_monitor -ksp_norm_type UNPRECONDITIONED -draw_pause 1
 clean::
 	-@${RM} ${TARGETS}