ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
hsolver::DiagoLOBPCG< T, Device > Class Template Reference

#include <diago_lobpcg.h>

Collaboration diagram for hsolver::DiagoLOBPCG< T, Device >:

Classes

struct  VectorImages
struct  ProjectionCache

Public Member Functions

 DiagoLOBPCG (const Real *precondition, const int nband, const int ndim, const int nmax, const LobpcgBasisLayout &layout, const diag_comm_info &comm, const int para_rr_method, const int para_rr_block_size, const bool use_overlap, const LobpcgLocking locking, dense::ParallelDenseEigensolver &rr_solver, dense::GpuDenseEigensolver &gpu_rr_solver)
 Store the caller configuration and allocate Device wavefunction and host RR workspaces.
 ~DiagoLOBPCG ()
 Record the final owned algebra workspace capacity before its buffers are released.
bool diag (const HSOperator< T, Device > &op, T *psi_in, const int ld_psi, Real *eigenvalue_in, const double tolerance, const int max_iter, const std::vector< double > &ethr_band)
 Solve H X = S X Lambda by generalized RR in [X,P,W], with prefix locking and failure-only repair.
int iterations () const

Private Types

using Real = typename GetTypeReal<T>::type
 Real precision of the stored wavefunctions T.
using Wide = std::complex<double>
 Accumulation and projected eigensolver precision.
using CtDevice = typename ct::PsiToContainer<Device>::type
using SerialGvWorkspace = dense::SerialGvWorkspace
using syncmem_complex_2d_op = base_device::memory::synchronize_memory_2d_op<T, Device, Device>
using syncmem_var_h2d_op = ct::kernels::synchronize_memory<Real, CtDevice, ct::DEVICE_CPU>
using setmem_complex_op = ct::kernels::set_memory<T, CtDevice>
using syncmem_complex_h2d_op = ct::kernels::synchronize_memory<T, CtDevice, ct::DEVICE_CPU>
using copy_op = ct::kernels::blas_copy<T, CtDevice>
using axpy_op = ct::kernels::blas_axpy<T, CtDevice>
using nrm2_op = ct::kernels::blas_nrm2<T, CtDevice>

Private Member Functions

void initialize (T *psi_in, const int ld_psi)
 Copy the input X, seed optional buffer bands, and zero inactive rows in each spinor component.
void form_residual (const VectorImages &vectors, const int count, const Real *eigenvalues, T *residual)
 Form R = HX - SX*Lambda for the supplied block; a null SX means S = I.
int build_search (const HSOperator< T, Device > &op, const int locked, const int count, const int first_w)
 Precondition the active residual, project out the locked prefix, then normalize and compact W.
bool lock_converged (ct::Tensor &eig_prev, const ct::Tensor &tol_band, int &locked)
 Lock the leading bands satisfying the eigenvalue-change tolerance; soft locking can reactivate them.
int build_direction (const VectorImages &basis, const int dimension, const int q, const int active, const ct::Tensor &x_coefficients, const ct::Tensor &g)
 Form P from the non-X Ritz coefficients, removing new locked components before normalization.
void write_results (T *psi_in, const int ld_psi, Real *eigenvalue_in)
 Copy only the requested Ritz pairs back to the caller, preserving its leading dimension.
void rotate_images (const VectorImages &source, const int source_columns, const int target_columns, const T *coefficients, const VectorImages &target, T *scratch)
 Apply the same right coefficient matrix to each supplied X/HX/SX image; scratch permits overlap.
int normalize_columns (const VectorImages &block, const int columns, T *coefficients, const int coefficient_rows)
 Scale nonzero columns by their global Euclidean norm and compact images and coefficients together.
const T * prepare_rotation_coefficients (const ct::Tensor &coefficients)
 Borrow host double coefficients on CPU, or convert/upload them into reusable algebra scratch.
VectorImages basis_images (const int first)
 Return non-owning X/HX/SX pointers at one column offset in the shared trial-basis storage.
void project_padding (T *x, const int columns) const
 Zero unused rows of every spinor component so full-stride BLAS products exclude nonphysical entries.
