Octopus
system_oct_m Module Reference

This module implements the abstract system type. More...

Detailed Description

This module implements the abstract system type.

Data Types

type  barrier_t
 
interface  system_do_algorithmic_operation
 Execute one operation that is part of a larger algorithm. Returns true if the operation was successfully executed, false otherwise. More...
 
interface  system_init_interaction
 initialize a given interaction of the system More...
 
interface  system_initial_conditions
 set initial conditions for a system More...
 
interface  system_is_tolerance_reached
 check whether a system has reached a given tolerance More...
 
type  system_iterator_t
 
type  system_list_t
 These classes extends the list and list iterator to create a system list. More...
 
interface  system_restart_read_data
 
interface  system_restart_write_data
 
interface  system_store_current_status
 
type  system_t
 Abstract class for systems. More...
 
interface  system_update_exposed_quantity
 
interface  system_update_kinetic_energy
 
interface  system_update_quantity
 

Functions/Subroutines

subroutine, public system_execute_algorithm (this)
 perform one or more algorithmic operations More...
 
subroutine, public system_reset_clocks (this, accumulated_ticks)
 
logical function system_update_exposed_quantities (partner, requested_time, interaction)
 update all exposed quantities of the system. More...
 
subroutine system_init_all_interactions (this)
 
logical function system_update_interactions (this)
 
subroutine system_update_interactions_start (this)
 
subroutine system_update_interactions_finish (this)
 
subroutine, public system_restart_write (this)
 
logical function, public system_restart_read (this)
 
subroutine system_output_start (this)
 
subroutine system_output_write (this)
 
subroutine system_output_finish (this)
 
subroutine, public system_init_algorithm (this, factory)
 
recursive logical function system_algorithm_finished (this)
 
subroutine, public system_init_clocks (this)
 
subroutine, public system_propagation_start (this)
 
subroutine, public system_propagation_finish (this)
 
subroutine system_iteration_info (this)
 
logical function system_process_is_slave (this)
 
subroutine, public system_end (this)
 
subroutine system_list_add_node (this, partner)
 
recursive logical function system_list_contains (this, partner)
 
class(system_t) function, pointer system_iterator_get_next (this)
 
subroutine, public system_init_parallelization (this, grp)
 Basic functionality: copy the MPI group. This function needs to be implemented by extended types that need more initialization for their parallelization. More...
 
subroutine system_start_barrier (this, target_time, barrier_index)
 
subroutine system_end_barrier (this, barrier_index)
 
logical function system_arrived_at_barrier (this, barrier_index)
 
logical function system_arrived_at_any_barrier (this)
 
subroutine, public system_update_potential_energy (this)
 Calculate the potential energy of the system. The potential energy is defined as the sum of all energies arising from interactions with external systems. (Note that multisystems override this function) More...
 
subroutine system_update_internal_energy (this)
 Calculate the internal energy of the system. The internal energy is defined as the sum of all energies arising from intra-interactions and the entropy terms (if available). (Note that multisystems override this function) More...
 
subroutine, public system_update_total_energy (this)
 Calculate the total energy of the system. The total energy is defined as the sum of the kinetic, the internal and the potential energies. More...
 

Variables

integer, parameter, public number_barriers = 1
 
integer, parameter, public barrier_restart = 1
 

Function/Subroutine Documentation

◆ system_execute_algorithm()

subroutine, public system_oct_m::system_execute_algorithm ( class(system_t), intent(inout)  this)

perform one or more algorithmic operations

The following subroutine takes a system and performs as many algorithmic operations as possible on the system until a barrier is reached. There are two types of barriers:

  • explicit barriers, implemented using the barrier_t type
  • the interaction update

The interaction update is always considered a barrier, even if the update was successful. This is to allow other system to also update their interactions before this system moves on to the next operations.

Definition at line 337 of file system.F90.

◆ system_reset_clocks()

subroutine, public system_oct_m::system_reset_clocks ( class(system_t), intent(inout)  this,
integer, intent(in)  accumulated_ticks 
)

Definition at line 455 of file system.F90.

◆ system_update_exposed_quantities()

logical function system_oct_m::system_update_exposed_quantities ( class(system_t), intent(inout)  partner,
type(clock_t), intent(in)  requested_time,
class(interaction_t), intent(inout)  interaction 
)
private

update all exposed quantities of the system.

this function is called as partner from the interaction

Definition at line 503 of file system.F90.

◆ system_init_all_interactions()

subroutine system_oct_m::system_init_all_interactions ( class(system_t), intent(inout)  this)
private

Definition at line 606 of file system.F90.

◆ system_update_interactions()

logical function system_oct_m::system_update_interactions ( class(system_t), intent(inout)  this)
private

Definition at line 632 of file system.F90.

◆ system_update_interactions_start()

subroutine system_oct_m::system_update_interactions_start ( class(system_t), intent(inout)  this)
private

Definition at line 727 of file system.F90.

◆ system_update_interactions_finish()

subroutine system_oct_m::system_update_interactions_finish ( class(system_t), intent(inout)  this)
private

Definition at line 739 of file system.F90.

◆ system_restart_write()

subroutine, public system_oct_m::system_restart_write ( class(system_t), intent(inout)  this)

