/[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 2121 by artak, Mon Dec 1 06:27:14 2008 UTC revision 2122 by artak, Wed Dec 3 02:52:28 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                  }                  }
                 /* This check is to make sure we dont get some nusty rows which were not removed durring coarsing process.*/  
                 /* TODO: we have to mechanism that this does not happend at all, and get rid of this 'If'. */  
                 if (ABS(S)>1.e-10)  
151                     out->inv_A_FF[i]=1./S;                     out->inv_A_FF[i]=1./S;
                 else  
                    out->inv_A_FF[i]=1.;  
152                }                }
153    
154             if( Paso_noError()) {             if( Paso_noError()) {
155                /* if there are no nodes in the coarse level there is no more work to do */                /* if there are no nodes in the coarse level there is no more work to do */
156                out->n_C=n-out->n_F;                out->n_C=n-out->n_F;
157                if (level<3) {                if (level<5) {
158                 /*if (out->n_F>500) {*/                 /*if (out->n_F>500) {*/
159                     out->rows_in_C=MEMALLOC(out->n_C,index_t);                     out->rows_in_C=MEMALLOC(out->n_C,index_t);
160                     out->mask_C=MEMALLOC(n,index_t);                     out->mask_C=MEMALLOC(n,index_t);
# Line 254  Paso_Solver_AMG* Paso_Solver_getAMG(Paso Line 249  Paso_Solver_AMG* Paso_Solver_getAMG(Paso
249    if (Paso_noError()) {    if (Paso_noError()) {
250        if (verbose) {        if (verbose) {
251           printf("AMG: %d unknowns eliminated. %d left.\n",out->n_F,n-out->n_F);           printf("AMG: %d unknowns eliminated. %d left.\n",out->n_F,n-out->n_F);
252           if (level<3) {           if (level<5) {
253           /*if (out->n_F<500) {*/           /*if (out->n_F<500) {*/
254              printf("timing: AMG: MIS/reordering/elemination : %e/%e/%e\n",time2,time0,time1);              printf("timing: AMG: MIS/reordering/elemination : %e/%e/%e\n",time2,time0,time1);
255           } else {           } else {
# Line 299  void Paso_Solver_solveAMG(Paso_Solver_AM Line 294  void Paso_Solver_solveAMG(Paso_Solver_AM
294       double *x0=MEMALLOC(amg->n,double);       double *x0=MEMALLOC(amg->n,double);
295       double time0=0;       double time0=0;
296            
297       if (amg->level==3) {       if (amg->level==5) {
298       /*if (amg->n_F<=500) {*/       /*if (amg->n_F<=500) {*/
299        time0=Paso_timer();        time0=Paso_timer();
300                    

Legend:
Removed from v.2121  
changed lines
  Added in v.2122

  ViewVC Help
Powered by ViewVC 1.1.26