~vcs-imports/escript-finley/trunk

« back to all changes in this revision

Viewing changes to paso/src/SystemMatrix_nullifyRowsAndCols.c

  • Committer: jfenwick
  • Date: 2010-10-11 01:48:14 UTC
  • Revision ID: svn-v4:77569008-7704-0410-b7a0-a92fef0b09fd:trunk:3259
Merging dudley and scons updates from branches

Show diffs side-by-side

added added

removed removed

Lines of Context:
37
37
void Paso_SystemMatrix_nullifyRowsAndCols(Paso_SystemMatrix* A, double* mask_row, double* mask_col, double main_diagonal_value) {
38
38
 
39
39
  double *remote_values=NULL;
40
 
  Paso_MPIInfo *mpi_info=A->mpi_info;
 
40
  Esys_MPIInfo *mpi_info=A->mpi_info;
41
41
  if (mpi_info->size>1) {
42
42
     if (A ->col_block_size==1 && A ->row_block_size ==1) {
43
43
       if (A->type & MATRIX_FORMAT_CSC) {
44
 
           Paso_setError(SYSTEM_ERROR,"Paso_SystemMatrix_nullifyRowsAndCols: CSC is not supported by MPI.");
 
44
           Esys_setError(SYSTEM_ERROR,"Paso_SystemMatrix_nullifyRowsAndCols: CSC is not supported by MPI.");
45
45
           return;
46
46
       } else if (A->type & MATRIX_FORMAT_TRILINOS_CRS) {
47
 
           Paso_setError(SYSTEM_ERROR,"Paso_SystemMatrix_nullifyRowsAndCols: TRILINOS is not supported with MPI.");
 
47
           Esys_setError(SYSTEM_ERROR,"Paso_SystemMatrix_nullifyRowsAndCols: TRILINOS is not supported with MPI.");
48
48
           return;
49
49
       } else {
50
 
         if (Paso_noError()) {
 
50
         if (Esys_noError()) {
51
51
            Paso_SystemMatrix_startColCollect(A,mask_col);
52
52
            Paso_SystemMatrix_startRowCollect(A,mask_row);
53
53
            Paso_SparseMatrix_nullifyRowsAndCols_CSR_BLK1(A->mainBlock,mask_row,mask_col,main_diagonal_value);
59
59
       }
60
60
     } else {
61
61
       if (A->type & MATRIX_FORMAT_CSC) {
62
 
           Paso_setError(SYSTEM_ERROR,"Paso_SystemMatrix_nullifyRowsAndCols: CSC is not supported by MPI.");
 
62
           Esys_setError(SYSTEM_ERROR,"Paso_SystemMatrix_nullifyRowsAndCols: CSC is not supported by MPI.");
63
63
           return;
64
64
       } else if (A->type & MATRIX_FORMAT_TRILINOS_CRS) {
65
 
           Paso_setError(SYSTEM_ERROR,"Paso_SystemMatrix_nullifyRowsAndCols: TRILINOS is not supported with MPI.");
 
65
           Esys_setError(SYSTEM_ERROR,"Paso_SystemMatrix_nullifyRowsAndCols: TRILINOS is not supported with MPI.");
66
66
           return;
67
67
       } else {
68
 
         if (Paso_noError()) {
 
68
         if (Esys_noError()) {
69
69
            Paso_SystemMatrix_startColCollect(A,mask_col) ;
70
70
            Paso_SystemMatrix_startRowCollect(A,mask_row) ;
71
71
            Paso_SparseMatrix_nullifyRowsAndCols_CSR(A->mainBlock,mask_row,mask_col,main_diagonal_value);
81
81
       if (A->type & MATRIX_FORMAT_CSC) {
82
82
           Paso_SparseMatrix_nullifyRowsAndCols_CSC_BLK1(A->mainBlock,mask_row,mask_col,main_diagonal_value);
83
83
       } else if (A->type & MATRIX_FORMAT_TRILINOS_CRS) {
84
 
           Paso_setError(SYSTEM_ERROR,"Paso_SystemMatrix_nullifyRowsAndCols: TRILINOS is not supported.");
 
84
           Esys_setError(SYSTEM_ERROR,"Paso_SystemMatrix_nullifyRowsAndCols: TRILINOS is not supported.");
85
85
       } else {
86
86
           Paso_SparseMatrix_nullifyRowsAndCols_CSR_BLK1(A->mainBlock,mask_row,mask_col,main_diagonal_value);
87
87
       }
89
89
       if (A->type & MATRIX_FORMAT_CSC) {
90
90
           Paso_SparseMatrix_nullifyRowsAndCols_CSC(A->mainBlock,mask_row,mask_col,main_diagonal_value);
91
91
       } else if (A->type & MATRIX_FORMAT_TRILINOS_CRS) {
92
 
           Paso_setError(SYSTEM_ERROR,"Paso_SystemMatrix_nullifyRowsAndCols: TRILINOS is not supported with MPI.");
 
92
           Esys_setError(SYSTEM_ERROR,"Paso_SystemMatrix_nullifyRowsAndCols: TRILINOS is not supported with MPI.");
93
93
       } else {
94
94
           Paso_SparseMatrix_nullifyRowsAndCols_CSR(A->mainBlock,mask_row,mask_col,main_diagonal_value);
95
95
       }