Work in progress!
The propagator class
type, extends(algorithm_t), abstract :: propagator_t private class(system_t), pointer, public :: system type(algorithm_iterator_t) :: scf_start !< Options related to predictor-corrector propagators logical, public :: predictor_corrector = .false. integer, public :: scf_count integer, public :: max_scf_count FLOAT, public :: scf_tol FLOAT, public :: final_time = M_ZERO contains ! Below are the list of operations that needs to be implemented procedure :: do_operation => propagator_do_operation !< @copydoc propagator_oct_m::propagator_do_operation procedure :: finished => propagator_finished !< @copydoc propagator_oct_m::propagator_finished procedure :: save_scf_start => propagator_save_scf_start !< @copydoc propagator_oct_m::propagator_save_scf_start procedure :: rewind_scf_loop => propagator_rewind_scf_loop !< @copydoc propagator_oct_m::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 :: & 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.