Definition at line 751 of file system.F90.

◆ system_restart_read()

logical function, public system_oct_m::system_restart_read ( class(system_t), intent(inout)  this)

Definition at line 790 of file system.F90.

◆ system_output_start()

subroutine system_oct_m::system_output_start ( class(system_t), intent(inout)  this)
private

Definition at line 834 of file system.F90.

◆ system_output_write()

subroutine system_oct_m::system_output_write ( class(system_t), intent(inout)  this)
private

Definition at line 846 of file system.F90.

◆ system_output_finish()

subroutine system_oct_m::system_output_finish ( class(system_t), intent(inout)  this)
private

Definition at line 858 of file system.F90.

◆ system_init_algorithm()

subroutine, public system_oct_m::system_init_algorithm ( class(system_t), intent(inout)  this,
class(algorithm_factory_t), intent(in)  factory 
)

Definition at line 870 of file system.F90.

◆ system_algorithm_finished()

recursive logical function system_oct_m::system_algorithm_finished ( class(system_t), intent(in)  this)
private

Definition at line 913 of file system.F90.

◆ system_init_clocks()

subroutine, public system_oct_m::system_init_clocks ( class(system_t), intent(inout)  this)

Definition at line 922 of file system.F90.

◆ system_propagation_start()

subroutine, public system_oct_m::system_propagation_start ( class(system_t), intent(inout)  this)

Definition at line 955 of file system.F90.

◆ system_propagation_finish()

subroutine, public system_oct_m::system_propagation_finish ( class(system_t), intent(inout)  this)

Definition at line 1008 of file system.F90.

◆ system_iteration_info()

subroutine system_oct_m::system_iteration_info ( class(system_t), intent(in)  this)
private

Definition at line 1041 of file system.F90.

◆ system_process_is_slave()

logical function system_oct_m::system_process_is_slave ( class(system_t), intent(in)  this)
private

Definition at line 1070 of file system.F90.

◆ system_end()

subroutine, public system_oct_m::system_end ( class(system_t), intent(inout)  this)

Definition at line 1082 of file system.F90.

◆ system_list_add_node()

subroutine system_oct_m::system_list_add_node ( class(system_list_t this,
class(interaction_partner_t), target  partner 
)
private

Definition at line 1105 of file system.F90.

◆ system_list_contains()

recursive logical function system_oct_m::system_list_contains ( class(system_list_t this,
class(interaction_partner_t), target  partner 
)
private

Definition at line 1122 of file system.F90.

◆ system_iterator_get_next()

class(system_t) function, pointer system_oct_m::system_iterator_get_next ( class(system_iterator_t), intent(inout)  this)
private

Definition at line 1150 of file system.F90.

◆ system_init_parallelization()

subroutine, public system_oct_m::system_init_parallelization ( class(system_t), intent(inout)  this,
type(mpi_grp_t), intent(in)  grp 
)

Basic functionality: copy the MPI group. This function needs to be implemented by extended types that need more initialization for their parallelization.

Definition at line 1170 of file system.F90.

◆ system_start_barrier()

subroutine system_oct_m::system_start_barrier ( class(system_t), intent(inout)  this,
real(8), intent(in)  target_time,
integer, intent(in)  barrier_index 
)
private

Definition at line 1185 of file system.F90.

◆ system_end_barrier()

subroutine system_oct_m::system_end_barrier ( class(system_t), intent(inout)  this,
integer, intent(in)  barrier_index 
)
private

Definition at line 1199 of file system.F90.

◆ system_arrived_at_barrier()

logical function system_oct_m::system_arrived_at_barrier ( class(system_t), intent(inout)  this,
integer, intent(in)  barrier_index 
)
private

Definition at line 1212 of file system.F90.

◆ system_arrived_at_any_barrier()

logical function system_oct_m::system_arrived_at_any_barrier ( class(system_t), intent(inout)  this)
private

Definition at line 1232 of file system.F90.

◆ system_update_potential_energy()

subroutine, public system_oct_m::system_update_potential_energy ( class(system_t), intent(inout)  this)

Calculate the potential energy of the system. The potential energy is defined as the sum of all energies arising from interactions with external systems. (Note that multisystems override this function)

Definition at line 1254 of file system.F90.

◆ system_update_internal_energy()

subroutine system_oct_m::system_update_internal_energy ( class(system_t), intent(inout)  this)
private

Calculate the internal energy of the system. The internal energy is defined as the sum of all energies arising from intra-interactions and the entropy terms (if available). (Note that multisystems override this function)

Definition at line 1281 of file system.F90.

◆ system_update_total_energy()

subroutine, public system_oct_m::system_update_total_energy ( class(system_t), intent(inout)  this)

Calculate the total energy of the system. The total energy is defined as the sum of the kinetic, the internal and the potential energies.

External energy as the sum over interaction energies

Self energy arises from the interaction with itself

Definition at line 1306 of file system.F90.

Variable Documentation

◆ number_barriers

integer, parameter, public system_oct_m::number_barriers = 1

Definition at line 157 of file system.F90.

◆ barrier_restart

integer, parameter, public system_oct_m::barrier_restart = 1

Definition at line 157 of file system.F90.