OPAL (Object Oriented Parallel Accelerator Library)  2024.1
OPAL
LF2.h
Go to the documentation of this file.
1 //
2 // Class LF2
3 // Second order Leap-Frog time integrator
4 //
5 // Copyright (c) 2008 - 2020, Paul Scherrer Institut, Villigen PSI, Switzerland
6 // All rights reserved
7 //
8 // This file is part of OPAL.
9 //
10 // OPAL is free software: you can redistribute it and/or modify
11 // it under the terms of the GNU General Public License as published by
12 // the Free Software Foundation, either version 3 of the License, or
13 // (at your option) any later version.
14 //
15 // You should have received a copy of the GNU General Public License
16 // along with OPAL. If not, see <https://www.gnu.org/licenses/>.
17 //
18 #ifndef LF2_H
19 #define LF2_H
20 
21 #include "Steppers/Stepper.h"
22 #include "Physics/Physics.h"
23 
25 template <typename FieldFunction, typename ... Arguments>
26 class LF2 : public Stepper<FieldFunction, Arguments...> {
27 
28 public:
29  LF2(const FieldFunction& fieldfunc) : Stepper<FieldFunction, Arguments ...>(fieldfunc) { }
30 
31 private:
33  const size_t& i,
34  const double& t,
35  const double dt,
36  Arguments& ... args) const;
37 
38  void push_m(Vector_t& R, const Vector_t& P, const double& h) const;
39 
40  bool kick_m(PartBunchBase<double, 3>* bunch, const size_t& i,
41  const double& t, const double& h,
42  Arguments& ... args) const;
43 };
44 
45 #include "LF2.hpp"
46 
47 #endif
Leap-Frog 2nd order.
Definition: LF2.h:26
LF2(const FieldFunction &fieldfunc)
Definition: LF2.h:29
bool doAdvance_m(PartBunchBase< double, 3 > *bunch, const size_t &i, const double &t, const double dt, Arguments &...args) const
Definition: LF2.hpp:22
Definition: TSVMeta.h:24
bool kick_m(PartBunchBase< double, 3 > *bunch, const size_t &i, const double &t, const double &h, Arguments &...args) const
Definition: LF2.hpp:54
void push_m(Vector_t &R, const Vector_t &P, const double &h) const
Definition: LF2.hpp:43