Octopus
propagator_magnus_oct_m Module Reference

Data Types

interface  magnus3_linear_operator_t
 Class to encapsulate the operation for the explicit Magnus 3 propagator. More...
 
interface  magnus3_operator_t
 
interface  magnus4_operator_t
 Class to encapsulate linear combinations of two Hamiltonians. More...
 

Functions/Subroutines

subroutine, public td_magnus (hm, ext_partners, gr, st, tr, namespace, time, dt)
 Magnus propagator. More...
 
type(magnus4_operator_t) function, pointer magnus4_operator_constructor (namespace, mesh, hm, vmagnus)
 
subroutine magnus4_operator_apply (this, psib, hpsib)
 
type(magnus3_linear_operator_t) function, pointer magnus3_linear_operator_constructor (namespace, mesh, hm1, hm2, c1, c2)
 Build a linear Hamiltonian operator c1*H1 + c2*H2. More...
 
subroutine magnus3_apply_stage_in_ref_phase (namespace, mesh, hm_ref, hm_stage, psib, hpsib)
 Apply a stage Hamiltonian in the reference Hamiltonian phase convention. More...
 
subroutine magnus3_linear_operator_apply (this, psib, hpsib)
 Apply the linear Hamiltonian operator for the explicit Magnus-3 stages. More...
 
type(magnus3_operator_t) function, pointer magnus3_operator_constructor (namespace, mesh, hm1, hm2, hm3, hm4, dt)
 Build the explicit Magnus-3 final-stage operator from stage Hamiltonians. More...
 
