PLaSK library
Loading...
Searching...
No Matches
plask::electrical::capacitance::ZgbMatrix Struct Reference

Symmetric band matrix structure. More...

#include <solvers/electrical/capacitance/complex_gauss_matrix.hpp>

Inheritance diagram for plask::electrical::capacitance::ZgbMatrix:
[legend]
Collaboration diagram for plask::electrical::capacitance::ZgbMatrix:
[legend]

Public Member Functions

 ZgbMatrix (const Solver *solver, size_t rank, size_t band)
 Create matrix.
 
 ZgbMatrix (const ZgbMatrix &)=delete
 
size_t index (size_t r, size_t c)
 
dcomplex & operator() (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< dcomplex > &B, DataVector< dcomplex > &X) override
 
void mult (const DataVector< const dcomplex > &vector, DataVector< dcomplex > &result) override
 Multiply matrix by vector.
 
void addmult (const DataVector< const dcomplex > &vector, DataVector< dcomplex > &result) override
 Multiply matrix by vector adding the result.
 
- Public Member Functions inherited from plask::BandMatrix< dcomplex >
 BandMatrix (const Solver *solver, size_t rank, size_t kd, size_t ld)
 
void setBC (DataVector< dcomplex > &B, size_t r, dcomplex 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.
 
virtual void setBC (DataVector< T > &B, size_t r, T val)=0
 Set Dirichlet boundary condition.
 
template<typename BoundaryConditonsT >
void applyBC (const BoundaryConditonsT &bconds, DataVector< T > &B)
 Apply Dirichlet boundary conditions.
 

Public Attributes

const size_t shift
 Shift of the diagonal.
 
aligned_unique_ptr< intipiv
 
- Public Attributes inherited from plask::BandMatrix< dcomplex >
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 63 of file complex_gauss_matrix.hpp.

Constructor & Destructor Documentation

◆ ZgbMatrix() [1/2]

plask::electrical::capacitance::ZgbMatrix::ZgbMatrix ( const Solver solver,
size_t  rank,
size_t  band 
)
inline

Create matrix.

Parameters
rankrank of the matrix
bandband size

Definition at line 73 of file complex_gauss_matrix.hpp.

◆ ZgbMatrix() [2/2]

plask::electrical::capacitance::ZgbMatrix::ZgbMatrix ( const ZgbMatrix )
delete

Member Function Documentation

◆ addmult()

void plask::electrical::capacitance::ZgbMatrix::addmult ( const DataVector< const dcomplex > &  vector,
DataVector< dcomplex > &  result 
)
inlineoverride

Multiply matrix by vector adding the result.

Parameters
vectorvector to multiply
resultmultiplication result

Definition at line 135 of file complex_gauss_matrix.hpp.

◆ factorize()

void plask::electrical::capacitance::ZgbMatrix::factorize ( )
inlineoverridevirtual

Factorize the matrix in advance to speed up the solution.

Parameters
solversolver to use

Reimplemented from plask::FemMatrix< T >.

Definition at line 93 of file complex_gauss_matrix.hpp.

◆ index()

size_t plask::electrical::capacitance::ZgbMatrix::index ( size_t  r,
size_t  c 
)
inline

Definition at line 79 of file complex_gauss_matrix.hpp.

◆ mult()

void plask::electrical::capacitance::ZgbMatrix::mult ( const DataVector< const dcomplex > &  vector,
DataVector< dcomplex > &  result 
)
inlineoverride

Multiply matrix by vector.

Parameters
vectorvector to multiply
resultmultiplication result

Definition at line 125 of file complex_gauss_matrix.hpp.

◆ operator()()

dcomplex & plask::electrical::capacitance::ZgbMatrix::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 91 of file complex_gauss_matrix.hpp.

◆ solverhs()

void plask::electrical::capacitance::ZgbMatrix::solverhs ( DataVector< dcomplex > &  B,
DataVector< dcomplex > &  X 
)
inlineoverride

Definition at line 110 of file complex_gauss_matrix.hpp.

Member Data Documentation

◆ ipiv

aligned_unique_ptr<int> plask::electrical::capacitance::ZgbMatrix::ipiv

Definition at line 66 of file complex_gauss_matrix.hpp.

◆ shift

const size_t plask::electrical::capacitance::ZgbMatrix::shift

Shift of the diagonal.

Definition at line 64 of file complex_gauss_matrix.hpp.


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