PLaSK library
Loading...
Searching...
No Matches
plask::DpbMatrix Struct Reference

Symmetric band matrix structure. More...

#include <plask/common/fem/cholesky_matrix.hpp>

Inheritance diagram for plask::DpbMatrix:
[legend]
Collaboration diagram for plask::DpbMatrix:
[legend]

Public Member Functions

 DpbMatrix (const Solver *solver, size_t rank, size_t band)
 Create matrix.
 
size_t index (size_t r, size_t c)
 
doubleoperator() (size_t r, size_t c) override
 Return reference to array element.
 
void factorize () override
 Factorize the matrix in advance to speed up the solution.
 
void solverhs (DataVector< double > &B, DataVector< double > &X) override
 
void mult (const DataVector< const double > &vector, DataVector< double > &result) override
 
void addmult (const DataVector< const double > &vector, DataVector< double > &result) override
 
- Public Member Functions inherited from plask::BandMatrix< T >
 BandMatrix (const Solver *solver, size_t rank, size_t kd, size_t ld)
 
void setBC (DataVector< T > &B, size_t r, T val) override
 Set Dirichlet boundary condition.
 
std::string describe () const override
 
- Public Member Functions inherited from plask::FemMatrix< T >
 FemMatrix (const Solver *solver, size_t rank, size_t size)
 
 FemMatrix (const FemMatrix &)=delete
 
virtual ~FemMatrix ()
 
virtual void clear ()
 Clear the matrix.
 
virtual void solverhs (DataVector< T > &B, DataVector< T > &X)=0
 Solve for the right-hand-side of a system of linear equations.
 
void solve (DataVector< T > &B, DataVector< T > &X)
 Solve the set of linear equations.
 
void solve (DataVector< T > &B)
 Solve the set of linear equations.
 
virtual void mult (const DataVector< const T > &vector, DataVector< T > &result)=0
 Multiply matrix by vector.
 
virtual void addmult (const DataVector< const T > &vector, DataVector< T > &result)=0
 Multiply matrix by vector adding the result.
 
template<typename BoundaryConditonsT >
void applyBC (const BoundaryConditonsT &bconds, DataVector< T > &B)
 Apply Dirichlet boundary conditions.
 

Additional Inherited Members

- Public Attributes inherited from plask::BandMatrix< T >
const size_t ld
 leading dimension of the matrix
 
const size_t kd
 Size of the band reduced by one.
 
- Public Attributes inherited from plask::FemMatrix< T >
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.
 
T * data
 Pointer to data.
 
const Solversolver
 Solver owning the matrix.
 

Detailed Description

Symmetric band matrix structure.

Data is stored in LAPACK format.

Definition at line 58 of file cholesky_matrix.hpp.

Constructor & Destructor Documentation

◆ DpbMatrix()

plask::DpbMatrix::DpbMatrix ( const Solver solver,
size_t  rank,
size_t  band 
)
inline

Create matrix.

Parameters
rankrank of the matrix
bandmaximum band size

Definition at line 64 of file cholesky_matrix.hpp.

Member Function Documentation

◆ addmult()

void plask::DpbMatrix::addmult ( const DataVector< const double > &  vector,
DataVector< double > &  result 
)
inlineoverride

Definition at line 117 of file cholesky_matrix.hpp.

◆ factorize()

void plask::DpbMatrix::factorize ( )
inlineoverridevirtual

Factorize the matrix in advance to speed up the solution.

Parameters
solversolver to use

Reimplemented from plask::FemMatrix< T >.

Definition at line 90 of file cholesky_matrix.hpp.

◆ index()

size_t plask::DpbMatrix::index ( size_t  r,
size_t  c 
)
inline

Definition at line 67 of file cholesky_matrix.hpp.

◆ mult()

void plask::DpbMatrix::mult ( const DataVector< const double > &  vector,
DataVector< double > &  result 
)
inlineoverride

Definition at line 113 of file cholesky_matrix.hpp.

◆ operator()()

double & plask::DpbMatrix::operator() ( size_t  r,
size_t  c 
)
inlineoverridevirtual

Return reference to array element.

Parameters
rindex of the element row
cindex of the element column

Implements plask::FemMatrix< T >.

Definition at line 88 of file cholesky_matrix.hpp.

◆ solverhs()

void plask::DpbMatrix::solverhs ( DataVector< double > &  B,
DataVector< double > &  X 
)
inlineoverride

Definition at line 103 of file cholesky_matrix.hpp.


The documentation for this struct was generated from the following file: