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

Diff of /trunk/paso/src/AMG_Restriction.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 43  Line 43 
43  Paso_SystemMatrix* Paso_Preconditioner_AMG_getRestriction(Paso_SystemMatrix* P)  Paso_SystemMatrix* Paso_Preconditioner_AMG_getRestriction(Paso_SystemMatrix* P)
44  {  {
45     Esys_MPIInfo *mpi_info=Esys_MPIInfo_getReference(P->mpi_info);     Esys_MPIInfo *mpi_info=Esys_MPIInfo_getReference(P->mpi_info);
    paso::SparseMatrix *main_block=NULL, *couple_block=NULL;  
46     Paso_SystemMatrix *out=NULL;     Paso_SystemMatrix *out=NULL;
47     paso::SystemMatrixPattern_ptr pattern;     paso::SystemMatrixPattern_ptr pattern;
48     paso::Distribution_ptr input_dist, output_dist;     paso::Distribution_ptr input_dist, output_dist;
# Line 71  Paso_SystemMatrix* Paso_Preconditioner_A Line 70  Paso_SystemMatrix* Paso_Preconditioner_A
70     #endif     #endif
71    
72     /* get main_block of R from the transpose of P->mainBlock */     /* get main_block of R from the transpose of P->mainBlock */
73     main_block = paso::SparseMatrix_getTranspose(P->mainBlock);     paso::SparseMatrix_ptr main_block(P->mainBlock->getTranspose());
74    
75     /* prepare "ptr" for the col_coupleBlock of R, start with get info about     /* prepare "ptr" for the col_coupleBlock of R, start with get info about
76        the degree_set (associated with "ptr"), offset_set (associated with        the degree_set (associated with "ptr"), offset_set (associated with
77        "idx" and data_set (associated with "val") to be sent to other ranks */        "idx" and data_set (associated with "val") to be sent to other ranks */
78     couple_block = P->col_coupleBlock;     paso::SparseMatrix_ptr couple_block(P->col_coupleBlock);
79     num_Pcouple_cols = couple_block->numCols;     num_Pcouple_cols = couple_block->numCols;
80     block_size = P->block_size;     block_size = P->block_size;
81     copy_block_size = block_size * sizeof(double);     copy_block_size = block_size * sizeof(double);
# Line 382  Paso_SystemMatrix* Paso_Preconditioner_A Line 381  Paso_SystemMatrix* Paso_Preconditioner_A
381          out->col_coupleBlock->len * sizeof(double));          out->col_coupleBlock->len * sizeof(double));
382     delete[] val;     delete[] val;
383    
    /* clean up */  
    paso::SparseMatrix_free(main_block);  
   
384     if (Esys_noError()) {     if (Esys_noError()) {
385        return out;        return out;
386     } else {     } else {

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

  ViewVC Help
Powered by ViewVC 1.1.26