PLaSK library
|
#include <plask/common/fem/iterative_matrix.hpp>
Public Member Functions | |
template<typename SolverT > | |
SparseBandMatrix (SolverT *solver, size_t rank, size_t major) | |
Create 2D matrix. | |
template<typename SolverT > | |
SparseBandMatrix (SolverT *solver, size_t rank, size_t major, size_t minor) | |
Create 3D matrix. | |
template<typename SolverT > | |
SparseBandMatrix (SolverT *solver, size_t rank, std::initializer_list< int > bands) | |
Create band matrix. | |
double & | operator() (size_t r, size_t c) override |
Return reference to array element. | |
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 | clear () |
Clear the matrix. | |
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 |
Protected Member Functions | |
NspcgFunc | get_preconditioner () override |
Protected Member Functions inherited from plask::SparseMatrix | |
virtual int | get_maxnz () const |
Additional Inherited Members | |
Public Types inherited from plask::SparseMatrix | |
typedef void(* | NspcgFunc) (...) |
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 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 346 of file iterative_matrix.hpp.
|
inline |
Create 2D matrix.
solver | solver |
rank | rank of the matrix |
major | shift of nodes to the next row (mesh[x,y+1]) |
Definition at line 354 of file iterative_matrix.hpp.
|
inline |
Create 3D matrix.
solver | solver |
rank | rank of the matrix |
major | shift of nodes to the next major row (mesh[x,y,z+1]) |
minor | shift of nodes to the next minor row (mesh[x,y+1,z]) |
Definition at line 372 of file iterative_matrix.hpp.
|
inline |
Create band matrix.
solver | solver |
rank | rank of the matrix |
bands | list of non-zero bands (shift from diagonal) |
Definition at line 398 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 419 of file iterative_matrix.hpp.
|
inlineoverrideprotectedvirtual |
Implements plask::SparseMatrix.
Definition at line 435 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 411 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 460 of file iterative_matrix.hpp.