subroutine magnus3_operator_apply (this, psib, hpsib)
 Apply the explicit Magnus-3 operator (weighted stage sum plus commutator term). The equation refers to: Casas, F. & Iserles, A. Explicit Magnus expansions for nonlinear equations. J. Phys. A: Math. Gen. 39, 5445 (2006) [https: More...
 
subroutine, public td_explicit_magnus3 (ks, namespace, space, hm, gr, st, tr, time, dt, ions_dyn, ions, ext_partners, mc)
 Third-order explicit Magnus propagator. This implements equation (22) from Casas, F. & Iserles, A. Explicit Magnus expansions for nonlinear equations. J. Phys. A: Math. Gen. 39, 5445 (2006) [https: More...
 
subroutine, public td_cfmagnus4 (ks, namespace, space, hm, gr, st, tr, time, dt, ions_dyn, ions, ext_partners, mc, iter)
 Commutator-free Magnus propagator of order 4. This method has been developed for linear systems and involves products of exponentials to avoid commutators. To apply it to our non-linear equations, we extrapolate the potential from previous timesteps to the times needed. The fourth-ordermethod implemented here follows equation 54 in G\U000000f3mez Pueyo, A., Marques, M. A. L., Rubio, A. & Castro, A. Propagators for the Time-Dependent Kohn–Sham Equations: Multistep, Runge–Kutta, Exponential Runge–Kutta, and Commutator Free Magnus Methods. J. Chem. Theory Comput. 14, 3040–3052 (2018) which corresponds to equation 43 in Blanes, S. & Moan, P. C. Fourth- and sixth-order commutator-free Magnus integrators for linear and non-linear dynamical systems. Applied Numerical Mathematics 56, 1519–1537 (2006): <math> \psi(t+\Delta t) = \exp(-i \Delta t ( \alpha_1 H(t_1) + \alpha_2 H(t_2) ) ) \exp(-i \Delta t ( \alpha_2 H(t_1) + \alpha_1 H(t_2) ) ) \psi(t), </math> with $\alpha_{1,2} = \frac{3\mp 2\sqrt{3}}{12}$ and $t_i = t_0 + c_i \Delta t$, $c_{1,2} = \frac{1}{2} \mp \frac{\sqrt{3}}{6}$. More...
 

Function/Subroutine Documentation

◆ td_magnus()

subroutine, public propagator_magnus_oct_m::td_magnus ( type(hamiltonian_elec_t), intent(inout)  hm,
type(partner_list_t), intent(in)  ext_partners,
type(grid_t), intent(in)  gr,
type(states_elec_t), intent(inout)  st,
type(propagator_base_t), intent(inout)  tr,
type(namespace_t), intent(in)  namespace,
real(real64), intent(in)  time,
real(real64), intent(in)  dt 
)

Magnus propagator.

Definition at line 210 of file propagator_magnus.F90.

◆ magnus4_operator_constructor()

type(magnus4_operator_t) function, pointer propagator_magnus_oct_m::magnus4_operator_constructor ( type(namespace_t), intent(in), target  namespace,
class(mesh_t), intent(in), target  mesh,
class(hamiltonian_abst_t), intent(in), target  hm,
real(real64), dimension(:, :, :), intent(in)  vmagnus 
)
private

Definition at line 279 of file propagator_magnus.F90.

◆ magnus4_operator_apply()

subroutine propagator_magnus_oct_m::magnus4_operator_apply ( class(magnus4_operator_t), intent(in)  this,
class(batch_t), intent(inout)  psib,
class(batch_t), intent(inout)  hpsib 
)
private

Definition at line 305 of file propagator_magnus.F90.

◆ magnus3_linear_operator_constructor()

type(magnus3_linear_operator_t) function, pointer propagator_magnus_oct_m::magnus3_linear_operator_constructor ( type(namespace_t), intent(in), target  namespace,
class(mesh_t), intent(in), target  mesh,
type(hamiltonian_elec_t), intent(in), target  hm1,
type(hamiltonian_elec_t), intent(in), target  hm2,
real(real64), intent(in)  c1,
real(real64), intent(in)  c2 
)
private

Build a linear Hamiltonian operator c1*H1 + c2*H2.

Definition at line 372 of file propagator_magnus.F90.

◆ magnus3_apply_stage_in_ref_phase()

subroutine propagator_magnus_oct_m::magnus3_apply_stage_in_ref_phase ( type(namespace_t), intent(in)  namespace,
class(mesh_t), intent(in)  mesh,
type(hamiltonian_elec_t), intent(in)  hm_ref,
type(hamiltonian_elec_t), intent(in)  hm_stage,
type(wfs_elec_t), intent(inout)  psib,
type(wfs_elec_t), intent(inout)  hpsib 
)
private

Apply a stage Hamiltonian in the reference Hamiltonian phase convention.

Definition at line 395 of file propagator_magnus.F90.

◆ magnus3_linear_operator_apply()

subroutine propagator_magnus_oct_m::magnus3_linear_operator_apply ( class(magnus3_linear_operator_t), intent(in)  this,
class(batch_t), intent(inout)  psib,
class(batch_t), intent(inout)  hpsib 
)
private

Apply the linear Hamiltonian operator for the explicit Magnus-3 stages.

Definition at line 424 of file propagator_magnus.F90.

◆ magnus3_operator_constructor()

type(magnus3_operator_t) function, pointer propagator_magnus_oct_m::magnus3_operator_constructor ( type(namespace_t), intent(in), target  namespace,
class(mesh_t), intent(in), target  mesh,
type(hamiltonian_elec_t), intent(in), target  hm1,
type(hamiltonian_elec_t), intent(in), target  hm2,
type(hamiltonian_elec_t), intent(in), target  hm3,
type(hamiltonian_elec_t), intent(in), target  hm4,
real(real64), intent(in)  dt 
)
private

Build the explicit Magnus-3 final-stage operator from stage Hamiltonians.

Definition at line 467 of file propagator_magnus.F90.

◆ magnus3_operator_apply()

subroutine propagator_magnus_oct_m::magnus3_operator_apply ( class(magnus3_operator_t), intent(in)  this,
class(batch_t), intent(inout)  psib,
class(batch_t), intent(inout)  hpsib 
)
private

Apply the explicit Magnus-3 operator (weighted stage sum plus commutator term). The equation refers to: Casas, F. & Iserles, A. Explicit Magnus expansions for nonlinear equations. J. Phys. A: Math. Gen. 39, 5445 (2006) [https:

Definition at line 495 of file propagator_magnus.F90.

◆ td_explicit_magnus3()

subroutine, public propagator_magnus_oct_m::td_explicit_magnus3 ( type(v_ks_t), intent(inout)  ks,
type(namespace_t), intent(in)  namespace,
type(electron_space_t), intent(in)  space,
type(hamiltonian_elec_t), intent(inout), target  hm,
type(grid_t), intent(inout), target  gr,
type(states_elec_t), intent(inout), target  st,
type(propagator_base_t), intent(inout), target  tr,
real(real64), intent(in)  time,
real(real64), intent(in)  dt,
type(ion_dynamics_t), intent(inout)  ions_dyn,
type(ions_t), intent(inout)  ions,
type(partner_list_t), intent(in)  ext_partners,
type(multicomm_t), intent(inout)  mc 
)

Third-order explicit Magnus propagator. This implements equation (22) from Casas, F. & Iserles, A. Explicit Magnus expansions for nonlinear equations. J. Phys. A: Math. Gen. 39, 5445 (2006) [https:

Definition at line 586 of file propagator_magnus.F90.

◆ td_cfmagnus4()

subroutine, public propagator_magnus_oct_m::td_cfmagnus4 ( type(v_ks_t), intent(inout), target  ks,
type(namespace_t), intent(in)  namespace,
type(electron_space_t), intent(in)  space,
type(hamiltonian_elec_t), intent(inout), target  hm,
type(grid_t), intent(inout), target  gr,
type(states_elec_t), intent(inout), target  st,
type(propagator_base_t), intent(inout), target  tr,
real(real64), intent(in)  time,
real(real64), intent(in)  dt,
type(ion_dynamics_t), intent(inout)  ions_dyn,
type(ions_t), intent(inout)  ions,
type(partner_list_t), intent(in)  ext_partners,
type(multicomm_t), intent(inout)  mc,
integer, intent(in)  iter 
)

Commutator-free Magnus propagator of order 4. This method has been developed for linear systems and involves products of exponentials to avoid commutators. To apply it to our non-linear equations, we extrapolate the potential from previous timesteps to the times needed. The fourth-ordermethod implemented here follows equation 54 in G\U000000f3mez Pueyo, A., Marques, M. A. L., Rubio, A. & Castro, A. Propagators for the Time-Dependent Kohn–Sham Equations: Multistep, Runge–Kutta, Exponential Runge–Kutta, and Commutator Free Magnus Methods. J. Chem. Theory Comput. 14, 3040–3052 (2018) which corresponds to equation 43 in Blanes, S. & Moan, P. C. Fourth- and sixth-order commutator-free Magnus integrators for linear and non-linear dynamical systems. Applied Numerical Mathematics 56, 1519–1537 (2006): <math> \psi(t+\Delta t) = \exp(-i \Delta t ( \alpha_1 H(t_1) + \alpha_2 H(t_2) ) ) \exp(-i \Delta t ( \alpha_2 H(t_1) + \alpha_1 H(t_2) ) ) \psi(t), </math> with $\alpha_{1,2} = \frac{3\mp 2\sqrt{3}}{12}$ and $t_i = t_0 + c_i \Delta t$, $c_{1,2} = \frac{1}{2} \mp \frac{\sqrt{3}}{6}$.

Definition at line 708 of file propagator_magnus.F90.