Octopus
propagator_leapfrog.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_leapfrog_t
35 private
37
38 interface propagator_leapfrog_t
39 procedure propagator_leapfrog_constructor
40 end interface propagator_leapfrog_t
41
42 !# doc_start leapfrog_propagation_operations
43 character(len=ALGO_LABEL_LEN), public, parameter :: &
44 LEAPFROG_START = 'LEAPFROG_START', &
45 leapfrog_finish = 'LEAPFROG_FINISH', &
46 leapfrog_propagate = 'LEAPFROG_PROPAGATE'
47
48 type(algorithmic_operation_t), public, parameter :: &
49 OP_LEAPFROG_START = algorithmic_operation_t(leapfrog_start, 'Starting leap frog'), &
51 op_leapfrog_propagate = algorithmic_operation_t(leapfrog_propagate, 'Propagation step for leap frog')
52 !# doc_end
53
54contains
55
56 ! ---------------------------------------------------------
57 function propagator_leapfrog_constructor(dt) result(this)
58 float, intent(in) :: dt
59 type(propagator_leapfrog_t), pointer :: this
60
62
63 allocate(this)
64
65 this%predictor_corrector = .false.
66 this%start_operation = op_leapfrog_start
67 this%final_operation = op_leapfrog_finish
68
69 call this%add_operation(op_leapfrog_propagate)
70 call this%add_operation(op_update_couplings)
71 call this%add_operation(op_update_interactions)
72 call this%add_operation(op_iteration_done)
73 call this%add_operation(op_rewind_algorithm)
74
75 this%algo_steps = 1
76 this%dt = dt
77
80
82
83
84!! Local Variables:
85!! mode: f90
86!! coding: utf-8
87!! End:
This module implements the basic elements defining algorithms.
Definition: algorithm.F90:132
type(algorithmic_operation_t), parameter, public op_iteration_done
Definition: algorithm.F90:170
type(algorithmic_operation_t), parameter, public op_rewind_algorithm
Definition: algorithm.F90:170
type(algorithmic_operation_t), parameter, public op_update_couplings
Definition: algorithm.F90:170
type(algorithmic_operation_t), parameter, public op_update_interactions
Definition: algorithm.F90:170
character(len=algo_label_len), parameter, public leapfrog_propagate
character(len=algo_label_len), parameter, public leapfrog_finish
type(propagator_leapfrog_t) function, pointer propagator_leapfrog_constructor(dt)
type(algorithmic_operation_t), parameter, public op_leapfrog_finish
type(algorithmic_operation_t), parameter, public op_leapfrog_propagate
This module implements the basic propagator framework.
Definition: propagator.F90:108
Descriptor of one algorithmic operation.
Definition: algorithm.F90:154
Implements a propagator for the leap frog algorithm.
Abstract class implementing propagators.
Definition: propagator.F90:129