template<typename Value>
void broadcast (Value *data, const int count) const
 Share root-owned coefficients or status within the eigensolve communicator.
void allocate_workspace ()
 Allocate wavefunction blocks and small RR buffers for the current internal width, and record capacity.
void form_projected_matrices (const VectorImages &basis, const int columns, const ProjectionCache *retained, ct::Tensor &k, ct::Tensor &g)
 Form K = B^H H B and G = B^H S B; with a retained [X,P] block, compute only the new W panel.
bool solve_projected (const ct::Tensor &k, const ct::Tensor &g, const int dimension, const int wanted, SerialGvWorkspace &serial_workspace)
 Solve K C = G C Theta for the wanted Ritz pairs and share the result; return false for metric failure.
void retain_pair (const ct::Tensor &k, const ct::Tensor &g, const int rows, const ct::Tensor &x_coefficients, const int first_x, const int x_columns, const int p_columns, const Real *ritz_values, const int zero_prefix, ProjectionCache &cache)
 Cache projections for the new [X,P] using coefficient-space products and the Ritz XX identities.
bool recover_projected (const HSOperator< T, Device > &op, const VectorImages &basis, int &working_columns, const int wanted, ct::Tensor &projected, ct::Tensor &gram, SerialGvWorkspace &workspace)
 After GV metric failure, refresh true H/S images and retry; if needed, repair only the increments.
int repair_basis (const HSOperator< T, Device > &op, const int added)
 Preserve X, project increments with its actual S metric, then repair their rank and refresh H images.
int rank_orthonormalize (const int m, T *x, T *sx)
 Recovery-only metric normalization: use Cholesky for a well-conditioned block, otherwise spectral rank truncation.

Private Attributes

int n_band_ = 0
 Number of requested eigenpairs returned to the caller.
int n_dim_ = 0
 Local column leading dimension, including spinor padding.
int n_max_ = 0
 Internal block width: requested bands plus dimension-limited buffer bands.
int iterations_ = 0
 Main-loop RR iterations in the last diag call; excludes initial RR.
std::string error_message_
 Failure reason supplied by RR or recovery.
const LobpcgBasisLayout layout_
 Physical rows and spinor count within each stored column.
const diag_comm_info comm_
 Communicator/rank for distributed rows of one eigensolve.
const int para_rr_method_ = 0
 RR backend: local (0) or ScaLAPACK (2).
const int para_rr_bs_ = 0
 Distributed RR block size; zero selects automatically.
const bool use_overlap_
 Store and apply explicit S images instead of S = I.
const LobpcgLocking locking_
 Hard freezes the converged prefix; soft retains all X in RR.
dense::ParallelDenseEigensolver & rr_solver_
 Borrowed, reusable distributed CPU RR resources.
dense::GpuDenseEigensolver & gpu_rr_solver_
 Borrowed, reusable CUDA RR resources.
ct::DataType r_type_ = ct::DataType::DT_INVALID
 Tensor element type corresponding to Real.
ct::DataType t_type_ = ct::DataType::DT_INVALID
 Tensor element type corresponding to T.
ct::DeviceType device_type_ = ct::DeviceType::UnKnown
 Wavefunction/scratch storage device.
ct::Tensor prec_
 Device copy of the caller's diagonal preconditioner input, n_dim_ entries.
ct::Tensor eig_
 Host Ritz values for all n_max_ columns, including locked columns.
ct::Tensor eig_device_
 Active Ritz values on Device for preconditioning.
ct::Tensor evec_
 Device rotation scratch, n_dim_ by n_max_.
ct::Tensor space_
 Device basis [X,P,W], capacity n_dim_ by 3*n_max_.
ct::Tensor hspace_
 H images matching the columns of space_.
ct::Tensor sspace_
 Explicit S images matching space_; unused for S = I.
ct::Tensor ritz_coefficients_
 Host T coefficients C, capacity 3*n_max_ by n_max_.
ct::Tensor e_red_
 Host eigenvalue output of the current reduced problem.
ct::Tensor x_new_
 Device updated Ritz vectors; hard-locked prefix stays unchanged.
