/[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 2442 by artak, Fri May 29 00:39:44 2009 UTC revision 2446 by gross, Fri May 29 04:24:01 2009 UTC
# Line 71  to Line 71  to
71     then AMG is applied to S again until S becomes empty     then AMG is applied to S again until S becomes empty
72    
73  */  */
74  Paso_Solver_AMG* Paso_Solver_getAMG(Paso_SparseMatrix *A_p,bool_t verbose,dim_t level, double couplingParam) {  Paso_Solver_AMG* Paso_Solver_getAMG(Paso_SparseMatrix *A_p,bool_t verbose,dim_t level, double coarsening_threshold) {
75    Paso_Solver_AMG* out=NULL;    Paso_Solver_AMG* out=NULL;
76    dim_t n=A_p->numRows;    dim_t n=A_p->numRows;
77    dim_t n_block=A_p->row_block_size;    dim_t n_block=A_p->row_block_size;
# Line 116  Paso_Solver_AMG* Paso_Solver_getAMG(Paso Line 116  Paso_Solver_AMG* Paso_Solver_getAMG(Paso
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,coarsening_threshold);
120      /*Paso_Pattern_RS(A_p,mis_marker,couplingParam);*/      /*Paso_Pattern_RS(A_p,mis_marker,coarsening_threshold);*/
121       /*Paso_Pattern_Aggregiation(A_p,mis_marker,couplingParam);*/       /*Paso_Pattern_Aggregiation(A_p,mis_marker,coarsening_threshold);*/
122       if (Paso_noError()) {       if (Paso_noError()) {
123          #pragma omp parallel for private(i) schedule(static)          #pragma omp parallel for private(i) schedule(static)
124          for (i = 0; i < n; ++i) counter[i]=mis_marker[i];          for (i = 0; i < n; ++i) counter[i]=mis_marker[i];
# Line 213  Paso_Solver_AMG* Paso_Solver_getAMG(Paso Line 213  Paso_Solver_AMG* Paso_Solver_getAMG(Paso
213                                                                    
214                              if (Paso_noError()) {                              if (Paso_noError()) {
215                                  Paso_Solver_updateIncompleteSchurComplement(schur_withFillIn,out->A_CF,out->inv_A_FF,out->A_FF_pivot,out->A_FC);                                  Paso_Solver_updateIncompleteSchurComplement(schur_withFillIn,out->A_CF,out->inv_A_FF,out->A_FF_pivot,out->A_FC);
216                                  out->AMG_of_Schur=Paso_Solver_getAMG(schur_withFillIn,verbose,level-1,couplingParam);                                  out->AMG_of_Schur=Paso_Solver_getAMG(schur_withFillIn,verbose,level-1,coarsening_threshold);
217                                  Paso_SparseMatrix_free(schur);                                  Paso_SparseMatrix_free(schur);
218                              }                              }
219                              /* allocate work arrays for AMG application */                              /* allocate work arrays for AMG application */

Legend:
Removed from v.2442  
changed lines
  Added in v.2446

  ViewVC Help
Powered by ViewVC 1.1.26