ORB5X 1.0.0
Performance-portable global electromagnetic gyrokinetic PIC code
orb5x::spclibs::GBMat Struct Reference

General Band Matrix (LAPACK GB storage format) More...

#include "matrix.hpp"

+ Collaboration diagram for orb5x::spclibs::GBMat:

Public Member Functions

 GBMat ()=default
 Construct an empty, unallocated band-matrix descriptor.
 
bool is_initialized () const
 
int lda () const
 

Public Attributes

int kl = 0
 Number of subdiagonals (lower bandwidth)
 
int kmat = 0
 Matrix identifier.
 
int ku = 0
 Number of superdiagonals (upper bandwidth)
 
int mrows = 0
 Number of rows.
 
int ncols = 0
 Number of columns.
 
int nterms = 0
 Number of non-zero terms (informational)
 
std::vector< int > piv
 Pivot indices from LU factorization.
 
int rank = 0
 Matrix rank (typically = ncols for square matrices)
 
Kokkos::View< Real **, Kokkos::HostSpace > val
 Matrix values in LAPACK band storage.
 

Detailed Description

General Band Matrix (LAPACK GB storage format)

Storage format for LAPACK band matrix routines (DGBTRF, DGBTRS, DGBMV). The matrix is stored in a 2D array with dimensions (2*kl+ku+1, n).

For a matrix element A(i,j): val(kl+ku+i-j, j) = A(i,j) for max(0,j-ku) <= i <= min(n-1,j+kl)

The extra kl rows at the top are used for fill-in during LU factorization.

Constructor & Destructor Documentation

◆ GBMat()

orb5x::spclibs::GBMat::GBMat ( )
default

Construct an empty, unallocated band-matrix descriptor.

Member Function Documentation

◆ is_initialized()

bool orb5x::spclibs::GBMat::is_initialized ( ) const
inline
Returns
true when numerical band storage is allocated.

References val.

Referenced by orb5x::spclibs::PeriodicMat::is_initialized().

◆ lda()

int orb5x::spclibs::GBMat::lda ( ) const
inline
Returns
LAPACK general-band leading dimension 2*kl+ku+1.

References kl, and ku.

Member Data Documentation

◆ kl

int orb5x::spclibs::GBMat::kl = 0

Number of subdiagonals (lower bandwidth)

Referenced by lda().

◆ kmat

int orb5x::spclibs::GBMat::kmat = 0

Matrix identifier.

◆ ku

int orb5x::spclibs::GBMat::ku = 0

Number of superdiagonals (upper bandwidth)

Referenced by lda().

◆ mrows

int orb5x::spclibs::GBMat::mrows = 0

Number of rows.

◆ ncols

int orb5x::spclibs::GBMat::ncols = 0

Number of columns.

◆ nterms

int orb5x::spclibs::GBMat::nterms = 0

Number of non-zero terms (informational)

◆ piv

std::vector<int> orb5x::spclibs::GBMat::piv

Pivot indices from LU factorization.

◆ rank

int orb5x::spclibs::GBMat::rank = 0

Matrix rank (typically = ncols for square matrices)

◆ val

Kokkos::View<Real**, Kokkos::HostSpace> orb5x::spclibs::GBMat::val

Matrix values in LAPACK band storage.

Referenced by is_initialized().


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