ct::Tensor hx_new_
 Updated H images needed by residuals and the next trial basis.
ct::Tensor sx_new_
 Updated S images; unused for S = I.
ct::Tensor residual_
 Device residuals HX - SX*Lambda, active columns at their band offsets.
ct::Tensor u_p_
 Host T history coefficients C_P, compacted/scaled together with P.
const T zero_ = static_cast<T>(0.0)
copy_op copy_op_
axpy_op axpy_op_
nrm2_op nrm2_op_
precondition_op< T, Device > precondition_op_
LinearAlgebra< T, Device > algebra_
 Distributed products and reusable conversion/rotation scratch.

Friends

class LobpcgProjectionTest

Member Typedef Documentation

◆ axpy_op

template<typename T = std::complex<double>, typename Device = base_device::DEVICE_CPU>
using hsolver::DiagoLOBPCG< T, Device >::axpy_op = ct::kernels::blas_axpy<T, CtDevice>
private

◆ copy_op

template<typename T = std::complex<double>, typename Device = base_device::DEVICE_CPU>
using hsolver::DiagoLOBPCG< T, Device >::copy_op = ct::kernels::blas_copy<T, CtDevice>
private

◆ CtDevice

template<typename T = std::complex<double>, typename Device = base_device::DEVICE_CPU>
using hsolver::DiagoLOBPCG< T, Device >::CtDevice = typename ct::PsiToContainer<Device>::type
private

◆ nrm2_op

template<typename T = std::complex<double>, typename Device = base_device::DEVICE_CPU>
using hsolver::DiagoLOBPCG< T, Device >::nrm2_op = ct::kernels::blas_nrm2<T, CtDevice>
private

◆ Real

template<typename T = std::complex<double>, typename Device = base_device::DEVICE_CPU>
using hsolver::DiagoLOBPCG< T, Device >::Real = typename GetTypeReal<T>::type
private

Real precision of the stored wavefunctions T.

◆ SerialGvWorkspace

template<typename T = std::complex<double>, typename Device = base_device::DEVICE_CPU>
using hsolver::DiagoLOBPCG< T, Device >::SerialGvWorkspace = dense::SerialGvWorkspace
private

◆ setmem_complex_op

template<typename T = std::complex<double>, typename Device = base_device::DEVICE_CPU>
using hsolver::DiagoLOBPCG< T, Device >::setmem_complex_op = ct::kernels::set_memory<T, CtDevice>
private

◆ syncmem_complex_2d_op

template<typename T = std::complex<double>, typename Device = base_device::DEVICE_CPU>
using hsolver::DiagoLOBPCG< T, Device >::syncmem_complex_2d_op = base_device::memory::synchronize_memory_2d_op<T, Device, Device>
private

◆ syncmem_complex_h2d_op

template<typename T = std::complex<double>, typename Device = base_device::DEVICE_CPU>
using hsolver::DiagoLOBPCG< T, Device >::syncmem_complex_h2d_op = ct::kernels::synchronize_memory<T, CtDevice, ct::DEVICE_CPU>
private

◆ syncmem_var_h2d_op

template<typename T = std::complex<double>, typename Device = base_device::DEVICE_CPU>
using hsolver::DiagoLOBPCG< T, Device >::syncmem_var_h2d_op = ct::kernels::synchronize_memory<Real, CtDevice, ct::DEVICE_CPU>
private

◆ Wide

template<typename T = std::complex<double>, typename Device = base_device::DEVICE_CPU>
using hsolver::DiagoLOBPCG< T, Device >::Wide = std::complex<double>
private

Accumulation and projected eigensolver precision.

Constructor & Destructor Documentation

◆ DiagoLOBPCG()

template<typename T, typename Device>
hsolver::DiagoLOBPCG< T, Device >::DiagoLOBPCG ( const Real * precondition,
const int nband,
const int ndim,
const int nmax,
const LobpcgBasisLayout & layout,
const diag_comm_info & comm,
const int para_rr_method,
const int para_rr_block_size,
const bool use_overlap,
const LobpcgLocking locking,
dense::ParallelDenseEigensolver & rr_solver,
dense::GpuDenseEigensolver & gpu_rr_solver )

