![]() |
Octopus
|
This module implements the abstract system type. More...
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_initialize |
| 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 |
| For some algorithms it might be necessary to store the status of a system at a given algorithmic step. More... | |
| type | system_t |
| Abstract class for systems. More... | |
| interface | system_update_kinetic_energy |
Functions/Subroutines | |
| subroutine, public | system_execute_algorithm (this) |
| perform one or more algorithmic operations More... | |
| subroutine, public | system_reset_iteration_counters (this, accumulated_iterations) |
| recursive subroutine, public | system_create_interactions (this, interaction_factory, available_partners) |
| create the interactions of the system More... | |
| logical function | system_update_couplings (this) |
| Update the couplings (quantities) of the interaction partners. More... | |
| subroutine | system_update_interactions (this) |
| Attempt to update all interactions of the system. More... | |
| 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_new_algorithm (this, factory) |
| recursive logical function | system_algorithm_finished (this) |
| subroutine, public | system_init_iteration_counters (this) |
| Initialize the iteration counters of the system and its interactions, algorithms and quantities. More... | |
| subroutine, public | system_algorithm_start (this) |
| subroutine, public | system_algorithm_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) |
| add system to list More... | |
| 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 |
| 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:
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 338 of file system.F90.
| subroutine, public system_oct_m::system_reset_iteration_counters | ( | class(system_t), intent(inout) | this, |
| integer, intent(in) | accumulated_iterations | ||
| ) |
Definition at line 464 of file system.F90.
| recursive subroutine, public system_oct_m::system_create_interactions | ( | class(system_t), intent(inout) | this, |
| class(interactions_factory_abst_t), intent(in) | interaction_factory, | ||
| class(partner_list_t), intent(in), target | available_partners | ||
| ) |
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())
| [in,out] | this | system for which interactions are created. |
| [in] | interaction_factory | factory that creates the actual interactions |
| [in] | available_partners | a (hierarchical) list of available partners |
Definition at line 518 of file system.F90.
|
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 695 of file system.F90.
|
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 732 of file system.F90.
|
private |
Definition at line 801 of file system.F90.
|
private |
Definition at line 813 of file system.F90.
| subroutine, public system_oct_m::system_restart_write | ( | class(system_t), intent(inout) | this | ) |
Definition at line 825 of file system.F90.
| logical function, public system_oct_m::system_restart_read | ( | class(system_t), intent(inout) | this | ) |
Definition at line 866 of file system.F90.
|
private |
Definition at line 911 of file system.F90.
|
private |
Definition at line 923 of file system.F90.
|
private |
Definition at line 935 of file system.F90.
| subroutine, public system_oct_m::system_new_algorithm | ( | class(system_t), intent(inout) | this, |
| class(algorithm_factory_t), intent(in) | factory | ||
| ) |
Definition at line 947 of file system.F90.
|
private |
Definition at line 970 of file system.F90.
| subroutine, public system_oct_m::system_init_iteration_counters | ( | class(system_t), intent(inout) | this | ) |
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 985 of file system.F90.
| subroutine, public system_oct_m::system_algorithm_start | ( | class(system_t), intent(inout) | this | ) |
Definition at line 1022 of file system.F90.
| subroutine, public system_oct_m::system_algorithm_finish | ( | class(system_t), intent(inout) | this | ) |
Definition at line 1074 of file system.F90.
|
private |
Definition at line 1110 of file system.F90.
|
private |
Definition at line 1139 of file system.F90.
| subroutine, public system_oct_m::system_end | ( | class(system_t), intent(inout) | this | ) |
Definition at line 1151 of file system.F90.
|
private |
add system to list
Definition at line 1177 of file system.F90.
|
private |
Definition at line 1194 of file system.F90.
|
private |
Definition at line 1222 of file system.F90.
| 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 1242 of file system.F90.
|
private |
Definition at line 1257 of file system.F90.
|
private |
Definition at line 1271 of file system.F90.
|
private |
Definition at line 1284 of file system.F90.
|
private |
Definition at line 1304 of file system.F90.
| 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 1326 of file system.F90.
|
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 1353 of file system.F90.
| 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 1378 of file system.F90.
| integer, parameter, public system_oct_m::number_barriers = 1 |
Definition at line 168 of file system.F90.
| integer, parameter, public system_oct_m::barrier_restart = 1 |
Definition at line 168 of file system.F90.