OPAL (Object Oriented Parallel Accelerator Library) 2022.1
OPAL
Astra1DDynamic_fast.h
Go to the documentation of this file.
1//
2// Class Astra1DDynamic_fast
3//
4// This class provides a reader for Astra style field maps. It pre-computes the field
5// on a lattice to increase the performance during simulation.
6//
7// Copyright (c) 2016, Christof Metzger-Kraus, Helmholtz-Zentrum Berlin, Germany
8// 2017 - 2020 Christof Metzger-Kraus
9//
10// All rights reserved
11//
12// This file is part of OPAL.
13//
14// OPAL is free software: you can redistribute it and/or modify
15// it under the terms of the GNU General Public License as published by
16// the Free Software Foundation, either version 3 of the License, or
17// (at your option) any later version.
18//
19// You should have received a copy of the GNU General Public License
20// along with OPAL. If not, see <https://www.gnu.org/licenses/>.
21//
22#ifndef CLASSIC_AstraFIELDMAP1DDYNAMICFAST_HH
23#define CLASSIC_AstraFIELDMAP1DDYNAMICFAST_HH
24
25#include "Fields/Astra1D_fast.h"
26
28
29public:
30 virtual bool getFieldstrength(const Vector_t &R, Vector_t &E, Vector_t &B) const;
31 virtual bool getFieldDerivative(const Vector_t &R, Vector_t &E, Vector_t &B, const DiffDirection &dir) const;
32 virtual void getFieldDimensions(double &zBegin, double &zEnd) const;
33 virtual void getFieldDimensions(double &xIni, double &xFinal, double &yIni, double &yFinal, double &zIni, double &zFinal) const;
34 virtual void swap();
35 virtual void getInfo(Inform *);
36 virtual double getFrequency() const;
37 virtual void setFrequency(double freq);
38 virtual void getOnaxisEz(std::vector<std::pair<double, double> > & F);
39
40private:
41 Astra1DDynamic_fast(std::string aFilename);
42 virtual ~Astra1DDynamic_fast();
43
44 virtual void readMap();
45
46 bool readFileHeader(std::ifstream &file);
47 int stripFileHeader(std::ifstream &file);
48
50 double xlrep_m;
51
52 friend class Fieldmap;
53};
54
55#endif
DiffDirection
Definition: Fieldmap.h:54
bool readFileHeader(std::ifstream &file)
int stripFileHeader(std::ifstream &file)
virtual void getInfo(Inform *)
virtual double getFrequency() const
virtual bool getFieldstrength(const Vector_t &R, Vector_t &E, Vector_t &B) const
virtual void getFieldDimensions(double &zBegin, double &zEnd) const
virtual void setFrequency(double freq)
virtual bool getFieldDerivative(const Vector_t &R, Vector_t &E, Vector_t &B, const DiffDirection &dir) const
virtual void getOnaxisEz(std::vector< std::pair< double, double > > &F)
Astra1DDynamic_fast(std::string aFilename)
Definition: Inform.h:42