The following diagram represents the family tree of the system classes. Rounded boxes denote abstract classes, while rectangular boxes are normal classes, which can be instantiated.
Abstract classes
interaction_partner_t
An interaction_partner in Octopus is anything, which can have an interaction with any other system.
For instance electrons and ions are interaction partners, but also the photonic system described by the Maxwell system, or external potentials.
Therefore, it is the base class of all possible systems and multisystems.
Definition of interaction_partner_t
type,abstract::interaction_partner_tprivate
type(namespace_t),public::namespacetype(clock_t),public::clocktype(space_t),public::spacetype(integer_list_t),public::supported_interactions_as_partnertype(quantity_t),public::quantities(MAX_QUANTITIES)!< Array of all possible quantities.
! !< The elements of the array are accessed using the
! !< quantity`s identifiers.
contains
procedure(interaction_partner_update_exposed_quantities),deferred::update_exposed_quantitiesprocedure(interaction_partner_update_exposed_quantity),deferred::update_exposed_quantityprocedure(interaction_partner_init_interaction_as_partner),deferred::init_interaction_as_partnerprocedure(interaction_partner_copy_quantities_to_interaction),deferred::copy_quantities_to_interactionend type interaction_partner_t
Each interaction_partner is associated with a namespace, owns a clock, as well as a list of interactions in which it can be a partner, and a list of physical quantities, which can be exposed to other systems (through the interactions). See here for the list of possible quantities.
It also provides the basic functions to update exposed quantities, and copy them to the interaction. More details about this mechanism are described in the section on
interactions.
system_t
The system_t type is the abstract type for all systems.
As all possible systems are potential partners of some interaction, the system_t type itself extends the abstract interaction_partner_t type.
Definition of system_t
type,extends(interaction_partner_t),abstract::system_tprivate
class(propagator_t),pointer,public::prop=>null()integer::accumulated_loop_ticksinteger,public::interaction_timing!< parameter to determine if interactions
!< should use the quantities at the exact time or if retardation is allowed
type(integer_list_t),public::supported_interactionstype(interaction_list_t),public::interactions!< List with all the interactions of this system
type(mpi_grp_t),public::grp!< mpi group for this system
type(barrier_t)::barrier(NUMBER_BARRIERS)FLOAT,public::kinetic_energy!< Energy not from interactions, like the kinetic energy
FLOAT,public::potential_energy!< Energy from the interactions with external systems
FLOAT,public::internal_energy!< Energy from the interactions with itself and for containers the kinetic energy of its constituents
FLOAT,public::total_energy!< Sum of internal, external, and self energy
contains
procedure::dt_operation=>system_dt_operationprocedure::reset_clocks=>system_reset_clocksprocedure::update_exposed_quantities=>system_update_exposed_quantitiesprocedure::init_propagator=>system_init_propagatorprocedure::init_all_interactions=>system_init_all_interactionsprocedure::init_parallelization=>system_init_parallelizationprocedure::update_interactions=>system_update_interactionsprocedure::update_interactions_start=>system_update_interactions_startprocedure::update_interactions_finish=>system_update_interactions_finishprocedure::propagation_start=>system_propagation_startprocedure::propagation_finish=>system_propagation_finishprocedure::iteration_info=>system_iteration_infoprocedure::has_reached_final_propagation_time=>system_has_reached_final_propagation_timeprocedure::restart_write=>system_restart_writeprocedure::restart_read=>system_restart_readprocedure::output_start=>system_output_startprocedure::output_write=>system_output_writeprocedure::output_finish=>system_output_finishprocedure::process_is_slave=>system_process_is_slaveprocedure::exec_end_of_timestep_tasks=>system_exec_end_of_timestep_tasksprocedure::start_barrier=>system_start_barrierprocedure::end_barrier=>system_end_barrierprocedure::arrived_at_barrier=>system_arrived_at_barrierprocedure::arrived_at_any_barrier=>system_arrived_at_any_barrierprocedure::update_potential_energy=>system_update_potential_energyprocedure::update_internal_energy=>system_update_internal_energyprocedure::update_total_energy=>system_update_total_energyprocedure(system_init_interaction),deferred::init_interactionprocedure(system_initial_conditions),deferred::initial_conditionsprocedure(system_do_td_op),deferred::do_td_operationprocedure(system_is_tolerance_reached),deferred::is_tolerance_reachedprocedure(system_update_quantity),deferred::update_quantityprocedure(system_restart_write_data),deferred::restart_write_dataprocedure(system_restart_read_data),deferred::restart_read_dataprocedure(system_update_kinetic_energy),deferred::update_kinetic_energyend type system_t
The system_t class adds information about the physical space in which the system exists, the propagator, and the list of interactions, which are owned by the system. (Check the section interactions for details on who owns an interaction.)
multisystem_t
The multisystem_t, finally adds a list of systems to the type definietion.
Definition of multisystem_t
type,extends(system_t),abstract::multisystem_ttype(system_list_t)::listcontains
procedure::dt_operation=>multisystem_dt_operationprocedure::init_parallelization=>multisystem_init_parallelizationprocedure::smallest_algo_dt=>multisystem_smallest_algo_dtprocedure::next_time_on_largest_dt=>multisystem_next_time_on_largest_dtprocedure::reset_clocks=>multisystem_reset_clocksprocedure::init_propagator=>multisystem_init_propagatorprocedure::propagation_start=>multisystem_propagation_startprocedure::propagation_finish=>multisystem_propagation_finishprocedure::has_reached_final_propagation_time=>multisystem_has_reached_final_propagation_timeprocedure::init_all_interactions=>multisystem_init_all_interactionsprocedure::init_interaction=>multisystem_init_interactionprocedure::write_interaction_graph=>multisystem_write_interaction_graphprocedure::initial_conditions=>multisystem_initial_conditionsprocedure::do_td_operation=>multisystem_do_td_operationprocedure::is_tolerance_reached=>multisystem_is_tolerance_reachedprocedure::update_quantity=>multisystem_update_quantityprocedure::update_exposed_quantity=>multisystem_update_exposed_quantityprocedure::init_interaction_as_partner=>multisystem_init_interaction_as_partnerprocedure::copy_quantities_to_interaction=>multisystem_copy_quantities_to_interactionprocedure::process_is_slave=>multisystem_process_is_slaveprocedure::start_barrier=>multisystem_start_barrierprocedure::end_barrier=>multisystem_end_barrierprocedure::arrived_at_barrier=>multisystem_arrived_at_barrierprocedure::restart_write=>multisystem_restart_writeprocedure::restart_read=>multisystem_restart_readprocedure::restart_write_data=>multisystem_restart_write_dataprocedure::restart_read_data=>multisystem_restart_read_dataprocedure::update_kinetic_energy=>multisystem_update_kinetic_energyprocedure::update_potential_energy=>multisystem_update_potential_energyprocedure::update_internal_energy=>multisystem_update_internal_energyprocedure::get_flat_list=>multisystem_get_flat_listend type multisystem_t
multisystem_t is an abstract class and cannot be used as such to describe a set of systems in the code.
The type to be used for combined systems is multisystem_basic_t, which extends multisystem_t.