64 "The \"TRACK\" command initiates tracking.") {
66 (
"LINE",
"Name of lattice to be tracked.");
69 (
"BEAM",
"Name of beam to be used.",
"UNNAMED_BEAM");
72 (
"DT",
"The integration timestep in [s].");
75 (
"DTSCINIT",
"Only for adaptive integrator: Initial time step for space charge integration.", 1
e-12);
78 (
"DTAU",
"Only for adaptive integrator: Alternative way to set accuracy of space integration.", -1.0);
81 (
"T0",
"The elapsed time of the bunch in seconds", 0.0);
84 (
"MAXSTEPS",
"The maximum number of integration steps dt, should be larger ZSTOP/(beta*c average).");
87 (
"ZSTART",
"Defines a z-location [m] where the reference particle starts.", 0.0);
90 (
"ZSTOP",
"Defines a z-location [m], after which the simulation stops when the last particles passes.");
93 (
"STEPSPERTURN",
"The time steps per revolution period, only for opal-cycl.", 720);
96 (
"TIMEINTEGRATOR",
"Name of time integrator to be used.",
97 {
"RK-4",
"RK4",
"LF-2",
"LF2",
"MTS"},
"RK4");
100 (
"MAP_ORDER",
"Truncation order of maps for ThickTracker (default: 1, i.e. linear).", 1);
122 if (dTs.size() == 0) {
123 dTs.push_back(1
e-12);
125 for (
double dt : dTs) {
128 "The time steps provided with DT have to be positive");
152 if (zstop.size() == 0) {
153 zstop.push_back(1000000.0);
160 std::vector<unsigned long long> maxsteps_i;
161 if (maxsteps_d.size() == 0) {
162 maxsteps_i.push_back(10ul);
164 for (
double numSteps : maxsteps_d) {
167 "The number of steps provided with MAXSTEPS has to be positive");
169 unsigned long long value = numSteps;
170 maxsteps_i.push_back(value);
196 std::vector<double> dt =
getDT();
200 std::vector<unsigned long long> maxsteps =
getMaxSteps();
203 std::vector<double> zstop =
getZStop();
206 size_t numTracks = dt.size();
207 numTracks =
std::max(numTracks, maxsteps.size());
208 numTracks =
std::max(numTracks, zstop.size());
209 for (
size_t i = dt.size(); i < numTracks; ++ i) {
210 dt.push_back(dt.back());
212 for (
size_t i = maxsteps.size(); i < numTracks; ++i) {
213 maxsteps.push_back(maxsteps.back());
215 for (
size_t i = zstop.size(); i < numTracks; ++i) {
216 zstop.push_back(zstop.back());
225 stepsperturn, zstart, zstop,
226 timeintegrator, t0, dtScInit, deltaTau);
T::PETE_Expr_t::PETE_Return_t max(const PETE_Expr< T > &expr, NDIndex< D > &loc)
double getReal(const Attribute &attr)
Return real value.
Attribute makePredefinedString(const std::string &name, const std::string &help, const std::initializer_list< std::string > &predefinedStrings)
Make predefined string attribute.
Attribute makeReal(const std::string &name, const std::string &help)
Make real attribute.
Attribute makeRealArray(const std::string &name, const std::string &help)
Create real array attribute.
std::vector< double > getRealArray(const Attribute &attr)
Get array value.
std::string getString(const Attribute &attr)
Get string value.
Attribute makeString(const std::string &name, const std::string &help)
Make string attribute.
constexpr double e
The value of.
The base class for all OPAL actions.
static void addAttributeOwner(const std::string &owner, const OwnerType &type, const std::string &name)
The base class for all OPAL beam lines and sequences.
static BeamSequence * find(const std::string &name)
Find a BeamSequence by name.
void registerOwnership(const AttributeHandler::OwnerType &itsClass) const
std::vector< Attribute > itsAttr
The object attributes.
virtual void run() const
Read current stream.
static Beam * find(const std::string &name)
Find named BEAM.
const PartData & getReference() const
Return the embedded CLASSIC PartData.
static Track * block
The block of track data.
TrackParser parser
The parser used during tracking.
int truncOrder
Trunction order for map tracking.
double getDTSCINIT() const
virtual TrackCmd * clone(const std::string &name)
Return a clone.
std::vector< double > getDT() const
Return the timestep in seconds.
int getStepsPerTurn() const
std::vector< double > getZStop() const
location at which the simulation stops
virtual void execute()
Execute the command.
double getT0() const
Return the elapsed time (sec) of the bunch.
Steppers::TimeIntegrator getTimeIntegrator()
return the name of time integrator
double getZStart() const
location at which the simulation starts
static const std::map< std::string, Steppers::TimeIntegrator > stringTimeIntegrator_s
std::vector< unsigned long long > getMaxSteps() const
Return the maximum timsteps we integrate the system.
void setIsParseable(bool isParseable)
set the IsParseable flag
The base class for all OPAL exceptions.