Octopus
output_modelmb.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
23 use global_oct_m
24 use grid_oct_m
25 use io_oct_m
27 use ions_oct_m
28 use, intrinsic :: iso_fortran_env
30 use mesh_oct_m
33 use output_oct_m
36 use space_oct_m
39 use unit_oct_m
41 use young_oct_m
42
43
44 implicit none
45
46 private
47 public :: &
49
50contains
51
52 ! ---------------------------------------------------------
53 subroutine output_modelmb(outp, namespace, space, dir, gr, ions, iter, st)
54 type(output_t), intent(in) :: outp
55 type(namespace_t), intent(in) :: namespace
56 class(space_t), intent(in) :: space
57 character(len=*), intent(in) :: dir
58 type(grid_t), intent(in) :: gr
59 type(ions_t), intent(in) :: ions
60 integer, intent(in) :: iter
61 type(states_elec_t), intent(inout) :: st
62
63
64 push_sub(output_modelmb)
65 call profiling_in("OUTPUT_MODELMB")
66
67 if (outp%what_now(option__output__mmb_den, iter) .or. outp%what_now(option__output__mmb_wfs, iter)) then
68 if (states_are_real(st)) then
69 call doutput_modelmb(outp, namespace, space, trim(dir), gr, st, ions)
70 else
71 call zoutput_modelmb(outp, namespace, space, trim(dir), gr, st, ions)
72 end if
73 end if
74
75 call profiling_out("OUTPUT_MODELMB")
76 pop_sub(output_modelmb)
77 end subroutine output_modelmb
78
79#include "undef.F90"
80#include "complex.F90"
81#include "output_modelmb_inc.F90"
82
83#include "undef.F90"
84#include "real.F90"
85#include "output_modelmb_inc.F90"
86
87end module output_modelmb_oct_m
88
89!! Local Variables:
90!! mode: f90
91!! coding: utf-8
92!! End:
This module implements the underlying real-space grid.
Definition: grid.F90:117
Definition: io.F90:114
This module defines the meshes, which are used in Octopus.
Definition: mesh.F90:118
this module contains the output system
Definition: output_low.F90:115
subroutine, public output_modelmb(outp, namespace, space, dir, gr, ions, iter, st)
subroutine zoutput_modelmb(outp, namespace, space, dir, mesh, st, ions)
routine for output of model many-body quantities.
subroutine doutput_modelmb(outp, namespace, space, dir, mesh, st, ions)
routine for output of model many-body quantities.
this module contains the output system
Definition: output.F90:115
subroutine, public profiling_out(label)
Increment out counter and sum up difference between entry and exit time.
Definition: profiling.F90:623
subroutine, public profiling_in(label, exclude)
Increment in counter and save entry time.
Definition: profiling.F90:552
pure logical function, public states_are_real(st)
brief This module defines the class unit_t which is used by the unit_systems_oct_m module.
Definition: unit.F90:132
This module defines the unit system, used for input and output.