Octopus
perturbation_none.F90
Go to the documentation of this file.
1!! Copyright (C) 2007 X. Andrade
2!! Copyright (C) 2021 N. Tancogne-Dejean
3!!
4!! This program is free software; you can redistribute it and/or modify
5!! it under the terms of the GNU General Public License as published by
6!! the Free Software Foundation; either version 2, or (at your option)
7!! any later version.
8!!
9!! This program is distributed in the hope that it will be useful,
10!! but WITHOUT ANY WARRANTY; without even the implied warranty of
11!! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12!! GNU General Public License for more details.
13!!
14!! You should have received a copy of the GNU General Public License
15!! along with this program; if not, write to the Free Software
16!! Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
17!! 02110-1301, USA.
18!!
19
20#include "global.h"
21
23 use batch_oct_m
25 use debug_oct_m
26 use global_oct_m
27 use grid_oct_m
29 use mesh_oct_m
34 use space_oct_m
36
37 implicit none
38
39 private
40 public :: &
42
43 type, extends(perturbation_t) :: perturbation_none_t
44 private
45 contains
46 procedure :: copy => perturbation_none_copy
47 generic :: assignment(=) => copy
48 procedure :: info => perturbation_none_info
49 procedure :: dapply => dperturbation_none_apply
50 procedure :: zapply => zperturbation_none_apply
51 procedure :: apply_batch => perturbation_none_apply_batch
52 procedure :: dapply_order_2 => dperturbation_none_apply_order_2
53 procedure :: zapply_order_2 => zperturbation_none_apply_order_2
55 end type perturbation_none_t
56
57 interface perturbation_none_t
58 procedure perturbation_none_constructor
59 end interface perturbation_none_t
60
61contains
62
63 ! ---------------------------------------------------------
68 function perturbation_none_constructor(namespace) result(pert)
69 class(perturbation_none_t), pointer :: pert
70 type(namespace_t), intent(in) :: namespace
71
73
74 safe_allocate(pert)
75
76 call perturbation_none_init(pert, namespace)
77
80
81 ! --------------------------------------------------------------------
82 subroutine perturbation_none_init(this, namespace)
83 type(perturbation_none_t), intent(out) :: this
84 type(namespace_t), intent(in) :: namespace
85
87
88 this%dir = -1
89 this%dir2 = -1
90
92 end subroutine perturbation_none_init
93
94 ! --------------------------------------------------------------------
95 subroutine perturbation_none_finalize(this)
96 type(perturbation_none_t), intent(inout) :: this
97
99
101 end subroutine perturbation_none_finalize
102
103 ! --------------------------------------------------------------------
104 subroutine perturbation_none_copy(this, source)
105 class(perturbation_none_t), intent(out) :: this
106 class(perturbation_none_t), intent(in) :: source
107
108 push_sub(perturbation_none_copy)
109
110 call perturbation_copy(this, source)
111
113 end subroutine perturbation_none_copy
114
116 ! --------------------------------------------------------------------
117 subroutine perturbation_none_info(this)
118 class(perturbation_none_t), intent(in) :: this
119
120 push_sub(perturbation_none_info)
121
123 end subroutine perturbation_none_info
124
125 ! --------------------------------------------------------------------------
126 subroutine perturbation_none_apply_batch(this, namespace, space, gr, hm, f_in, f_out)
127 class(perturbation_none_t), intent(in) :: this
128 type(namespace_t), intent(in) :: namespace
129 class(space_t), intent(in) :: space
130 type(grid_t), intent(in) :: gr
131 type(hamiltonian_elec_t), intent(in) :: hm
132 type(wfs_elec_t), intent(in) :: f_in
133 type(wfs_elec_t), intent(inout) :: f_out
134
137 assert(f_in%status() == f_out%status())
138
139 call batch_set_zero(f_out)
146#include "undef.F90"
147#include "real.F90"
148#include "perturbation_none_inc.F90"
149
150#include "undef.F90"
151#include "complex.F90"
152#include "perturbation_none_inc.F90"
153
155
156!! Local Variables:
157!! mode: f90
158!! coding: utf-8
159!! End:
This module implements batches of mesh functions.
Definition: batch.F90:133
This module implements common operations on batches of mesh functions.
Definition: batch_ops.F90:116
subroutine, public batch_set_zero(this, np, async)
fill all mesh functions of the batch with zero
Definition: batch_ops.F90:240
This module implements the underlying real-space grid.
Definition: grid.F90:117
This module defines the meshes, which are used in Octopus.
Definition: mesh.F90:118
subroutine dperturbation_none_apply_order_2(this, namespace, space, gr, hm, ik, f_in, f_out)
subroutine zperturbation_none_apply_order_2(this, namespace, space, gr, hm, ik, f_in, f_out)
subroutine perturbation_none_apply_batch(this, namespace, space, gr, hm, f_in, f_out)
subroutine perturbation_none_copy(this, source)
subroutine zperturbation_none_apply(this, namespace, space, gr, hm, ik, f_in, f_out, set_bc)
Returns f_out = H' f_in, where H' is perturbation Hamiltonian Note that e^ikr phase is applied to f_i...
subroutine perturbation_none_init(this, namespace)
subroutine perturbation_none_info(this)
subroutine dperturbation_none_apply(this, namespace, space, gr, hm, ik, f_in, f_out, set_bc)
Returns f_out = H' f_in, where H' is perturbation Hamiltonian Note that e^ikr phase is applied to f_i...
subroutine perturbation_none_finalize(this)
class(perturbation_none_t) function, pointer perturbation_none_constructor(namespace)
The factory routine (or constructor) allocates a pointer of the corresponding type and then calls the...
subroutine, public perturbation_copy(this, source)