/[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 3449 by gross, Fri Jan 21 05:48:15 2011 UTC revision 3450 by gross, Fri Jan 21 06:39:56 2011 UTC
# Line 88  Paso_Preconditioner_AMG* Paso_Preconditi Line 88  Paso_Preconditioner_AMG* Paso_Preconditi
88    
89    Paso_Preconditioner_AMG* out=NULL;    Paso_Preconditioner_AMG* out=NULL;
90    bool_t verbose=options->verbose;    bool_t verbose=options->verbose;
   Paso_SystemMatrix *Atemp=NULL, *A_C=NULL;  
91    
92    const dim_t my_n=Paso_SystemMatrix_getNumRows(A_p);    const dim_t my_n=Paso_SystemMatrix_getNumRows(A_p);
93    const dim_t overlap_n=Paso_SystemMatrix_getColOverlap(A_p);    const dim_t overlap_n=Paso_SystemMatrix_getColOverlap(A_p);
94    const dim_t n = my_n + overlap_n;    const dim_t n = my_n + overlap_n;
95    
96    const dim_t n_block=A_p->row_block_size;    const dim_t n_block=A_p->row_block_size;
97    index_t* F_marker=NULL, *counter=NULL, *mask_C=NULL, *rows_in_F=NULL;    index_t* F_marker=NULL, *counter=NULL, *mask_C=NULL;
98    dim_t n_F=0, n_C=0, i;    dim_t i;
99    double time0=0;    double time0=0;
100    const double theta = options->coarsening_threshold;    const double theta = options->coarsening_threshold;
101    const double tau = options->diagonal_dominance_threshold;    const double tau = options->diagonal_dominance_threshold;
# Line 441  void Paso_Preconditioner_AMG_setStrongCo Line 440  void Paso_Preconditioner_AMG_setStrongCo
440       }       }
441       #pragma ivdep       #pragma ivdep
442       for (iptr=A->col_coupleBlock->pattern->ptr[i];iptr<A->col_coupleBlock->pattern->ptr[i+1]; ++iptr) {       for (iptr=A->col_coupleBlock->pattern->ptr[i];iptr<A->col_coupleBlock->pattern->ptr[i+1]; ++iptr) {
         register index_t j=A->col_coupleBlock->pattern->index[iptr];  
443          register double fnorm=ABS(A->col_coupleBlock->val[iptr]);          register double fnorm=ABS(A->col_coupleBlock->val[iptr]);
444          max_offdiagonal = MAX(max_offdiagonal,fnorm);          max_offdiagonal = MAX(max_offdiagonal,fnorm);
445          sum_row+=fnorm;          sum_row+=fnorm;
# Line 527  void Paso_Preconditioner_AMG_setStrongCo Line 525  void Paso_Preconditioner_AMG_setStrongCo
525          }          }
526              rtmp_offset=A->mainBlock->pattern->ptr[i+1]-A->mainBlock->pattern->ptr[i]-A->col_coupleBlock->pattern->ptr[i];              rtmp_offset=A->mainBlock->pattern->ptr[i+1]-A->mainBlock->pattern->ptr[i]-A->col_coupleBlock->pattern->ptr[i];
527          for (iptr=A->col_coupleBlock->pattern->ptr[i];iptr<A->col_coupleBlock->pattern->ptr[i+1]; ++iptr) {          for (iptr=A->col_coupleBlock->pattern->ptr[i];iptr<A->col_coupleBlock->pattern->ptr[i+1]; ++iptr) {
            register index_t j=A->col_coupleBlock->pattern->index[iptr];  
528             register double fnorm=0;             register double fnorm=0;
529             #pragma ivdep             #pragma ivdep
530             for(bi=0;bi<n_block*n_block;++bi) {             for(bi=0;bi<n_block*n_block;++bi) {

Legend:
Removed from v.3449  
changed lines
  Added in v.3450

  ViewVC Help
Powered by ViewVC 1.1.26