Octopus
propagator_qoct.F90
Go to the documentation of this file.
1!! Copyright (C) 2002-2006 M. Marques, A. Castro, A. Rubio, G. Bertsch
2!!
3!! This program is free software; you can redistribute it and/or modify
4!! it under the terms of the GNU General Public License as published by
5!! the Free Software Foundation; either version 2, or (at your option)
6!! any later version.
7!!
8!! This program is distributed in the hope that it will be useful,
9!! but WITHOUT ANY WARRANTY; without even the implied warranty of
10!! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11!! GNU General Public License for more details.
12!!
13!! You should have received a copy of the GNU General Public License
14!! along with this program; if not, write to the Free Software
15!! Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
16!! 02110-1301, USA.
17!!
18
19#include "global.h"
20
22 use debug_oct_m
28 use grid_oct_m
29 use global_oct_m
33 use ions_oct_m
35 use lasers_oct_m
39 use parser_oct_m
43 use space_oct_m
45 use xc_oct_m
46
47 implicit none
48
49 private
50
51 public :: &
53
54contains
55
56 ! ---------------------------------------------------------
58 subroutine td_qoct_tddft_propagator(hm, namespace, space, gr, st, tr, time, dt, ions_dyn, ions, ext_partners)
59 type(hamiltonian_elec_t), intent(inout) :: hm
60 type(namespace_t), intent(in) :: namespace
61 type(electron_space_t), intent(in) :: space
62 type(grid_t), intent(inout) :: gr
63 type(states_elec_t), intent(inout) :: st
64 type(propagator_base_t), intent(inout) :: tr
65 real(real64), intent(in) :: time, dt
66 type(ion_dynamics_t), intent(inout) :: ions_dyn
67 type(ions_t), intent(inout) :: ions
68 type(partner_list_t), intent(in) :: ext_partners
69
70 type(gauge_field_t), pointer :: gfield
71
73
74 !TODO: Add gauge field support
75 gfield => list_get_gauge_field(ext_partners)
76 if(associated(gfield)) then
77 assert(gauge_field_is_propagated(gfield) .eqv. .false.)
78 end if
79
80 if (.not. oct_exchange_enabled(hm%oct_exchange)) then
81 call hm%ks_pot%interpolate_potentials(tr%vks_old, 2, time, dt, time-dt/m_two)
82 end if
83
84 !move the ions to time 'time - dt/2'
85 call propagation_ops_elec_move_ions(tr%propagation_ops_elec, gr, hm, st, namespace, space, ions_dyn, ions, &
86 ext_partners, time - m_half*dt, m_half*dt, save_pos = .true.)
87
88 call propagation_ops_elec_update_hamiltonian(namespace, space, st, gr, hm, ext_partners, time-dt/m_two)
89
90 call exponential_apply_all(tr%te, namespace, gr, hm, st, dt)
91
92 call density_calc(st, gr, st%rho)
93
94 !restore to time 'time - dt'
95 call propagation_ops_elec_restore_ions(tr%propagation_ops_elec, ions_dyn, ions)
96
98 end subroutine td_qoct_tddft_propagator
99 ! ---------------------------------------------------------
100
101end module propagator_qoct_oct_m
102
103!! Local Variables:
104!! mode: f90
105!! coding: utf-8
106!! End:
This module implements a calculator for the density and defines related functions.
Definition: density.F90:120
subroutine, public density_calc(st, gr, density, istin)
Computes the density from the orbitals in st.
Definition: density.F90:609
subroutine, public exponential_apply_all(te, namespace, mesh, hm, st, deltat, order)
Note that this routine not only computes the exponential, but also an extra term if there is a inhomo...
type(gauge_field_t) function, pointer, public list_get_gauge_field(partners)
logical pure function, public gauge_field_is_propagated(this)
real(real64), parameter, public m_two
Definition: global.F90:190
real(real64), parameter, public m_half
Definition: global.F90:194
This module implements the underlying real-space grid.
Definition: grid.F90:117
This module defines classes and functions for interaction partners.
A module to handle KS potential, without the external potential.
logical function, public oct_exchange_enabled(this)
subroutine, public propagation_ops_elec_restore_ions(wo, ions_dyn, ions)
subroutine, public propagation_ops_elec_move_ions(wo, gr, hm, st, namespace, space, ions_dyn, ions, ext_partners, time, dt, save_pos)
subroutine, public propagation_ops_elec_update_hamiltonian(namespace, space, st, mesh, hm, ext_partners, time)
subroutine, public td_qoct_tddft_propagator(hm, namespace, space, gr, st, tr, time, dt, ions_dyn, ions, ext_partners)
Propagator specifically designed for the QOCT+TDDFT problem.
int true(void)