OPAL (Object Oriented Parallel Accelerator Library)  2021.1.99
OPAL
Options.h
Go to the documentation of this file.
1 //
2 // Namespace Options
3 // The global OPAL option flags.
4 // This namespace contains the global option flags.
5 //
6 // Copyright (c) 200x - 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 #ifndef OPTIONS_HH
20 #define OPTIONS_HH
21 
22 #include "OptionTypes.h"
24 
25 #include <string>
26 
27 namespace Options {
29  // If true, print an input echo.
30  extern bool echo;
31 
33  // If true, print informative messages.
34  extern bool info;
35  extern int infoLevel;
36 
38  // If true, print CPU time before and after each command.
39  extern bool mtrace;
40 
42  // If true, print warning messages.
43  extern bool warn;
44  extern int warnLevel;
45 
46  // The global random generator.
47  extern Random rangen;
48 
50  extern int seed;
51 
53  extern int psDumpFreq;
54 
56  extern int statDumpFreq;
57 
59  // if true, dump phase space after each turn
60  extern bool psDumpEachTurn;
61 
63  // - GLOBAL, in Cartesian frame of the global particle
64  // - BUNCH_MEAN, in Cartesian frame of the bunch mean
65  // - REFERENCE, in Cartesian frame of the reference (0) particle
66  extern DumpFrame psDumpFrame;
67 
69  extern int sptDumpFreq;
70 
72  extern int repartFreq;
73 
75  extern int minBinEmitted;
76 
78  extern int minStepForRebin;
79 
81  extern int rebinFreq;
82 
84  extern int scSolveFreq;
85 
86  // How many small timesteps are inside the large timestep used in multiple time stepping (MTS) integrator
87  extern int mtsSubsteps;
88 
89  // If the distance of a particle to bunch mass larger than remotePartDel times of the rms size of the bunch in any dimension,
90  // the particle will be deleted artifically to hold the accuracy of space charge calculation. The default setting of -1 stands for no deletion.
91  extern double remotePartDel;
92 
93  extern bool rhoDump;
94 
95  extern bool ebDump;
96 
97  extern bool csrDump;
98 
99  // the number of refinements of the search range for the phase with maximum energy
100  // if eq 0 then no autophase
101  // if true opal find the phases in the cavities, such that the energy gain is at maximum
102  extern int autoPhase;
103 
104  // Options for the Belos solver
106  extern int numBlocks;
108  extern int recycleBlocks;
110  extern int nLHS;
111 
113  extern bool cZero;
114 
116  extern std::string rngtype;
117 
119  extern bool enableHDF5;
120 
122  extern bool enableVTK;
123 
124  extern bool asciidump;
125 
126  // Governs how often boundp_destroy is called to destroy lost particles
127  // Mainly used in the CyclotronTracker as of now -DW
128  extern int boundpDestroyFreq;
129 
130  extern double beamHaloBoundary;
131 
133  extern bool cloTuneOnly;
134 
135  // Using hard edge model for calculation of path length
136  extern bool idealized;
137 
138  extern bool writeBendTrajectories;
139 
141  extern int version;
142 
144  extern bool amr;
145 
147  extern int amrYtDumpFreq;
148 
150  extern int amrRegridFreq;
151 
152  extern bool memoryDump;
153 
155  extern double haloShift;
156 
158  extern unsigned int delPartFreq;
159 }
160 
161 #endif // OPAL_Options_HH
int mtsSubsteps
Definition: Options.cpp:59
double remotePartDel
Definition: Options.cpp:61
int psDumpFreq
The frequency to dump the phase space, i.e.dump data when steppsDumpFreq==0.
Definition: Options.cpp:39
double haloShift
The constant parameter C to shift halo, by < w^4 > / < w^2 > ^2 - C (w=x,y,z)
Definition: Options.cpp:107
bool writeBendTrajectories
Definition: Options.cpp:95
bool mtrace
Trace flag.
Definition: Options.cpp:31
int boundpDestroyFreq
Definition: Options.cpp:87
bool memoryDump
Definition: Options.cpp:105
bool enableVTK
If true VTK files are written.
Definition: Options.cpp:83
int version
opal version of input file
Definition: Options.cpp:97
int minBinEmitted
The number of bins that have to be emitted before the bin are squashed into a single bin.
Definition: Options.cpp:51
bool enableHDF5
If true HDF5 files are written.
Definition: Options.cpp:81
bool psDumpEachTurn
phase space dump flag for OPAL-cycl
Definition: Options.cpp:43
bool asciidump
Definition: Options.cpp:85
int amrRegridFreq
After how many steps the AMR grid hierarchy is updated.
Definition: Options.cpp:103
int numBlocks
RCG: cycle length.
Definition: Options.cpp:71
int sptDumpFreq
The frequency to dump single particle trajectory of particles with ID = 0 & 1.
Definition: Options.cpp:47
int autoPhase
Definition: Options.cpp:69
bool warn
Warn flag.
Definition: Options.cpp:33
std::string rngtype
random number generator
Definition: Options.cpp:79
bool echo
Echo flag.
Definition: Options.cpp:26
bool rhoDump
Definition: Options.cpp:63
int minStepForRebin
The number of steps into the simulation before the bins are squashed into a single bin.
Definition: Options.cpp:53
bool cloTuneOnly
Do closed orbit and tune calculation only.
Definition: Options.cpp:91
bool csrDump
Definition: Options.cpp:67
bool ebDump
Definition: Options.cpp:65
bool idealized
Definition: Options.cpp:93
int amrYtDumpFreq
The frequency to dump AMR grid data and particles into file.
Definition: Options.cpp:101
unsigned int delPartFreq
The frequency to delete particles (currently: OPAL-cycl only)
Definition: Options.cpp:109
int scSolveFreq
The frequency to solve space charge fields.
Definition: Options.cpp:57
int warnLevel
Definition: Options.cpp:34
int repartFreq
The frequency to do particles repartition for better load balance between nodes.
Definition: Options.cpp:49
bool amr
Enable AMR if true.
Definition: Options.cpp:99
bool cZero
If true create symmetric distribution.
Definition: Options.cpp:77
double beamHaloBoundary
Definition: Options.cpp:89
int nLHS
number of old left hand sides used to extrapolate a new start vector
Definition: Options.cpp:75
int rebinFreq
The frequency to reset energy bin ID for all particles.
Definition: Options.cpp:55
int infoLevel
Definition: Options.cpp:29
bool info
Info flag.
Definition: Options.cpp:28
Random rangen
Definition: Options.cpp:36
int seed
The current random seed.
Definition: Options.cpp:37
DumpFrame psDumpFrame
flag to decide in which coordinate frame the phase space will be dumped for OPAL-cycl
Definition: Options.cpp:45
int statDumpFreq
The frequency to dump statistical values, e.e. dump data when stepstatDumpFreq==0.
Definition: Options.cpp:41
int recycleBlocks
RCG: number of recycle blocks.
Definition: Options.cpp:73
The CLASSIC random generator.
Definition: ClassicRandom.h:36