Store the caller configuration and allocate Device wavefunction and host RR workspaces.

Here is the call graph for this function:

◆ ~DiagoLOBPCG()

template<typename T, typename Device>
hsolver::DiagoLOBPCG< T, Device >::~DiagoLOBPCG ( )

Record the final owned algebra workspace capacity before its buffers are released.

Here is the call graph for this function:

Member Function Documentation

◆ allocate_workspace()

template<typename T, typename Device>
void hsolver::DiagoLOBPCG< T, Device >::allocate_workspace ( )
private

Allocate wavefunction blocks and small RR buffers for the current internal width, and record capacity.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ basis_images()

template<typename T, typename Device>
DiagoLOBPCG< T, Device >::VectorImages hsolver::DiagoLOBPCG< T, Device >::basis_images ( const int first)
private

Return non-owning X/HX/SX pointers at one column offset in the shared trial-basis storage.

Here is the caller graph for this function:

◆ broadcast()

template<typename T, typename Device>
template<typename Value>
void hsolver::DiagoLOBPCG< T, Device >::broadcast ( Value * data,
const int count ) const
private

Share root-owned coefficients or status within the eigensolve communicator.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ build_direction()

template<typename T, typename Device>
int hsolver::DiagoLOBPCG< T, Device >::build_direction ( const VectorImages & basis,
const int dimension,
const int q,
const int active,
const ct::Tensor & x_coefficients,
const ct::Tensor & g )
private

Form P from the non-X Ritz coefficients, removing new locked components before normalization.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ build_search()

template<typename T, typename Device>
int hsolver::DiagoLOBPCG< T, Device >::build_search ( const HSOperator< T, Device > & op,
const int locked,
const int count,
const int first_w )
private

Precondition the active residual, project out the locked prefix, then normalize and compact W.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ diag()

template<typename T, typename Device>
bool hsolver::DiagoLOBPCG< T, Device >::diag ( const HSOperator< T, Device > & op,
T * psi_in,
const int ld_psi,
Real * eigenvalue_in,
const double tolerance,
const int max_iter,
const std::vector< double > & ethr_band )

Solve H X = S X Lambda by generalized RR in [X,P,W], with prefix locking and failure-only repair.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ form_projected_matrices()

template<typename T, typename Device>
template void hsolver::DiagoLOBPCG< T, Device >::form_projected_matrices ( const VectorImages & basis,
const int columns,
const ProjectionCache * retained,
ct::Tensor & k,
ct::Tensor & g )
private

Form K = B^H H B and G = B^H S B; with a retained [X,P] block, compute only the new W panel.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ form_residual()

template<typename T, typename Device>
void hsolver::DiagoLOBPCG< T, Device >::form_residual ( const VectorImages & vectors,
const int count,
const Real * eigenvalues,
T * residual )
private

Form R = HX - SX*Lambda for the supplied block; a null SX means S = I.

Here is the caller graph for this function:

◆ initialize()

template<typename T, typename Device>
void hsolver::DiagoLOBPCG< T, Device >::initialize ( T * psi_in,
const int ld_psi )
private

Copy the input X, seed optional buffer bands, and zero inactive rows in each spinor component.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ iterations()

template<typename T = std::complex<double>, typename Device = base_device::DEVICE_CPU>
int hsolver::DiagoLOBPCG< T, Device >::iterations ( ) const
inline
Here is the caller graph for this function:

◆ lock_converged()

template<typename T, typename Device>
bool hsolver::DiagoLOBPCG< T, Device >::lock_converged ( ct::Tensor & eig_prev,
const ct::Tensor & tol_band,
int & locked )
private

Lock the leading bands satisfying the eigenvalue-change tolerance; soft locking can reactivate them.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ normalize_columns()

template<typename T, typename Device>
int hsolver::DiagoLOBPCG< T, Device >::normalize_columns ( const VectorImages & block,
const int columns,
T * coefficients,
const int coefficient_rows )
private

Scale nonzero columns by their global Euclidean norm and compact images and coefficients together.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ prepare_rotation_coefficients()

