/[escript]/trunk/paso/src/Solver_AMG.c
ViewVC logotype

Diff of /trunk/paso/src/Solver_AMG.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2438 by artak, Tue Apr 14 03:46:59 2009 UTC revision 2439 by artak, Tue May 26 04:34:21 2009 UTC
# Line 82  Paso_Solver_AMG* Paso_Solver_getAMG(Paso Line 82  Paso_Solver_AMG* Paso_Solver_getAMG(Paso
82    Paso_SparseMatrix * schur=NULL;    Paso_SparseMatrix * schur=NULL;
83    Paso_SparseMatrix * schur_withFillIn=NULL;    Paso_SparseMatrix * schur_withFillIn=NULL;
84    double S=0;    double S=0;
85    /*Paso_Pattern* test;*/    
86      /*Make sure we have block sizes 1*/
87      A_p->pattern->input_block_size=A_p->col_block_size;
88      A_p->pattern->output_block_size=A_p->row_block_size;
89      A_p->pattern->block_size=A_p->block_size;
90        
91    /* identify independend set of rows/columns */    /* identify independend set of rows/columns */
92    mis_marker=TMPMEMALLOC(n,index_t);    mis_marker=TMPMEMALLOC(n,index_t);
# Line 107  Paso_Solver_AMG* Paso_Solver_getAMG(Paso Line 111  Paso_Solver_AMG* Paso_Solver_getAMG(Paso
111    out->GS=Paso_Solver_getJacobi(A_p);    out->GS=Paso_Solver_getJacobi(A_p);
112    /*out->GS->sweeps=2;*/    /*out->GS->sweeps=2;*/
113    out->level=level;    out->level=level;
114        
115    if ( !(Paso_checkPtr(mis_marker) || Paso_checkPtr(out) || Paso_checkPtr(counter) ) ) {    if ( !(Paso_checkPtr(mis_marker) || Paso_checkPtr(out) || Paso_checkPtr(counter) ) ) {
116       /* identify independend set of rows/columns */       /* identify independend set of rows/columns */
117       #pragma omp parallel for private(i) schedule(static)       #pragma omp parallel for private(i) schedule(static)
118       for (i=0;i<n;++i) mis_marker[i]=-1;       for (i=0;i<n;++i) mis_marker[i]=-1;
119       /*Paso_Pattern_coup(A_p,mis_marker,couplingParam);*/       Paso_Pattern_coup(A_p,mis_marker,couplingParam);
120      Paso_Pattern_RS(A_p,mis_marker,couplingParam);      /*Paso_Pattern_RS(A_p,mis_marker,couplingParam);*/
121       /*Paso_Pattern_Aggregiation(A_p,mis_marker,couplingParam);*/       /*Paso_Pattern_Aggregiation(A_p,mis_marker,couplingParam);*/
122       if (Paso_noError()) {       if (Paso_noError()) {
123          #pragma omp parallel for private(i) schedule(static)          #pragma omp parallel for private(i) schedule(static)
# Line 308  void Paso_Solver_solveAMG(Paso_Solver_AM Line 312  void Paso_Solver_solveAMG(Paso_Solver_AM
312           x[i]+=x0[i];           x[i]+=x0[i];
313          }          }
314          */          */
           
315          /*Paso_UMFPACK1(amg->A,x,b,0);*/          /*Paso_UMFPACK1(amg->A,x,b,0);*/
316                    
317         /*time0=Paso_timer()-time0;         /*time0=Paso_timer()-time0;
318         fprintf(stderr,"timing: DIRECT SOLVER: %e/\n",time0);*/         fprintf(stderr,"timing: DIRECT SOLVER: %e/\n",time0);*/
319       } else {       } else {
       
320          /* presmoothing */          /* presmoothing */
321           Paso_Solver_solveJacobi(amg->GS,x,b);           Paso_Solver_solveJacobi(amg->GS,x,b);
322           /*           /*

Legend:
Removed from v.2438  
changed lines
  Added in v.2439

  ViewVC Help
Powered by ViewVC 1.1.26