Work in progress!
The propagator class
type, extends(algorithm_t), abstract :: propagator_t private type(algorithm_iterator_t) :: iter type(algorithm_iterator_t) :: scf_start type(algorithmic_operation_t) :: current_ops type(algorithmic_operation_t), public :: start_step type(algorithmic_operation_t), public :: final_step integer, public :: algo_steps FLOAT, public :: dt !< Options related to predictor-corrector propagators logical, public :: predictor_corrector = .false. integer, public :: scf_count integer, public :: max_scf_count FLOAT, public :: scf_tol logical :: step_done logical, public :: inside_scf = .false. type(clock_t), public :: clock FLOAT :: start_time = M_ZERO FLOAT, public :: elapsed_time = M_ZERO contains ! Below are the list of operations that needs to be implemented procedure :: get_td_operation => propagator_get_tdop procedure :: step_is_done => propagator_step_is_done procedure :: next => propagator_next procedure :: rewind => propagator_rewind procedure :: finished => propagator_finished procedure :: save_scf_start => propagator_save_scf_start procedure :: rewind_scf_loop => propagator_rewind_scf_loop end type propagator_t
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 :: & SKIP = 'SKIP', & FINISHED = 'FINISHED', & UPDATE_INTERACTIONS = 'UPDATE_INTERACTIONS', & 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_SKIP = algorithmic_operation_t(SKIP, 'Skipping propagation step'), & OP_FINISHED = algorithmic_operation_t(FINISHED, 'Propagation step finished'), & OP_UPDATE_INTERACTIONS = algorithmic_operation_t(UPDATE_INTERACTIONS, 'Propagation step - Updating interactions'), & 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.