/[escript]/branches/escript3047_with_pastix2995/paso/src/SystemMatrix_nullifyRowsAndCols.c
ViewVC logotype

Diff of /branches/escript3047_with_pastix2995/paso/src/SystemMatrix_nullifyRowsAndCols.c

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

revision 3048 by lgao, Fri Jun 25 03:46:37 2010 UTC revision 3049 by lgao, Fri Jun 25 04:20:29 2010 UTC
# Line 40  void Paso_SystemMatrix_nullifyRowsAndCol Line 40  void Paso_SystemMatrix_nullifyRowsAndCol
40    Paso_MPIInfo *mpi_info=A->mpi_info;    Paso_MPIInfo *mpi_info=A->mpi_info;
41    if (mpi_info->size>1) {    if (mpi_info->size>1) {
42       if (A ->col_block_size==1 && A ->row_block_size ==1) {       if (A ->col_block_size==1 && A ->row_block_size ==1) {
43         if (A->type & MATRIX_FORMAT_CSC) {  /*       if (A->type & MATRIX_FORMAT_CSC) {
44             Paso_setError(SYSTEM_ERROR,"Paso_SystemMatrix_nullifyRowsAndCols: CSC is not supported by MPI.");             Paso_setError(SYSTEM_ERROR,"Paso_SystemMatrix_nullifyRowsAndCols: CSC is not supported by MPI.");
45             return;             return;
46         } else if (A->type & MATRIX_FORMAT_TRILINOS_CRS) {         } else */ if (A->type & MATRIX_FORMAT_TRILINOS_CRS) {
47             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.");
48             return;             return;
49         } else {         } else {
50           if (Paso_noError()) {           if (Paso_noError()) {
51              Paso_SystemMatrix_startColCollect(A,mask_col);              Paso_SystemMatrix_startColCollect(A,mask_col);
52              Paso_SystemMatrix_startRowCollect(A,mask_row);              Paso_SystemMatrix_startRowCollect(A,mask_row);
53              Paso_SparseMatrix_nullifyRowsAndCols_CSR_BLK1(A->mainBlock,mask_row,mask_col,main_diagonal_value);              if (A->type & MATRIX_FORMAT_CSC) {
54                   Paso_SparseMatrix_nullifyRowsAndCols_CSC_BLK1(A->mainBlock,mask_row,mask_col,main_diagonal_value);
55                } else {
56                   Paso_SparseMatrix_nullifyRowsAndCols_CSR_BLK1(A->mainBlock,mask_row,mask_col,main_diagonal_value);
57                }
58              remote_values=Paso_SystemMatrix_finishColCollect(A);              remote_values=Paso_SystemMatrix_finishColCollect(A);
59              Paso_SparseMatrix_nullifyRowsAndCols_CSR_BLK1(A->col_coupleBlock,mask_row,remote_values,0.);              if (A->type & MATRIX_FORMAT_CSC) {
60                   Paso_SparseMatrix_nullifyRowsAndCols_CSC_BLK1(A->col_coupleBlock,mask_row,remote_values,0.);
61                } else {
62                   Paso_SparseMatrix_nullifyRowsAndCols_CSR_BLK1(A->col_coupleBlock,mask_row,remote_values,0.);
63                }
64              remote_values=Paso_SystemMatrix_finishRowCollect(A);              remote_values=Paso_SystemMatrix_finishRowCollect(A);
65              Paso_SparseMatrix_nullifyRowsAndCols_CSR_BLK1(A->row_coupleBlock,remote_values,mask_col,0.);              if (A->type & MATRIX_FORMAT_CSC) {
66                   Paso_SparseMatrix_nullifyRowsAndCols_CSC_BLK1(A->row_coupleBlock,remote_values,mask_col,0.);
67                } else {
68                   Paso_SparseMatrix_nullifyRowsAndCols_CSR_BLK1(A->row_coupleBlock,remote_values,mask_col,0.);
69                }
70           }           }
71         }         }
72       } else {       } else {
73         if (A->type & MATRIX_FORMAT_CSC) {  /*       if (A->type & MATRIX_FORMAT_CSC) {
74             Paso_setError(SYSTEM_ERROR,"Paso_SystemMatrix_nullifyRowsAndCols: CSC is not supported by MPI.");             Paso_setError(SYSTEM_ERROR,"Paso_SystemMatrix_nullifyRowsAndCols: CSC is not supported by MPI.");
75             return;             return;
76         } else if (A->type & MATRIX_FORMAT_TRILINOS_CRS) {         } else */ if (A->type & MATRIX_FORMAT_TRILINOS_CRS) {
77             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.");
78             return;             return;
79         } else {         } else {
80           if (Paso_noError()) {           if (Paso_noError()) {
81              Paso_SystemMatrix_startColCollect(A,mask_col) ;              Paso_SystemMatrix_startColCollect(A,mask_col) ;
82              Paso_SystemMatrix_startRowCollect(A,mask_row) ;              Paso_SystemMatrix_startRowCollect(A,mask_row) ;
83              Paso_SparseMatrix_nullifyRowsAndCols_CSR(A->mainBlock,mask_row,mask_col,main_diagonal_value);              if (A->type & MATRIX_FORMAT_CSC) {
84                   Paso_SparseMatrix_nullifyRowsAndCols_CSC(A->mainBlock,mask_row,mask_col,main_diagonal_value);
85                } else {
86                   Paso_SparseMatrix_nullifyRowsAndCols_CSR(A->mainBlock,mask_row,mask_col,main_diagonal_value);
87                }
88              remote_values=Paso_SystemMatrix_finishColCollect(A);              remote_values=Paso_SystemMatrix_finishColCollect(A);
89              Paso_SparseMatrix_nullifyRowsAndCols_CSR(A->col_coupleBlock,mask_row,remote_values,0.);              if (A->type & MATRIX_FORMAT_CSC) {
90                   Paso_SparseMatrix_nullifyRowsAndCols_CSC(A->col_coupleBlock,mask_row,remote_values,0.);
91                } else {
92                   Paso_SparseMatrix_nullifyRowsAndCols_CSR(A->col_coupleBlock,mask_row,remote_values,0.);
93                }
94              remote_values=Paso_SystemMatrix_finishRowCollect(A);              remote_values=Paso_SystemMatrix_finishRowCollect(A);
95              Paso_SparseMatrix_nullifyRowsAndCols_CSR(A->row_coupleBlock,remote_values,mask_col,0.);              if (A->type & MATRIX_FORMAT_CSC) {
96                   Paso_SparseMatrix_nullifyRowsAndCols_CSC(A->col_coupleBlock,remote_values,mask_col,0.);
97                } else {
98                   Paso_SparseMatrix_nullifyRowsAndCols_CSR(A->row_coupleBlock,remote_values,mask_col,0.);
99                }
100           }           }
101         }         }
102       }       }

Legend:
Removed from v.3048  
changed lines
  Added in v.3049

  ViewVC Help
Powered by ViewVC 1.1.26