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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 155 - (hide annotations)
Wed Nov 9 02:02:19 2005 UTC (13 years, 10 months ago) by jgs
File MIME type: text/plain
File size: 3231 byte(s)
move all directories from trunk/esys2 into trunk and remove esys2

1 jgs 150 /* $Id$ */
2    
3     /**************************************************************/
4    
5     /* Paso: SystemMatrix and SystemVector */
6    
7     /**************************************************************/
8    
9     /* Copyrights by ACcESS Australia 2003,2004,2005 */
10     /* Author: gross@access.edu.au */
11    
12     /**************************************************************/
13    
14     #ifndef INC_PASO_SYSTEM
15     #define INC_PASO_SYSTEM
16    
17     #include "Common.h"
18     #include "SystemMatrixPattern.h"
19     #include "Options.h"
20    
21     /**************************************************************/
22    
23     /* this struct holds a stiffness matrix: */
24    
25     /* matrix type */
26     #define CSC 0
27     #define CSR 1
28     /* these formats are used in the SCSL context */
29     #define CSC_SYM 2
30     #define CSR_SYM 3
31     #define CSC_BLK1 4
32     #define CSR_BLK1 5
33     #define CSC_BLK1_SYM 6
34     #define CSR_BLK1_SYM 7
35    
36     typedef int Paso_SystemMatrixType;
37    
38     typedef struct Paso_SystemMatrix {
39     Paso_SystemMatrixType type;
40     dim_t reference_counter;
41    
42     dim_t logical_row_block_size;
43     dim_t logical_col_block_size;
44     dim_t logical_block_size;
45    
46     dim_t row_block_size;
47     dim_t col_block_size;
48     dim_t block_size;
49    
50     dim_t num_rows;
51     dim_t num_cols;
52    
53     Paso_SystemMatrixPattern* pattern;
54    
55     dim_t len;
56     double *val;
57    
58     double *normalizer; /* vector with a inverse of the absolute row/col sum (set by Solver.c)*/
59     bool_t normalizer_is_valid;
60     void* direct; /* pointer to data needed by the direct solver */
61     void* iterative; /* pointer to data needed by the iterative solver */
62    
63     } Paso_SystemMatrix;
64    
65     /* interfaces: */
66    
67     Paso_SystemMatrix* Paso_SystemMatrix_alloc(Paso_SystemMatrixType,Paso_SystemMatrixPattern*,dim_t,dim_t);
68     Paso_SystemMatrix* Paso_SystemMatrix_reference(Paso_SystemMatrix*);
69     void Paso_SystemMatrix_dealloc(Paso_SystemMatrix*);
70    
71     void Paso_SystemMatrix_setValues(Paso_SystemMatrix*,double);
72     void Paso_SystemMatrix_copy(Paso_SystemMatrix*,double*);
73     void Paso_SystemMatrix_add(Paso_SystemMatrix*,dim_t,index_t*, dim_t,dim_t,index_t*,dim_t, double*);
74     void Paso_SystemMatrix_MatrixVector(double alpha, Paso_SystemMatrix* A, double* in, double beta, double* out);
75    
76     void Paso_SystemMatrix_saveMM(Paso_SystemMatrix *, char *);
77     void Paso_SystemMatrix_saveHB(Paso_SystemMatrix *, char *);
78     Paso_SystemMatrix* Paso_SystemMatrix_loadMM_toCSR(char *);
79     void Paso_SystemMatrix_nullifyRowsAndCols(Paso_SystemMatrix* A, double* mask_row, double* mask_col, double main_diagonal_value);
80     void Paso_SystemMatrix_setDefaults(Paso_Options*);
81     int Paso_SystemMatrix_getSystemMatrixTypeId(index_t solver, index_t package, bool_t symmetry);
82     Paso_SystemMatrix* Paso_SystemMatrix_getSubmatrix(Paso_SystemMatrix* A,dim_t,index_t*,index_t*);
83     double* Paso_SystemMatrix_borrowNormalization(Paso_SystemMatrix* A);
84    
85     #endif /* #ifndef INC_PASO_SYSTEM */
86    
87     /*
88     * $Log$
89     * Revision 1.2 2005/09/15 03:44:38 jgs
90     * Merge of development branch dev-02 back to main trunk on 2005-09-15
91     *
92     * Revision 1.1.2.2 2005/09/07 00:59:08 gross
93     * some inconsistent renaming fixed to make the linking work.
94     *
95     * Revision 1.1.2.1 2005/09/05 06:29:47 gross
96     * These files have been extracted from finley to define a stand alone libray for iterative
97     * linear solvers on the ALTIX. main entry through Paso_solve. this version compiles but
98     * has not been tested yet.
99     *
100     *
101     */

Properties

Name Value
svn:eol-style native
svn:keywords Author Date Id Revision

  ViewVC Help
Powered by ViewVC 1.1.26