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

#include <init.hpp>

+ Inheritance diagram for q3::PlanewaveDiagonalizer:

Public Member Functions

 ~PlanewaveDiagonalizer () override=default
 
virtual void invalidate_smooth_potential_cache ()
 
virtual int number_of_unconverged_bands () const
 
virtual void release_workspace ()
 
virtual void set_basis_expansion_factor (int)
 
virtual void set_cached_hubbard_projectors (int, const q3::Matrix< Complex > *)
 
virtual void set_cached_projectors (int, const q3::Matrix< Complex > *)
 
virtual void set_hubbard_d_matrix (const std::vector< Complex > *)
 
virtual void set_maximum_iterations (int)
 
virtual void solve (int kpoint_index_state, int kpoint_index, int number_of_plane_waves, int number_of_bands, const std::vector< int > &g_vector_indices, const std::vector< Real > &kinetic_energy_squared, const std::vector< Real > &real_space_potential, const Crystal &crystal_structure, const KPointsGrid &kpoint_grid, const PlanewaveBasis &planewave_basis, const NormConservingPlanewaveKohnShamQuantumSystem &pseudopotential_quantum_system, PlanewaveKohnShamQuantumSystem &quantum_system)=0
 
- Public Member Functions inherited from q3::Diagonalizer
virtual ~Diagonalizer ()=default
 
virtual std::string name () const =0
 
virtual void set_first_iteration (bool)
 
virtual void set_tolerance (Real)
 

Detailed Description

Definition at line 26 of file init.hpp.

Constructor & Destructor Documentation

◆ ~PlanewaveDiagonalizer()

q3::PlanewaveDiagonalizer::~PlanewaveDiagonalizer ( )
overridedefault

Member Function Documentation

◆ invalidate_smooth_potential_cache()

virtual void q3::PlanewaveDiagonalizer::invalidate_smooth_potential_cache ( )
inlinevirtual

Invalidate any cached smooth grid potential. Called by the SCF iterator when the effective potential changes. No-op by default; overridden by solvers that cache the smooth potential.

Reimplemented in q3::PlanewaveDavidsonDiagonalizer.

Definition at line 108 of file init.hpp.

◆ number_of_unconverged_bands()

virtual int q3::PlanewaveDiagonalizer::number_of_unconverged_bands ( ) const
inlinevirtual

How many bands the last solve() returned without meeting its tolerance: zero when it converged, and always zero for a solver that is not iterative.

Reimplemented in q3::PlanewaveDavidsonDiagonalizer.

Definition at line 77 of file init.hpp.

◆ release_workspace()

virtual void q3::PlanewaveDiagonalizer::release_workspace ( )
inlinevirtual

Free the working arrays once nothing will call solve() again in this run: the eigenvectors live in the quantum system and survive, the working basis and its Hamiltonian image do not need to. A later solve() allocates afresh. No-op for solvers without a persistent workspace.

Reimplemented in q3::PlanewaveDavidsonDiagonalizer.

Definition at line 87 of file init.hpp.

◆ set_basis_expansion_factor()

virtual void q3::PlanewaveDiagonalizer::set_basis_expansion_factor ( int  )
inlinevirtual

Size the iterative working basis, as a multiple of the band count.

No-op for solvers that do not build one – the direct diagonalizer forms the whole Hamiltonian and has no working basis to size.

Reimplemented in q3::PlanewaveDavidsonDiagonalizer.

Definition at line 63 of file init.hpp.

◆ set_cached_hubbard_projectors()

virtual void q3::PlanewaveDiagonalizer::set_cached_hubbard_projectors ( int  ,
const q3::Matrix< Complex > *   
)
inlinevirtual

Set pre-computed DFT+U (Hubbard) atomic-orbital projectors for a specific k-point. No-op by default; overridden by solvers that support DFT+U (v1: Davidson only).

Reimplemented in q3::PlanewaveDavidsonDiagonalizer.

Definition at line 93 of file init.hpp.

◆ set_cached_projectors()

virtual void q3::PlanewaveDiagonalizer::set_cached_projectors ( int  ,
const q3::Matrix< Complex > *   
)
inlinevirtual

Set pre-computed KB projectors for a specific k-point. If set, the solver may use these instead of recomputing them. No-op by default; overridden by solvers that support caching.

Reimplemented in q3::PlanewaveDavidsonDiagonalizer, and q3::PlanewaveDirectDiagonalizer.

Definition at line 54 of file init.hpp.

◆ set_hubbard_d_matrix()

virtual void q3::PlanewaveDiagonalizer::set_hubbard_d_matrix ( const std::vector< Complex > *  )
inlinevirtual

Set the dense block-diagonal Hubbard D-matrix (see PlanewaveHamiltonianApplicator). No-op by default; overridden by solvers that support DFT+U (v1: Davidson only).

Reimplemented in q3::PlanewaveDavidsonDiagonalizer.

Definition at line 100 of file init.hpp.

◆ set_maximum_iterations()

virtual void q3::PlanewaveDiagonalizer::set_maximum_iterations ( int  )
inlinevirtual

Cap the iterations one solve() may take before it returns what it has.

No-op for solvers that are not iterative.

Reimplemented in q3::PlanewaveDavidsonDiagonalizer.

Definition at line 70 of file init.hpp.

◆ solve()

virtual void q3::PlanewaveDiagonalizer::solve ( int  kpoint_index_state,
int  kpoint_index,
int  number_of_plane_waves,
int  number_of_bands,
const std::vector< int > &  g_vector_indices,
const std::vector< Real > &  kinetic_energy_squared,
const std::vector< Real > &  real_space_potential,
const Crystal &  crystal_structure,
const KPointsGrid &  kpoint_grid,
const PlanewaveBasis &  planewave_basis,
const NormConservingPlanewaveKohnShamQuantumSystem &  pseudopotential_quantum_system,
PlanewaveKohnShamQuantumSystem &  quantum_system 
)
pure virtual

Solve the KS eigenvalue problem at one k-point. For NC-PP: H·ψ = ε·ψ (standard eigenvalue problem) For US-PP: H·ψ = ε·S·ψ (generalized eigenvalue problem)

Implemented in q3::PlanewaveDavidsonDiagonalizer, and q3::PlanewaveDirectDiagonalizer.


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