Octopus
interaction_partner_oct_m Module Reference

This module defines classes and functions for interaction partners. More...

Detailed Description

This module defines classes and functions for interaction partners.

Interaction partners are general objects, which define the "source" of an interaction (interaction_oct_m::interaction_t).

Data Types

interface  interaction_partner_copy_quantities_to_interaction
 
interface  interaction_partner_init_interaction_as_partner
 
type  interaction_partner_t
 abstract class for general interaction partners More...
 
type  partner_iterator_t
 iterator for the list of partners More...
 
type  partner_list_t
 the list of partners More...
 

Functions/Subroutines

recursive subroutine interaction_partner_add_partners_to_list (this, list, interaction_type)
 add interaction partner to a list More...
 
subroutine interaction_partner_update_quantity (this, iq)
 Method to be overriden by interaction partners that have quantities that can be updated on demand. More...
 
subroutine interaction_partner_update_on_demand_quantities (this, quantities, requested_iteration, retardation_allowed)
 Given a list of quantities, update the ones that can be update on demand. More...
 
integer function interaction_partner_check_couplings_status (this, couplings, requested_iteration)
 Check the status of some couplings. More...
 
subroutine partner_list_add_node (this, partner)
 add a partner to the list More...
 
class(interaction_partner_t) function, pointer partner_iterator_get_next (this)
 get next partner from the list More...
 

Variables

integer, parameter, public couplings_undefined = 0
 
integer, parameter, public couplings_behind_in_time = 1
 
integer, parameter, public couplings_on_time = 2
 
integer, parameter, public couplings_ahead_in_time = 3
 

Function/Subroutine Documentation

◆ interaction_partner_add_partners_to_list()

recursive subroutine interaction_partner_oct_m::interaction_partner_add_partners_to_list ( class(interaction_partner_t), intent(in)  this,
class(partner_list_t), intent(inout)  list,
integer, intent(in), optional  interaction_type 
)
private

add interaction partner to a list

If the interaciton_type is provided, the partner is only added to the list if it supports that interaction.

Definition at line 200 of file interaction_partner.F90.

◆ interaction_partner_update_quantity()

subroutine interaction_partner_oct_m::interaction_partner_update_quantity ( class(interaction_partner_t), intent(inout)  this,
integer, intent(in)  iq 
)
private

Method to be overriden by interaction partners that have quantities that can be updated on demand.

This routine simply throws an error, as it is not mean to be called. We could have implemented this as a deferred method, but we prefer not to force interaction partners that do not have quantities to be updated on demand to implement it.

Definition at line 223 of file interaction_partner.F90.

◆ interaction_partner_update_on_demand_quantities()

subroutine interaction_partner_oct_m::interaction_partner_update_on_demand_quantities ( class(interaction_partner_t), intent(inout), target  this,
integer, dimension(:), intent(in)  quantities,
class(iteration_counter_t), intent(in)  requested_iteration,
logical, intent(in)  retardation_allowed 
)
private

Given a list of quantities, update the ones that can be update on demand.

For each quantity that is not always available, the update will only take place if the quantity can be evaluated at the requested iteration. Currently we also allow for a special case: some quantities are allowed to get ahead by one iteration if "retardation_allowed" is set to true.

Definition at line 244 of file interaction_partner.F90.

◆ interaction_partner_check_couplings_status()

integer function interaction_partner_oct_m::interaction_partner_check_couplings_status ( class(interaction_partner_t), intent(inout)  this,
integer, dimension(:), intent(in)  couplings,
class(iteration_counter_t), intent(in)  requested_iteration 
)
private

Check the status of some couplings.

Possible results are:

  • COUPLINGS_UNDEFINED: if there are some couplings ahead in time and some on time
  • COUPLINGS_BEHIND_IN_TIME: if any coupling is behind in time and COUPLINGS_UNDEFINED condition is not met
  • COUPLINGS_ON_TIME: if all couplings are right on time
  • COUPLINGS_AHEAD_IN_TIME: if all couplings are ahead in time

Definition at line 292 of file interaction_partner.F90.

◆ partner_list_add_node()

subroutine interaction_partner_oct_m::partner_list_add_node ( class(partner_list_t this,
class(interaction_partner_t), target  partner 
)
private

add a partner to the list

Parameters
thisthe partner list
partnerthe partner to add

Definition at line 326 of file interaction_partner.F90.

◆ partner_iterator_get_next()

class(interaction_partner_t) function, pointer interaction_partner_oct_m::partner_iterator_get_next ( class(partner_iterator_t), intent(inout)  this)
private

get next partner from the list

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

Definition at line 340 of file interaction_partner.F90.

Variable Documentation

◆ couplings_undefined

integer, parameter, public interaction_partner_oct_m::couplings_undefined = 0

Definition at line 124 of file interaction_partner.F90.

◆ couplings_behind_in_time

integer, parameter, public interaction_partner_oct_m::couplings_behind_in_time = 1

Definition at line 124 of file interaction_partner.F90.

◆ couplings_on_time

integer, parameter, public interaction_partner_oct_m::couplings_on_time = 2

Definition at line 124 of file interaction_partner.F90.

◆ couplings_ahead_in_time

integer, parameter, public interaction_partner_oct_m::couplings_ahead_in_time = 3

Definition at line 124 of file interaction_partner.F90.