/[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 2112 by artak, Mon Dec 1 02:53:58 2008 UTC revision 2113 by artak, Mon Dec 1 06:27:14 2008 UTC
# Line 148  Paso_Solver_AMG* Paso_Solver_getAMG(Paso Line 148  Paso_Solver_AMG* Paso_Solver_getAMG(Paso
148                   if (mis_marker[j])                   if (mis_marker[j])
149                       S+=A_p->val[iPtr];                       S+=A_p->val[iPtr];
150                  }                  }
151                  if (ABS(S)>0)                  /* This check is to make sure we dont get some nusty rows which were not removed durring coarsing process.*/
152                    /* TODO: we have to mechanism that this does not happend at all, and get rid of this 'If'. */
153                    if (ABS(S)>1.e-10)
154                     out->inv_A_FF[i]=1./S;                     out->inv_A_FF[i]=1./S;
155                    else
156                       out->inv_A_FF[i]=1.;
157                }                }
158    
159             if( Paso_noError()) {             if( Paso_noError()) {
# Line 359  void Paso_Solver_solveAMG(Paso_Solver_AM Line 363  void Paso_Solver_solveAMG(Paso_Solver_AM
363          /* x_F=invA_FF*b_F  */          /* x_F=invA_FF*b_F  */
364          Paso_Solver_applyBlockDiagonalMatrix(1,amg->n_F,amg->inv_A_FF,amg->A_FF_pivot,amg->x_F,amg->b_F);          Paso_Solver_applyBlockDiagonalMatrix(1,amg->n_F,amg->inv_A_FF,amg->A_FF_pivot,amg->x_F,amg->b_F);
365          /* x<-[x_F,x_C]     */          /* x<-[x_F,x_C]     */
366            
367          #pragma omp parallel for private(i) schedule(static)          #pragma omp parallel for private(i) schedule(static)
368          for (i=0;i<amg->n;++i) {          for (i=0;i<amg->n;++i) {
369              if (amg->mask_C[i]>-1) {              if (amg->mask_C[i]>-1) {
# Line 369  void Paso_Solver_solveAMG(Paso_Solver_AM Line 373  void Paso_Solver_solveAMG(Paso_Solver_AM
373              }              }
374          }          }
375                    
   
376       /*postsmoothing*/       /*postsmoothing*/
377    
378       #pragma omp parallel for private(i) schedule(static)       #pragma omp parallel for private(i) schedule(static)
# Line 396  void Paso_Solver_solveAMG(Paso_Solver_AM Line 399  void Paso_Solver_solveAMG(Paso_Solver_AM
399       */       */
400       /*end of postsmoothing*/       /*end of postsmoothing*/
401            
   
402       }       }
   
403       MEMFREE(r);       MEMFREE(r);
404       MEMFREE(x0);       MEMFREE(x0);
405      return;      return;

Legend:
Removed from v.2112  
changed lines
  Added in v.2113

  ViewVC Help
Powered by ViewVC 1.1.26