Loading...
Searching...
No Matches
q3::SubspaceDiagonalizer Class Referenceabstract

#include <init.hpp>

+ Inheritance diagram for q3::SubspaceDiagonalizer:

Public Member Functions

virtual ~SubspaceDiagonalizer ()=default
 
virtual bool is_collective () const
 
virtual std::string name () const =0
 
virtual int solve (int basis_size, Complex *hamiltonian_matrix, Complex *overlap_matrix, Real *eigenvalues, Complex *eigenvector_matrix, bool is_gamma_only=false)=0
 

Detailed Description

Definition at line 20 of file init.hpp.

Constructor & Destructor Documentation

◆ ~SubspaceDiagonalizer()

virtual q3::SubspaceDiagonalizer::~SubspaceDiagonalizer ( )
virtualdefault

Member Function Documentation

◆ is_collective()

virtual bool q3::SubspaceDiagonalizer::is_collective ( ) const
inlinevirtual

Whether solve() is a collective operation over the process group.

Collective solvers (ScaLAPACK) require EVERY rank of the group to call solve() — gating the call on one rank deadlocks the group — and return redundant results on all ranks, so no post-solve broadcast is needed. Non-collective solvers (serial LAPACK) may be called on the group root only, with results broadcast afterwards.

Definition at line 54 of file init.hpp.

◆ name()

virtual std::string q3::SubspaceDiagonalizer::name ( ) const
pure virtual

◆ solve()

virtual int q3::SubspaceDiagonalizer::solve ( int  basis_size,
Complex *  hamiltonian_matrix,
Complex *  overlap_matrix,
Real *  eigenvalues,
Complex *  eigenvector_matrix,
bool  is_gamma_only = false 
)
pure virtual

Solve the generalized eigenvalue problem: H * C = S * C * E

Parameters
basis_sizeDimension of the subspace (matrix size).
hamiltonian_matrixProjected Hamiltonian (destroyed/overwritten). May be the same buffer as eigenvector_matrix: every implementation reads it whole before it writes any eigenvector, which is what lets the caller keep one copy of H rather than two.
overlap_matrixProjected overlap (destroyed/overwritten).
eigenvaluesOutput eigenvalues (size basis_size).
eigenvector_matrixOutput eigenvectors (basis_size x basis_size).
Returns
0 on success, non-zero on failure.

Implemented in q3::SerialSubspaceDiagonalizer.


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