ORB5X 1.0.0
Performance-portable global electromagnetic gyrokinetic PIC code
Loading...
Searching...
No Matches
matrix.hpp File Reference

Matrix types and operations for spclibs C++ port. More...

#include "../prec_const.hpp"
#include <Kokkos_Core.hpp>
#include <vector>
#include <complex>
Include dependency graph for matrix.hpp:
This graph shows which files directly or indirectly include this file:

Classes

struct  orb5x::spclibs::GBMat
 General Band Matrix (LAPACK GB storage format). More...
struct  orb5x::spclibs::GEMat
 General Dense Matrix (LAPACK GE storage format). More...
struct  orb5x::spclibs::PBMat
 Packed Band Matrix (LAPACK PB storage format). More...
struct  orb5x::spclibs::PeriodicMat
 Periodic Band Matrix. More...
struct  orb5x::spclibs::ZGBMat
 Complex General Band Matrix. More...
struct  orb5x::spclibs::ZGEMat
 Complex General Dense Matrix. More...
struct  orb5x::spclibs::ZPBMat
 Complex Packed Band Matrix. More...
struct  orb5x::spclibs::ZPeriodicMat
 Complex Periodic Band Matrix. More...

Namespaces

namespace  orb5x
namespace  orb5x::spclibs

Functions

void orb5x::spclibs::bsolve (const GBMat &mat, Real *b, int nrhs=1)
 Solve linear system A*x = b.
void orb5x::spclibs::bsolve (const GEMat &mat, Real *b, int nrhs=1)
void orb5x::spclibs::bsolve (const PBMat &mat, Real *b, int nrhs=1)
void orb5x::spclibs::bsolve (const PeriodicMat &mat, Real *b, int nrhs=1)
void orb5x::spclibs::bsolve (const ZGBMat &mat, Complex *b, int nrhs=1)
void orb5x::spclibs::bsolve (const ZGEMat &mat, Complex *b, int nrhs=1)
void orb5x::spclibs::bsolve (const ZPBMat &mat, Complex *b, int nrhs=1)
void orb5x::spclibs::bsolve (const ZPeriodicMat &mat, Complex *b, int nrhs=1)
void orb5x::spclibs::destroy (GBMat &mat)
void orb5x::spclibs::destroy (GEMat &mat)
void orb5x::spclibs::destroy (PBMat &mat)
void orb5x::spclibs::destroy (PeriodicMat &mat)
void orb5x::spclibs::destroy (ZGBMat &mat)
void orb5x::spclibs::destroy (ZGEMat &mat)
void orb5x::spclibs::destroy (ZPBMat &mat)
void orb5x::spclibs::destroy (ZPeriodicMat &mat)
Real orb5x::spclibs::determinant (const GBMat &mat)
 Compute determinant of factorized matrix.
Real orb5x::spclibs::determinant (const GEMat &mat)
Real orb5x::spclibs::determinant (const PBMat &mat)
Complex orb5x::spclibs::determinant (const ZGBMat &mat)
Complex orb5x::spclibs::determinant (const ZGEMat &mat)
Complex orb5x::spclibs::determinant (const ZPBMat &mat)
int orb5x::spclibs::factor (GBMat &mat)
 Compute LU factorization of matrix.
int orb5x::spclibs::factor (GEMat &mat)
int orb5x::spclibs::factor (PBMat &mat)
int orb5x::spclibs::factor (PeriodicMat &mat)
int orb5x::spclibs::factor (ZGBMat &mat)
int orb5x::spclibs::factor (ZGEMat &mat)
int orb5x::spclibs::factor (ZPBMat &mat)
int orb5x::spclibs::factor (ZPeriodicMat &mat)
void orb5x::spclibs::getcol (const GBMat &mat, int j, Real *col)
 Get column of matrix.
void orb5x::spclibs::getcol (const PBMat &mat, int j, Real *col)
void orb5x::spclibs::getcol (const PeriodicMat &mat, int j, Real *col)
Real orb5x::spclibs::getele (const GBMat &mat, int i, int j)
 Get matrix element.
Real orb5x::spclibs::getele (const PBMat &mat, int i, int j)
Real orb5x::spclibs::getele (const PeriodicMat &mat, int i, int j)
Complex orb5x::spclibs::getele (const ZGBMat &mat, int i, int j)
Complex orb5x::spclibs::getele (const ZPBMat &mat, int i, int j)
Complex orb5x::spclibs::getele (const ZPeriodicMat &mat, int i, int j)
void orb5x::spclibs::getrow (const GBMat &mat, int i, Real *row)
 Get row of matrix.
void orb5x::spclibs::getrow (const GEMat &mat, int i, Real *row)
void orb5x::spclibs::getrow (const PBMat &mat, int i, Real *row)
void orb5x::spclibs::getrow (const PeriodicMat &mat, int i, Real *row)
void orb5x::spclibs::getrow (const ZPBMat &mat, int i, Complex *row)
Realorb5x::spclibs::getvalp (GBMat &mat, int i, int j)
 Get pointer to matrix value for element (i,j) Used for direct access to storage for assembly.
Realorb5x::spclibs::getvalp (GEMat &mat, int i, int j)
Realorb5x::spclibs::getvalp (PBMat &mat, int i, int j)
Complexorb5x::spclibs::getvalp (ZGBMat &mat, int i, int j)
Complexorb5x::spclibs::getvalp (ZGEMat &mat, int i, int j)
Complexorb5x::spclibs::getvalp (ZPBMat &mat, int i, int j)
void orb5x::spclibs::init (int kl, int ku, int n, int nterms, GBMat &mat, int kmat=0, int mrows=-1)
 Initialize a general band matrix.
