|
| SchurComplement (IS ia, Distribution *ds) |
|
| SchurComplement (SchurComplement &other) |
|
void | set_tolerances (double r_tol, double a_tol, unsigned int max_it) override |
|
void | set_from_input (const Input::Record in_rec) override |
|
LinSys * | get_system () const |
|
Distribution * | get_distribution () const |
|
| ~SchurComplement () |
|
void | form_rhs () |
|
void | set_complement (LinSys_PETSC *ls) |
| Set complement LinSys object. More...
|
|
Distribution * | make_complement_distribution () |
| get distribution of complement object if complement is defined More...
|
|
double | get_solution_precision () override |
| get precision of solving More...
|
|
LinSys::SolveInfo | solve () override |
|
void | resolve () |
|
double | compute_residual () override |
|
| LinSys_PETSC (const Distribution *rows_ds, const std::string ¶ms="") |
|
| LinSys_PETSC (LinSys_PETSC &other) |
|
const Distribution * | get_ds () |
|
const Mat * | get_matrix () override |
|
const Vec * | get_rhs () override |
|
PetscErrorCode | set_matrix (Mat &matrix, MatStructure str) override |
|
PetscErrorCode | set_rhs (Vec &rhs) override |
|
PetscErrorCode | mat_zero_entries () override |
|
PetscErrorCode | rhs_zero_entries () override |
|
void | start_allocation () override |
|
void | start_add_assembly () override |
|
void | start_insert_assembly () override |
|
void | mat_set_values (int nrow, int *rows, int ncol, int *cols, double *vals) override |
|
void | rhs_set_values (int nrow, int *rows, double *vals) override |
|
void | preallocate_values (int nrow, int *rows, int ncol, int *cols) |
|
void | preallocate_matrix () |
|
void | finish_assembly () override |
|
void | finish_assembly (MatAssemblyType assembly_type) |
|
void | apply_constrains (double scalar=1.) override |
|
void | set_initial_guess_nonzero (bool set_nonzero=true) |
|
double | get_absolute_accuracy () override |
|
void | view () override |
|
| ~LinSys_PETSC () |
|
| LinSys (const Distribution *rows_ds) |
|
| LinSys (LinSys &other) |
|
unsigned int | size () |
|
unsigned int | vec_lsize () |
|
void | set_matrix_changed () |
|
void | set_rhs_changed () |
|
bool | is_matrix_changed () |
|
bool | is_rhs_changed () |
|
const Vec & | get_solution () |
|
void | set_solution (double *sol_array) |
|
double * | get_solution_array () |
|
void | mat_set_value (int row, int col, double val) |
|
void | rhs_set_value (int row, double val) |
|
void | set_values (int nrow, int *rows, int ncol, int *cols, PetscScalar *mat_vals, PetscScalar *rhs_vals) |
| Set values in the system matrix and values in the right-hand side vector on corresponding rows. More...
|
|
void | set_local_system (LocalSystem &local) |
|
void | set_values (std::vector< int > &row_dofs, std::vector< int > &col_dofs, const arma::mat &matrix, const arma::vec &rhs, const arma::vec &row_solution, const arma::vec &col_solution) |
|
void | add_constraint (int row, double value) |
|
double | get_residual_norm () |
|
double | get_relative_accuracy () |
|
void | set_symmetric (bool flag=true) |
|
bool | is_symmetric () |
|
void | set_positive_definite (bool flag=true) |
|
void | set_negative_definite (bool flag=true) |
|
bool | is_positive_definite () |
|
bool | is_negative_definite () |
|
bool | is_new () |
|
bool | is_preallocated () |
|
void | set_spd_via_symmetric_general (bool flag=true) |
|
bool | is_spd_via_symmetric_general () |
|
virtual | ~LinSys () |
|
Definition at line 64 of file schur.hh.
SchurComplement::SchurComplement |
( |
IS |
ia, |
|
|
Distribution * |
ds |
|
) |
| |
Constructor
Gets linear system with original matrix A and creates its inversion (IA matrix)
In current implementation the index set IsA has to be continuous sequence at the beginning of the local block of indices.
Create Schur complement system.
- Parameters
-
[in] | orig | : original system |
[in] | inv_a | : inversion of the A block |
[in] | ia | : index set of the A block, default continuous given by inv_a: proc 1 2 3 |
Orig: ****** ****** **** IA : *** ** ***
Definition at line 61 of file schur.cc.
void SchurComplement::form_schur |
( |
| ) |
|
|
protected |
COMPUTE A SCHUR COMPLEMENT OF A PETSC MATRIX
given symmetric original matrix Orig has form A B x_1 RHS_1 B' C * x_2 = RHS_2 where the first block is given by index set IsA, and the second block by IsB user has to provide inverse IA of the A-block we suppose that original matrix have non-zero pattern for the schur complement
we return: Shur - schur complement, ShurRHS - RHS of the complemented system: (B' * IA * B - C) * x_2 = (B' * IA * RHS_1 - RHS_2) IAB - a matrix to compute eliminated part of the solution: x_1 = IA * RHS_1 - IAB * x_2
Actually as B' is stored separetly, the routine can be used also for nonsymetric original system
Definition at line 138 of file schur.cc.
void SchurComplement::set_tolerances |
( |
double |
r_tol, |
|
|
double |
a_tol, |
|
|
unsigned int |
max_it |
|
) |
| |
|
overridevirtual |
Set relative tolerance, absolute tolerance, and maximum number of iterations of the linear solver.
For each of these three parameters we first look for the value at user input if not set we use the value provided to this method and finally the default values are set by the call of this method in the constructor.
Reimplemented from LinSys_PETSC.
Definition at line 251 of file schur.cc.