47 class(system_t),
pointer,
public :: system
49 type(algorithm_iterator_t) :: scf_start
52 logical,
public :: predictor_corrector = .false.
53 integer,
public :: scf_count
54 integer,
public :: max_scf_count
55 float,
public :: scf_tol
57 float,
public :: final_time =
m_zero
68 character(len=ALGO_LABEL_LEN),
public,
parameter :: &
69 START_SCF_LOOP =
'START_SCF_LOOP', &
73 type(algorithmic_operation_t),
public,
parameter :: &
87 class(propagator_t),
intent(inout) :: this
88 type(algorithmic_operation_t),
intent(in) :: operation
92 select case (operation%id)
94 assert(this%predictor_corrector)
96 call this%save_scf_start()
97 this%inside_scf = .
true.
98 this%system%accumulated_loop_ticks = 0
101 write(
message(1),
'(a,i3,a)')
"Debug: -- SCF iter ", this%scf_count,
" for '" + trim(this%system%namespace%get()) +
"'"
108 if (this%scf_count == this%max_scf_count)
then
110 message(1) =
"Debug: -- Max SCF Iter reached for '" + trim(this%system%namespace%get()) +
"'"
113 this%inside_scf = .false.
117 if (this%system%is_tolerance_reached(this%scf_tol))
then
119 message(1) =
"Debug: -- SCF tolerance reached for '" + trim(this%system%namespace%get()) +
"'"
122 this%inside_scf = .false.
126 call this%rewind_scf_loop()
129 call this%system%reset_clocks(this%system%accumulated_loop_ticks)
130 this%system%accumulated_loop_ticks = 0
132 write(
message(1),
'(a,i3,a,a)')
"Debug: -- SCF iter ", this%scf_count,
" for '" + trim(this%system%namespace%get()),
"'"
164 this%scf_start = this%iter
179 this%iter = this%scf_start
181 this%scf_count = this%scf_count + 1
The basic elements defining algorithms.
integer, parameter, public clock_tick
type(debug_t), save, public debug
real(8), parameter, public m_zero
subroutine, public push_sub(sub_name)
subroutine, public messages_info(no_lines, iunit, verbose_limit, stress, all_nodes, namespace)
character(len=256), dimension(max_lines), public message
to be output by fatal, warning
subroutine, public pop_sub(sub_name)
This module implements the basic propagator framework.
character(len=algo_label_len), parameter, public store_current_status
type(algorithmic_operation_t), parameter, public op_store_current_status
subroutine propagator_rewind_scf_loop(this)
Reset the iteration state to the beginning of the loop (START_SCF_LOOP) and move to next step.
subroutine propagator_save_scf_start(this)
Save the current iteration state (START_SCF_LOOP) and move to next step.
logical function propagator_do_operation(this, operation)
perform one operation of the state machine
logical function propagator_finished(this)
indicate whether a propagation has reached the final time
character(len=algo_label_len), parameter, public end_scf_loop
type(algorithmic_operation_t), parameter, public op_end_scf_loop
This module implements the abstract system type.
An algorithm is a list of algorithmic operations executed sequentially. This is implemented as a link...
Descriptor of one algorithmic operation.
Abstract class implementing propagators.