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

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

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

revision 3435 by gross, Tue Dec 7 08:13:51 2010 UTC revision 3436 by plaub, Mon Jan 10 02:06:07 2011 UTC
# Line 98  Paso_Preconditioner_LocalAMG* Paso_Preco Line 98  Paso_Preconditioner_LocalAMG* Paso_Preco
98    double time0=0;    double time0=0;
99    const double theta = options->coarsening_threshold;    const double theta = options->coarsening_threshold;
100    const double tau = options->diagonal_dominance_threshold;    const double tau = options->diagonal_dominance_threshold;
101      
102        
103    /*    /*
104        is the input matrix A suitable for coarsening        is the input matrix A suitable for coarsening
105                
106    */    */
107    if ( (A_p->pattern->len >= options->min_coarse_sparsity * n * n ) || (n <= options->min_coarse_matrix_size) || (level > options->level_max) ) {    if ( (A_p->pattern->len >= options->min_coarse_sparsity * n * n ) || (n <= options->min_coarse_matrix_size) || (level > options->level_max) ) {
108       if (verbose) printf("Paso_Preconditioner: AMG level %d (limit = %d) stopped. sparsity = %e (limit = %e), unknowns = %d (limit = %d)\n",  
109      level,  options->level_max, A_p->pattern->len/(1.*n * n), options->min_coarse_sparsity, n, options->min_coarse_matrix_size  );        if (verbose) {
110              /*
111                  print stopping condition:
112                          - 'SPAR' = min_coarse_matrix_sparsity exceeded
113                          - 'SIZE' = min_coarse_matrix_size exceeded
114                          - 'LEVEL' = level_max exceeded
115              */
116              printf("Paso_Preconditioner: Stopping condition: ");
117    
118              if (A_p->pattern->len >= options->min_coarse_sparsity * n * n)
119                  printf("SPAR ");
120    
121              if (n <= options->min_coarse_matrix_size)
122                  printf("SIZE ");
123    
124              if (level > options->level_max)
125                  printf("LEVEL ");
126    
127              printf("\n");
128    
129            printf("Paso_Preconditioner: AMG level %d (limit = %d) stopped. sparsity = %e (limit = %e), unknowns = %d (limit = %d)\n",
130                        level,  options->level_max, A_p->pattern->len/(1.*n * n), options->min_coarse_sparsity, n, options->min_coarse_matrix_size);  
131    
132        }
133    
134       return NULL;       return NULL;
135    }    }
136       /* Start Coarsening : */       /* Start Coarsening : */

Legend:
Removed from v.3435  
changed lines
  Added in v.3436

  ViewVC Help
Powered by ViewVC 1.1.26