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

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

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

revision 4261 by jfenwick, Wed Feb 27 06:09:33 2013 UTC revision 4291 by jfenwick, Thu Mar 7 08:57:58 2013 UTC
# Line 39  void Paso_SystemMatrix_fillWithGlobalCoo Line 39  void Paso_SystemMatrix_fillWithGlobalCoo
39     Paso_Coupler* col_coupler=NULL, *row_coupler=NULL;     Paso_Coupler* col_coupler=NULL, *row_coupler=NULL;
40     double *cols=NULL, *rows=NULL;     double *cols=NULL, *rows=NULL;
41        
42     cols=TMPMEMALLOC(m, double);     cols=new double[m];
43     rows=TMPMEMALLOC(n, double);     rows=new double[n];
44     col_coupler= Paso_Coupler_alloc(A->col_coupler->connector, 1);     col_coupler= Paso_Coupler_alloc(A->col_coupler->connector, 1);
45     row_coupler = Paso_Coupler_alloc(A->col_coupler->connector, 1);     row_coupler = Paso_Coupler_alloc(A->col_coupler->connector, 1);
46        
# Line 82  void Paso_SystemMatrix_fillWithGlobalCoo Line 82  void Paso_SystemMatrix_fillWithGlobalCoo
82        }              }      
83     }     }
84        
85     TMPMEMFREE(cols);     delete[] cols;
86     TMPMEMFREE(rows);     delete[] rows;
87     Paso_Coupler_free(row_coupler);     Paso_Coupler_free(row_coupler);
88     Paso_Coupler_free(col_coupler);     Paso_Coupler_free(col_coupler);
89     return;                 return;            
# Line 96  void Paso_SystemMatrix_print(Paso_System Line 96  void Paso_SystemMatrix_print(Paso_System
96     const dim_t block_size=A->block_size;     const dim_t block_size=A->block_size;
97     index_t rank=A->mpi_info->rank;     index_t rank=A->mpi_info->rank;
98     char *str1, *str2;     char *str1, *str2;
99     str1 = TMPMEMALLOC(n*n*block_size*30+100, char);     str1 = new char[n*n*block_size*30+100];
100     str2 = TMPMEMALLOC(30, char);     str2 = new char[30];
101        
102     sprintf(str1, "rank %d Main Block:\n-----------\n", rank);     sprintf(str1, "rank %d Main Block:\n-----------\n", rank);
103     for (q=0; q< n; ++q){     for (q=0; q< n; ++q){
# Line 158  void Paso_SystemMatrix_print(Paso_System Line 158  void Paso_SystemMatrix_print(Paso_System
158        }        }
159        fprintf(stderr, "%s", str1);        fprintf(stderr, "%s", str1);
160     }     }
161     TMPMEMFREE(str1);     delete[] str1;
162     TMPMEMFREE(str2);     delete[] str2;
163     return;     return;
164  }  }
165    

Legend:
Removed from v.4261  
changed lines
  Added in v.4291

  ViewVC Help
Powered by ViewVC 1.1.26