|
ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
|
PW Crank-Nicolson numerical solves with fixed previous-step orbitals. More...
#include <cn_solver_pw.h>
Classes | |
| struct | KPointState |
| struct | SequenceState |
| struct | BatchLayout |
| struct | SolveDetails |
Public Member Functions | |
| CNSolverPW (const ModulePW::PW_Basis_K &basis, const CNControls &cn_ctrl, int npol, const std::vector< int > &global_k, const diag_comm_info &comm, std::ostream &log) | |
| Configure propagation with explicit numerical controls and orbital layout. | |
| void | invalidate_basis () |
| Invalidate basis-dependent history and restart independent residual checks without releasing buffers. Call on every rank in the pool after changing the basis or its distribution, including G-vector ordering or k-point changes that preserve array sizes. Ordinary Hamiltonian updates and ionic motion at fixed basis do not require this notification. | |
| void | solve (HSOperator< T, Device > &op, const psi::Psi< T, Device > &previous, psi::Psi< T, Device > *current, const double dt, const ModuleBase::Vector3< double > &momentum_shift, const int istep, const int iter, const bool detailed_output) |
| Propagate from the fixed previous step, retaining the current iterate as the initial guess. | |
Private Types | |
| using | Real = typename GetTypeReal<T>::type |
Private Member Functions | |
| void | initialize () |
| bool | tracks_state () const |
| void | prepare_sequence (int nk, int ld, int bands, double dt, int step, int iteration) |
| bool | require_audit (int step, KPointState *state) const |
| SolveDetails | solve_kpoint (const LinearOperator< T, Device > &op, const T *previous, T *current, const BatchLayout &batch, int step, int iteration, KPointState *state) |
| void | retry_kinetic (const LinearOperator< T, Device > &op, T *current, const BatchLayout &batch, LinearSolveResult *result) |
| void | update_state (KPointState *state, const SolveDetails &details, int step, const BatchLayout &batch, const T *current) |
| void | report_solve (const SolveDetails &details, int ik, int step, int iteration) const |
| void | prepare_buffers (const int nbands, const int nbasis) |
| void | update_precond (const int ik, const int dim, const T coefficient, const ModuleBase::Vector3< double > &momentum_shift) |
Private Attributes | |
| const ModulePW::PW_Basis_K & | basis_ |
| const diag_comm_info | comm_ |
| CNControls | cn_ctrl_ |
| const int | npol_ |
| const std::vector< int > | global_k_ |
| ct::Tensor | clean_ |
| LinearAlgebra< T, Device > | algebra_ |
| std::ostream & | log_ |
| CNSubspace< T, Device > | projection_ |
| std::vector< KPointState > | states_ |
| SequenceState | sequence_ |
| std::unique_ptr< HSolverLinear< T, Device > > | linear_solver_ |
| ct::Tensor | rhs_ |
| ct::Tensor | inverse_kinetic_ |
| ct::Tensor | response_workspace_ |
| ct::Tensor | correction_workspace_ |
PW Crank-Nicolson numerical solves with fixed previous-step orbitals.
|
private |
| hsolver::CNSolverPW< T, Device >::CNSolverPW | ( | const ModulePW::PW_Basis_K & | basis, |
| const CNControls & | cn_ctrl, | ||
| int | npol, | ||
| const std::vector< int > & | global_k, | ||
| const diag_comm_info & | comm, | ||
| std::ostream & | log ) |
Configure propagation with explicit numerical controls and orbital layout.
|
private |
| void hsolver::CNSolverPW< T, Device >::invalidate_basis | ( | ) |
Invalidate basis-dependent history and restart independent residual checks without releasing buffers. Call on every rank in the pool after changing the basis or its distribution, including G-vector ordering or k-point changes that preserve array sizes. Ordinary Hamiltonian updates and ionic motion at fixed basis do not require this notification.
|
private |
|
private |
|
private |
|
private |
|
private |
| void hsolver::CNSolverPW< T, Device >::solve | ( | HSOperator< T, Device > & | op, |
| const psi::Psi< T, Device > & | previous, | ||
| psi::Psi< T, Device > * | current, | ||
| const double | dt, | ||
| const ModuleBase::Vector3< double > & | momentum_shift, | ||
| const int | istep, | ||
| const int | iter, | ||
| const bool | detailed_output ) |
Propagate from the fixed previous step, retaining the current iterate as the initial guess.
| dt | Electronic time step in Hartree atomic units. |
| momentum_shift | Propagation vector potential in Hartree atomic units (inverse Bohr). |
| istep | Electronic propagation step, increasing across electronic substeps within an MD step. |
| iter | SCF iteration within this electronic step. |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |