Octopus
propagator_exp_mid.F90
Go to the documentation of this file.
1!! Copyright (C) 2023 Sebastian Ohlmann
2!!
3!! This program is free software; you can redistribute it and/or modify
4!! it under the terms of the GNU General Public License as published by
5!! the Free Software Foundation; either version 2, or (at your option)
6!! any later version.
7!!
8!! This program is distributed in the hope that it will be useful,
9!! but WITHOUT ANY WARRANTY; without even the implied warranty of
10!! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11!! GNU General Public License for more details.
12!!
13!! You should have received a copy of the GNU General Public License
14!! along with this program; if not, write to the Free Software
15!! Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
16!! 02110-1301, USA.
17!!
18
19#include "global.h"
20
23 use debug_oct_m
24 use global_oct_m
26
27 implicit none
28
29 private
30 public :: &
32
34 type, extends(propagator_t) :: propagator_exp_mid_t
35 private
37
38 interface propagator_exp_mid_t
39 procedure propagator_exp_mid_constructor
40 end interface propagator_exp_mid_t
41
42 !# doc_start exp_mid_propagation_operations
43 ! Specific exponential mid-point propagation operations identifiers
44 character(len=ALGO_LABEL_LEN), public, parameter :: &
45 EXPMID_START = 'EXPMID_START', &
46 expmid_finish = 'EXPMID_FINISH', &
47 expmid_extrapolate = 'EXPMID_EXTRAPOLATE', &
48 expmid_propagate = 'EXPMID_PROPAGATE'
49
50 ! Specific exponential mid-point propagation operations
51 type(algorithmic_operation_t), public, parameter :: &
52 OP_EXPMID_START = algorithmic_operation_t(expmid_start, 'Starting exponential midpoint'), &
53 op_expmid_finish = algorithmic_operation_t(expmid_finish, 'Finishing exponential midpoint'), &
54 op_expmid_extrapolate = algorithmic_operation_t(expmid_extrapolate, 'Extrapolate to dt/2 for exponential midpoint'), &
55 op_expmid_propagate = algorithmic_operation_t(expmid_propagate, 'Propagation step for exponential midpoint')
56 !# doc_end
57
58contains
59
60 ! ---------------------------------------------------------
61 function propagator_exp_mid_constructor(dt) result(this)
62 real(real64), intent(in) :: dt
63 type(propagator_exp_mid_t), pointer :: this
64
66
67 allocate(this)
68
69 this%predictor_corrector = .false.
70 this%start_operation = op_expmid_start
71 this%final_operation = op_expmid_finish
72
73 call this%add_operation(op_expmid_extrapolate)
74 call this%add_operation(op_expmid_propagate)
75 call this%add_operation(op_update_couplings)
76 call this%add_operation(op_update_interactions)
77 call this%add_operation(op_iteration_done)
78 call this%add_operation(op_rewind_algorithm)
79
80 this%algo_steps = 1
81 this%dt = dt
82
85
87
88
89!! Local Variables:
90!! mode: f90
91!! coding: utf-8
92!! End:
This module implements the basic elements defining algorithms.
Definition: algorithm.F90:141
type(algorithmic_operation_t), parameter, public op_iteration_done
Definition: algorithm.F90:179
type(algorithmic_operation_t), parameter, public op_rewind_algorithm
Definition: algorithm.F90:179
type(algorithmic_operation_t), parameter, public op_update_couplings
Definition: algorithm.F90:179
type(algorithmic_operation_t), parameter, public op_update_interactions
Definition: algorithm.F90:179
character(len=algo_label_len), parameter, public expmid_extrapolate
type(algorithmic_operation_t), parameter, public op_expmid_extrapolate
character(len=algo_label_len), parameter, public expmid_finish
type(algorithmic_operation_t), parameter, public op_expmid_finish
type(algorithmic_operation_t), parameter, public op_expmid_propagate
type(propagator_exp_mid_t) function, pointer propagator_exp_mid_constructor(dt)
character(len=algo_label_len), parameter, public expmid_propagate
This module implements the basic propagator framework.
Definition: propagator.F90:117
Descriptor of one algorithmic operation.
Definition: algorithm.F90:163
Implements the explicit exponential midpoint propagator (without predictor-corrector)
Abstract class implementing propagators.
Definition: propagator.F90:138