/[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

revision 1388 by trankine, Fri Jan 11 07:45:58 2008 UTC revision 1552 by gross, Thu May 8 08:52:41 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           }           }
          Paso_SystemMatrix_freeBuffer(A);  
60         }         }
61       } else {       } else {
62         if (A->type & MATRIX_FORMAT_CSC) {         if (A->type & MATRIX_FORMAT_CSC) {
# Line 65  void Paso_SystemMatrix_nullifyRowsAndCol Line 66  void Paso_SystemMatrix_nullifyRowsAndCol
66             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.");
67             return;             return;
68         } else {         } else {
          Paso_SystemMatrix_allocBuffer(A);  
69           if (Paso_noError()) {           if (Paso_noError()) {
70              Paso_SystemMatrix_startCollect(A,mask_col) ;              Paso_SystemMatrix_startColCollect(A,mask_col) ;
71                Paso_SystemMatrix_startRowCollect(A,mask_row) ;
72              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);
73              remote_values=Paso_SystemMatrix_finishCollect(A);              remote_values=Paso_SystemMatrix_finishColCollect(A);
74              Paso_SparseMatrix_nullifyRowsAndCols_CSR(A->coupleBlock,mask_row,remote_values,0.);              Paso_SparseMatrix_nullifyRowsAndCols_CSR(A->col_coupleBlock,mask_row,remote_values,0.);
75                remote_values=Paso_SystemMatrix_finishRowCollect(A);
76                Paso_SparseMatrix_nullifyRowsAndCols_CSR(A->row_coupleBlock,remote_values,mask_col,0.);
77           }           }
          Paso_SystemMatrix_freeBuffer(A);  
78         }         }
79       }       }
80    } else {    } else {

Legend:
Removed from v.1388  
changed lines
  Added in v.1552

  ViewVC Help
Powered by ViewVC 1.1.26