template<typename T, typename Device>
const T * hsolver::DiagoLOBPCG< T, Device >::prepare_rotation_coefficients ( const ct::Tensor & coefficients)
private

Borrow host double coefficients on CPU, or convert/upload them into reusable algebra scratch.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ project_padding()

template<typename T, typename Device>
void hsolver::DiagoLOBPCG< T, Device >::project_padding ( T * x,
const int columns ) const
private

Zero unused rows of every spinor component so full-stride BLAS products exclude nonphysical entries.

Here is the caller graph for this function:

◆ rank_orthonormalize()

template<typename T, typename Device>
template int hsolver::DiagoLOBPCG< T, Device >::rank_orthonormalize ( const int m,
T * x,
T * sx )
private

Recovery-only metric normalization: use Cholesky for a well-conditioned block, otherwise spectral rank truncation.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ recover_projected()

template<typename T, typename Device>
template bool hsolver::DiagoLOBPCG< T, Device >::recover_projected ( const HSOperator< T, Device > & op,
const VectorImages & basis,
int & working_columns,
const int wanted,
ct::Tensor & projected,
ct::Tensor & gram,
SerialGvWorkspace & workspace )
private

After GV metric failure, refresh true H/S images and retry; if needed, repair only the increments.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ repair_basis()

template<typename T, typename Device>
template int hsolver::DiagoLOBPCG< T, Device >::repair_basis ( const HSOperator< T, Device > & op,
const int added )
private

Preserve X, project increments with its actual S metric, then repair their rank and refresh H images.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ retain_pair()

template<typename T, typename Device>
template void hsolver::DiagoLOBPCG< T, Device >::retain_pair ( const ct::Tensor & k,
const ct::Tensor & g,
const int rows,
const ct::Tensor & x_coefficients,
const int first_x,
const int x_columns,
const int p_columns,
const Real * ritz_values,
const int zero_prefix,
ProjectionCache & cache )
private

Cache projections for the new [X,P] using coefficient-space products and the Ritz XX identities.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ rotate_images()

template<typename T, typename Device>
void hsolver::DiagoLOBPCG< T, Device >::rotate_images ( const VectorImages & source,
const int source_columns,
const int target_columns,
const T * coefficients,
const VectorImages & target,
T * scratch )
private

Apply the same right coefficient matrix to each supplied X/HX/SX image; scratch permits overlap.

Here is the caller graph for this function:

◆ solve_projected()

template<typename T, typename Device>
template bool hsolver::DiagoLOBPCG< T, Device >::solve_projected ( const ct::Tensor & k,
const ct::Tensor & g,
const int dimension,
const int wanted,
SerialGvWorkspace & serial_workspace )
private

Solve K C = G C Theta for the wanted Ritz pairs and share the result; return false for metric failure.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ write_results()

template<typename T, typename Device>
void hsolver::DiagoLOBPCG< T, Device >::write_results ( T * psi_in,
const int ld_psi,
Real * eigenvalue_in )
private

Copy only the requested Ritz pairs back to the caller, preserving its leading dimension.

Here is the caller graph for this function:

◆ LobpcgProjectionTest

template<typename T = std::complex<double>, typename Device = base_device::DEVICE_CPU>
friend class LobpcgProjectionTest
friend

Member Data Documentation

◆ algebra_

template<typename T = std::complex<double>, typename Device = base_device::DEVICE_CPU>
LinearAlgebra<T, Device> hsolver::DiagoLOBPCG< T, Device >::algebra_
private

Distributed products and reusable conversion/rotation scratch.

◆ axpy_op_

template<typename T = std::complex<double>, typename Device = base_device::DEVICE_CPU>
axpy_op hsolver::DiagoLOBPCG< T, Device >::axpy_op_
private

◆ comm_

template<typename T = std::complex<double>, typename Device = base_device::DEVICE_CPU>
const diag_comm_info hsolver::DiagoLOBPCG< T, Device >::comm_
private

Communicator/rank for distributed rows of one eigensolve.

◆ copy_op_

