OPALX (Object Oriented Parallel Accelerator Library for Exascal) master (dc2a29eed580)
OPALX
Loading...
Searching...
No Matches
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 "Physics/Physics.h"
22#include "Stepper.h"
23
25template <typename FieldFunction, typename... Arguments>
26class LF2 : public Stepper<FieldFunction, Arguments...> {
27public:
28 LF2(const FieldFunction& fieldfunc) : Stepper<FieldFunction, Arguments...>(fieldfunc) {}
29
30private:
31 bool doAdvance_m(
32 PartBunch_t* bunch, const size_t& i, const double& t, const double dt,
33 Arguments&... args) const;
34
35 void push_m(Vector_t<double, 3>& R, const Vector_t<double, 3>& P, const double& h) const;
36
37 bool kick_m(
38 PartBunch_t* bunch, const size_t& i, const double& t, const double& h,
39 Arguments&... args) const;
40};
41
42#include "LF2.hpp"
43
44#endif
ippl::Vector< T, Dim > Vector_t
Leap-Frog 2nd order.
Definition LF2.h:26
LF2(const FieldFunction &fieldfunc)
Definition LF2.h:28
void push_m(Vector_t< double, 3 > &R, const Vector_t< double, 3 > &P, const double &h) const
Definition LF2.hpp:39
bool kick_m(PartBunch_t *bunch, const size_t &i, const double &t, const double &h, Arguments &... args) const
Definition LF2.hpp:48
bool doAdvance_m(PartBunch_t *bunch, const size_t &i, const double &t, const double dt, Arguments &... args) const
Definition LF2.hpp:22