66 procedure(perturbation_info),
deferred :: info
67 procedure(dperturbation_apply),
deferred :: dapply
68 procedure(zperturbation_apply),
deferred :: zapply
69 procedure(dperturbation_apply_order_2),
deferred :: dapply_order_2
70 procedure(zperturbation_apply_order_2),
deferred :: zapply_order_2
82 class(perturbation_t),
intent(in) :: this
83 type(namespace_t),
intent(in) :: namespace
84 class(space_t),
intent(in) :: space
85 type(grid_t),
intent(in) :: gr
86 type(hamiltonian_elec_t),
intent(in) :: hm
87 integer,
intent(in) :: ik
88 real(real64),
contiguous,
intent(in) :: f_in(:, :)
89 real(real64),
contiguous,
intent(out) :: f_out(:, :)
90 logical,
optional,
intent(in) :: set_bc
101 class(perturbation_t),
intent(in) :: this
102 type(namespace_t),
intent(in) :: namespace
103 class(space_t),
intent(in) :: space
104 type(grid_t),
intent(in) :: gr
105 type(hamiltonian_elec_t),
intent(in) :: hm
106 integer,
intent(in) :: ik
107 complex(real64),
contiguous,
intent(in) :: f_in(:, :)
108 complex(real64),
contiguous,
intent(out) :: f_out(:, :)
109 logical,
optional,
intent(in) :: set_bc
120 class(perturbation_t),
intent(in) :: this
121 type(namespace_t),
intent(in) :: namespace
122 class(space_t),
intent(in) :: space
123 type(grid_t),
intent(in) :: gr
124 type(hamiltonian_elec_t),
intent(in) :: hm
125 integer,
intent(in) :: ik
126 real(real64),
contiguous,
intent(in) :: f_in(:, :)
127 real(real64),
contiguous,
intent(out) :: f_out(:, :)
138 class(perturbation_t),
intent(in) :: this
139 type(namespace_t),
intent(in) :: namespace
140 class(space_t),
intent(in) :: space
141 type(grid_t),
intent(in) :: gr
142 type(hamiltonian_elec_t),
intent(in) :: hm
143 integer,
intent(in) :: ik
144 complex(real64),
contiguous,
intent(in) :: f_in(:, :)
145 complex(real64),
contiguous,
intent(out) :: f_out(:, :)
165 this%dir = source%dir
166 this%dir2 = source%dir2
174 integer,
intent(in) :: dir
175 integer,
optional,
intent(in) :: dir2
180 if (
present(dir2))
then
193 class(
space_t),
intent(in) :: space
194 type(
grid_t),
intent(in) :: gr
200 real(real64),
allocatable :: dfi(:, :), dfo(:, :)
201 complex(real64),
allocatable :: zfi(:, :), zfo(:, :)
205 assert(f_in%status() == f_out%status())
208 safe_allocate(dfi(1:gr%np, 1:hm%d%dim))
209 safe_allocate(dfo(1:gr%np, 1:hm%d%dim))
213 call this%dapply(namespace, space, gr, hm, f_in%ik, dfi, dfo)
217 safe_deallocate_a(dfi)
218 safe_deallocate_a(dfo)
222 safe_allocate(zfi(1:gr%np, 1:hm%d%dim))
223 safe_allocate(zfo(1:gr%np, 1:hm%d%dim))
227 call this%zapply(namespace, space, gr, hm, f_in%ik, zfi, zfo)
231 safe_deallocate_a(zfi)
232 safe_deallocate_a(zfo)
242#include "perturbation_inc.F90"
245#include "complex.F90"
246#include "perturbation_inc.F90"
There are several ways how to call batch_set_state and batch_get_state:
This module implements batches of mesh functions.
This module implements common operations on batches of mesh functions.
Module implementing boundary conditions in Octopus.
This module calculates the derivatives (gradients, Laplacians, etc.) of a function.
This module implements the underlying real-space grid.
This module defines functions over batches of mesh functions.
This module defines various routines, operating on mesh functions.
This module defines the meshes, which are used in Octopus.
real(real64) function dperturbation_expectation_value(this, namespace, space, gr, hm, st, psia, psib, perturbation_order)
subroutine zperturbation_expectation_density(this, namespace, space, gr, hm, st, psia, psib, density, perturbation_order)
This routine includes occupations for psib if perturbation_order == 2, correct if used as ....
subroutine perturbation_apply_batch(this, namespace, space, gr, hm, f_in, f_out)
complex(real64) function zperturbation_states_elec_expectation_value(this, namespace, space, gr, hm, st, perturbation_order)
subroutine, public perturbation_copy(this, source)
complex(real64) function zperturbation_expectation_value(this, namespace, space, gr, hm, st, psia, psib, perturbation_order)
subroutine perturbation_setup_dir(this, dir, dir2)
real(real64) function dperturbation_states_elec_expectation_value(this, namespace, space, gr, hm, st, perturbation_order)
subroutine dperturbation_expectation_density(this, namespace, space, gr, hm, st, psia, psib, density, perturbation_order)
This routine includes occupations for psib if perturbation_order == 2, correct if used as ....
This module handles spin dimensions of the states and the k-point distribution.
type(type_t), parameter, public type_float
Description of the grid, containing information on derivatives, stencil, and symmetries.
batches of electronic states