These pages might not always be in sync with the code. In order to see the current implementation, and code documentation, see the
doxygen documentation of the code.
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_tprivatetype(namespace_t),public::namespaceinteger,allocatable,public::supported_interactions_as_partner(:)!< list of interactions, which support
!! this interaction_partner_t as partner
type(quantity_t),public::quantities(MAX_QUANTITIES)!< Array of all possible quantities.
!! The elements of the array are accessed using the
!! quantity`s identifiers.
containsprocedure::add_partners_to_list=>interaction_partner_add_partners_to_listprocedure::update_quantity=>interaction_partner_update_quantity!< @copydoc interaction_partner_update_quantity
procedure::update_on_demand_quantities=>interaction_partner_update_on_demand_quantities!< @copydoc interaction_partner_update_on_demand_quantities
procedure::check_couplings_status=>interaction_partner_check_couplings_status!< @copydoc interaction_partner_check_couplings_status
procedure(interaction_partner_init_interaction_as_partner),deferred::init_interaction_as_partner!< @copydoc interaction_partner_init_interaction_as_partner
procedure(interaction_partner_copy_quantities_to_interaction),deferred::copy_quantities_to_interaction!< @copydoc interaction_partner_copy_quantities_to_interaction
endtypeinteraction_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_tprivatetype(iteration_counter_t),public::iterationclass(algorithm_t),pointer,public::algo=>null()integer,allocatable,public::supported_interactions(:)type(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)real(real64),public::kinetic_energy!< Energy not from interactions, like the kinetic energy
real(real64),public::potential_energy!< Energy from the interactions with external systems
real(real64),public::internal_energy!< Energy from the interactions with itself and for containers the kinetic energy of its constituents
real(real64),public::total_energy!< Sum of internal, external, and self energy
containsprocedure::execute_algorithm=>system_execute_algorithm!< @copydoc system_oct_m::system_execute_algorithm
procedure::reset_iteration_counters=>system_reset_iteration_counters!< @copydoc system_oct_m::system_reset_iteration_counters
procedure::new_algorithm=>system_new_algorithm!< @copydoc system_oct_m::system_new_algorithm
procedure::algorithm_finished=>system_algorithm_finished!< @copydoc system_oct_m::system_algorithm_finished
procedure::init_iteration_counters=>system_init_iteration_counters!< @copydoc system_oct_m::system_init_iteration_counters
procedure::create_interactions=>system_create_interactions!< @copydoc system_oct_m::system_create_interactions
procedure::init_parallelization=>system_init_parallelization!< @copydoc system_oct_m::system_init_parallelization
procedure::update_couplings=>system_update_couplings!< @copydoc system_oct_m::system_update_couplings
procedure::update_interactions=>system_update_interactions!< @copydoc system_oct_m::system_update_interactions
procedure::update_interactions_start=>system_update_interactions_start!< @copydoc system_oct_m::system_update_interactions_start
procedure::update_interactions_finish=>system_update_interactions_finish!< @copydoc system_oct_m::system_update_interactions_finish
procedure::algorithm_start=>system_algorithm_start!< @copydoc system_oct_m::system_algorithm_start
procedure::algorithm_finish=>system_algorithm_finish!< @copydoc system_oct_m::system_algorithm_finish
procedure::iteration_info=>system_iteration_info!< @copydoc system_oct_m::system_iteration_info
procedure::restart_write=>system_restart_write!< @copydoc system_oct_m::system_restart_write
procedure::restart_read=>system_restart_read!< @copydoc system_oct_m::system_restart_read
procedure::output_start=>system_output_start!< @copydoc system_oct_m::system_output_start
procedure::output_write=>system_output_write!< @copydoc system_oct_m::system_output_write
procedure::output_finish=>system_output_finish!< @copydoc system_oct_m::system_output_finish
procedure::process_is_slave=>system_process_is_slave!< @copydoc system_oct_m::system_process_is_slave
procedure::start_barrier=>system_start_barrier!< @copydoc system_oct_m::system_start_barrier
procedure::end_barrier=>system_end_barrier!< @copydoc system_oct_m::system_end_barrier
procedure::arrived_at_barrier=>system_arrived_at_barrier!< @copydoc system_oct_m::system_arrived_at_barrier
procedure::arrived_at_any_barrier=>system_arrived_at_any_barrier!< @copydoc system_oct_m::system_arrived_at_any_barrier
procedure::update_potential_energy=>system_update_potential_energy!< @copydoc system_oct_m::system_update_potential_energy
procedure::update_internal_energy=>system_update_internal_energy!< @copydoc system_oct_m::system_update_internal_energy
procedure::update_total_energy=>system_update_total_energy!< @copydoc system_oct_m::system_update_total_energy
procedure(system_init_interaction),deferred::init_interaction!< @copydoc system_oct_m::system_init_interaction
procedure(system_initialize),deferred::initialize!< @copydoc system_oct_m::system_initialize
procedure(system_do_algorithmic_operation),deferred::do_algorithmic_operation!< @copydoc system_oct_m::system_do_algorithmic_operation
procedure(system_is_tolerance_reached),deferred::is_tolerance_reached!< @copydoc system_oct_m::system_is_tolerance_reached
procedure(system_restart_write_data),deferred::restart_write_data!< @copydoc system_oct_m::system_restart_write_data
procedure(system_restart_read_data),deferred::restart_read_data!< @copydoc system_oct_m::system_restart_read_data
procedure(system_update_kinetic_energy),deferred::update_kinetic_energy!< @copydoc system_oct_m::system_update_kinetic_energy
endtypesystem_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.
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.