Exposed quantities
Work in progress!
Systems can expose quantities that can be used to calculate interactions with other systems.
Some quantities are dynamical variables of the system. Such quantities are usually updated by the propagation algorithm and cannot be calculated on-demand. Such quantities must be marked as “protected”.
The module multisystem/quantity.F90 defines the parameters, which act as index to an exposed quantity within a system.
integer, public, parameter :: &
POSITION = 1, &
VELOCITY = 2, &
CURRENT = 3, &
DENSITY = 4, &
SCALAR_POTENTIAL = 5, &
VECTOR_POTENTIAL = 6, &
E_FIELD = 7, &
B_FIELD = 8, &
MASS = 9, &
CHARGE = 10, &
PERMITTIVITY = 11, &
PERMEABILITY = 12, &
E_CONDUCTIVITY = 13, &
M_CONDUCTIVITY = 14, &
MAX_QUANTITIES = 14
Any system, through its base class interaction_partner_t
owns an array of type quantity_t
type quantity_t
private
type(clock_t), public :: clock !< Clock storing the time at which the quantity was last updated.
logical, public :: required = .false. !< Should this quantities be calculated?
logical, public :: available_at_any_time = .false. !< Can we use this quantity at any requested time? (e.g., this will be true for a static quantity, but false for a quantity that is only updated at specific time-steps)
logical, public :: updated_on_demand = .true. !< If true, the quantity is only updated when requested. If false, the quantity is updated automatically during the execution of an algorithm.
end type quantity_t
This determines whether a quanity is required for a given system, and also associates a specific clock with each quantity.
''Protected'' quantities deserve some extra mention: Protected quantities are updated in the propagation step of the system, and do not need to be (cannot be) updated explicitely by update_exposed_quantity()
.