OPAL (Object Oriented Parallel Accelerator Library) 2022.1
OPAL
TrackCmd.h
Go to the documentation of this file.
1//
2// Class TrackCmd
3// The class for the OPAL TRACK command.
4//
5// Copyright (c) 200x - 2022, 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 OPAL_TrackCmd_HH
19#define OPAL_TrackCmd_HH
20
22#include "Steppers/Steppers.h"
23
24#include <map>
25
26
27class TrackCmd: public Action {
28
29public:
30 TrackCmd();
31
32 virtual ~TrackCmd();
33
34 virtual TrackCmd* clone(const std::string& name);
35
36 virtual void execute();
37
39 std::vector<double> getDT() const;
40
41 double getDTSCINIT() const;
42
43 double getDTAU() const;
44
46 double getT0() const;
47
49 std::vector<unsigned long long> getMaxSteps() const;
50
53 int getStepsPerTurn() const;
54
56 double getZStart() const;
57
59 std::vector<double> getZStop() const;
60
63
65 void setIsParseable(bool isParseable);
66private:
67 // Not implemented.
69 void operator=(const TrackCmd&);
70
71 // Clone constructor.
72 TrackCmd(const std::string& name, TrackCmd* parent);
73
74 // When called from python, the track command can't be parsed in the normal
75 // way - this is disabled.
76 bool isParseable_m = true;
77 static const std::map<std::string, Steppers::TimeIntegrator> stringTimeIntegrator_s;
78};
79
80#endif // OPAL_TrackCmd_HH
const std::string name
TimeIntegrator
Definition: Steppers.h:25
The base class for all OPAL actions.
Definition: Action.h:30
double getDTSCINIT() const
Definition: TrackCmd.cpp:134
virtual TrackCmd * clone(const std::string &name)
Return a clone.
Definition: TrackCmd.cpp:116
std::vector< double > getDT() const
Return the timestep in seconds.
Definition: TrackCmd.cpp:120
int getStepsPerTurn() const
Definition: TrackCmd.cpp:177
std::vector< double > getZStop() const
location at which the simulation stops
Definition: TrackCmd.cpp:150
virtual void execute()
Execute the command.
Definition: TrackCmd.cpp:191
virtual ~TrackCmd()
Definition: TrackCmd.cpp:112
TrackCmd()
Definition: TrackCmd.cpp:62
double getT0() const
Return the elapsed time (sec) of the bunch.
Definition: TrackCmd.cpp:142
bool isParseable_m
Definition: TrackCmd.h:76
TrackCmd(const TrackCmd &)
void operator=(const TrackCmd &)
double getDTAU() const
Definition: TrackCmd.cpp:138
Steppers::TimeIntegrator getTimeIntegrator()
return the name of time integrator
Definition: TrackCmd.cpp:181
double getZStart() const
location at which the simulation starts
Definition: TrackCmd.cpp:146
static const std::map< std::string, Steppers::TimeIntegrator > stringTimeIntegrator_s
Definition: TrackCmd.h:77
std::vector< unsigned long long > getMaxSteps() const
Return the maximum timsteps we integrate the system.
Definition: TrackCmd.cpp:158
void setIsParseable(bool isParseable)
set the IsParseable flag
Definition: TrackCmd.cpp:186