Octopus
quantity.F90
Go to the documentation of this file.
1!! Copyright (C) 2020 N. Tancogne-Dejean
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
43
44module quantity_oct_m
46 implicit none
47
48 private
49 public :: &
51
52 !# doc_start quantity
53 integer, public, parameter :: &
54 POSITION = 1, &
55 velocity = 2, &
56 current = 3, &
57 density = 4, &
58 scalar_potential = 5, &
59 vector_potential = 6, &
60 e_field = 7, &
61 b_field = 8, &
62 mass = 9, &
63 charge = 10, &
64 permittivity = 11, &
65 permeability = 12, &
66 e_conductivity = 13, &
67 m_conductivity = 14, &
68 dipole = 15, &
70 !# doc_end
71
72 character(len=17), public, parameter :: QUANTITY_LABEL(MAX_QUANTITIES) = (/ &
73 "position ", &
74 "velocity ", &
75 "current ", &
76 "density ", &
77 "scalar potential", &
78 "vector potential", &
79 "E field ", &
80 "B field ", &
81 "mass ", &
82 "charge ", &
83 "permittivity ", &
84 "permeability ", &
85 "e_conductivity ", &
86 "m_conductivity ", &
87 "dipole " &
88 /)
89
96 type quantity_t
97 private
98 type(iteration_counter_t), public :: iteration
99 ! !!
100 ! !! @note quantities dont have a constructor. The iteration counter is initialized automatically
101 ! !! for extenstions of system_t, but needs to be initialized explicitly for extensions of
102 ! !! interaction_partner_t, which are not systems.
103
104 logical, public :: required = .false.
105 ! !!
106 ! !! true means that they are needed by either some interaction
107 ! !! or because they are dynamical variables of the system
108 ! !! (i.e., they appear in the differential equations governing
109 ! !! the systems dynamics). This is just a flag saying that the
110 ! !! system needs to compute and store these quantities. It says
111 ! !! nothing about **when** they should be updated.
112
113 logical, public :: always_available = .false.
114 ! !!
115 ! !! (e.g., this will be true for a static quantity,
116 ! !! but false for a quantity that is only updated at specific iterations)
117
118 logical, public :: updated_on_demand = .true.
119 ! !!
120 ! !! If true, the quantity is only updated when requested. The quantity should be calculated (updated)
121 ! !! in the systems update_quantity() routine.
122 ! !!
123 ! !! If false, the quantity is updated automatically during the execution of an algorithm.
124 ! !! In this case, the quantity should be updated inside the do_algorithmic_operation() routine.
125
126 end type quantity_t
127
128contains
129
130end module quantity_oct_m
131
132!! Local Variables:
133!! mode: f90
134!! coding: utf-8
135!! End:
This module defines the quantity_t class and the IDs for quantities, which can be exposed by a system...
Definition: quantity.F90:137
integer, parameter, public density
Definition: quantity.F90:146
integer, parameter, public e_conductivity
Definition: quantity.F90:146
integer, parameter, public velocity
Definition: quantity.F90:146
integer, parameter, public m_conductivity
Definition: quantity.F90:146
integer, parameter, public permittivity
Definition: quantity.F90:146
integer, parameter, public permeability
Definition: quantity.F90:146
integer, parameter, public mass
Definition: quantity.F90:146
integer, parameter, public b_field
Definition: quantity.F90:146
integer, parameter, public current
Definition: quantity.F90:146
integer, parameter, public scalar_potential
Definition: quantity.F90:146
integer, parameter, public vector_potential
Definition: quantity.F90:146
integer, parameter, public dipole
Definition: quantity.F90:146
integer, parameter, public charge
Definition: quantity.F90:146
integer, parameter, public max_quantities
Definition: quantity.F90:146
integer, parameter, public e_field
Definition: quantity.F90:146
Systems (system_t) can expose quantities that can be used to calculate interactions with other system...
Definition: quantity.F90:189
int true(void)