39 using namespace Options;
101 "The \"OPTION\" statement defines OPAL execution options.")
105 (
"ECHO",
"If true, give echo of input",
echo);
108 (
"INFO",
"If true, print information messages",
info);
111 (
"TRACE",
"If true, print execution trace",
mtrace);
114 (
"WARN",
"If true, print warning messages",
warn);
117 (
"SEED",
"The seed for the random generator, -1 will use time(0) as seed ");
120 (
"TELL",
"If true, print the current settings. "
121 "Must be the last option in the inputfile in "
122 "order to render correct results",
false);
125 (
"PSDUMPFREQ",
"The frequency to dump the phase space, "
126 "i.e.dump data when step%psDumpFreq==0, its default value is 10.",
130 (
"STATDUMPFREQ",
"The frequency to dump statistical data "
131 "(e.g. RMS beam quantities), i.e. dump data when step%statDumpFreq == 0, "
135 (
"PSDUMPEACHTURN",
"If true, dump phase space after each "
136 "turn ,only aviable for OPAL-cycl, its default value is false",
140 (
"SCSOLVEFREQ",
"The frequency to solve space charge fields. its default value is 1");
143 "are inside the large timestep used in multiple "
144 "time stepping (MTS) integrator");
147 (
"REMOTEPARTDEL",
"Artifically delete the remote particle if its distance "
148 "to the beam mass is larger than REMOTEPARTDEL times of the beam rms size, "
149 "its default values is 0 (no delete) ",0.0);
152 (
"PSDUMPFRAME",
"Controls the frame of phase space dump in "
153 "stat file and h5 file. If 'GLOBAL' OPAL will dump in the "
154 "lab (global) Cartesian frame; if 'BUNCH_MEAN' OPAL will "
155 "dump in the local Cartesian frame of the beam mean; "
156 "if 'REFERENCE' OPAL will dump in the local Cartesian "
157 "frame of the reference particle 0. Only aviable for "
158 "OPAL-cycl, its default value is 'GLOBAL'");
161 (
"SPTDUMPFREQ",
"The frequency to dump single "
162 "particle trajectory of particles with ID = 0 & 1, "
163 "its default value is 1. ");
166 (
"REPARTFREQ",
"The frequency to do particles repartition "
167 "for better load balance between nodes, its "
171 (
"MINBINEMITTED",
"The number of bins that have to be emitted before the bins are squashed into "
175 (
"MINSTEPFORREBIN",
"The number of steps into the simulation before the bins are squashed into "
179 (
"REBINFREQ",
"The frequency to reset energy bin ID for "
180 "all particles, its default value is 100.",
rebinFreq);
183 (
"RHODUMP",
"If true, in addition to the phase "
184 "space the scalar rho field is also dumped (H5Block)",
rhoDump);
187 (
"EBDUMP",
"If true, in addition to the phase space the "
188 "E and B field at each particle is also dumped into the H5 file)",
ebDump);
191 (
"CSRDUMP",
"If true, the csr E field, line density "
192 "and the line density derivative is dumped into the "
196 (
"AUTOPHASE",
"If greater than zero OPAL is scanning "
197 "the phases of each rf structure in order to get maximum "
198 "acceleration. Defines the number of refinements of the "
202 (
"PPDEBUG",
"If true, use special initial velocity distribution "
203 "for parallel plate and print special debug output",
ppdebug);
206 (
"SURFDUMPFREQ",
"The frequency to dump surface-particle "
207 "interaction data, its default value is -1 (no dump).",
211 (
"CZERO",
"If set to true a symmetric distribution is "
212 "created -> centroid == 0.0 ",
cZero);
215 (
"RNGTYPE",
"RANDOM (default), Quasi-random number "
216 "generators: HALTON, SOBOL, NIEDERREITER (Gsl ref manual 18.5)",
rngtype);
220 (
"CLOTUNEONLY",
"If set to true stop after "
224 (
"NUMBLOCKS",
"Maximum number of vectors in the Krylov "
225 "space (for RCGSolMgr). Default value is 0 and BlockCGSolMgr will be used.");
227 (
"RECYCLEBLOCKS",
"Number of vectors in the recycle "
228 "space (for RCGSolMgr). Default value is 0 and BlockCGSolMgr will be used.");
230 (
"NLHS",
"Number of stored old solutions for extrapolating "
231 "the new starting vector. Default value is 1 and just the last solution is used.");
234 (
"ENABLEHDF5",
"If true, HDF5 actions are enabled",
enableHDF5);
237 (
"ASCIIDUMP",
"If true, some of the elements dump in ASCII instead of HDF5",
false);
240 (
"BOUNDPDESTROYFQ",
"The frequency to do boundp_destroy to delete lost particles. Default 10",10.0);
243 (
"BEAMHALOBOUNDARY",
"Defines in terms of sigma where the halo starts. Default 0.0",0.0);
246 (
"IDEALIZED",
"Using the hard edge model for the calculation of path length. Default: false",
false);
249 (
"LOGBENDTRAJECTORY",
"Writing the trajectory of every bend to disk. Default: false",
false);
252 (
"VERSION",
"Version of OPAL for which input file was written", 10000);
256 (
"AMR",
"Use adaptive mesh refinement.",
amr);
259 "The frequency to dump grid "
264 "The frequency to perform a regrid "
265 "in multi-bunch mode (default: 10)",
269 (
"MEMORYDUMP",
"If true, write memory to SDDS file",
memoryDump);
272 (
"HALOSHIFT",
"Constant parameter to shift halo value (default: 0.0)",
haloShift);
275 (
"DELPARTFREQ",
"The frequency to delete particles, i.e. delete when step%delPartFreq == 0. Default: 1",
delPartFreq);
335 return new Option(name,
this);
369 IpplMemoryUsage::Unit::GB,
false);
468 rngtype = std::string(
"RANDOM");
471 if(
itsAttr[BEAMHALOBOUNDARY]) {
492 *gmsg <<
"\nCurrent settings of options:\n" << *
this <<
endl;
497 if (dumpFrame ==
"GLOBAL") {
499 }
else if (dumpFrame ==
"BUNCH_MEAN") {
501 }
else if (dumpFrame ==
"REFERENCE") {
504 std::string msg = std::string(
"Did not recognise PSDUMPFRAME '")+\
505 dumpFrame+std::string(
"'. It should be one of 'GLOBAL',")+\
506 std::string(
" 'BUNCH_MEAN' or 'REFERENCE'");
514 return std::string(
"BUNCH_MEAN");
516 return std::string(
"REFERENCE");
519 return std::string(
"GLOBAL");
int seed
The current random seed.
void setReal(Attribute &attr, double val)
Set real value.
double haloShift
The constant parameter C to shift halo, by < w^4 > / < w^2 > ^2 - C (w=x,y,z)
The base class for all OPAL actions.
T::PETE_Expr_t::PETE_Return_t max(const PETE_Expr< T > &expr, NDIndex< D > &loc)
The base class for all OPAL exceptions.
std::string toUpper(const std::string &str)
int minStepForRebin
The number of steps into the simulation before the bins are squashed into a single bin...
static IpplMemory_p getInstance(Unit unit=Unit::GB, bool reset=true)
void init55(int seed)
Initialise random number generator.
void setString(Attribute &attr, const std::string &val)
Set string value.
virtual void execute()
Execute the command.
std::vector< Attribute > itsAttr
The object attributes (see Attribute.hh).
int recycleBlocks
RCG: number of recycle blocks.
bool cZero
if true create symmetric distribution
int statDumpFreq
The frequency to dump statistical values, e.e. dump data when stepstatDumpFreq==0.
bool getBool(const Attribute &attr)
Return logical value.
unsigned int delPartFreq
The frequency to delete particles (currently: OPAL-cycl only)
virtual Option * clone(const std::string &name)
Make clone.
int version
opal version of input file
int sptDumpFreq
The frequency to dump single particle trajectory of particles with ID = 0 & 1.
Random rangen
Random generator.
int repartFreq
The frequency to do particles repartition for better load balance between nodes.
std::string rngtype
random number generator
int numBlocks
RCG: cycle length.
void registerOwnership(const AttributeHandler::OwnerType &itsClass) const
bool enableHDF5
If true HDF5 files are written.
int rebinFreq
The frequency to reset energy bin ID for all particles.
int nLHS
number of old left hand sides used to extrapolate a new start vector
std::string DumpFrameToString(DumpFrame df)
int psDumpFreq
The frequency to dump the phase space, i.e.dump data when steppsDumpFreq==0.
static void setEcho(bool flag)
Set echo flag.
bool psDumpEachTurn
phase space dump flag for OPAL-cycl
Option()
Exemplar constructor.
DumpFrame psDumpFrame
flag to decide in which coordinate frame the phase space will be dumped for OPAL-cycl ...
int minBinEmitted
The number of bins that have to be emitted before the bin are squashed into a single bin...
Attribute makeBool(const std::string &name, const std::string &help)
Make logical attribute.
void setBool(Attribute &attr, bool val)
Set logical value.
int surfDumpFreq
The frequency to dump the particle-geometry surface interation data.
int scSolveFreq
The frequency to solve space charge fields.
int amrYtDumpFreq
The frequency to dump AMR grid data and particles into file.
bool cloTuneOnly
Do closed orbit and tune calculation only.
double getReal(const Attribute &attr)
Return real value.
bool ppdebug
ppdebug flag.
Attribute makeString(const std::string &name, const std::string &help)
Make string attribute.
void handlePsDumpFrame(const std::string &dumpFrame)
Attribute makeReal(const std::string &name, const std::string &help)
Make real attribute.
Inform & endl(Inform &inf)
std::string getString(const Attribute &attr)
Get string value.
bool writeBendTrajectories