void orb5x::spclibs::init (int kl, int ku, int n, int nterms, PeriodicMat &mat, int kmat=0)
 Initialize a periodic band matrix.
void orb5x::spclibs::init (int kl, int ku, int n, int nterms, ZGBMat &mat, int kmat=0, int mrows=-1)
void orb5x::spclibs::init (int kl, int ku, int n, int nterms, ZPeriodicMat &mat, int kmat=0)
void orb5x::spclibs::init (int ku, int n, int nterms, PBMat &mat, int kmat=0)
 Initialize a packed band matrix.
void orb5x::spclibs::init (int ku, int n, int nterms, ZPBMat &mat, int kmat=0)
void orb5x::spclibs::init (int n, int nterms, GEMat &mat, int kmat=0, int mrows=-1)
 Initialize a general dense matrix.
void orb5x::spclibs::init (int n, int nterms, ZGEMat &mat, int kmat=0, int mrows=-1)
void orb5x::spclibs::maddto (Real alpha, const GBMat &a, GBMat &b)
 Add matrices: B = B + alpha*A.
void orb5x::spclibs::maddto (Real alpha, const GEMat &a, GEMat &b)
void orb5x::spclibs::maddto (Real alpha, const PBMat &a, PBMat &b)
void orb5x::spclibs::maddto (Real alpha, const PeriodicMat &a, PeriodicMat &b)
void orb5x::spclibs::mcopy (const GBMat &src, GBMat &dst)
void orb5x::spclibs::mcopy (const GEMat &src, GEMat &dst)
void orb5x::spclibs::mcopy (const PBMat &src, PBMat &dst)
void orb5x::spclibs::mcopy (const PeriodicMat &src, PeriodicMat &dst)
void orb5x::spclibs::putcol (GBMat &mat, int j, const Real *col)
 Set column of matrix.
void orb5x::spclibs::putcol (GEMat &mat, int j, const Real *col)
void orb5x::spclibs::putcol (PBMat &mat, int j, const Real *col)
void orb5x::spclibs::putcol (PeriodicMat &mat, int j, const Real *col)
void orb5x::spclibs::putcol (ZPBMat &mat, int j, const Complex *col)
void orb5x::spclibs::putele (GBMat &mat, Real val, int i, int j)
 Set matrix element.
void orb5x::spclibs::putele (PBMat &mat, Real val, int i, int j)
void orb5x::spclibs::putele (PeriodicMat &mat, Real val, int i, int j)
void orb5x::spclibs::putele (ZGBMat &mat, Complex val, int i, int j)
void orb5x::spclibs::putele (ZPBMat &mat, Complex val, int i, int j)
void orb5x::spclibs::putele (ZPeriodicMat &mat, Complex val, int i, int j)
void orb5x::spclibs::putrow (GBMat &mat, int i, const Real *row)
 Set row of matrix.
void orb5x::spclibs::putrow (GEMat &mat, int i, const Real *row)
void orb5x::spclibs::putrow (PBMat &mat, int i, const Real *row)
void orb5x::spclibs::putrow (PeriodicMat &mat, int i, const Real *row)
void orb5x::spclibs::putrow (ZPBMat &mat, int i, const Complex *row)
void orb5x::spclibs::updtmat (GBMat &mat, Real val, int i, int j)
 Update matrix element: mat(i,j) += val.
void orb5x::spclibs::updtmat (GEMat &mat, Real val, int i, int j)
void orb5x::spclibs::updtmat (PBMat &mat, Real val, int i, int j)
void orb5x::spclibs::updtmat (PeriodicMat &mat, Real val, int i, int j)
void orb5x::spclibs::updtmat (ZGBMat &mat, Complex val, int i, int j)
void orb5x::spclibs::updtmat (ZPBMat &mat, Complex val, int i, int j)
void orb5x::spclibs::updtmat (ZPeriodicMat &mat, Complex val, int i, int j)
void orb5x::spclibs::vmx (const GBMat &mat, const Real *x, Real *y)
 Compute y = A*x.
void orb5x::spclibs::vmx (const GBMat &mat, const Real *x, Real *y, int nrhs)
 Compute Y = A*X for multiple vectors.
void orb5x::spclibs::vmx (const GEMat &mat, const Real *x, Real *y)
void orb5x::spclibs::vmx (const GEMat &mat, const Real *x, Real *y, int nrhs)
void orb5x::spclibs::vmx (const PBMat &mat, const Real *x, Real *y)
void orb5x::spclibs::vmx (const PeriodicMat &mat, const Real *x, Real *y)
void orb5x::spclibs::vmx (const ZGBMat &mat, const Complex *x, Complex *y)
void orb5x::spclibs::vmx (const ZGEMat &mat, const Complex *x, Complex *y)
void orb5x::spclibs::vmx (const ZPBMat &mat, const Complex *x, Complex *y)
void orb5x::spclibs::vmx (const ZPeriodicMat &mat, const Complex *x, Complex *y)

Detailed Description

Matrix types and operations for spclibs C++ port.

This file is a C++ translation of the Fortran module matrix.f90 from spclibs. It provides band matrix types compatible with LAPACK routines.

Key types:

  • GBMat: General band matrix (LAPACK DGBTRF/DGBTRS storage)
  • GEMat: General dense matrix (LAPACK DGETRF/DGETRS storage)
  • PBMat: Packed band matrix (symmetric, LAPACK DPBTRF/DPBTRS storage)
  • PeriodicMat: Periodic band matrix using Woodbury formula