Octopus
system_oct_m::system_t Type Reference

Abstract class for systems. More...

Detailed Description

Abstract class for systems.

All explicit systems are derived from this class.

Definition at line 172 of file system.F90.

Inheritance diagram for system_oct_m::system_t:
Inheritance graph

Public Attributes

type(iteration_counter_t), public iteration
 
class(algorithm_t), pointer, public algo => null()
 
integer, dimension(:), allocatable, public supported_interactions
 
type(interaction_list_t), public interactions
 List with all the interactions of this system. More...
 
type(mpi_grp_t), public grp
 mpi group for this system More...
 
real(real64), public kinetic_energy
 Energy not from interactions, like the kinetic energy. More...
 
real(real64), public potential_energy
 Energy from the interactions with external systems. More...
 
real(real64), public internal_energy
 Energy from the interactions with itself and for containers the kinetic energy of its constituents. More...
 
real(real64), public total_energy
 Sum of internal, external, and self energy. More...
 
- Public Attributes inherited from interaction_partner_oct_m::interaction_partner_t
type(namespace_t), public namespace
 
integer, dimension(:), allocatable, public supported_interactions_as_partner
 list of interactions, which support this interaction_partner_t as partner More...
 
type(quantity_t), dimension(max_quantities), public quantities
 Array of all possible quantities. The elements of the array are accessed using the quantity`s identifiers. More...
 

Private Member Functions

procedure execute_algorithm => system_execute_algorithm
 perform one or more algorithmic operations More...
 
procedure reset_iteration_counters => system_reset_iteration_counters
 
procedure init_algorithm => system_init_algorithm
 
procedure algorithm_finished => system_algorithm_finished
 
procedure init_iteration_counters => system_init_iteration_counters
 Initialize the iteration counters of the system and its interactions, algorithms and quantities. More...
 
procedure create_interactions => system_create_interactions
 create the interactions of the system More...
 
procedure init_parallelization => system_init_parallelization
 Basic functionality: copy the MPI group. This function needs to be implemented by extended types that need more initialization for their parallelization. More...
 
procedure update_couplings => system_update_couplings
 Update the couplings (quantities) of the interaction partners. More...
 
procedure update_interactions => system_update_interactions
 Attempt to update all interactions of the system. More...
 
procedure update_interactions_start => system_update_interactions_start
 
procedure update_interactions_finish => system_update_interactions_finish
 
procedure propagation_start => system_propagation_start
 
procedure propagation_finish => system_propagation_finish
 
procedure iteration_info => system_iteration_info
 
procedure restart_write => system_restart_write
 
procedure restart_read => system_restart_read
 
procedure output_start => system_output_start
 
procedure output_write => system_output_write
 
procedure output_finish => system_output_finish
 
procedure process_is_slave => system_process_is_slave
 
procedure start_barrier => system_start_barrier
 
procedure end_barrier => system_end_barrier
 
procedure arrived_at_barrier => system_arrived_at_barrier
 
procedure arrived_at_any_barrier => system_arrived_at_any_barrier
 
procedure update_potential_energy => system_update_potential_energy
 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...
 
procedure update_internal_energy => system_update_internal_energy
 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...
 
procedure update_total_energy => system_update_total_energy
 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...
 
procedure(system_init_interaction), deferred init_interaction
 initialize a given interaction of the system More...
 
procedure(system_initial_conditions), deferred initial_conditions
 set initial conditions for a system More...
 
procedure(system_do_algorithmic_operation), deferred do_algorithmic_operation
 Execute one operation that is part of a larger algorithm. Returns true if the operation was successfully executed, false otherwise. More...
 
procedure(system_is_tolerance_reached), deferred is_tolerance_reached
 check whether a system has reached a given tolerance More...
 
procedure(system_restart_write_data), deferred restart_write_data
 
procedure(system_restart_read_data), deferred restart_read_data
 
procedure(system_update_kinetic_energy), deferred update_kinetic_energy
 

Private Attributes

type(barrier_t), dimension(number_barriersbarrier
 

Member Function/Subroutine Documentation

◆ execute_algorithm()

procedure system_oct_m::system_t::execute_algorithm
private

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 couplings update

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

Definition at line 189 of file system.F90.

◆ reset_iteration_counters()

procedure system_oct_m::system_t::reset_iteration_counters
private

Definition at line 190 of file system.F90.

◆ init_algorithm()

procedure system_oct_m::system_t::init_algorithm
private

Definition at line 191 of file system.F90.

◆ algorithm_finished()

procedure system_oct_m::system_t::algorithm_finished
private

Definition at line 192 of file system.F90.

◆ init_iteration_counters()

procedure system_oct_m::system_t::init_iteration_counters
private

Initialize the iteration counters of the system and its interactions, algorithms and quantities.

Note that th iteration counters for interactions, and on-demand quantities are initialized to one iteration before the algorithm iteration counter. This is necessary, as the interactions and on-demand quantities first need to be updated.

Definition at line 193 of file system.F90.

◆ create_interactions()

procedure system_oct_m::system_t::create_interactions
private

create the interactions of the system

Given a list of available partners, this routine creates all the supported interactions between the system and the partners. To do so, it uses an interaction factory. It also initializes all the interactions (calling system_t::init_interaction() and interaction_partner_t::init_interaction_as_partner())

Note
This routine also creates the ghost interactions between the system and all available partners. Any class overriding this method must make sure ghost interactions are properly created or the framework might not work correctly.
Parameters
[in,out]thissystem for which interactions are created.
[in]interaction_factoryfactory that creates the actual interactions
[in]available_partnersa (hierarchical) list of available partners for the given system.

Definition at line 194 of file system.F90.

◆ init_parallelization()

procedure system_oct_m::system_t::init_parallelization
private

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 195 of file system.F90.

◆ update_couplings()

procedure system_oct_m::system_t::update_couplings
private

Update the couplings (quantities) of the interaction partners.

This function loops over all interactions and the corresponding interaction partners and attempts to update their couplings to the requested iteration. It returns true if all couplings have been successfully updated.

Definition at line 196 of file system.F90.

◆ update_interactions()

procedure system_oct_m::system_t::update_interactions
private

Attempt to update all interactions of the system.

First we try to update the systems own quantities required for the interaction, and then try to update the interaction itself.

Definition at line 197 of file system.F90.

◆ update_interactions_start()

procedure system_oct_m::system_t::update_interactions_start
private

Definition at line 198 of file system.F90.

◆ update_interactions_finish()

procedure system_oct_m::system_t::update_interactions_finish
private

Definition at line 199 of file system.F90.

◆ propagation_start()

procedure system_oct_m::system_t::propagation_start
private

Definition at line 200 of file system.F90.

◆ propagation_finish()

procedure system_oct_m::system_t::propagation_finish
private

Definition at line 201 of file system.F90.

◆ iteration_info()

procedure system_oct_m::system_t::iteration_info
private

Definition at line 202 of file system.F90.

◆ restart_write()

procedure system_oct_m::system_t::restart_write
private

Definition at line 203 of file system.F90.

◆ restart_read()

procedure system_oct_m::system_t::restart_read
private

Definition at line 204 of file system.F90.

◆ output_start()

procedure system_oct_m::system_t::output_start
private

Definition at line 205 of file system.F90.

◆ output_write()

procedure system_oct_m::system_t::output_write
private

Definition at line 206 of file system.F90.

◆ output_finish()

procedure system_oct_m::system_t::output_finish
private

Definition at line 207 of file system.F90.

◆ process_is_slave()

procedure system_oct_m::system_t::process_is_slave
private

Definition at line 208 of file system.F90.

◆ start_barrier()

procedure system_oct_m::system_t::start_barrier
private

Definition at line 209 of file system.F90.

◆ end_barrier()

procedure system_oct_m::system_t::end_barrier
private

Definition at line 210 of file system.F90.

◆ arrived_at_barrier()

procedure system_oct_m::system_t::arrived_at_barrier
private

Definition at line 211 of file system.F90.

◆ arrived_at_any_barrier()

procedure system_oct_m::system_t::arrived_at_any_barrier
private

Definition at line 212 of file system.F90.

◆ update_potential_energy()

procedure system_oct_m::system_t::update_potential_energy
private

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 213 of file system.F90.

◆ update_internal_energy()

procedure system_oct_m::system_t::update_internal_energy
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 214 of file system.F90.

◆ update_total_energy()

procedure system_oct_m::system_t::update_total_energy
private

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

Definition at line 215 of file system.F90.

◆ init_interaction()

procedure(system_init_interaction), deferred system_oct_m::system_t::init_interaction
private

initialize a given interaction of the system

Definition at line 216 of file system.F90.

◆ initial_conditions()

procedure(system_initial_conditions), deferred system_oct_m::system_t::initial_conditions
private

set initial conditions for a system

Definition at line 217 of file system.F90.

◆ do_algorithmic_operation()

procedure(system_do_algorithmic_operation), deferred system_oct_m::system_t::do_algorithmic_operation
private

Execute one operation that is part of a larger algorithm. Returns true if the operation was successfully executed, false otherwise.

Unsuccessful operations can occur, e.g. of quantities from an interaction are required, but the interaction is still behind in terms of the iteration counters.

On output, the routine should also provide a list quantities that were updated. If no quantitiy was updated, then the corresponding array should be left unallocated.

Definition at line 218 of file system.F90.

◆ is_tolerance_reached()

procedure(system_is_tolerance_reached), deferred system_oct_m::system_t::is_tolerance_reached
private

check whether a system has reached a given tolerance

Definition at line 219 of file system.F90.

◆ restart_write_data()

procedure(system_restart_write_data), deferred system_oct_m::system_t::restart_write_data
private

Definition at line 220 of file system.F90.

◆ restart_read_data()

procedure(system_restart_read_data), deferred system_oct_m::system_t::restart_read_data
private

Definition at line 221 of file system.F90.

◆ update_kinetic_energy()

procedure(system_update_kinetic_energy), deferred system_oct_m::system_t::update_kinetic_energy
private

Definition at line 222 of file system.F90.

Member Data Documentation

◆ iteration

type(iteration_counter_t), public system_oct_m::system_t::iteration

Definition at line 174 of file system.F90.

◆ algo

class(algorithm_t), pointer, public system_oct_m::system_t::algo => null()

Definition at line 175 of file system.F90.

◆ supported_interactions

integer, dimension(:), allocatable, public system_oct_m::system_t::supported_interactions

Definition at line 177 of file system.F90.

◆ interactions

type(interaction_list_t), public system_oct_m::system_t::interactions

List with all the interactions of this system.

Definition at line 178 of file system.F90.

◆ grp

type(mpi_grp_t), public system_oct_m::system_t::grp

mpi group for this system

Definition at line 180 of file system.F90.

◆ barrier

type(barrier_t), dimension(number_barriers) system_oct_m::system_t::barrier
private

Definition at line 182 of file system.F90.

◆ kinetic_energy

real(real64), public system_oct_m::system_t::kinetic_energy

Energy not from interactions, like the kinetic energy.

Definition at line 183 of file system.F90.

◆ potential_energy

real(real64), public system_oct_m::system_t::potential_energy

Energy from the interactions with external systems.

Definition at line 184 of file system.F90.

◆ internal_energy

real(real64), public system_oct_m::system_t::internal_energy

Energy from the interactions with itself and for containers the kinetic energy of its constituents.

Definition at line 185 of file system.F90.

◆ total_energy

real(real64), public system_oct_m::system_t::total_energy

Sum of internal, external, and self energy.

Definition at line 186 of file system.F90.


The documentation for this type was generated from the following file: