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_tprivate
type(namespace_t),public::namespacetype(integer_list_t),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.
contains
procedure::update_quantity=>interaction_partner_update_quantity!< @copydoc interaction_partner_oct_m::interaction_partner_update_quantity
procedure::update_on_demand_quantities=>interaction_partner_update_on_demand_quantities!< @copydoc interaction_partner_oct_m::interaction_partner_update_on_demand_quantities
procedure::check_couplings_status=>interaction_partner_check_couplings_status!< @copydoc interaction_partner_oct_m::interaction_partner_check_couplings_status
procedure(interaction_partner_init_interaction_as_partner),deferred::init_interaction_as_partner!< @copydoc interaction_partner_oct_m::interaction_partner_init_interaction_as_partner
procedure(interaction_partner_copy_quantities_to_interaction),deferred::copy_quantities_to_interaction!< @copydoc interaction_partner_oct_m::interaction_partner_copy_quantities_to_interaction
end 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
type(iteration_counter_t),public::iterationclass(algorithm_t),pointer,public::algo=>null()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::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::init_algorithm=>system_init_algorithm!< @copydoc system_oct_m::system_init_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::init_all_interactions=>system_init_all_interactions!< @copydoc system_oct_m::system_init_all_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::propagation_start=>system_propagation_start!< @copydoc system_oct_m::system_propagation_start
procedure::propagation_finish=>system_propagation_finish!< @copydoc system_oct_m::system_propagation_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_initial_conditions),deferred::initial_conditions!< @copydoc system_oct_m::system_initial_conditions
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
end 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::execute_algorithm=>multisystem_execute_algorithmprocedure::init_parallelization=>multisystem_init_parallelizationprocedure::next_time_on_largest_dt=>multisystem_next_time_on_largest_dtprocedure::reset_iteration_counters=>multisystem_reset_iteration_countersprocedure::init_algorithm=>multisystem_init_algorithmprocedure::algorithm_finished=>multisystem_algorithm_finishedprocedure::init_iteration_counters=>multisystem_init_iteration_countersprocedure::propagation_start=>multisystem_propagation_startprocedure::propagation_finish=>multisystem_propagation_finishprocedure::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_algorithmic_operation=>multisystem_do_algorithmic_operationprocedure::is_tolerance_reached=>multisystem_is_tolerance_reachedprocedure::update_quantity=>multisystem_update_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.
Currently, the following system types are defined:
integer,parameter::&SYSTEM_ELECTRONIC=1,&!< electronic system (electrons_oct_m::electrons_t)
SYSTEM_MAXWELL=2,&!< maxwell system, (maxwell_oct_m::maxwell_t)
SYSTEM_CLASSICAL_PARTICLE=3,&!< single classical particle (classical_particle_oct_m::classical_particle_t)
SYSTEM_CHARGED_PARTICLE=4,&!< single charged classical particle (charged_particle_oct_m::charged_particle_t)
SYSTEM_DFTBPLUS=5,&!< tight binding system (dftb_oct_m::dftb_t)
SYSTEM_LINEAR_MEDIUM=6,&!< linear medium for Maxwell calculations (linear_medium_oct_m::linear_medium_t)
SYSTEM_MATTER=7,&!< electrons including ions (matter_oct_m::matter_t)
SYSTEM_DISPERSIVE_MEDIUM=8,&!< dispersive medium for classical electrodynamics (dispersive_medium_oct_m::dispersive_medium_t)
SYSTEM_MULTISYSTEM=9!< container system. (multisystem_basic_oct_m::multisystem_basic_t)
When using these system types, always use the parameters, and not their numerical values, as they might change over time.