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

One complex field matrix and its boundary/factorization metadata. More...

#include "solver_data.hpp"

+ Collaboration diagram for orb5x::Zbmat:

Public Member Functions

void allocate_band (int kl, int ku, int n)
 Allocate active band storage.
 
void clear_factorization ()
 Invalidate both primary and fallback factorization state after assembly changes.
 
int get_rank () const
 Return the square dimension of active matrix storage.
 
bool has_matrix () const
 Test whether active LAPACK storage is allocated.
 
 Zbmat ()
 Construct an unallocated, unfactorized matrix descriptor.
 

Public Attributes

Kokkos::View< Complex *** > boundary_terms
 Explicit boundary blocks [term][term][inner/outer].
 
bool is_allocated = false
 Whether numerical matrix storage has been allocated.
 
bool is_factorized = false
 Whether active numerical storage contains a factorization.
 
int mass_matrix = 0
 0 standard mass operator; 1 first toroidal derivative.
 
bool nl_factorize = false
 Whether this operator is factorized for solves.
 
bool nl_impose_bc = false
 Whether radial boundary transforms apply.
 
NSelMatrixType nsel_type = NSelMatrixType::NSEL_PBMAT
 Requested storage/factorization type.
 
int nterms = 0
 Number of assembled weak-form terms.
 
int nterms_boundary = 0
 Number of stored explicit boundary terms.
 
bool use_gb_fallback = false
 Whether an SPD matrix was refactorized as general band.
 
spclibs::ZGBMat zgb
 General complex band storage.
 
spclibs::ZPBMat zpb
 Hermitian positive-definite packed-band storage.
 

Detailed Description

One complex field matrix and its boundary/factorization metadata.

Exactly one of zpb or zgb is active. Positive-definite matrices use LAPACK packed-band Cholesky; nonsymmetric matrices use pivoted general-band LU. A failed SPD factorization may be represented by the general-band fallback while retaining the requested matrix type.

Fortran reference solver_data.F90, type zbmat.

Constructor & Destructor Documentation

◆ Zbmat()

orb5x::Zbmat::Zbmat ( )
inline

Construct an unallocated, unfactorized matrix descriptor.

Member Function Documentation

◆ allocate_band()

void orb5x::Zbmat::allocate_band ( int  kl,
int  ku,
int  n 
)
inline

Allocate active band storage.

Parameters
[in]klNumber of subdiagonals (general-band path).
[in]kuNumber of superdiagonals.
[in]nSquare matrix dimension.

References orb5x::spclibs::init(), is_allocated, is_factorized, orb5x::NSEL_PBMAT, nsel_type, nterms, zgb, and zpb.

◆ clear_factorization()

void orb5x::Zbmat::clear_factorization ( )
inline

Invalidate both primary and fallback factorization state after assembly changes.

References is_factorized, and use_gb_fallback.

◆ get_rank()

int orb5x::Zbmat::get_rank ( ) const
inline

Return the square dimension of active matrix storage.

Returns
Matrix rank, or zero for empty storage.

References orb5x::NSEL_PBMAT, nsel_type, orb5x::spclibs::ZGBMat::rank, orb5x::spclibs::ZPBMat::rank, zgb, and zpb.

◆ has_matrix()

bool orb5x::Zbmat::has_matrix ( ) const
inline

Test whether active LAPACK storage is allocated.

Returns
True when the selected band matrix has initialized storage.

References orb5x::spclibs::ZGBMat::is_initialized(), orb5x::spclibs::ZPBMat::is_initialized(), orb5x::NSEL_PBMAT, nsel_type, zgb, and zpb.

Member Data Documentation

◆ boundary_terms

Kokkos::View<Complex***> orb5x::Zbmat::boundary_terms

Explicit boundary blocks [term][term][inner/outer].

◆ is_allocated

bool orb5x::Zbmat::is_allocated = false

Whether numerical matrix storage has been allocated.

Referenced by allocate_band().

◆ is_factorized

bool orb5x::Zbmat::is_factorized = false

Whether active numerical storage contains a factorization.

Referenced by allocate_band(), and clear_factorization().

◆ mass_matrix

int orb5x::Zbmat::mass_matrix = 0

0 standard mass operator; 1 first toroidal derivative.

◆ nl_factorize

bool orb5x::Zbmat::nl_factorize = false

Whether this operator is factorized for solves.

◆ nl_impose_bc

bool orb5x::Zbmat::nl_impose_bc = false

Whether radial boundary transforms apply.

◆ nsel_type

NSelMatrixType orb5x::Zbmat::nsel_type = NSelMatrixType::NSEL_PBMAT

Requested storage/factorization type.

Referenced by allocate_band(), get_rank(), and has_matrix().

◆ nterms

int orb5x::Zbmat::nterms = 0

Number of assembled weak-form terms.

Referenced by allocate_band().

◆ nterms_boundary

int orb5x::Zbmat::nterms_boundary = 0

Number of stored explicit boundary terms.

◆ use_gb_fallback

bool orb5x::Zbmat::use_gb_fallback = false

Whether an SPD matrix was refactorized as general band.

Referenced by clear_factorization().

◆ zgb

spclibs::ZGBMat orb5x::Zbmat::zgb

General complex band storage.

Referenced by allocate_band(), get_rank(), and has_matrix().

◆ zpb

spclibs::ZPBMat orb5x::Zbmat::zpb

Hermitian positive-definite packed-band storage.

Referenced by allocate_band(), get_rank(), and has_matrix().


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