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

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

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

temp_trunk_copy/paso/src/SystemMatrix_nullifyRowsAndCols.c revision 1384 by phornby, Fri Jan 11 02:29:38 2008 UTC trunk/paso/src/SystemMatrix_nullifyRowsAndCols.c revision 1562 by gross, Wed May 21 13:04:40 2008 UTC
# Line 18  Line 18 
18  /* Paso: SystemMatrix                                       */  /* Paso: SystemMatrix                                       */
19    
20  /*  nullify rows and columns in the matrix                    */  /*  nullify rows and columns in the matrix                    */
21    /*
22  /*  the rows and columns are marked by positive values in     */  /*  the rows and columns are marked by positive values in     */
23  /*  mask_row and mask_col. Values on the main diagonal        */  /*  mask_row and mask_col. Values on the main diagonal        */
24  /*  which are marked to set to zero by both mask_row and      */  /*  which are marked to set to zero by both mask_row and      */
# Line 48  void Paso_SystemMatrix_nullifyRowsAndCol Line 48  void Paso_SystemMatrix_nullifyRowsAndCol
48             Paso_setError(SYSTEM_ERROR,"Paso_SystemMatrix_nullifyRowsAndCols: TRILINOS is not supported with MPI.");             Paso_setError(SYSTEM_ERROR,"Paso_SystemMatrix_nullifyRowsAndCols: TRILINOS is not supported with MPI.");
49             return;             return;
50         } else {         } else {
          Paso_SystemMatrix_allocBuffer(A);  
51           if (Paso_noError()) {           if (Paso_noError()) {
52              Paso_SystemMatrix_startCollect(A,mask_col) ;              Paso_SystemMatrix_startColCollect(A,mask_col);
53                Paso_SystemMatrix_startRowCollect(A,mask_row);
54              Paso_SparseMatrix_nullifyRowsAndCols_CSR_BLK1(A->mainBlock,mask_row,mask_col,main_diagonal_value);              Paso_SparseMatrix_nullifyRowsAndCols_CSR_BLK1(A->mainBlock,mask_row,mask_col,main_diagonal_value);
55              remote_values=Paso_SystemMatrix_finishCollect(A);              remote_values=Paso_SystemMatrix_finishColCollect(A);
56              Paso_SparseMatrix_nullifyRowsAndCols_CSR_BLK1(A->coupleBlock,mask_row,remote_values,0.);              Paso_SparseMatrix_nullifyRowsAndCols_CSR_BLK1(A->col_coupleBlock,mask_row,remote_values,0.);
57                /* remote_values=Paso_SystemMatrix_finishRowCollect(A);
58                Paso_SparseMatrix_nullifyRowsAndCols_CSR_BLK1(A->row_coupleBlock,remote_values,mask_col,0.);
59                */
60           }           }
          Paso_SystemMatrix_freeBuffer(A);  
61         }         }
62       } else {       } else {
63         if (A->type & MATRIX_FORMAT_CSC) {         if (A->type & MATRIX_FORMAT_CSC) {
# Line 65  void Paso_SystemMatrix_nullifyRowsAndCol Line 67  void Paso_SystemMatrix_nullifyRowsAndCol
67             Paso_setError(SYSTEM_ERROR,"Paso_SystemMatrix_nullifyRowsAndCols: TRILINOS is not supported with MPI.");             Paso_setError(SYSTEM_ERROR,"Paso_SystemMatrix_nullifyRowsAndCols: TRILINOS is not supported with MPI.");
68             return;             return;
69         } else {         } else {
          Paso_SystemMatrix_allocBuffer(A);  
70           if (Paso_noError()) {           if (Paso_noError()) {
71              Paso_SystemMatrix_startCollect(A,mask_col) ;              Paso_SystemMatrix_startColCollect(A,mask_col) ;
72                Paso_SystemMatrix_startRowCollect(A,mask_row) ;
73              Paso_SparseMatrix_nullifyRowsAndCols_CSR(A->mainBlock,mask_row,mask_col,main_diagonal_value);              Paso_SparseMatrix_nullifyRowsAndCols_CSR(A->mainBlock,mask_row,mask_col,main_diagonal_value);
74              remote_values=Paso_SystemMatrix_finishCollect(A);              remote_values=Paso_SystemMatrix_finishColCollect(A);
75              Paso_SparseMatrix_nullifyRowsAndCols_CSR(A->coupleBlock,mask_row,remote_values,0.);              Paso_SparseMatrix_nullifyRowsAndCols_CSR(A->col_coupleBlock,mask_row,remote_values,0.);
76                /*
77                remote_values=Paso_SystemMatrix_finishRowCollect(A);
78                Paso_SparseMatrix_nullifyRowsAndCols_CSR(A->row_coupleBlock,remote_values,mask_col,0.);
79                */
80           }           }
          Paso_SystemMatrix_freeBuffer(A);  
81         }         }
82       }       }
83    } else {    } else {

Legend:
Removed from v.1384  
changed lines
  Added in v.1562

  ViewVC Help
Powered by ViewVC 1.1.26