|
13 | 13 | #include "norm_psi.h" |
14 | 14 | #include "propagator.h" |
15 | 15 | #include "upsi.h" |
| 16 | +#include "solve_propagation.h" |
16 | 17 |
|
17 | 18 | #include <complex> |
18 | 19 |
|
@@ -69,19 +70,30 @@ void evolve_psi(const int nband, |
69 | 70 | } |
70 | 71 |
|
71 | 72 | // (2)->>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> |
72 | | - |
73 | | - /// @brief compute U_operator |
74 | | - /// @input Stmp, Htmp, print_matrix |
75 | | - /// @output U_operator |
76 | | - Propagator prop(propagator, pv, PARAM.mdp.md_dt); |
77 | | - prop.compute_propagator(nlocal, Stmp, Htmp, H_laststep, U_operator, ofs_running, print_matrix); |
| 73 | + if (propagator != 3) |
| 74 | + { |
| 75 | + /// @brief compute U_operator |
| 76 | + /// @input Stmp, Htmp, print_matrix |
| 77 | + /// @output U_operator |
| 78 | + Propagator prop(propagator, pv, PARAM.mdp.md_dt); |
| 79 | + prop.compute_propagator(nlocal, Stmp, Htmp, H_laststep, U_operator, ofs_running, print_matrix); |
| 80 | + } |
78 | 81 |
|
79 | 82 | // (3)->>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> |
80 | | - |
81 | | - /// @brief apply U_operator to the wave function of the previous step for new wave function |
82 | | - /// @input U_operator, psi_k_laststep, print_matrix |
83 | | - /// @output psi_k |
84 | | - upsi(pv, nband, nlocal, U_operator, psi_k_laststep, psi_k, ofs_running, print_matrix); |
| 83 | + if (propagator != 3) |
| 84 | + { |
| 85 | + /// @brief apply U_operator to the wave function of the previous step for new wave function |
| 86 | + /// @input U_operator, psi_k_laststep, print_matrix |
| 87 | + /// @output psi_k |
| 88 | + upsi(pv, nband, nlocal, U_operator, psi_k_laststep, psi_k, ofs_running, print_matrix); |
| 89 | + } |
| 90 | + else |
| 91 | + { |
| 92 | + /// @brief solve the propagation equation |
| 93 | + /// @input Stmp, Htmp, psi_k_laststep |
| 94 | + /// @output psi_k |
| 95 | + solve_propagation(pv, nband, nlocal, PARAM.mdp.md_dt / ModuleBase::AU_to_FS, Stmp, Htmp, psi_k_laststep, psi_k); |
| 96 | + } |
85 | 97 |
|
86 | 98 | // (4)->>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> |
87 | 99 |
|
|
0 commit comments