/[escript]/trunk/paso/src/SystemMatrix.h
ViewVC logotype

Diff of /trunk/paso/src/SystemMatrix.h

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

revision 3593 by lgao, Fri May 13 04:15:29 2011 UTC revision 3594 by caltinay, Thu Sep 15 00:45:04 2011 UTC
# Line 86  typedef struct Paso_SystemMatrix { Line 86  typedef struct Paso_SystemMatrix {
86    
87  /*  interfaces: */  /*  interfaces: */
88    
89    PASO_DLL_API
90  Paso_SystemMatrix* Paso_SystemMatrix_alloc(Paso_SystemMatrixType,Paso_SystemMatrixPattern*,dim_t,dim_t, const bool_t patternIsUnrolled);  Paso_SystemMatrix* Paso_SystemMatrix_alloc(Paso_SystemMatrixType,Paso_SystemMatrixPattern*,dim_t,dim_t, const bool_t patternIsUnrolled);
91    
92    PASO_DLL_API
93  Paso_SystemMatrix* Paso_SystemMatrix_getReference(Paso_SystemMatrix*);  Paso_SystemMatrix* Paso_SystemMatrix_getReference(Paso_SystemMatrix*);
94    
95    PASO_DLL_API
96  void Paso_SystemMatrix_free(Paso_SystemMatrix*);  void Paso_SystemMatrix_free(Paso_SystemMatrix*);
97    
98    
99    PASO_DLL_API
100  void Paso_SystemMatrix_MatrixVector(const double alpha, Paso_SystemMatrix* A, const double* in, const double beta, double* out);  void Paso_SystemMatrix_MatrixVector(const double alpha, Paso_SystemMatrix* A, const double* in, const double beta, double* out);
101    
102    PASO_DLL_API
103  void Paso_SystemMatrix_MatrixVector_CSR_OFFSET0(double alpha, Paso_SystemMatrix* A, const double* in, const double beta, double* out);  void Paso_SystemMatrix_MatrixVector_CSR_OFFSET0(double alpha, Paso_SystemMatrix* A, const double* in, const double beta, double* out);
104    
105    PASO_DLL_API
106  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);
107    
108    PASO_DLL_API
109  void Paso_SystemMatrix_applyBalanceInPlace(const Paso_SystemMatrix* A, double* x, const bool_t RHS);  void Paso_SystemMatrix_applyBalanceInPlace(const Paso_SystemMatrix* A, double* x, const bool_t RHS);
110    
111    PASO_DLL_API
112  void Paso_SystemMatrix_applyBalance(const Paso_SystemMatrix* A, double* x_out, const double* x, const bool_t RHS);  void Paso_SystemMatrix_applyBalance(const Paso_SystemMatrix* A, double* x_out, const double* x, const bool_t RHS);
113    
114    PASO_DLL_API
115  void Paso_SystemMatrix_balance(Paso_SystemMatrix* A);  void Paso_SystemMatrix_balance(Paso_SystemMatrix* A);
116    
117    
118    PASO_DLL_API
119  void Paso_solve(Paso_SystemMatrix* A, double* out, double* in, Paso_Options* options);  void Paso_solve(Paso_SystemMatrix* A, double* out, double* in, Paso_Options* options);
120    
121    PASO_DLL_API
122  void Paso_solve_free(Paso_SystemMatrix* in);  void Paso_solve_free(Paso_SystemMatrix* in);
123    
124    PASO_DLL_API
125  void  Paso_SystemMatrix_startCollect(Paso_SystemMatrix* A,const double* in);  void  Paso_SystemMatrix_startCollect(Paso_SystemMatrix* A,const double* in);
126    
127    PASO_DLL_API
128  double* Paso_SystemMatrix_finishCollect(Paso_SystemMatrix* A);  double* Paso_SystemMatrix_finishCollect(Paso_SystemMatrix* A);
129    
130    PASO_DLL_API
131  void  Paso_SystemMatrix_startColCollect(Paso_SystemMatrix* A,const double* in);  void  Paso_SystemMatrix_startColCollect(Paso_SystemMatrix* A,const double* in);
132    
133    PASO_DLL_API
134  double* Paso_SystemMatrix_finishColCollect(Paso_SystemMatrix* A);  double* Paso_SystemMatrix_finishColCollect(Paso_SystemMatrix* A);
135    
136    PASO_DLL_API
137  void  Paso_SystemMatrix_startRowCollect(Paso_SystemMatrix* A,const double* in);  void  Paso_SystemMatrix_startRowCollect(Paso_SystemMatrix* A,const double* in);
138    
139    PASO_DLL_API
140  double* Paso_SystemMatrix_finishRowCollect(Paso_SystemMatrix* A);  double* Paso_SystemMatrix_finishRowCollect(Paso_SystemMatrix* A);
141    
142    PASO_DLL_API
143  dim_t Paso_SystemMatrix_getTotalNumRows(const Paso_SystemMatrix* A);  dim_t Paso_SystemMatrix_getTotalNumRows(const Paso_SystemMatrix* A);
144    
145    PASO_DLL_API
146  dim_t Paso_SystemMatrix_getTotalNumCols(const Paso_SystemMatrix*);  dim_t Paso_SystemMatrix_getTotalNumCols(const Paso_SystemMatrix*);
147    
148    PASO_DLL_API
149  dim_t Paso_SystemMatrix_getGlobalNumRows(const Paso_SystemMatrix*);  dim_t Paso_SystemMatrix_getGlobalNumRows(const Paso_SystemMatrix*);
150    
151    PASO_DLL_API
152  dim_t Paso_SystemMatrix_getGlobalNumCols(const Paso_SystemMatrix*);  dim_t Paso_SystemMatrix_getGlobalNumCols(const Paso_SystemMatrix*);
153    
154    PASO_DLL_API
155  dim_t Paso_SystemMatrix_getGlobalTotalNumRows(const Paso_SystemMatrix* A);  dim_t Paso_SystemMatrix_getGlobalTotalNumRows(const Paso_SystemMatrix* A);
156    
157    PASO_DLL_API
158  dim_t Paso_SystemMatrix_getGlobalTotalNumCols(const Paso_SystemMatrix* A);  dim_t Paso_SystemMatrix_getGlobalTotalNumCols(const Paso_SystemMatrix* A);
159    
160    PASO_DLL_API
161  double Paso_SystemMatrix_getGlobalSize(const Paso_SystemMatrix*A);  double Paso_SystemMatrix_getGlobalSize(const Paso_SystemMatrix*A);
162    
163    PASO_DLL_API
164  double Paso_SystemMatrix_getSparsity(const Paso_SystemMatrix*A);  double Paso_SystemMatrix_getSparsity(const Paso_SystemMatrix*A);
165    
166    PASO_DLL_API
167  dim_t Paso_SystemMatrix_getNumRows(const Paso_SystemMatrix* A);  dim_t Paso_SystemMatrix_getNumRows(const Paso_SystemMatrix* A);
168    
169    PASO_DLL_API
170  dim_t Paso_SystemMatrix_getNumCols(const Paso_SystemMatrix* A);  dim_t Paso_SystemMatrix_getNumCols(const Paso_SystemMatrix* A);
171    
172    PASO_DLL_API
173  dim_t Paso_SystemMatrix_getRowOverlap(const Paso_SystemMatrix* A);  dim_t Paso_SystemMatrix_getRowOverlap(const Paso_SystemMatrix* A);
174    
175    PASO_DLL_API
176  dim_t Paso_SystemMatrix_getColOverlap(const Paso_SystemMatrix* A);  dim_t Paso_SystemMatrix_getColOverlap(const Paso_SystemMatrix* A);
177    
178    
179    
180    
181    PASO_DLL_API
182  void Paso_SystemMatrix_saveMM(Paso_SystemMatrix *, char *);  void Paso_SystemMatrix_saveMM(Paso_SystemMatrix *, char *);
183    
184    PASO_DLL_API
185  void Paso_SystemMatrix_saveHB(Paso_SystemMatrix *, char *);  void Paso_SystemMatrix_saveHB(Paso_SystemMatrix *, char *);
186    
187    PASO_DLL_API
188  Paso_SystemMatrix* Paso_SystemMatrix_loadMM_toCSR(char *);  Paso_SystemMatrix* Paso_SystemMatrix_loadMM_toCSR(char *);
189    
190    PASO_DLL_API
191  Paso_SystemMatrix* Paso_SystemMatrix_loadMM_toCSC(char *);  Paso_SystemMatrix* Paso_SystemMatrix_loadMM_toCSC(char *);
192    
193    PASO_DLL_API
194  void Paso_RHS_loadMM_toCSR( char *fileName_p, double *b, dim_t size);  void Paso_RHS_loadMM_toCSR( char *fileName_p, double *b, dim_t size);
195    
196    
197    PASO_DLL_API
198  int Paso_SystemMatrix_getSystemMatrixTypeId(const index_t solver,const index_t preconditioner, const  index_t package,const  bool_t symmetry, Esys_MPIInfo *mpi_info);  int Paso_SystemMatrix_getSystemMatrixTypeId(const index_t solver,const index_t preconditioner, const  index_t package,const  bool_t symmetry, Esys_MPIInfo *mpi_info);
199    
200    PASO_DLL_API
201  dim_t Paso_SystemMatrix_getNumOutput(Paso_SystemMatrix* A);  dim_t Paso_SystemMatrix_getNumOutput(Paso_SystemMatrix* A);
202    
203    
204    PASO_DLL_API
205  void Paso_SystemMatrix_setValues(Paso_SystemMatrix*,double);  void Paso_SystemMatrix_setValues(Paso_SystemMatrix*,double);
206    
207    PASO_DLL_API
208  void Paso_SystemMatrix_add(Paso_SystemMatrix*,dim_t,index_t*, dim_t,dim_t,index_t*,dim_t, double*);  void Paso_SystemMatrix_add(Paso_SystemMatrix*,dim_t,index_t*, dim_t,dim_t,index_t*,dim_t, double*);
209    
210    PASO_DLL_API
211  void Paso_SystemMatrix_rowSum(Paso_SystemMatrix* A, double* row_sum);  void Paso_SystemMatrix_rowSum(Paso_SystemMatrix* A, double* row_sum);
212    
213    PASO_DLL_API
214  void Paso_SystemMatrix_nullifyRows(Paso_SystemMatrix* A, double* mask_row, double main_diagonal_value);  void Paso_SystemMatrix_nullifyRows(Paso_SystemMatrix* A, double* mask_row, double main_diagonal_value);
215    
216    
217    PASO_DLL_API
218  void Paso_SystemMatrix_makeZeroRowSums(Paso_SystemMatrix * A_p, double* left_over);  void Paso_SystemMatrix_makeZeroRowSums(Paso_SystemMatrix * A_p, double* left_over);
219    
220    
221    PASO_DLL_API
222  void Paso_SystemMatrix_copyBlockFromMainDiagonal(Paso_SystemMatrix * A_p, double* out);  void Paso_SystemMatrix_copyBlockFromMainDiagonal(Paso_SystemMatrix * A_p, double* out);
223    
224    PASO_DLL_API
225  void Paso_SystemMatrix_copyBlockToMainDiagonal(Paso_SystemMatrix * A_p, const double* in);  void Paso_SystemMatrix_copyBlockToMainDiagonal(Paso_SystemMatrix * A_p, const double* in);
226    
227    PASO_DLL_API
228  void Paso_SystemMatrix_copyFromMainDiagonal(Paso_SystemMatrix * A_p, double* out);  void Paso_SystemMatrix_copyFromMainDiagonal(Paso_SystemMatrix * A_p, double* out);
229    
230    PASO_DLL_API
231  void Paso_SystemMatrix_copyToMainDiagonal(Paso_SystemMatrix * A_p, const double* in);  void Paso_SystemMatrix_copyToMainDiagonal(Paso_SystemMatrix * A_p, const double* in);
232    
233    
234    PASO_DLL_API
235  void Paso_SystemMatrix_solvePreconditioner(Paso_SystemMatrix* A,double* x,double* b);  void Paso_SystemMatrix_solvePreconditioner(Paso_SystemMatrix* A,double* x,double* b);
236    
237    PASO_DLL_API
238  void Paso_SystemMatrix_setPreconditioner(Paso_SystemMatrix* A,Paso_Options* options);  void Paso_SystemMatrix_setPreconditioner(Paso_SystemMatrix* A,Paso_Options* options);
239    
240    PASO_DLL_API
241  void Paso_SystemMatrix_freePreconditioner(Paso_SystemMatrix* A);  void Paso_SystemMatrix_freePreconditioner(Paso_SystemMatrix* A);
242    
243    PASO_DLL_API
244  void Paso_SystemMatrix_copyColCoupleBlock(Paso_SystemMatrix *A);  void Paso_SystemMatrix_copyColCoupleBlock(Paso_SystemMatrix *A);
245    
246    PASO_DLL_API
247  void Paso_SystemMatrix_copyRemoteCoupleBlock(Paso_SystemMatrix *A, const bool_t recreatePattern);  void Paso_SystemMatrix_copyRemoteCoupleBlock(Paso_SystemMatrix *A, const bool_t recreatePattern);
248    
249    PASO_DLL_API
250  void Paso_SystemMatrix_fillWithGlobalCoordinates(Paso_SystemMatrix *A, const double f1);  void Paso_SystemMatrix_fillWithGlobalCoordinates(Paso_SystemMatrix *A, const double f1);
251    
252    PASO_DLL_API
253  void Paso_SystemMatrix_print(Paso_SystemMatrix *A);  void Paso_SystemMatrix_print(Paso_SystemMatrix *A);
254    
255    
256    PASO_DLL_API
257  void Paso_SystemMatrix_mergeMainAndCouple(Paso_SystemMatrix *A, index_t **p_ptr, index_t **p_idx, double **p_val);  void Paso_SystemMatrix_mergeMainAndCouple(Paso_SystemMatrix *A, index_t **p_ptr, index_t **p_idx, double **p_val);
258    
259    PASO_DLL_API
260  void Paso_SystemMatrix_mergeMainAndCouple_CSR_OFFSET0(Paso_SystemMatrix* A, index_t** p_ptr, index_t** p_idx, double** p_val);  void Paso_SystemMatrix_mergeMainAndCouple_CSR_OFFSET0(Paso_SystemMatrix* A, index_t** p_ptr, index_t** p_idx, double** p_val);
261    
262    PASO_DLL_API
263  void Paso_SystemMatrix_mergeMainAndCouple_CSC_OFFSET1(Paso_SystemMatrix *A, index_t **p_ptr, index_t **p_idx, double **p_val);  void Paso_SystemMatrix_mergeMainAndCouple_CSC_OFFSET1(Paso_SystemMatrix *A, index_t **p_ptr, index_t **p_idx, double **p_val);
264    
265    PASO_DLL_API
266  void Paso_SystemMatrix_copyMain_CSC_OFFSET1(Paso_SystemMatrix* A, index_t** p_ptr, index_t** p_idx, double** p_val);  void Paso_SystemMatrix_copyMain_CSC_OFFSET1(Paso_SystemMatrix* A, index_t** p_ptr, index_t** p_idx, double** p_val);
267    
268        

Legend:
Removed from v.3593  
changed lines
  Added in v.3594

  ViewVC Help
Powered by ViewVC 1.1.26