Flow123d
jenkins-Flow123d-windows32-release-multijob-51
|
#include <linsys_BDDC.hh>
Public Member Functions | |
LinSys_BDDC (const unsigned numDofsSub, const Distribution *rows_ds, const int matrixTypeInt=0, const int numSubLoc=1, const bool swap_sign=false) | |
void | load_mesh (const int nDim, const int numNodes, const int numDofs, const std::vector< int > &inet, const std::vector< int > &nnet, const std::vector< int > &nndf, const std::vector< int > &isegn, const std::vector< int > &isngn, const std::vector< int > &isvgvn, const std::vector< double > &xyz, const std::vector< double > &element_permeability, const int meshDim) |
void | mat_set_values (int nrow, int *rows, int ncol, int *cols, double *vals) |
void | rhs_set_values (int nrow, int *rows, double *vals) |
void | diagonal_weights_set_value (int global_index, double value) |
PetscErrorCode | mat_zero_entries () override |
PetscErrorCode | rhs_zero_entries () override |
void | finish_assembly () |
void | apply_constrains (double scalar=1.) |
int | solve () |
void | set_from_input (const Input::Record in_rec) |
double | get_solution_precision () |
~LinSys_BDDC () | |
Public Member Functions inherited from LinSys | |
LinSys (const Distribution *rows_ds) | |
LinSys (LinSys &other) | |
unsigned int | size () |
unsigned int | vec_lsize () |
virtual const Mat * | get_matrix () |
virtual const Vec * | get_rhs () |
void | set_matrix_changed () |
void | set_rhs_changed () |
bool | is_matrix_changed () |
bool | is_rhs_changed () |
virtual PetscErrorCode | set_matrix (Mat &matrix, MatStructure str) |
virtual PetscErrorCode | set_rhs (Vec &rhs) |
const Vec & | get_solution () |
void | set_solution (double *sol_array) |
double * | get_solution_array () |
virtual void | start_allocation () |
virtual void | start_add_assembly () |
virtual void | start_insert_assembly () |
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_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 () |
virtual double | get_absolute_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 void | view () |
virtual | ~LinSys () |
Static Public Attributes | |
static Input::Type::Record | input_type |
Static Public Attributes inherited from LinSys | |
static Input::Type::AbstractRecord | input_type |
Private Types | |
typedef la::BddcmlWrapper | Bddcml_ |
Private Attributes | |
int | max_nondecr_it_ |
parameters expected from input file: More... | |
int | number_of_levels_ |
number of levels in the multilevel method More... | |
bool | use_adaptive_bddc_ |
should adaptive BDDC be used? More... | |
int | bddcml_verbosity_level_ |
const bool | swap_sign_ |
swap sign of matrix and rhs entries, e.g. to make the matrix SPD More... | |
std::vector< int > | isngn_ |
indices of subdomain nodes in global numbering More... | |
std::vector< double > | locSolution_ |
subdomain solution More... | |
Vec | locSolVec_ |
local solution PETSc vector - sequential More... | |
VecScatter | VSpetscToSubScatter_ |
scatter from solution_ to locSolVec_ More... | |
Bddcml_ * | bddcml_ |
BDDCML wrapper. More... | |
Additional Inherited Members | |
Public Types inherited from LinSys | |
enum | SetValuesMode { INSERT =INSERT_VALUES, ADD =ADD_VALUES, ALLOCATE, DONE, NONE } |
Protected Types inherited from LinSys | |
typedef std::pair< unsigned, double > | Constraint_ |
typedef std::vector< Constraint_ > | ConstraintVec_ |
Protected Attributes inherited from LinSys | |
double | r_tol_ |
double | a_tol_ |
int | max_it_ |
MPI_Comm | comm_ |
SetValuesMode | status_ |
Set value status of the linear system. More... | |
const unsigned | lsize_ |
local number of matrix rows (non-overlapping division of rows) More... | |
unsigned | size_ |
global number of matrix rows, i.e. problem size More... | |
const Distribution * | rows_ds_ |
final distribution of rows of MH matrix More... | |
bool | symmetric_ |
bool | positive_definite_ |
bool | negative_definite_ |
bool | spd_via_symmetric_general_ |
bool | matrix_changed_ |
true if the matrix was changed since the last solve More... | |
bool | rhs_changed_ |
true if the right hand side was changed since the last solve More... | |
Vec | solution_ |
PETSc vector constructed with vb array. More... | |
double * | v_solution_ |
local solution array pointing into Vec solution_ More... | |
bool | own_solution_ |
Indicates if the solution array has been allocated by this class. More... | |
double | residual_norm_ |
local solution array pointing into Vec solution_ More... | |
ConstraintVec_ | constraints_ |
std::vector< double > | globalSolution_ |
global solution in numbering for linear system More... | |
Input::Record | in_rec_ |
Definition at line 47 of file linsys_BDDC.hh.
|
private |
Definition at line 114 of file linsys_BDDC.hh.
LinSys_BDDC::LinSys_BDDC | ( | const unsigned | numDofsSub, |
const Distribution * | rows_ds, | ||
const int | matrixTypeInt = 0 , |
||
const int | numSubLoc = 1 , |
||
const bool | swap_sign = false |
||
) |
Definition at line 61 of file linsys_BDDC.cc.
LinSys_BDDC::~LinSys_BDDC | ( | ) |
Definition at line 293 of file linsys_BDDC.cc.
|
virtual |
Apply constrains to assembled matrix. Constrains are given by pairs: global row index, value. i.e. typedef pair<unsigned int, double> Constrain;
What is th meaning of ( const double factor ) form Cambridge code?
Implements LinSys.
Definition at line 239 of file linsys_BDDC.cc.
void LinSys_BDDC::diagonal_weights_set_value | ( | int | global_index, |
double | value | ||
) |
Definition at line 209 of file linsys_BDDC.cc.
|
virtual |
Finish assembly of the whole system. For PETSC this should call MatEndAssembly with MAT_FINAL_ASSEMBLY
Implements LinSys.
Definition at line 232 of file linsys_BDDC.cc.
|
virtual |
void LinSys_BDDC::load_mesh | ( | const int | nDim, |
const int | numNodes, | ||
const int | numDofs, | ||
const std::vector< int > & | inet, | ||
const std::vector< int > & | nnet, | ||
const std::vector< int > & | nndf, | ||
const std::vector< int > & | isegn, | ||
const std::vector< int > & | isngn, | ||
const std::vector< int > & | isvgvn, | ||
const std::vector< double > & | xyz, | ||
const std::vector< double > & | element_permeability, | ||
const int | meshDim | ||
) |
Definition at line 112 of file linsys_BDDC.cc.
|
virtual |
Assembly full rectangular submatrix into the system matrix. Should be virtual, implemented differently in particular solvers.
Implements LinSys.
Definition at line 163 of file linsys_BDDC.cc.
|
overridevirtual |
Clears entries of the matrix
Reimplemented from LinSys.
Definition at line 216 of file linsys_BDDC.cc.
|
virtual |
Set values of the system right-hand side. Should be virtual, implemented differently in particular solvers.
Implements LinSys.
Definition at line 188 of file linsys_BDDC.cc.
|
overridevirtual |
Clears entries of the right-hand side
Reimplemented from LinSys.
Definition at line 224 of file linsys_BDDC.cc.
|
virtual |
Sets basic parameters of LinSys defined by user in input file and used to calculate
Reimplemented from LinSys.
Definition at line 280 of file linsys_BDDC.cc.
|
virtual |
Solve the system and return convergence reason.
Implements LinSys.
Definition at line 246 of file linsys_BDDC.cc.
|
private |
BDDCML wrapper.
Definition at line 115 of file linsys_BDDC.hh.
|
private |
level of verbosity of BDDCML library ( 0 - only fatal errors reported, 1 - mild output, 2 - detailed output )//!< should adaptive BDDC be used?
Definition at line 102 of file linsys_BDDC.hh.
|
static |
Definition at line 51 of file linsys_BDDC.hh.
|
private |
indices of subdomain nodes in global numbering
Definition at line 109 of file linsys_BDDC.hh.
|
private |
subdomain solution
Definition at line 110 of file linsys_BDDC.hh.
|
private |
local solution PETSc vector - sequential
Definition at line 111 of file linsys_BDDC.hh.
|
private |
parameters expected from input file:
maximum number of iterations of linear solver with non-decreasing residual
Definition at line 99 of file linsys_BDDC.hh.
|
private |
number of levels in the multilevel method
Definition at line 100 of file linsys_BDDC.hh.
|
private |
swap sign of matrix and rhs entries, e.g. to make the matrix SPD
Definition at line 107 of file linsys_BDDC.hh.
|
private |
should adaptive BDDC be used?
Definition at line 101 of file linsys_BDDC.hh.
|
private |
scatter from solution_ to locSolVec_
Definition at line 112 of file linsys_BDDC.hh.