Options.h 5.03 KB
Newer Older
kraus's avatar
kraus committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
#ifndef OPTIONS_HH
#define OPTIONS_HH

// ------------------------------------------------------------------------
// $RCSfile: Options.h,v $
// ------------------------------------------------------------------------
// $Revision: 1.1.1.1 $
// ------------------------------------------------------------------------
// Copyright: see Copyright.readme
// ------------------------------------------------------------------------
//
// Struct: Options
//
// ------------------------------------------------------------------------
//
// $Date: 2000/03/27 09:33:48 $
// $Author: Andreas Adelmann $
//
// ------------------------------------------------------------------------


// Namespace Options.
// ------------------------------------------------------------------------
/// The global OPAL option flags.
//  This namespace contains the global option flags.

27 28
#include "OptionTypes.h"
#include "Utilities/ClassicRandom.h"
29

kraus's avatar
kraus committed
30 31 32 33 34 35 36 37 38
namespace Options {
    /// Echo flag.
    //  If true, print an input echo.
    extern bool echo;

    /// Info flag.
    //  If true, print informative messages.
    extern bool info;

kraus's avatar
kraus committed
39 40 41 42 43 44 45 46
    extern int infoLevel;

    /// Warn flag.
    //  If true, print warning messages.
    extern bool warn;

    extern int warnLevel;

kraus's avatar
kraus committed
47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62
    extern bool csrDump;

    /// ppdebug flag.
    //  If true, use special initial velocity distribution for parallel plate and print special debug output .
    extern bool ppdebug;

    /// if true create symmetric distribution
    extern bool cZero;

    /// If true HDF5 files are written
    extern bool enableHDF5;

    extern bool asciidump;

    // If the distance of a particle to bunch mass larger than remotePartDel times of the rms size of the bunch in any dimension,
    // the particle will be deleted artifically to hold the accuracy of space charge calculation. The default setting of -1 stands for no deletion.
adelmann's avatar
adelmann committed
63
    extern double remotePartDel;
64 65

    extern double beamHaloBoundary;
66

67 68 69
    extern bool writeBendTrajectories;

    extern bool idealized;
70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93

    /// Trace flag.
    //  If true, print CPU time before and after each command.
    extern bool mtrace;

    /// Random generator.
    //  The global random generator.
    extern Random rangen;

    /// The current random seed.
    extern int seed;

    /// The frequency to dump the phase space, i.e.dump data when step%psDumpFreq==0
    extern int psDumpFreq;

    /// The frequency to dump statistical values, e.e. dump data when step%statDumpFreq==0
    extern int statDumpFreq;

    /// The frequency to dump single particle trajectory of particles with ID = 0 & 1
    extern int sptDumpFreq;

    /// The frequency to do particles repartition for better load balance between nodes
    extern int repartFreq;

94 95 96 97 98 99
    /// The number of bins that have to be emitted before the bin are squashed into a single bin
    extern int minBinEmitted;

    /// The number of steps into the simulation before the bins are squashed into a single bin
    extern int minStepForRebin;

100 101 102 103 104 105 106 107 108 109 110 111
    /// The frequency to reset energy bin ID for all particles
    extern int rebinFreq;

    /// phase space dump flag for OPAL-cycl
    //  if true, dump phase space after each turn
    extern bool psDumpEachTurn;

    // Governs how often boundp_destroy is called to destroy lost particles
    // Mainly used in the CyclotronTracker as of now -DW
    extern int boundpDestroyFreq;

    /// flag to decide in which coordinate frame the phase space will be dumped for OPAL-cycl
winklehner_d's avatar
-DW  
winklehner_d committed
112 113 114
    //  - GLOBAL, in Cartesian frame of the global particle
    //  - BUNCH_MEAN, in Cartesian frame of the bunch mean
    //  - REFERENCE, in Cartesian frame of the reference (0) particle
115
    extern DumpFrame psDumpFrame;
116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141

    /// The frequency to solve space charge fields.
    extern int scSolveFreq;

    // How many small timesteps are inside the large timestep used in multiple time stepping (MTS) integrator
    extern int mtsSubsteps;

    extern bool rhoDump;

    extern bool ebDump;

    // if true opal find the phases in the cavities, such that the energy gain is at maximum
    extern int autoPhase;

    /// The frequency to dump the particle-geometry surface interation data.
    extern int surfDumpFreq;

    /// RCG: cycle length
    extern int numBlocks;

    /// RCG: number of recycle blocks
    extern int recycleBlocks;

    /// number of old left hand sides used to extrapolate a new start vector
    extern int nLHS;

142
    /// random number generator
143 144 145 146 147
    extern std::string rngtype;

    /// Do closed orbit and tune calculation only.
    extern bool cloTuneOnly;

148
    /// opal version of input file
149
    extern int version;
150

frey_m's avatar
frey_m committed
151
    /// Enable AMR if true
frey_m's avatar
frey_m committed
152
    extern bool amr;
153

154 155
    /// The frequency to dump AMR grid data and particles into file
    extern int amrYtDumpFreq;
frey_m's avatar
frey_m committed
156
    
frey_m's avatar
frey_m committed
157
    /// After how many steps the AMR grid hierarchy is updated
frey_m's avatar
frey_m committed
158
    extern int amrRegridFreq;
159

frey_m's avatar
frey_m committed
160
    extern bool memoryDump;
frey_m's avatar
frey_m committed
161 162 163

    /// The constant parameter C to shift halo, by < w^4 > / < w^2 > ^2 - C (w=x,y,z)
    extern double haloShift;
frey_m's avatar
frey_m committed
164 165 166

    /// The frequency to delete particles (currently: OPAL-cycl only)
    extern unsigned int delPartFreq;
kraus's avatar
kraus committed
167 168
}

169
#endif // OPAL_Options_HH