OPAL (Object Oriented Parallel Accelerator Library)  2021.1.99
OPAL
Option.cpp
Go to the documentation of this file.
1 //
2 // Class Option
3 // The OPTION command.
4 // The user interface allowing setting of OPAL options.
5 // The actual option flags are contained in namespace Options.
6 //
7 // Copyright (c) 200x - 2020, Paul Scherrer Institut, Villigen PSI, Switzerland
8 // All rights reserved
9 //
10 // This file is part of OPAL.
11 //
12 // OPAL is free software: you can redistribute it and/or modify
13 // it under the terms of the GNU General Public License as published by
14 // the Free Software Foundation, either version 3 of the License, or
15 // (at your option) any later version.
16 //
17 // You should have received a copy of the GNU General Public License
18 // along with OPAL. If not, see <https://www.gnu.org/licenses/>.
19 //
20 #include "BasicActions/Option.h"
22 #include "Attributes/Attributes.h"
23 #include "Parser/FileStream.h"
25 #include "Utilities/Options.h"
26 #include "Utilities/OptionTypes.h"
28 
29 #include "Utility/Inform.h"
30 #include "Utility/IpplInfo.h"
32 
33 #include <ctime>
34 #include <iostream>
35 #include <limits>
36 #include <cstddef>
37 
38 extern Inform* gmsg;
39 
40 using namespace Options;
41 
42 std::string DumpFrameToString(DumpFrame df);
43 
44 namespace {
45  // The attributes of class Option.
46  enum {
47  ECHO,
48  INFO,
49  TRACE,
50  WARN,
51  SEED,
52  TELL,
53  PSDUMPFREQ,
54  STATDUMPFREQ,
55  PSDUMPEACHTURN,
56  PSDUMPFRAME,
57  SPTDUMPFREQ,
58  REPARTFREQ,
59  REBINFREQ,
60  SCSOLVEFREQ,
61  MTSSUBSTEPS,
62  REMOTEPARTDEL,
63  RHODUMP,
64  EBDUMP,
65  CSRDUMP,
66  AUTOPHASE,
67  NUMBLOCKS,
68  RECYCLEBLOCKS,
69  NLHS,
70  CZERO,
71  RNGTYPE,
72  ENABLEHDF5,
73  ENABLEVTK,
74  ASCIIDUMP,
75  BOUNDPDESTROYFQ,
76  BEAMHALOBOUNDARY,
77  CLOTUNEONLY,
78  IDEALIZED,
79  LOGBENDTRAJECTORY,
80  VERSION,
81 #ifdef ENABLE_AMR
82  AMR,
83  AMR_YT_DUMP_FREQ,
84  AMR_REGRID_FREQ,
85 #endif
86  MEMORYDUMP,
87  HALOSHIFT,
88  DELPARTFREQ,
89  MINBINEMITTED,
90  MINSTEPFORREBIN,
91  SIZE
92  };
93 }
94 
95 
97  Action(SIZE, "OPTION",
98  "The \"OPTION\" statement defines OPAL execution options.")
99  {
100 
102  ("ECHO", "If true, give echo of input", echo);
103 
105  ("INFO", "If true, print information messages", info);
106 
108  ("TRACE", "If true, print execution trace"
109  "Must be the first option in the inputfile in "
110  "order to render correct results", mtrace);
111 
113  ("WARN", "If true, print warning messages", warn);
114 
116  ("SEED", "The seed for the random generator, -1 will use time(0) as seed ");
117 
119  ("TELL", "If true, print the current settings. "
120  "Must be the last option in the inputfile in "
121  "order to render correct results", false);
122 
123  itsAttr[PSDUMPFREQ] = Attributes::makeReal
124  ("PSDUMPFREQ", "The frequency to dump the phase space, "
125  "i.e.dump data when step%psDumpFreq==0, its default value is 10.",
126  psDumpFreq);
127 
128  itsAttr[STATDUMPFREQ] = Attributes::makeReal
129  ("STATDUMPFREQ", "The frequency to dump statistical data "
130  "(e.g. RMS beam quantities), i.e. dump data when step%statDumpFreq == 0, "
131  "its default value is 10.", statDumpFreq);
132 
133  itsAttr[PSDUMPEACHTURN] = Attributes::makeBool
134  ("PSDUMPEACHTURN", "If true, dump phase space after each "
135  "turn ,only aviable for OPAL-cycl, its default value is false",
137 
138  itsAttr[SCSOLVEFREQ] = Attributes::makeReal
139  ("SCSOLVEFREQ", "The frequency to solve space charge fields. its default value is 1");
140 
141  itsAttr[MTSSUBSTEPS] = Attributes::makeReal
142  ("MTSSUBSTEPS", "How many small timesteps "
143  "are inside the large timestep used in multiple "
144  "time stepping (MTS) integrator");
145 
146  itsAttr[REMOTEPARTDEL] = Attributes::makeReal
147  ("REMOTEPARTDEL", "Artifically delete the remote particle "
148  "if its distance to the beam mass is larger than "
149  "REMOTEPARTDEL times of the beam rms size, "
150  "its default values is 0 (no delete) ",remotePartDel);
151 
153  ("PSDUMPFRAME", "Controls the frame of phase space dump in "
154  "stat file and h5 file. If 'GLOBAL' OPAL will dump in the "
155  "lab (global) Cartesian frame; if 'BUNCH_MEAN' OPAL will "
156  "dump in the local Cartesian frame of the beam mean; "
157  "if 'REFERENCE' OPAL will dump in the local Cartesian "
158  "frame of the reference particle 0. Only available for "
159  "OPAL-cycl.", {"BUNCH_MEAN", "REFERENCE", "GLOBAL"}, "GLOBAL");
160 
161  itsAttr[SPTDUMPFREQ] = Attributes::makeReal
162  ("SPTDUMPFREQ", "The frequency to dump single "
163  "particle trajectory of particles with ID = 0 & 1, "
164  "its default value is 1.", sptDumpFreq);
165 
166  itsAttr[REPARTFREQ] = Attributes::makeReal
167  ("REPARTFREQ", "The frequency to do particles repartition "
168  "for better load balance between nodes, its "
169  "default value is " + std::to_string(repartFreq) + ".", repartFreq);
170 
171  itsAttr[MINBINEMITTED] = Attributes::makeReal
172  ("MINBINEMITTED", "The number of bins that have to be emitted before the bins are squashed into "
173  "a single bin; the default value is " + std::to_string(minBinEmitted) + ".", minBinEmitted);
174 
175  itsAttr[MINSTEPFORREBIN] = Attributes::makeReal
176  ("MINSTEPFORREBIN", "The number of steps into the simulation before the bins are squashed into "
177  "a single bin; the default value is " + std::to_string(minStepForRebin) + ".", minStepForRebin);
178 
179  itsAttr[REBINFREQ] = Attributes::makeReal
180  ("REBINFREQ", "The frequency to reset energy bin ID for "
181  "all particles, its default value is 100.", rebinFreq);
182 
183  itsAttr[RHODUMP] = Attributes::makeBool
184  ("RHODUMP", "If true, in addition to the phase "
185  "space the scalar rho field is also dumped (H5Block)", rhoDump);
186 
187  itsAttr[EBDUMP] = Attributes::makeBool
188  ("EBDUMP", "If true, in addition to the phase space the "
189  "E and B field at each particle is also dumped into the H5 file)", ebDump);
190 
191  itsAttr[CSRDUMP] = Attributes::makeBool
192  ("CSRDUMP", "If true, the csr E field, line density "
193  "and the line density derivative is dumped into the "
194  "data directory)", csrDump);
195 
196  itsAttr[AUTOPHASE] = Attributes::makeReal
197  ("AUTOPHASE", "If greater than zero OPAL is scanning "
198  "the phases of each rf structure in order to get maximum "
199  "acceleration. Defines the number of refinements of the "
200  "search range", autoPhase);
201 
203  ("CZERO", "If set to true a symmetric distribution is "
204  "created -> centroid == 0.0", cZero);
205 
207  ("RNGTYPE", "Type of pseudo- or quasi-random number generator, "
208  "see also Quasi-Random Sequences, GSL reference manual.",
209  {"RANDOM", "HALTON", "SOBOL", "NIEDERREITER"}, rngtype);
210 
211  itsAttr[CLOTUNEONLY] = Attributes::makeBool
212  ("CLOTUNEONLY", "If set to true stop after "
213  "CLO and tune calculation ", cloTuneOnly);
214 
215  itsAttr[NUMBLOCKS] = Attributes::makeReal
216  ("NUMBLOCKS", "Maximum number of vectors in the Krylov "
217  "space (for RCGSolMgr). Default value is 0 and BlockCGSolMgr will be used.");
218 
219  itsAttr[RECYCLEBLOCKS] = Attributes::makeReal
220  ("RECYCLEBLOCKS", "Number of vectors in the recycle "
221  "space (for RCGSolMgr). Default value is 0 and BlockCGSolMgr will be used.");
222 
224  ("NLHS", "Number of stored old solutions for extrapolating "
225  "the new starting vector. Default value is 1 and just the last solution is used.");
226 
227  itsAttr[ENABLEHDF5] = Attributes::makeBool
228  ("ENABLEHDF5", "If true, HDF5 actions are enabled", enableHDF5);
229 
230  itsAttr[ENABLEVTK] = Attributes::makeBool
231  ("ENABLEVTK", "If true, writing of VTK files are enabled", enableVTK);
232 
233  itsAttr[ASCIIDUMP] = Attributes::makeBool
234  ("ASCIIDUMP", "If true, some of the elements dump in ASCII instead of HDF5", asciidump);
235 
236  itsAttr[BOUNDPDESTROYFQ] = Attributes::makeReal
237  ("BOUNDPDESTROYFQ", "The frequency to do boundp_destroy to "
238  "delete lost particles. Default 10", boundpDestroyFreq);
239 
240  itsAttr[BEAMHALOBOUNDARY] = Attributes::makeReal
241  ("BEAMHALOBOUNDARY", "Defines in terms of sigma where "
242  "the halo starts. Default 0.0", beamHaloBoundary);
243 
244  itsAttr[IDEALIZED] = Attributes::makeBool
245  ("IDEALIZED", "Using the hard edge model for the calculation "
246  "of path length. Default: false", idealized);
247 
248  itsAttr[LOGBENDTRAJECTORY] = Attributes::makeBool
249  ("LOGBENDTRAJECTORY", "Writing the trajectory of "
250  "every bend to disk. Default: false", writeBendTrajectories);
251 
252  itsAttr[VERSION] = Attributes::makeReal
253  ("VERSION", "Version of OPAL for which input file was written", version);
254 
255 #ifdef ENABLE_AMR
257  ("AMR", "Use adaptive mesh refinement.", amr);
258 
259  itsAttr[AMR_YT_DUMP_FREQ] = Attributes::makeReal("AMR_YT_DUMP_FREQ",
260  "The frequency to dump grid "
261  "and particle data "
262  "(default: 10)", amrYtDumpFreq);
263 
264  itsAttr[AMR_REGRID_FREQ] = Attributes::makeReal("AMR_REGRID_FREQ",
265  "The frequency to perform a regrid "
266  "in multi-bunch mode (default: 10)",
267  amrRegridFreq);
268 #endif
269 
270  itsAttr[MEMORYDUMP] = Attributes::makeBool
271  ("MEMORYDUMP", "If true, write memory to SDDS file", memoryDump);
272 
273  itsAttr[HALOSHIFT] = Attributes::makeReal
274  ("HALOSHIFT", "Constant parameter to shift halo value (default: 0.0)", haloShift);
275 
276  itsAttr[DELPARTFREQ] = Attributes::makeReal
277  ("DELPARTFREQ", "The frequency to delete particles, "
278  "i.e. delete when step%delPartFreq == 0. Default: 1", delPartFreq);
279 
281 
283 }
284 
285 
286 Option::Option(const std::string& name, Option* parent):
287  Action(name, parent) {
293  Attributes::setReal(itsAttr[PSDUMPFREQ], psDumpFreq);
294  Attributes::setReal(itsAttr[STATDUMPFREQ], statDumpFreq);
295  Attributes::setBool(itsAttr[PSDUMPEACHTURN], psDumpEachTurn);
297  Attributes::setReal(itsAttr[SPTDUMPFREQ], sptDumpFreq);
298  Attributes::setReal(itsAttr[SCSOLVEFREQ], scSolveFreq);
299  Attributes::setReal(itsAttr[MTSSUBSTEPS], mtsSubsteps);
300  Attributes::setReal(itsAttr[REMOTEPARTDEL], remotePartDel);
301  Attributes::setReal(itsAttr[REPARTFREQ], repartFreq);
302  Attributes::setReal(itsAttr[MINBINEMITTED], minBinEmitted);
303  Attributes::setReal(itsAttr[MINSTEPFORREBIN], minStepForRebin);
310  Attributes::setBool(itsAttr[CLOTUNEONLY], cloTuneOnly);
311  Attributes::setPredefinedString(itsAttr[RNGTYPE], std::string(rngtype));
313  Attributes::setReal(itsAttr[RECYCLEBLOCKS], recycleBlocks);
315  Attributes::setBool(itsAttr[ENABLEHDF5], enableHDF5);
318  Attributes::setReal(itsAttr[BOUNDPDESTROYFQ], boundpDestroyFreq);
319  Attributes::setReal(itsAttr[BEAMHALOBOUNDARY], beamHaloBoundary);
323 #ifdef ENABLE_AMR
325  Attributes::setReal(itsAttr[AMR_YT_DUMP_FREQ], amrYtDumpFreq);
326  Attributes::setReal(itsAttr[AMR_REGRID_FREQ], amrRegridFreq);
327 #endif
328  Attributes::setBool(itsAttr[MEMORYDUMP], memoryDump);
330  Attributes::setReal(itsAttr[DELPARTFREQ], delPartFreq);
331 }
332 
333 
335 {}
336 
337 
338 Option* Option::clone(const std::string& name) {
339  return new Option(name, this);
340 }
341 
342 
344  // Store the option flags.
349  psDumpEachTurn = Attributes::getBool(itsAttr[PSDUMPEACHTURN]);
350  remotePartDel = Attributes::getReal(itsAttr[REMOTEPARTDEL]);
351  rhoDump = Attributes::getBool(itsAttr[RHODUMP]);
353  csrDump = Attributes::getBool(itsAttr[CSRDUMP]);
354  enableHDF5 = Attributes::getBool(itsAttr[ENABLEHDF5]);
355  enableVTK = Attributes::getBool(itsAttr[ENABLEVTK]);
356  idealized = Attributes::getBool(itsAttr[IDEALIZED]);
357  asciidump = Attributes::getBool(itsAttr[ASCIIDUMP]);
358  version = Attributes::getReal(itsAttr[VERSION]);
360  writeBendTrajectories = Attributes::getBool(itsAttr[LOGBENDTRAJECTORY]);
361 
362 #ifdef ENABLE_AMR
364  amrYtDumpFreq = int(Attributes::getReal(itsAttr[AMR_YT_DUMP_FREQ]));
365 
366  if ( amrYtDumpFreq < 1 ) {
368  }
369 
370  amrRegridFreq = int(Attributes::getReal(itsAttr[AMR_REGRID_FREQ]));
371  amrRegridFreq = ( amrRegridFreq < 1 ) ? 1 : amrRegridFreq;
372 #endif
373 
374  memoryDump = Attributes::getBool(itsAttr[MEMORYDUMP]);
375  haloShift = Attributes::getReal(itsAttr[HALOSHIFT]);
376  delPartFreq = Attributes::getReal(itsAttr[DELPARTFREQ]);
377 
378  if ( memoryDump ) {
380  IpplMemoryUsage::Unit::GB, false);
381  memory->sample();
382  }
383 
386 
387  if (Options::seed == -1)
388  rangen.init55(time(0));
389  else
390  rangen.init55(seed);
391 
394 
396 
399  if (itsAttr[SEED]) {
400  seed = int(Attributes::getReal(itsAttr[SEED]));
401  if (seed == -1)
402  rangen.init55(time(0));
403  else
404  rangen.init55(seed);
405  }
406 
407  if (itsAttr[PSDUMPFREQ]) {
408  psDumpFreq = int(Attributes::getReal(itsAttr[PSDUMPFREQ]));
409  if (psDumpFreq==0)
411  }
412 
413  if (itsAttr[STATDUMPFREQ]) {
414  statDumpFreq = int(Attributes::getReal(itsAttr[STATDUMPFREQ]));
415  if (statDumpFreq==0)
417  }
418 
419  if (itsAttr[SPTDUMPFREQ]) {
420  sptDumpFreq = int(Attributes::getReal(itsAttr[SPTDUMPFREQ]));
421  if (sptDumpFreq==0)
423  }
424 
425  if (itsAttr[SCSOLVEFREQ]) {
426  scSolveFreq = int(Attributes::getReal(itsAttr[SCSOLVEFREQ]));
427  scSolveFreq = ( scSolveFreq < 1 ) ? 1 : scSolveFreq;
428  }
429 
430  if (itsAttr[MTSSUBSTEPS]) {
431  mtsSubsteps = int(Attributes::getReal(itsAttr[MTSSUBSTEPS]));
432  }
433 
434  if (itsAttr[REPARTFREQ]) {
435  repartFreq = int(Attributes::getReal(itsAttr[REPARTFREQ]));
436  }
437 
438  if (itsAttr[MINBINEMITTED]) {
439  minBinEmitted = int(Attributes::getReal(itsAttr[MINBINEMITTED]));
440  }
441 
442  if (itsAttr[MINSTEPFORREBIN]) {
443  minStepForRebin = int(Attributes::getReal(itsAttr[MINSTEPFORREBIN]));
444  }
445 
446  if (itsAttr[REBINFREQ]) {
447  rebinFreq = int(Attributes::getReal(itsAttr[REBINFREQ]));
448  }
449 
450  if (itsAttr[AUTOPHASE]) {
451  autoPhase = int(Attributes::getReal(itsAttr[AUTOPHASE]));
452  }
453 
454  if (itsAttr[NUMBLOCKS]) {
455  numBlocks = int(Attributes::getReal(itsAttr[NUMBLOCKS]));
456  }
457 
458  if (itsAttr[RECYCLEBLOCKS]) {
459  recycleBlocks = int(Attributes::getReal(itsAttr[RECYCLEBLOCKS]));
460  }
461 
462  if (itsAttr[NLHS]) {
463  nLHS = int(Attributes::getReal(itsAttr[NLHS]));
464  }
465 
466  if (itsAttr[CZERO]) {
467  cZero = bool(Attributes::getBool(itsAttr[CZERO]));
468  }
469 
470  if (itsAttr[RNGTYPE]) {
471  rngtype = std::string(Attributes::getString(itsAttr[RNGTYPE]));
472  } else {
473  rngtype = std::string("RANDOM");
474  }
475 
476  if (itsAttr[BEAMHALOBOUNDARY]) {
477  beamHaloBoundary = Attributes::getReal(itsAttr[BEAMHALOBOUNDARY]);
478  } else {
479  beamHaloBoundary = 0;
480  }
481 
482  if (itsAttr[CLOTUNEONLY]) {
483  cloTuneOnly = bool(Attributes::getBool(itsAttr[CLOTUNEONLY]));
484  } else {
485  cloTuneOnly = false;
486  }
487 
488  // Set message flags.
490 
491  if (Attributes::getBool(itsAttr[TELL])) {
492  *gmsg << "\nCurrent settings of options:\n" << *this << endl;
493  }
494 
495  Option* main = dynamic_cast<Option*>(OpalData::getInstance()->find("OPTION"));
496  if (main) {
497  main->update(itsAttr);
498  }
499 }
500 
501 void Option::handlePsDumpFrame(const std::string& dumpFrame) {
502  if (dumpFrame == "GLOBAL") {
504  } else if (dumpFrame == "BUNCH_MEAN") {
506  } else if (dumpFrame == "REFERENCE") {
508  }
509 }
510 
511 std::string DumpFrameToString(DumpFrame df) {
512  switch (df) {
513  case BUNCH_MEAN:
514  return std::string("BUNCH_MEAN");
515  case REFERENCE:
516  return std::string("REFERENCE");
517  case GLOBAL:
518  default:
519  return std::string("GLOBAL");
520  }
521 }
522 
523 void Option::update(const std::vector<Attribute>& othersAttributes) {
524  for (int i = 0; i < SIZE; ++ i) {
525  itsAttr[i] = othersAttributes[i];
526  }
527 }
@ SIZE
Definition: IndexMap.cpp:174
std::string DumpFrameToString(DumpFrame df)
Definition: Option.cpp:511
Inform * gmsg
Definition: Main.cpp:62
int main(int argc, char *argv[])
Definition: Main.cpp:127
T::PETE_Expr_t::PETE_Return_t max(const PETE_Expr< T > &expr, NDIndex< D > &loc)
Definition: ReductionLoc.h:84
Inform & endl(Inform &inf)
Definition: Inform.cpp:42
const std::string name
Some AMR types used a lot.
Definition: AmrDefs.h:33
Attribute makeBool(const std::string &name, const std::string &help)
Make logical attribute.
Definition: Attributes.cpp:90
double getReal(const Attribute &attr)
Return real value.
Definition: Attributes.cpp:252
void setBool(Attribute &attr, bool val)
Set logical value.
Definition: Attributes.cpp:119
Attribute makePredefinedString(const std::string &name, const std::string &help, const std::initializer_list< std::string > &predefinedStrings)
Make predefined string attribute.
Definition: Attributes.cpp:409
Attribute makeReal(const std::string &name, const std::string &help)
Make real attribute.
Definition: Attributes.cpp:240
bool getBool(const Attribute &attr)
Return logical value.
Definition: Attributes.cpp:100
void setReal(Attribute &attr, double val)
Set real value.
Definition: Attributes.cpp:271
void setPredefinedString(Attribute &attr, const std::string &val)
Set predefined string value.
Definition: Attributes.cpp:426
std::string getString(const Attribute &attr)
Get string value.
Definition: Attributes.cpp:343
@ BUNCH_MEAN
Definition: OptionTypes.h:7
@ GLOBAL
Definition: OptionTypes.h:6
@ REFERENCE
Definition: OptionTypes.h:8
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 repartFreq
The frequency to do particles repartition for better load balance between nodes.
Definition: Options.cpp:49
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
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 base class for all OPAL actions.
Definition: Action.h:30
void registerOwnership(const AttributeHandler::OwnerType &itsClass) const
Definition: Object.cpp:191
virtual void update()
Update this object.
Definition: Object.cpp:234
std::vector< Attribute > itsAttr
The object attributes.
Definition: Object.h:216
Object * find(const std::string &name)
Find entry.
Definition: OpalData.cpp:565
static OpalData * getInstance()
Definition: OpalData.cpp:195
Definition: Option.h:25
virtual ~Option()
Definition: Option.cpp:334
virtual void execute()
Execute the command.
Definition: Option.cpp:343
void handlePsDumpFrame(const std::string &dumpFrame)
Definition: Option.cpp:501
virtual Option * clone(const std::string &name)
Make clone.
Definition: Option.cpp:338
Option()
Exemplar constructor.
Definition: Option.cpp:96
static void setEcho(bool flag)
Set echo flag.
Definition: FileStream.cpp:47
void init55(int seed)
Initialise random number generator.
Definition: Inform.h:42
void on(const bool o)
Definition: Inform.h:69
static Inform * Warn
Definition: IpplInfo.h:79
static Inform * Info
Definition: IpplInfo.h:78
static IpplMemory_p getInstance(Unit unit=Unit::GB, bool reset=true)