--- trunk/paso/src/Solver_AMG.c 2009/04/14 03:23:29 2380 +++ trunk/paso/src/Solver_AMG.c 2009/04/14 03:46:59 2381 @@ -81,7 +81,7 @@ dim_t i,k,j; Paso_SparseMatrix * schur=NULL; Paso_SparseMatrix * schur_withFillIn=NULL; - double time0=0,time1=0,time2=0,S=0; + double S=0; /*Paso_Pattern* test;*/ /* identify independend set of rows/columns */ @@ -112,7 +112,9 @@ /* identify independend set of rows/columns */ #pragma omp parallel for private(i) schedule(static) for (i=0;in_C=n-out->n_F; - if (level>0 && out->n_F>500) { + if (level>0 && out->n_C>500) { /*if (out->n_F>500) {*/ out->rows_in_C=MEMALLOC(out->n_C,index_t); out->mask_C=MEMALLOC(n,index_t); @@ -247,12 +249,12 @@ if (Paso_noError()) { if (verbose) { printf("AMG: %d unknowns eliminated. %d left.\n",out->n_F,n-out->n_F); - if (level>0 && out->n_F>500) { + /*if (level>0 && out->n_F>500) {*/ /* if (out->n_F<500) {*/ - printf("timing: AMG: MIS/reordering/elemination : %e/%e/%e\n",time2,time0,time1); + /* printf("timing: AMG: MIS/reordering/elemination : %e/%e\n",time0,time1); } else { printf("timing: AMG: MIS: %e\n",time2); - } + }*/ } return out; } else { @@ -267,7 +269,7 @@ in fact it solves - [ I 0 ] [ A_FF 0 ] [ I invA_FF*A_FF ] [ x_F ] = [b_F] + [ I 0 ] [ A_FF 0 ] [ I invA_FF*A_FC ] [ x_F ] = [b_F] [ A_CF*invA_FF I ] [ 0 S ] [ 0 I ] [ x_C ] = [b_C] in the form @@ -288,13 +290,12 @@ void Paso_Solver_solveAMG(Paso_Solver_AMG * amg, double * x, double * b) { dim_t i; double *r=MEMALLOC(amg->n,double); - /*Paso_Solver_GS* GS=NULL;*/ double *x0=MEMALLOC(amg->n,double); - double time0=0; + /*double time0=0;*/ - if (amg->level==0 || amg->n_F<=500) { + if (amg->level==0 || amg->n_C<=500) { /*if (amg->n_F<=500) {*/ - time0=Paso_timer(); + /*time0=Paso_timer();*/ Paso_Solver_solveJacobi(amg->GS,x,b); @@ -307,10 +308,11 @@ x[i]+=x0[i]; } */ + /*Paso_UMFPACK1(amg->A,x,b,0);*/ - - time0=Paso_timer()-time0; - /*fprintf(stderr,"timing: DIRECT SOLVER: %e/\n",time0);*/ + + /*time0=Paso_timer()-time0; + fprintf(stderr,"timing: DIRECT SOLVER: %e/\n",time0);*/ } else { /* presmoothing */