Octopus
x_fbe.F90
Go to the documentation of this file.
1!! Copyright (C) 2002-2006 M. Marques, A. Castro, A. Rubio, G. Bertsch
2!! Copyright (C) 2023 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
22module x_fbe_oct_m
23 use comm_oct_m
24 use debug_oct_m
28 use global_oct_m
29 use grid_oct_m
32 use mesh_oct_m
34 use mpi_oct_m
39 use space_oct_m
43
44 implicit none
45
46 private
47 public :: &
48 x_fbe_calc
49
50contains
51
53 subroutine x_fbe_calc (namespace, psolver, gr, der, st, ex, vxc)
54 type(namespace_t), intent(in) :: namespace
55 type(poisson_t), intent(in) :: psolver
56 type(grid_t), intent(in) :: gr
57 type(derivatives_t), intent(in) :: der
58 type(states_elec_t), intent(inout) :: st
59 real(real64), intent(inout) :: ex
60 real(real64), optional, intent(inout) :: vxc(:,:)
61
62 push_sub(x_fbe_calc)
63
64 if (states_are_real(st)) then
65 call dx_fbe_calc(namespace, psolver, gr, der, st, ex, vxc)
66 else
67 call zx_fbe_calc(namespace, psolver, gr, der, st, ex, vxc)
68 end if
69
70 pop_sub(x_fbe_calc)
71 end subroutine x_fbe_calc
72
73#include "undef.F90"
74#include "real.F90"
75#include "x_fbe_inc.F90"
76
77#include "undef.F90"
78#include "complex.F90"
79#include "x_fbe_inc.F90"
80
81end module x_fbe_oct_m
82
83!! Local Variables:
84!! mode: f90
85!! coding: utf-8
86!! End:
This module calculates the derivatives (gradients, Laplacians, etc.) of a function.
This module implements the underlying real-space grid.
Definition: grid.F90:117
This module defines various routines, operating on mesh functions.
This module defines the meshes, which are used in Octopus.
Definition: mesh.F90:118
This module is an helper to perform ring-pattern communications among all states.
pure logical function, public states_are_real(st)
This module handles spin dimensions of the states and the k-point distribution.