OPALX (Object Oriented Parallel Accelerator Library for Exascal) MINIorX
OPALX
Track.cpp
Go to the documentation of this file.
1//
2// Class Track
3// Hold data for tracking.
4// Acts as a communication area between the various tracking commands.
5//
6// Copyright (c) 2008 - 2020, Paul Scherrer Institut, Villigen PSI, Switzerland
7// All rights reserved
8//
9// This file is part of OPAL.
10//
11// OPAL is free software: you can redistribute it and/or modify
12// it under the terms of the GNU General Public License as published by
13// the Free Software Foundation, either version 3 of the License, or
14// (at your option) any later version.
15//
16// You should have received a copy of the GNU General Public License
17// along with OPAL. If not, see <https://www.gnu.org/licenses/>.
18//
19
20#include "Track/Track.h"
21
23#include "PartBunch/PartBunch.h"
24#include "Utilities/Options.h"
25
27
34
36 BeamSequence* u, const PartData& ref, const std::vector<double>& dt,
37 const std::vector<unsigned long long>& maxtsteps, int stepsperturn, double zStart,
38 const std::vector<double>& zStop, Steppers::TimeIntegrator timeintegrator, double t0,
39 double dtScInit, double deltaTau)
40 : bunch(nullptr),
41 reference(ref),
42 use(u),
43 parser(),
44 dT(dt),
47 t0_m(t0),
48 localTimeSteps(maxtsteps),
49 stepsPerTurn(stepsperturn),
50 zstart(zStart),
51 zstop(zStop),
52 timeIntegrator(timeintegrator),
53 truncOrder(1) {
54 if (!OpalData::getInstance()->hasBunchAllocated()) {
57 }
58 // \todo crashes here
59 // bunch = OpalData::getInstance()->getPartBunch();
60}
61
TimeIntegrator
Definition Steppers.h:25
The base class for all OPAL beam lines and sequences.
static OpalData * getInstance()
Definition OpalData.cpp:195
Particle reference data.
Definition PartData.h:37
Definition Track.h:33
BeamSequence * use
The lattice to be tracked through.
Definition Track.h:49
int stepsPerTurn
The timsteps per revolution period. ONLY available for OPAL-cycl.
Definition Track.h:71
PartData reference
The reference data.
Definition Track.h:46
double zstart
The location at which the simulation starts.
Definition Track.h:74
~Track()
Definition Track.cpp:62
std::vector< unsigned long long > localTimeSteps
Maximal number of timesteps.
Definition Track.h:68
double deltaTau
Definition Track.h:61
std::vector< double > zstop
The location at which the simulation stops.
Definition Track.h:77
static Track * block
The block of track data.
Definition Track.h:55
Steppers::TimeIntegrator timeIntegrator
The ID of time integrator.
Definition Track.h:80
TrackParser parser
The parser used during tracking.
Definition Track.h:52
double t0_m
Definition Track.h:65
double dtScInit
Definition Track.h:61
int truncOrder
Trunction order for map tracking.
Definition Track.h:83
PartBunch_t * bunch
The particle bunch to be tracked.
Definition Track.h:43
std::vector< double > dT
The initial timestep.
Definition Track.h:58