PLaSK library
Loading...
Searching...
No Matches
plask::BandMatrix< T > Struct Template Reference

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

Inheritance diagram for plask::BandMatrix< T >:
[legend]
Collaboration diagram for plask::BandMatrix< T >:
[legend]

Public Member Functions

 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 T & operator() (size_t r, size_t c)=0
 Return reference to array element.
 
virtual void clear ()
 Clear the matrix.
 
virtual void factorize ()
 Factorize the matrix in advance to speed up the solution.
 
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.
 

Public Attributes

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

template<typename T = double>
struct plask::BandMatrix< T >

Definition at line 119 of file matrix.hpp.

Constructor & Destructor Documentation

◆ BandMatrix()

template<typename T = double>
plask::BandMatrix< T >::BandMatrix ( const Solver solver,
size_t  rank,
size_t  kd,
size_t  ld 
)
inline

Definition at line 123 of file matrix.hpp.

Member Function Documentation

◆ describe()

template<typename T = double>
std::string plask::BandMatrix< T >::describe ( ) const
inlineoverridevirtual

Reimplemented from plask::FemMatrix< T >.

Definition at line 141 of file matrix.hpp.

◆ setBC()

template<typename T = double>
void plask::BandMatrix< T >::setBC ( DataVector< T > &  B,
size_t  r,
val 
)
inlineoverridevirtual

Set Dirichlet boundary condition.

Parameters
Bright hand side of the equation
rindex of the row
valvalue of the boundary condition

Implements plask::FemMatrix< T >.

Definition at line 126 of file matrix.hpp.

Member Data Documentation

◆ kd

template<typename T = double>
const size_t plask::BandMatrix< T >::kd

Size of the band reduced by one.

Definition at line 121 of file matrix.hpp.

◆ ld

template<typename T = double>
const size_t plask::BandMatrix< T >::ld

leading dimension of the matrix

Definition at line 120 of file matrix.hpp.


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