/[escript]/trunk/paso/src/AMG_Prolongation.cpp
ViewVC logotype

Diff of /trunk/paso/src/AMG_Prolongation.cpp

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

revision 4828 by caltinay, Tue Apr 1 03:50:23 2014 UTC revision 4829 by caltinay, Thu Apr 3 04:02:53 2014 UTC
# Line 368  void Paso_Preconditioner_AMG_setDirectPr Line 368  void Paso_Preconditioner_AMG_setDirectPr
368      Paso_SystemMatrix* A, const index_t* offset_S, const dim_t* degree_S,      Paso_SystemMatrix* A, const index_t* offset_S, const dim_t* degree_S,
369          const index_t* S, const index_t *counter_C)          const index_t* S, const index_t *counter_C)
370  {  {
371      paso::SparseMatrix *main_block=P->mainBlock;      paso::SparseMatrix_ptr main_block(P->mainBlock);
372      paso::SparseMatrix *couple_block=P->col_coupleBlock;      paso::SparseMatrix_ptr couple_block(P->col_coupleBlock);
373      paso::Pattern_ptr main_pattern(main_block->pattern);      paso::Pattern_ptr main_pattern(main_block->pattern);
374      paso::Pattern_ptr couple_pattern(couple_block->pattern);      paso::Pattern_ptr couple_pattern(couple_block->pattern);
375     const dim_t my_n=A->mainBlock->numRows;     const dim_t my_n=A->mainBlock->numRows;
# Line 505  void Paso_Preconditioner_AMG_setDirectPr Line 505  void Paso_Preconditioner_AMG_setDirectPr
505          Paso_SystemMatrix* A, const index_t* offset_S, const dim_t* degree_S,          Paso_SystemMatrix* A, const index_t* offset_S, const dim_t* degree_S,
506          const index_t* S, const index_t *counter_C)          const index_t* S, const index_t *counter_C)
507  {  {
508      paso::SparseMatrix *main_block=P->mainBlock;      paso::SparseMatrix_ptr main_block(P->mainBlock);
509      paso::SparseMatrix *couple_block=P->col_coupleBlock;      paso::SparseMatrix_ptr couple_block(P->col_coupleBlock);
510      paso::Pattern_ptr main_pattern(main_block->pattern);      paso::Pattern_ptr main_pattern(main_block->pattern);
511      paso::Pattern_ptr couple_pattern(couple_block->pattern);      paso::Pattern_ptr couple_pattern(couple_block->pattern);
512     const dim_t row_block_size=A->row_block_size;     const dim_t row_block_size=A->row_block_size;
# Line 698  void Paso_Preconditioner_AMG_setDirectPr Line 698  void Paso_Preconditioner_AMG_setDirectPr
698  */  */
699  void Paso_Preconditioner_AMG_setClassicProlongation(Paso_SystemMatrix* P,  void Paso_Preconditioner_AMG_setClassicProlongation(Paso_SystemMatrix* P,
700      Paso_SystemMatrix* A, const index_t* offset_S, const dim_t* degree_S,      Paso_SystemMatrix* A, const index_t* offset_S, const dim_t* degree_S,
701      const index_t* S, const index_t *counter_C) {      const index_t* S, const index_t *counter_C)
702      paso::SparseMatrix *main_block=P->mainBlock;  {
703      paso::SparseMatrix *couple_block=P->col_coupleBlock;      paso::SparseMatrix_ptr main_block(P->mainBlock);
704        paso::SparseMatrix_ptr couple_block(P->col_coupleBlock);
705      paso::Pattern_ptr main_pattern(main_block->pattern);      paso::Pattern_ptr main_pattern(main_block->pattern);
706      paso::Pattern_ptr couple_pattern(couple_block->pattern);      paso::Pattern_ptr couple_pattern(couple_block->pattern);
707     const dim_t my_n=A->mainBlock->numRows;     const dim_t my_n=A->mainBlock->numRows;
# Line 709  void Paso_Preconditioner_AMG_setClassicP Line 710  void Paso_Preconditioner_AMG_setClassicP
710     dim_t i, q;     dim_t i, q;
711     double *D_s=NULL;     double *D_s=NULL;
712     index_t *D_s_offset=NULL, iPtr, iPtr_j;     index_t *D_s_offset=NULL, iPtr, iPtr_j;
713     const index_t *ptr_main_A = paso::SparseMatrix_borrowMainDiagonalPointer(A->mainBlock);     const index_t *ptr_main_A = A->mainBlock->borrowMainDiagonalPointer();
714     index_t *start_p_main_i, *start_p_couple_i;     index_t *start_p_main_i, *start_p_couple_i;
715     dim_t degree_p_main_i, degree_p_couple_i;     dim_t degree_p_main_i, degree_p_couple_i;
716     dim_t len, ll, main_len, len_D_s;     dim_t len, ll, main_len, len_D_s;
# Line 929  void Paso_Preconditioner_AMG_setClassicP Line 930  void Paso_Preconditioner_AMG_setClassicP
930      Paso_SystemMatrix* P, Paso_SystemMatrix* A, const index_t* offset_S,      Paso_SystemMatrix* P, Paso_SystemMatrix* A, const index_t* offset_S,
931      const dim_t* degree_S, const index_t* S, const index_t *counter_C)      const dim_t* degree_S, const index_t* S, const index_t *counter_C)
932  {  {
933      paso::SparseMatrix *main_block=P->mainBlock;      paso::SparseMatrix_ptr main_block(P->mainBlock);
934      paso::SparseMatrix *couple_block=P->col_coupleBlock;      paso::SparseMatrix_ptr couple_block(P->col_coupleBlock);
935      paso::Pattern_ptr main_pattern(main_block->pattern);      paso::Pattern_ptr main_pattern(main_block->pattern);
936      paso::Pattern_ptr couple_pattern(couple_block->pattern);      paso::Pattern_ptr couple_pattern(couple_block->pattern);
937     const dim_t row_block=A->row_block_size;     const dim_t row_block=A->row_block_size;
# Line 944  void Paso_Preconditioner_AMG_setClassicP Line 945  void Paso_Preconditioner_AMG_setClassicP
945     index_t *start_p_main_i, *start_p_couple_i;     index_t *start_p_main_i, *start_p_couple_i;
946     dim_t degree_p_main_i, degree_p_couple_i;     dim_t degree_p_main_i, degree_p_couple_i;
947     dim_t len, ll, main_len, len_D_s;     dim_t len, ll, main_len, len_D_s;
948     const index_t *ptr_main_A = paso::SparseMatrix_borrowMainDiagonalPointer(A->mainBlock);     const index_t *ptr_main_A = A->mainBlock->borrowMainDiagonalPointer();
949        
950     len = A->col_coupleBlock->numCols;     len = A->col_coupleBlock->numCols;
951     len = MAX(A->remote_coupleBlock->numCols, len);     len = MAX(A->remote_coupleBlock->numCols, len);

Legend:
Removed from v.4828  
changed lines
  Added in v.4829

  ViewVC Help
Powered by ViewVC 1.1.26