Commits

Rio Yokota committed 4ebc30c

Debugging mode.

  • Participants
  • Parent commits ffa2d25

Comments (0)

Files changed (2)

   PetscReal *ui  = fmm->ui;
 
   PetscInt i, j, ic = 0;
-   for (i=info.xs; i<info.xs+info.xm; i++) { // Loop over interior points
+  for (i=info.xs; i<info.xs+info.xm; i++) { // Loop over interior points
     for (j=info.ys; j<info.ys+info.ym; j++) {
       if (i != 0 && i != info.mx-1 && j != 0 && j != info.my-1) {
 	xi[ic] = (PetscReal)i / ( (PetscReal)(info.mx-1) );
     }
   }
   assert( ni == ic );
+  PetscReal eps = .2 / (1<<((int)(log2(info.mx-1))));
 
   ic = 0;
   j = 0;
   nb = ic; // this is ok, but we should improve memory allocation
   assert( nb == ic );
 
-  FMM(nb,xm,ym,rhs,ni,xi,yi,ri);
+  //FMM(nb,xm,ym,rhs,ni,xi,yi,ri);
+  nbodyG(nb,xm,ym,rhs,ni,xi,yi,ri,eps);
   //nbodyGn(nb,xm,ym,rhs,nb,xm,ym,um,dxe,dye,re,eps);
 
   for (i=0; i<nb; i++) {
   for (i=0; i<ni; i++) {
     ui[i] = 0;
   }
-  FMM(ni,xi,yi,ui,ni,xi,yi,ri);
-  FMM(ni,xi,yi,ui,nb,xm,ym,un);
+  //FMM(ni,xi,yi,ui,ni,xi,yi,ri);
+  //FMM(ni,xi,yi,ui,nb,xm,ym,un);
+  nbodyG(ni,xi,yi,ui,ni,xi,yi,ri,eps);
+  nbodyG(ni,xi,yi,ui,nb,xm,ym,un,eps);
   //nbodyGn(ni,xi,yi,ui,nb,xm,ym,um,dxe,dye,re,eps);
 
   ic = 0;

File fmm/makefile

 Poisson2D: Poisson2D.o fmm.o
 	${CLINKER} $^ -o $@ ${PETIGA_LIB} -L../../exafmm2d/wrappers -lfmm -ltbb
 	${RM} -f $<
-	mpirun -np 1 ./Poisson2D -ksp_monitor -ksp_norm_type UNPRECONDITIONED -ksp_max_it 100 -pc_type fmm -log_summary
-
+#	mpirun -np 1 ./Poisson2D -ksp_monitor -ksp_norm_type UNPRECONDITIONED -ksp_max_it 100 -pc_type fmm -log_summary
+	mpirun -np 1 ./Poisson2D -ksp_monitor -ksp_norm_type UNPRECONDITIONED
 clean::
 	-@${RM} ${TARGETS}