template<typename T = std::complex<double>, typename Device = base_device::DEVICE_CPU>
copy_op hsolver::DiagoLOBPCG< T, Device >::copy_op_
private

◆ device_type_

template<typename T = std::complex<double>, typename Device = base_device::DEVICE_CPU>
ct::DeviceType hsolver::DiagoLOBPCG< T, Device >::device_type_ = ct::DeviceType::UnKnown
private

Wavefunction/scratch storage device.

◆ e_red_

template<typename T = std::complex<double>, typename Device = base_device::DEVICE_CPU>
ct::Tensor hsolver::DiagoLOBPCG< T, Device >::e_red_
private

Host eigenvalue output of the current reduced problem.

◆ eig_

template<typename T = std::complex<double>, typename Device = base_device::DEVICE_CPU>
ct::Tensor hsolver::DiagoLOBPCG< T, Device >::eig_
private

Host Ritz values for all n_max_ columns, including locked columns.

◆ eig_device_

template<typename T = std::complex<double>, typename Device = base_device::DEVICE_CPU>
ct::Tensor hsolver::DiagoLOBPCG< T, Device >::eig_device_
private

Active Ritz values on Device for preconditioning.

◆ error_message_

template<typename T = std::complex<double>, typename Device = base_device::DEVICE_CPU>
std::string hsolver::DiagoLOBPCG< T, Device >::error_message_
private

Failure reason supplied by RR or recovery.

◆ evec_

template<typename T = std::complex<double>, typename Device = base_device::DEVICE_CPU>
ct::Tensor hsolver::DiagoLOBPCG< T, Device >::evec_
private

Device rotation scratch, n_dim_ by n_max_.

◆ gpu_rr_solver_

template<typename T = std::complex<double>, typename Device = base_device::DEVICE_CPU>
dense::GpuDenseEigensolver& hsolver::DiagoLOBPCG< T, Device >::gpu_rr_solver_
private

Borrowed, reusable CUDA RR resources.

◆ hspace_

template<typename T = std::complex<double>, typename Device = base_device::DEVICE_CPU>
ct::Tensor hsolver::DiagoLOBPCG< T, Device >::hspace_
private

H images matching the columns of space_.

◆ hx_new_

template<typename T = std::complex<double>, typename Device = base_device::DEVICE_CPU>
ct::Tensor hsolver::DiagoLOBPCG< T, Device >::hx_new_
private

Updated H images needed by residuals and the next trial basis.

◆ iterations_

template<typename T = std::complex<double>, typename Device = base_device::DEVICE_CPU>
int hsolver::DiagoLOBPCG< T, Device >::iterations_ = 0
private

Main-loop RR iterations in the last diag call; excludes initial RR.

◆ layout_

template<typename T = std::complex<double>, typename Device = base_device::DEVICE_CPU>
const LobpcgBasisLayout hsolver::DiagoLOBPCG< T, Device >::layout_
private

Physical rows and spinor count within each stored column.

◆ locking_

template<typename T = std::complex<double>, typename Device = base_device::DEVICE_CPU>
const LobpcgLocking hsolver::DiagoLOBPCG< T, Device >::locking_
private

Hard freezes the converged prefix; soft retains all X in RR.

◆ n_band_

template<typename T = std::complex<double>, typename Device = base_device::DEVICE_CPU>
int hsolver::DiagoLOBPCG< T, Device >::n_band_ = 0
private

Number of requested eigenpairs returned to the caller.

◆ n_dim_

template<typename T = std::complex<double>, typename Device = base_device::DEVICE_CPU>
int hsolver::DiagoLOBPCG< T, Device >::n_dim_ = 0
private

Local column leading dimension, including spinor padding.

◆ n_max_

template<typename T = std::complex<double>, typename Device = base_device::DEVICE_CPU>
int hsolver::DiagoLOBPCG< T, Device >::n_max_ = 0
private

Internal block width: requested bands plus dimension-limited buffer bands.

◆ nrm2_op_

template<typename T = std::complex<double>, typename Device = base_device::DEVICE_CPU>
nrm2_op hsolver::DiagoLOBPCG< T, Device >::nrm2_op_
private

