68 "DTSCINIT",
"Only for adaptive integrator: Initial time step for space charge integration.",
73 "Only for adaptive integrator: Alternative way to set accuracy of space integration.",
80 "The maximum number of integration steps dt, should be larger ZSTOP/(beta*c average).");
83 "ZSTART",
"Defines a z-location [m] where the reference particle starts.", 0.0);
87 "Defines a z-location [m], after which the simulation stops when the last particles "
91 "STEPSPERTURN",
"The time steps per revolution period, only for opal-cycl.", 720);
94 "TIMEINTEGRATOR",
"Name of time integrator to be used.",
95 {
"RK-4",
"RK4",
"LF-2",
"LF2",
"MTS"},
"RK4");
98 "MAP_ORDER",
"Truncation order of maps for ThickTracker (default: 1, i.e. linear).", 1);
117 if (dTs.size() == 0) {
118 dTs.push_back(1e-12);
120 for (
double dt : dTs) {
123 "TrackCmd::getDT",
"The time steps provided with DT have to be positive");
147 if (zstop.size() == 0) {
148 zstop.push_back(1000000.0);
155 std::vector<unsigned long long> maxsteps_i;
156 if (maxsteps_d.size() == 0) {
157 maxsteps_i.push_back(10ul);
159 for (
double numSteps : maxsteps_d) {
162 "TrackCmd::getMAXSTEPS",
163 "The number of steps provided with MAXSTEPS has to be positive");
165 unsigned long long value = numSteps;
166 maxsteps_i.push_back(value);
192 std::vector<double> dt =
getDT();
196 std::vector<unsigned long long> maxsteps =
getMaxSteps();
199 std::vector<double> zstop =
getZStop();
203 size_t numTracks = dt.size();
204 numTracks = std::max(numTracks, maxsteps.size());
205 numTracks = std::max(numTracks, zstop.size());
206 for (
size_t i = dt.size(); i < numTracks; ++i) {
207 dt.push_back(dt.back());
209 for (
size_t i = maxsteps.size(); i < numTracks; ++i) {
210 maxsteps.push_back(maxsteps.back());
212 for (
size_t i = zstop.size(); i < numTracks; ++i) {
213 zstop.push_back(zstop.back());
220 theLineToTrack, beam->
getReference(), dt, maxsteps, stepsperturn, zstart, zstop,
221 timeintegrator, t0, dtScInit, deltaTau);
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.
Action(int size, const char *name, const char *help)
Constructor for exemplars.
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.
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.
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.
The base class for all OPAL exceptions.