ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
td_prop_pw.h
Go to the documentation of this file.
1#ifndef PW_TD_PROP_PW_H
2#define PW_TD_PROP_PW_H
8
9namespace pw
10{
11enum class PropStage
12{
15};
16
18template <typename T, typename Device>
19class PWProp
20{
21 public:
22 virtual ~PWProp() = default;
23 virtual void begin_trial() = 0;
24 virtual void discard_trial() = 0;
25 virtual void invalidate_basis() = 0;
27 const TDHistoryPW<T, Device>& history,
28 elecstate::Potential& potential,
29 const elecstate::TDFieldManager& field,
30 psi::Psi<T, Device>* current,
31 int elec_step,
32 int scf_iter,
33 bool log_detail) = 0;
34};
35
37template <typename T, typename Device>
39{
40 private:
42 std::unique_ptr<hsolver::TDOrbOps<T, Device>> orb_ops_;
43 std::unique_ptr<PWProp<T, Device>> prop_;
44
45 public:
47 TDPropPW(const ModulePW::PW_Basis_K& basis,
48 std::unique_ptr<hsolver::TDOrbOps<T, Device>> orb_ops,
49 std::unique_ptr<PWProp<T, Device>> prop);
50 PropStage stage(int scf_iter) const;
51 void begin_trial();
52 void finish_trial();
53 void discard_trial();
54 void invalidate_basis();
59
61 elecstate::Potential& potential,
62 const TDHistoryPW<T, Device>& history,
63 const elecstate::TDFieldManager& field,
64 psi::Psi<T, Device>* current,
65 int elec_step,
66 int scf_iter,
67 bool log_detail);
68};
69
71template <typename T, typename Device>
72std::unique_ptr<TDPropPW<T, Device>> make_td_prop(const ModulePW::PW_Basis_K& basis,
73 const Input_para& input,
74 int npol,
75 const std::vector<int>& global_k,
76 const hsolver::diag_comm_info& comm,
77 std::ostream& log);
78} // namespace pw
79#endif
Special pw_basis class. It includes different k-points.
Definition pw_basis_k.h:56
Definition potential_new.h:58
Own and advance all time-dependent electric fields in RT-TDDFT.
Definition td_field_manager.h:36
Definition hamilt_pw.h:21
Definition td_orbital_ops.h:22
Definition psi.h:37
Method-specific wavefunction map; density and acceptance stay above it.
Definition td_prop_pw.h:20
virtual void discard_trial()=0
virtual void invalidate_basis()=0
virtual ~PWProp()=default
virtual void begin_trial()=0
virtual void evolve(TDHamiltPW< T, Device > &hamilt, const TDHistoryPW< T, Device > &history, elecstate::Potential &potential, const elecstate::TDFieldManager &field, psi::Psi< T, Device > *current, int elec_step, int scf_iter, bool log_detail)=0
A call-scoped PW sample; every k update refreshes shifted projectors.
Definition td_hamilt_pw.h:11
Accepted endpoint wavefunctions and potential snapshots.
Definition td_history_pw.h:33
void invalidate_basis()
Definition td_prop_pw.cpp:80
std::unique_ptr< hsolver::TDOrbOps< T, Device > > orb_ops_
Definition td_prop_pw.h:42
PropStage stage(int scf_iter) const
Definition td_prop_pw.cpp:60
void discard_trial()
Definition td_prop_pw.cpp:75
const ModulePW::PW_Basis_K & basis_
Definition td_prop_pw.h:41
void begin_trial()
Definition td_prop_pw.cpp:65
void finish_trial()
Definition td_prop_pw.cpp:70
TDPropPW(const ModulePW::PW_Basis_K &basis, std::unique_ptr< hsolver::TDOrbOps< T, Device > > orb_ops, std::unique_ptr< PWProp< T, Device > > prop)
Take ownership of the initialized orbital service and propagator.
Definition td_prop_pw.cpp:52
void evolve(hamilt::HamiltPW< T, Device > &hamilt, elecstate::Potential &potential, const TDHistoryPW< T, Device > &history, const elecstate::TDFieldManager &field, psi::Psi< T, Device > *current, int elec_step, int scf_iter, bool log_detail)
Restore the endpoint sample before returning to density construction.
Definition td_prop_pw.cpp:85
hsolver::TDOrbOps< T, Device > & orbitals()
Definition td_prop_pw.h:55
std::unique_ptr< PWProp< T, Device > > prop_
Definition td_prop_pw.h:43
Definition wf_op.cpp:6
Definition deltaspin_pw.cpp:7
PropStage
Definition td_prop_pw.h:12
@ predictor
Definition td_prop_pw.h:13
@ corrector
Definition td_prop_pw.h:14
std::unique_ptr< TDPropPW< T, Device > > make_td_prop(const ModulePW::PW_Basis_K &basis, const Input_para &input, int npol, const std::vector< int > &global_k, const hsolver::diag_comm_info &comm, std::ostream &log)
Resolve input controls and construct only the selected propagation method.
Definition td_prop_pw.cpp:11
Definition input_parameter.h:13
Definition diag_comm_info.h:12
Input_para input
Definition test_io_sys_var.cpp:58