◆ para_rr_bs_

template<typename T = std::complex<double>, typename Device = base_device::DEVICE_CPU>
const int hsolver::DiagoLOBPCG< T, Device >::para_rr_bs_ = 0
private

Distributed RR block size; zero selects automatically.

◆ para_rr_method_

template<typename T = std::complex<double>, typename Device = base_device::DEVICE_CPU>
const int hsolver::DiagoLOBPCG< T, Device >::para_rr_method_ = 0
private

RR backend: local (0) or ScaLAPACK (2).

◆ prec_

template<typename T = std::complex<double>, typename Device = base_device::DEVICE_CPU>
ct::Tensor hsolver::DiagoLOBPCG< T, Device >::prec_
private

Device copy of the caller's diagonal preconditioner input, n_dim_ entries.

◆ precondition_op_

template<typename T = std::complex<double>, typename Device = base_device::DEVICE_CPU>
precondition_op<T, Device> hsolver::DiagoLOBPCG< T, Device >::precondition_op_
private

◆ r_type_

template<typename T = std::complex<double>, typename Device = base_device::DEVICE_CPU>
ct::DataType hsolver::DiagoLOBPCG< T, Device >::r_type_ = ct::DataType::DT_INVALID
private

Tensor element type corresponding to Real.

◆ residual_

template<typename T = std::complex<double>, typename Device = base_device::DEVICE_CPU>
ct::Tensor hsolver::DiagoLOBPCG< T, Device >::residual_
private

Device residuals HX - SX*Lambda, active columns at their band offsets.

◆ ritz_coefficients_

template<typename T = std::complex<double>, typename Device = base_device::DEVICE_CPU>
ct::Tensor hsolver::DiagoLOBPCG< T, Device >::ritz_coefficients_
private

Host T coefficients C, capacity 3*n_max_ by n_max_.

◆ rr_solver_

template<typename T = std::complex<double>, typename Device = base_device::DEVICE_CPU>
dense::ParallelDenseEigensolver& hsolver::DiagoLOBPCG< T, Device >::rr_solver_
private

Borrowed, reusable distributed CPU RR resources.

◆ space_

template<typename T = std::complex<double>, typename Device = base_device::DEVICE_CPU>
ct::Tensor hsolver::DiagoLOBPCG< T, Device >::space_
private

Device basis [X,P,W], capacity n_dim_ by 3*n_max_.

◆ sspace_

template<typename T = std::complex<double>, typename Device = base_device::DEVICE_CPU>
ct::Tensor hsolver::DiagoLOBPCG< T, Device >::sspace_
private

Explicit S images matching space_; unused for S = I.

◆ sx_new_

template<typename T = std::complex<double>, typename Device = base_device::DEVICE_CPU>
ct::Tensor hsolver::DiagoLOBPCG< T, Device >::sx_new_
private

Updated S images; unused for S = I.

◆ t_type_

template<typename T = std::complex<double>, typename Device = base_device::DEVICE_CPU>
ct::DataType hsolver::DiagoLOBPCG< T, Device >::t_type_ = ct::DataType::DT_INVALID
private

Tensor element type corresponding to T.

◆ u_p_

template<typename T = std::complex<double>, typename Device = base_device::DEVICE_CPU>
ct::Tensor hsolver::DiagoLOBPCG< T, Device >::u_p_
private

Host T history coefficients C_P, compacted/scaled together with P.

◆ use_overlap_

template<typename T = std::complex<double>, typename Device = base_device::DEVICE_CPU>
const bool hsolver::DiagoLOBPCG< T, Device >::use_overlap_
private

Store and apply explicit S images instead of S = I.

◆ x_new_

template<typename T = std::complex<double>, typename Device = base_device::DEVICE_CPU>
ct::Tensor hsolver::DiagoLOBPCG< T, Device >::x_new_
private

Device updated Ritz vectors; hard-locked prefix stays unchanged.

◆ zero_

template<typename T = std::complex<double>, typename Device = base_device::DEVICE_CPU>
const T hsolver::DiagoLOBPCG< T, Device >::zero_ = static_cast<T>(0.0)
private

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