OPAL (Object Oriented Parallel Accelerator Library) 2022.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 "Stepper.h"
22#include "Physics/Physics.h"
23
25template <typename FieldFunction, typename ... Arguments>
26class LF2 : public Stepper<FieldFunction, Arguments...> {
27
28public:
29
30 LF2(const FieldFunction& fieldfunc) : Stepper<FieldFunction, Arguments ...>(fieldfunc) { }
31
32private:
34 const size_t& i,
35 const double& t,
36 const double dt,
37 Arguments& ... args) const;
38
39
40 void push_m(Vector_t& R, const Vector_t& P, const double& h) const;
41
42 bool kick_m(PartBunchBase<double, 3>* bunch, const size_t& i,
43 const double& t, const double& h,
44 Arguments& ... args) const;
45};
46
47#include "LF2.hpp"
48
49#endif
Leap-Frog 2nd order.
Definition: LF2.h:26
LF2(const FieldFunction &fieldfunc)
Definition: LF2.h:30
bool doAdvance_m(PartBunchBase< double, 3 > *bunch, const size_t &i, const double &t, const double dt, Arguments &... args) const
Definition: LF2.hpp:22
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