|
| MatrixSimple (unsigned int loc_row_size, unsigned int col_size) |
| Construct a parallel system with given local size. More...
|
|
void | multiply (Vec x, Vec y) |
| multiply PETSC vector: y=Ax More...
|
|
void | multiply_add (Vec x, Vec b, Vec y) |
| multiply vector and ad onother one: y=Ax+b More...
|
|
void | multiply_mat (...) |
| multiply matrix .. has to deal with preallocation of result and reuse of structure More...
|
|
void | axpy (...) |
|
void | aypx (...) |
|
virtual void | start_allocation ()=0 |
|
void | start_add_assembly () |
|
void | start_insert_assembly () |
|
void | finalize (MatAssemblyType assembly_type=MAT_FINAL_ASSEMBLY) |
|
virtual void | preallocate_matrix ()=0 |
|
virtual void | preallocate_values (int nrow, int *rows, int ncol, int *cols)=0 |
|
virtual void | view_local_matrix ()=0 |
|
void | mat_set_values (int nrow, int *rows, int ncol, int *cols, PetscScalar *vals) |
| Set full rectangular submatrix of the system matrix. More...
|
|
void | mat_set_value (int row, int col, PetscScalar val) |
| Set one element of the system matrix. More...
|
|
void | set_symmetric (bool flag=true) |
|
bool | is_symmetric () |
|
void | set_positive_definite (bool flag=true) |
|
bool | is_positive_definite () |
|
void | view (std::ostream output_stream, int *row_mapping=NULL, int *col_mapping=NULL) |
| Output the matrix in the Matlab format possibly with given renumbering of rows/cols. More...
|
|
virtual | ~LinSys () |
|
|
Access to distribution of rows, thhrou that you can get also matix size and local size. But for convenience we provide also direct functions
|
Distribution & | get_row_ds () |
|
Distribution & | get_col_ds () |
|
unsigned int | size () |
| Get global system size. More...
|
|
const Mat & | get_matrix () |
| Get matrix. SHOULD NOT BE USED !!! More...
|
|
Classes for block linear systems. Namely it should provide following functionality: 1) interface to various PETSC (or possibly other) matrices, with preallocation through the set_values method 2) For coupling problems creation of the global linear system by connectiong sub systems of individual equations. Working cycle could be:
- creation of sub problems up to the global problem (just matrix dimensions and types)
- pre assembly - > preallocation
- assembly - by the same functions
- matrix modifications (schur complements, assembly of one global matrix, preconditioners ...
- iterative solution in parallel
- for nonlinear/time problems: jump to 3. and reuse the structures
3) Solution through explicit or implicit schur complements 4) Preconditioning for coupled problems . 5) In assembly, the access to the matrices in LinSys hierarchy is through successive call of block(i,j) method, but there also should be a class or another mechanism how to represent a coordinate in the hierarchy. Then one can access a MatriSimple directly by two coordinates and constantly access correct part of rhs vector
Virtual test cases:
- Only water flow solved by 1, 2, 3, or 4 (Newton BC) Schur complements, explict and implicit Ideal: switch between Implicit and explicit only changing the particular class or some thing similarly simple
- Unsolved design problems:
- PETSC neumoznuje blokove vektory, tj. vektory by mely byt globalni a z nich by se mely pouzivat podvektory mozne reseni: blokovy globalni vektor se hierarchicky vytvari (pouze velikosti) a pak slouzi jako "fabrika" na globalni vektory i subvektory a nebo pro pristup k subvektorum globalniho vektoru .. detaily Abstract class for frontend for PETSc matrices. purpose:
- allow preallocation through double assembly
- make interface to PETSC since PETSC evolve and it is simpler to make changes on one place
- make documented interface to PETSC and document used PETSC functionality this way
Questions:
- how to setup column distribution. It is necessary only for some of PETSC formats, isn't it?
Definition at line 62 of file la_linsys_new.hh.