type,extends(algorithm_t),abstract::propagator_tprivate
class(system_t),pointer,public::system!< The system using this propagator
type(algorithm_iterator_t)::scf_start!< If the algorithm contains a self-consistency loop,
!! we need to save the start of that loop to be able to
!! jump back to it.
FLOAT,public::dt!< Physical duration of one time step
FLOAT,public::final_time=M_ZERO!< The final time of the simulation.
! Options related to predictor-corrector propagators
logical,public::inside_scf=.false.!< Indicate whether the system is executing an SCF loop
logical,public::predictor_corrector=.false.integer,public::scf_count!< Counter for self-consistency iterations
integer,public::max_scf_count!< Maximum number of iterations for self-consistent propagators
integer,public::accumulated_loop_ticksFLOAT,public::scf_tol!< Tolerance for self-consistent propagators
contains! Below are the list of operations that needs to be implemented
procedure::do_operation=>propagator_do_operation!< @copydoc propagator_do_operation
procedure::finished=>propagator_finished!< @copydoc propagator_finished
procedure::init_iteration_counters=>propagator_init_iteration_counters!< @copydoc propagator_init_iteration_counters
procedure::save_scf_start=>propagator_save_scf_start!< @copydoc propagator_save_scf_start
procedure::rewind_scf_loop=>propagator_rewind_scf_loop!< @copydoc propagator_rewind_scf_loop
end type propagator_t
The type propagator_t is an extension of algorithm_t. Therefore, it contains the list of operations, which define the propagator.
The elements of the propagator algorithm are defined as algorithmic operations.
The complete propagation algorithm is then defined by adding each step of the algorithm to the propagator (see the examples).
Note, that at this level, progators are independent of the actual implementation of each step. These have to be implemented within the system, for which the propagator will be applied.
Here, we define the following operations:
! Known propagation operations
character(len=ALGO_LABEL_LEN),public,parameter::&START_SCF_LOOP='START_SCF_LOOP',&END_SCF_LOOP='END_SCF_LOOP',&STORE_CURRENT_STATUS='STORE_CURRENT_STATUS'type(algorithmic_operation_t),public,parameter::&OP_START_SCF_LOOP=algorithmic_operation_t(START_SCF_LOOP,'Starting SCF loop'),&OP_END_SCF_LOOP=algorithmic_operation_t(END_SCF_LOOP,'End of SCF iteration'),&OP_STORE_CURRENT_STATUS=algorithmic_operation_t(STORE_CURRENT_STATUS,'Store current status')
These operations are general and not bound to a specific propagator, or a specific system. Therefore, they are implemented in the system_t class. For a discussion, see the section on time propagation.
The class procedures of propagator_t are those. handling the internal state of the propagator.
Specific propagators are defined as classes extending propagator_t. The necessary specific algorithmic steps are to be defined in the scope of the module file, containing the extending class.