/[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 3258 by jfenwick, Thu Jan 28 02:03:15 2010 UTC revision 3259 by jfenwick, Mon Oct 11 01:48:14 2010 UTC
# Line 37  Line 37 
37  void Paso_SystemMatrix_nullifyRowsAndCols(Paso_SystemMatrix* A, double* mask_row, double* mask_col, double main_diagonal_value) {  void Paso_SystemMatrix_nullifyRowsAndCols(Paso_SystemMatrix* A, double* mask_row, double* mask_col, double main_diagonal_value) {
38    
39    double *remote_values=NULL;    double *remote_values=NULL;
40    Paso_MPIInfo *mpi_info=A->mpi_info;    Esys_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.");             Esys_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.");             Esys_setError(SYSTEM_ERROR,"Paso_SystemMatrix_nullifyRowsAndCols: TRILINOS is not supported with MPI.");
48             return;             return;
49         } else {         } else {
50           if (Paso_noError()) {           if (Esys_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);              Paso_SparseMatrix_nullifyRowsAndCols_CSR_BLK1(A->mainBlock,mask_row,mask_col,main_diagonal_value);
# Line 59  void Paso_SystemMatrix_nullifyRowsAndCol Line 59  void Paso_SystemMatrix_nullifyRowsAndCol
59         }         }
60       } else {       } else {
61         if (A->type & MATRIX_FORMAT_CSC) {         if (A->type & MATRIX_FORMAT_CSC) {
62             Paso_setError(SYSTEM_ERROR,"Paso_SystemMatrix_nullifyRowsAndCols: CSC is not supported by MPI.");             Esys_setError(SYSTEM_ERROR,"Paso_SystemMatrix_nullifyRowsAndCols: CSC is not supported by MPI.");
63             return;             return;
64         } else if (A->type & MATRIX_FORMAT_TRILINOS_CRS) {         } else if (A->type & MATRIX_FORMAT_TRILINOS_CRS) {
65             Paso_setError(SYSTEM_ERROR,"Paso_SystemMatrix_nullifyRowsAndCols: TRILINOS is not supported with MPI.");             Esys_setError(SYSTEM_ERROR,"Paso_SystemMatrix_nullifyRowsAndCols: TRILINOS is not supported with MPI.");
66             return;             return;
67         } else {         } else {
68           if (Paso_noError()) {           if (Esys_noError()) {
69              Paso_SystemMatrix_startColCollect(A,mask_col) ;              Paso_SystemMatrix_startColCollect(A,mask_col) ;
70              Paso_SystemMatrix_startRowCollect(A,mask_row) ;              Paso_SystemMatrix_startRowCollect(A,mask_row) ;
71              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);
# Line 81  void Paso_SystemMatrix_nullifyRowsAndCol Line 81  void Paso_SystemMatrix_nullifyRowsAndCol
81         if (A->type & MATRIX_FORMAT_CSC) {         if (A->type & MATRIX_FORMAT_CSC) {
82             Paso_SparseMatrix_nullifyRowsAndCols_CSC_BLK1(A->mainBlock,mask_row,mask_col,main_diagonal_value);             Paso_SparseMatrix_nullifyRowsAndCols_CSC_BLK1(A->mainBlock,mask_row,mask_col,main_diagonal_value);
83         } else if (A->type & MATRIX_FORMAT_TRILINOS_CRS) {         } else if (A->type & MATRIX_FORMAT_TRILINOS_CRS) {
84             Paso_setError(SYSTEM_ERROR,"Paso_SystemMatrix_nullifyRowsAndCols: TRILINOS is not supported.");             Esys_setError(SYSTEM_ERROR,"Paso_SystemMatrix_nullifyRowsAndCols: TRILINOS is not supported.");
85         } else {         } else {
86             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);
87         }         }
# Line 89  void Paso_SystemMatrix_nullifyRowsAndCol Line 89  void Paso_SystemMatrix_nullifyRowsAndCol
89         if (A->type & MATRIX_FORMAT_CSC) {         if (A->type & MATRIX_FORMAT_CSC) {
90             Paso_SparseMatrix_nullifyRowsAndCols_CSC(A->mainBlock,mask_row,mask_col,main_diagonal_value);             Paso_SparseMatrix_nullifyRowsAndCols_CSC(A->mainBlock,mask_row,mask_col,main_diagonal_value);
91         } else if (A->type & MATRIX_FORMAT_TRILINOS_CRS) {         } else if (A->type & MATRIX_FORMAT_TRILINOS_CRS) {
92             Paso_setError(SYSTEM_ERROR,"Paso_SystemMatrix_nullifyRowsAndCols: TRILINOS is not supported with MPI.");             Esys_setError(SYSTEM_ERROR,"Paso_SystemMatrix_nullifyRowsAndCols: TRILINOS is not supported with MPI.");
93         } else {         } else {
94             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);
95         }         }

Legend:
Removed from v.3258  
changed lines
  Added in v.3259

  ViewVC Help
Powered by ViewVC 1.1.26