PLaSK library
|
#include <plask/common/fem/iterative_matrix.hpp>
Public Member Functions | |
template<typename SolverT > | |
SparseFreeMatrix (SolverT *solver, size_t rank, size_t maxnz) | |
Create sparse matrix. | |
double & | operator() (size_t r, size_t c) override |
Return reference to array element. | |
void | clear () override |
Clear the matrix. | |
void | addmult (const DataVector< const double > &vector, DataVector< double > &result) override |
Multiply matrix by vector adding the result. | |
void | setBC (DataVector< double > &B, size_t r, double val) override |
Set Dirichlet boundary condition. | |
Public Member Functions inherited from plask::SparseMatrix | |
template<typename SolverT > | |
SparseMatrix (SolverT *solver, size_t rank, size_t size, size_t isiz) | |
template<typename SolverT > | |
SparseMatrix (SolverT *solver, size_t rank, size_t size) | |
~SparseMatrix () | |
void | solverhs (DataVector< double > &B, DataVector< double > &X) override |
Solve for the right-hand-side of a system of linear equations. | |
void | mult (const DataVector< const double > &vector, DataVector< double > &result) override |
Multiply matrix by vector. | |
Public Member Functions inherited from plask::FemMatrix | |
FemMatrix (const Solver *solver, size_t rank, size_t size) | |
FemMatrix (const FemMatrix &)=delete | |
virtual | ~FemMatrix () |
virtual void | factorize () |
Factorize the matrix in advance to speed up the solution. | |
void | solve (DataVector< double > &B, DataVector< double > &X) |
Solve the set of linear equations. | |
void | solve (DataVector< double > &B) |
Solve the set of linear equations. | |
template<typename BoundaryConditonsT > | |
void | applyBC (const BoundaryConditonsT &bconds, DataVector< double > &B) |
Apply Dirichlet boundary conditions. | |
virtual std::string | describe () const |
Public Attributes | |
int | inz |
Number of non-zero elements. | |
int *const | ir |
int *const | ic |
Public Attributes inherited from plask::FemMatrix | |
const size_t | rank |
Order of the matrix, i.e. number of columns or rows. | |
const size_t | size |
Number of stored elements in the matrix. | |
double * | data |
Pointer to data. | |
const Solver * | solver |
Solver owning the matrix. | |
Protected Member Functions | |
NspcgFunc | get_preconditioner () override |
int | get_maxnz () const override |
Additional Inherited Members | |
Public Types inherited from plask::SparseMatrix | |
typedef void(* | NspcgFunc) (...) |
Protected Attributes inherited from plask::SparseMatrix | |
int * | icords |
Vector of non-zero band numbers (shift from diagonal) or non-zero elements. | |
IterativeMatrixParams * | params |
const int | nstore |
const int | ndim |
const int | mdim |
int | ifact = 1 |
int | nw = 0 |
int | inw = 0 |
double * | wksp = nullptr |
int * | iwksp = nullptr |
int | kblsz = -1 |
int | nbl2d = -1 |
Definition at line 486 of file iterative_matrix.hpp.
|
inline |
Create sparse matrix.
solver | solver |
rank | rank of the matrix |
maxnz | maximum number of non-zero elements |
Definition at line 498 of file iterative_matrix.hpp.
|
inlineoverridevirtual |
Multiply matrix by vector adding the result.
vector | vector to multiply |
result | multiplication result |
Implements plask::FemMatrix.
Definition at line 527 of file iterative_matrix.hpp.
|
inlineoverridevirtual |
Clear the matrix.
Reimplemented from plask::FemMatrix.
Definition at line 522 of file iterative_matrix.hpp.
|
inlineoverrideprotectedvirtual |
Reimplemented from plask::SparseMatrix.
Definition at line 550 of file iterative_matrix.hpp.
|
inlineoverrideprotectedvirtual |
Implements plask::SparseMatrix.
Definition at line 539 of file iterative_matrix.hpp.
|
inlineoverridevirtual |
Return reference to array element.
r | index of the element row |
c | index of the element column |
Implements plask::FemMatrix.
Definition at line 513 of file iterative_matrix.hpp.
|
inlineoverridevirtual |
Set Dirichlet boundary condition.
B | right hand side of the equation |
r | index of the row |
val | value of the boundary condition |
Implements plask::FemMatrix.
Definition at line 553 of file iterative_matrix.hpp.
Definition at line 489 of file iterative_matrix.hpp.
int plask::SparseFreeMatrix::inz |
Number of non-zero elements.
Definition at line 487 of file iterative_matrix.hpp.
Definition at line 488 of file iterative_matrix.hpp.