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

Diff of /branches/escript3047_with_pastix2995/paso/src/SystemMatrix_MatrixVector.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 41  void  Paso_SystemMatrix_MatrixVector(con Line 41  void  Paso_SystemMatrix_MatrixVector(con
41    Paso_MPIInfo *mpi_info=A->mpi_info;    Paso_MPIInfo *mpi_info=A->mpi_info;
42    
43    if (A->type & MATRIX_FORMAT_CSC) {    if (A->type & MATRIX_FORMAT_CSC) {
44       if ( mpi_info->size>1) {       if (A->type & MATRIX_FORMAT_OFFSET1) {
45             Paso_SystemMatrix_MatrixVector_CSC_OFFSET1(alpha,A,in,beta,out);
46         } else {
47             if (mpi_info->size>1) {
48                 Paso_setError(SYSTEM_ERROR,"Paso_SystemMatrix_MatrixVector: CSC with index 0 is not supported by MPI.");
49                 return;
50             } else {
51                 Paso_SparseMatrix_MatrixVector_CSC_OFFSET0(alpha,A->mainBlock,in,beta,out);
52             }
53    /*     if ( mpi_info->size>1) {
54             Paso_setError(SYSTEM_ERROR,"Paso_SystemMatrix_MatrixVector: CSC is not supported by MPI.");             Paso_setError(SYSTEM_ERROR,"Paso_SystemMatrix_MatrixVector: CSC is not supported by MPI.");
55             return;             return;
56       } else {       } else {
# Line 49  void  Paso_SystemMatrix_MatrixVector(con Line 58  void  Paso_SystemMatrix_MatrixVector(con
58           Paso_SparseMatrix_MatrixVector_CSC_OFFSET1(alpha,A->mainBlock,in,beta,out);           Paso_SparseMatrix_MatrixVector_CSC_OFFSET1(alpha,A->mainBlock,in,beta,out);
59         } else {         } else {
60           Paso_SparseMatrix_MatrixVector_CSC_OFFSET0(alpha,A->mainBlock,in,beta,out);           Paso_SparseMatrix_MatrixVector_CSC_OFFSET0(alpha,A->mainBlock,in,beta,out);
61         }         } */
62       }       }
63    } else if (A->type & MATRIX_FORMAT_TRILINOS_CRS) {    } else if (A->type & MATRIX_FORMAT_TRILINOS_CRS) {
64             Paso_setError(SYSTEM_ERROR,"Paso_SystemMatrix_MatrixVector: TRILINOS is not supported with MPI.");             Paso_setError(SYSTEM_ERROR,"Paso_SystemMatrix_MatrixVector: TRILINOS is not supported with MPI.");
# Line 89  void  Paso_SystemMatrix_MatrixVector_CSR Line 98  void  Paso_SystemMatrix_MatrixVector_CSR
98    }    }
99        
100  }  }
101    
102    void  Paso_SystemMatrix_MatrixVector_CSC_OFFSET1(double alpha,
103                                                     Paso_SystemMatrix* A,
104                                                     const double* in,
105                                                     const double beta,
106                                                     double* out)
107    {
108      double *remote_values=NULL;
109      /* start exchange */
110      Paso_SystemMatrix_startRowCollect(A,in);
111      /* process main block */
112      Paso_SparseMatrix_MatrixVector_CSC_OFFSET1(alpha,A->mainBlock,in,beta,out);
113      /* finish exchange */
114      remote_values=Paso_SystemMatrix_finishRowCollect(A);
115      /* process couple block */
116      if (A->row_coupleBlock->pattern->ptr!=NULL) {
117          Paso_SparseMatrix_MatrixVector_CSC_OFFSET1(alpha,A->row_coupleBlock,remote_values,1.,out);
118      }
119    
120    }
121    

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

  ViewVC Help
Powered by ViewVC 1.1.26