Octopus
quantity_oct_m Module Reference

This module defines the quantity_t class and the IDs for quantities, which can be exposed by a system, and used by an interaction. More...

Detailed Description

This module defines the quantity_t class and the IDs for quantities, which can be exposed by a system, and used by an interaction.

A special case of quantities, the so-called couplings are used to transfer information from a system to the interactions. Other quantities can be used for output purposes.

An interaction partner (derived from interaction_partner_t) needs to add any necessary quantity to its list of quantities. When doing this, it is important to correctly set the properties of the quantities:

call thisquantitiesadd(quantity_t(<quantity_label>, updated_on_demand = (.true. | .false.), always_available = (.true. | .false.)))

where "this" is the interaction partner instance. For the details of these flags see the documentation of quantity_t

Interactions also need to declare, which quantities they require from the system and the interaction partner:

! From the system: thissystem_quantities = [<system_quantity1_label>, <system_quantity2_label>, ...]

! From the partner: thiscouplings_from_partner = [<partner_quantity1_label>, <partner_quantity1_label>, ...]

Data Types

type  quantity_iterator_t
 
type  quantity_list_t
 These classes extends the list and list iterator to create a quantity list. More...
 
interface  quantity_t
 Systems (system_t) can expose quantities that can be used to calculate interactions with other systems. More...
 

Functions/Subroutines

type(quantity_t) function quantity_constructor (label, always_available, updated_on_demand, iteration, parents)
 
subroutine quantity_list_add_node (this, quantity)
 add a quantity to the list More...
 
class(quantity_t) function, pointer quantity_list_get (this, label)
 get pointer to quantity with given label More...
 
logical function, dimension(size(labels)) quantity_list_always_available (this, labels)
 Return if given quantities are always available or not. More...
 
logical function, dimension(size(labels)) quantity_list_iteration_equal (this, labels, iteration)
 Return if given quantities are at a given iteration. More...
 
class(quantity_t) function, pointer quantity_iterator_get_next (this)
 get next quantity from the list More...
 

Function/Subroutine Documentation

◆ quantity_constructor()

type(quantity_t) function quantity_oct_m::quantity_constructor ( character(len=*), intent(in)  label,
logical, intent(in), optional  always_available,
logical, intent(in), optional  updated_on_demand,
type(iteration_counter_t), intent(in), optional  iteration,
character(len=*), dimension(:), intent(in), optional  parents 
)
private

Definition at line 205 of file quantity.F90.

◆ quantity_list_add_node()

subroutine quantity_oct_m::quantity_list_add_node ( class(quantity_list_t this,
class(quantity_t), target  quantity 
)
private

add a quantity to the list

Parameters
thisthe quantity list
quantitythe quantity to add

Definition at line 239 of file quantity.F90.

◆ quantity_list_get()

class(quantity_t) function, pointer quantity_oct_m::quantity_list_get ( class(quantity_list_t), intent(in)  this,
character(len=*), intent(in)  label 
)
private

get pointer to quantity with given label

Parameters
[in]thisthe quantity list
[in]labelthe label of the quantity to get
Returns
pointer to quantity

Definition at line 250 of file quantity.F90.

◆ quantity_list_always_available()

logical function, dimension(size(labels)) quantity_oct_m::quantity_list_always_available ( class(quantity_list_t), intent(in)  this,
character(len=*), dimension(:), intent(in)  labels 
)
private

Return if given quantities are always available or not.

Parameters
[in]thisthe quantity list
[in]labelslabels of the quantities to check

Definition at line 275 of file quantity.F90.

◆ quantity_list_iteration_equal()

logical function, dimension(size(labels)) quantity_oct_m::quantity_list_iteration_equal ( class(quantity_list_t), intent(in)  this,
character(len=*), dimension(:), intent(in)  labels,
type(iteration_counter_t), intent(in)  iteration 
)
private

Return if given quantities are at a given iteration.

Parameters
[in]thisthe quantity list
[in]labelslabels of the quantities to check

Definition at line 292 of file quantity.F90.

◆ quantity_iterator_get_next()

class(quantity_t) function, pointer quantity_oct_m::quantity_iterator_get_next ( class(quantity_iterator_t), intent(inout)  this)
private

get next quantity from the list

Parameters
[in,out]thisthe list iterator
Returns
the next element of the list

Definition at line 312 of file quantity.F90.