67 procedure(perturbation_info),
deferred :: info
68 procedure(dperturbation_apply),
deferred :: dapply
69 procedure(zperturbation_apply),
deferred :: zapply
70 procedure(dperturbation_apply_order_2),
deferred :: dapply_order_2
71 procedure(zperturbation_apply_order_2),
deferred :: zapply_order_2
83 class(perturbation_t),
intent(in) :: this
84 type(namespace_t),
intent(in) :: namespace
85 class(space_t),
intent(in) :: space
86 type(grid_t),
intent(in) :: gr
87 type(hamiltonian_elec_t),
intent(in) :: hm
88 integer,
intent(in) :: ik
89 real(real64),
contiguous,
intent(in) :: f_in(:, :)
90 real(real64),
contiguous,
intent(out) :: f_out(:, :)
91 logical,
optional,
intent(in) :: set_bc
102 class(perturbation_t),
intent(in) :: this
103 type(namespace_t),
intent(in) :: namespace
104 class(space_t),
intent(in) :: space
105 type(grid_t),
intent(in) :: gr
106 type(hamiltonian_elec_t),
intent(in) :: hm
107 integer,
intent(in) :: ik
108 complex(real64),
contiguous,
intent(in) :: f_in(:, :)
109 complex(real64),
contiguous,
intent(out) :: f_out(:, :)
110 logical,
optional,
intent(in) :: set_bc
121 class(perturbation_t),
intent(in) :: this
122 type(namespace_t),
intent(in) :: namespace
123 class(space_t),
intent(in) :: space
124 type(grid_t),
intent(in) :: gr
125 type(hamiltonian_elec_t),
intent(in) :: hm
126 integer,
intent(in) :: ik
127 real(real64),
contiguous,
intent(in) :: f_in(:, :)
128 real(real64),
contiguous,
intent(out) :: f_out(:, :)
139 class(perturbation_t),
intent(in) :: this
140 type(namespace_t),
intent(in) :: namespace
141 class(space_t),
intent(in) :: space
142 type(grid_t),
intent(in) :: gr
143 type(hamiltonian_elec_t),
intent(in) :: hm
144 integer,
intent(in) :: ik
145 complex(real64),
contiguous,
intent(in) :: f_in(:, :)
146 complex(real64),
contiguous,
intent(out) :: f_out(:, :)
166 this%dir = source%dir
167 this%dir2 = source%dir2
175 integer,
intent(in) :: dir
176 integer,
optional,
intent(in) :: dir2
181 if (
present(dir2)) this%dir2 = dir2
190 class(
space_t),
intent(in) :: space
191 type(
grid_t),
intent(in) :: gr
197 real(real64),
allocatable :: dfi(:, :), dfo(:, :)
198 complex(real64),
allocatable :: zfi(:, :), zfo(:, :)
202 assert(f_in%status() == f_out%status())
205 safe_allocate(dfi(1:gr%np, 1:hm%d%dim))
206 safe_allocate(dfo(1:gr%np, 1:hm%d%dim))
210 call this%dapply(namespace, space, gr, hm, f_in%ik, dfi, dfo)
214 safe_deallocate_a(dfi)
215 safe_deallocate_a(dfo)
219 safe_allocate(zfi(1:gr%np, 1:hm%d%dim))
220 safe_allocate(zfo(1:gr%np, 1:hm%d%dim))
224 call this%zapply(namespace, space, gr, hm, f_in%ik, zfi, zfo)
228 safe_deallocate_a(zfi)
229 safe_deallocate_a(zfo)
239#include "perturbation_inc.F90"
242#include "complex.F90"
243#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), public type_float
Description of the grid, containing information on derivatives, stencil, and symmetries.
batches of electronic states