Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
cortes_c
src
Commits
c2ea9094
Commit
c2ea9094
authored
Jul 13, 2016
by
adelmann
🎗
Browse files
Unifiy OpalOptions and Options and set more defaults
parent
79b0468f
Changes
37
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
193 additions
and
20 deletions
+193
-20
classic/5.0/src/Utilities/Options.cpp
classic/5.0/src/Utilities/Options.cpp
+70
-1
classic/5.0/src/Utilities/Options.h
classic/5.0/src/Utilities/Options.h
+104
-0
src/Algorithms/AutophaseTracker.cpp
src/Algorithms/AutophaseTracker.cpp
+1
-1
src/Algorithms/ParallelCyclotronTracker.cpp
src/Algorithms/ParallelCyclotronTracker.cpp
+1
-1
src/Algorithms/ParallelSliceTracker.h
src/Algorithms/ParallelSliceTracker.h
+1
-1
src/Algorithms/ParallelTTracker.cpp
src/Algorithms/ParallelTTracker.cpp
+1
-1
src/Algorithms/ParallelTTracker.h
src/Algorithms/ParallelTTracker.h
+1
-1
src/BasicActions/Option.cpp
src/BasicActions/Option.cpp
+2
-2
src/Distribution/ClosedOrbitFinder.h
src/Distribution/ClosedOrbitFinder.h
+1
-1
src/Distribution/Distribution.cpp
src/Distribution/Distribution.cpp
+1
-1
src/Distribution/SigmaGenerator.h
src/Distribution/SigmaGenerator.h
+1
-1
src/Editor/Edit.cpp
src/Editor/Edit.cpp
+1
-1
src/Elements/OpalBeamline.h
src/Elements/OpalBeamline.h
+1
-1
src/Errors/ErrorCmd.cpp
src/Errors/ErrorCmd.cpp
+1
-1
src/Errors/ErrorComp.cpp
src/Errors/ErrorComp.cpp
+1
-1
src/Errors/ErrorField.cpp
src/Errors/ErrorField.cpp
+1
-1
src/Expressions/SRefAttr.h
src/Expressions/SRefAttr.h
+1
-1
src/Expressions/SRefExpr.h
src/Expressions/SRefExpr.h
+1
-1
src/Main.cpp
src/Main.cpp
+1
-1
src/Match/VaryCmd.cpp
src/Match/VaryCmd.cpp
+1
-1
No files found.
classic/5.0/src/Utilities/Options.cpp
View file @
c2ea9094
#include "Utilities/Random.h"
#include <string>
namespace
Options
{
// The global program options.
...
...
@@ -9,7 +11,6 @@ namespace Options {
// If true create symmetric distribution
bool
cZero
=
false
;
bool
enableHDF5
=
true
;
bool
asciidump
=
false
;
// If the distance of a particle to bunch mass larger than remotePartDel times of the rms size of the bunch in any dimension,
...
...
@@ -17,4 +18,72 @@ namespace Options {
int
remotePartDel
=
-
1
;
double
beamHaloBoundary
=
0
;
// The global program options.
bool
mtrace
=
false
;
bool
verify
=
false
;
bool
warn
=
true
;
bool
psDumpEachTurn
=
false
;
bool
psDumpLocalFrame
=
false
;
bool
scan
=
false
;
bool
rhoDump
=
false
;
bool
ebDump
=
false
;
bool
enableHDF5
=
true
;
// bool efDump = false;
// The global random generator.
Random
rangen
;
// The current random seed.
int
seed
=
123456789
;
// the number of refinements of the search range for the phase with maximum energy
// if eq 0 then no autophase
int
autoPhase
=
0
;
// The frequency to dump the phase space, i.e.dump data when step%psDumpFreq==0
int
psDumpFreq
=
10
;
// // The frequency to dump the phase space, i.e.dump data when step%psDumpFreq==0
// double rDump = 0.0;
// The frequency to dump statistical quantities such as beam RMS properties, i.e. dump
// when step%statDumpFreq == 0.
int
statDumpFreq
=
10
;
// The frequency to dump single particle trajectory of particles with ID = 0 & 1
int
sptDumpFreq
=
1
;
// The frequency to do particles repartition for better load balance between nodes
int
repartFreq
=
10
;
// The frequency to reset energy bin ID for all particles
int
rebinFreq
=
100
;
/// The frequency to solve space charge fields.
int
scSolveFreq
=
1
;
// How many small timesteps are inside the large timestep used in multiple time stepping (MTS) integrator
int
mtsSubsteps
=
1
;
// The frequency to dump the particle-geometry surface interation data, -1 stands for no dump.
int
surfDumpFreq
=
-
1
;
// Options for the Belos solver
int
numBlocks
=
0
;
int
recycleBlocks
=
0
;
int
nLHS
=
1
;
std
::
string
rngtype
=
std
::
string
(
"RANDOM"
);
bool
schottkyCorrection
=
false
;
double
schottkyRennormalization
=
-
1
;
bool
cloTuneOnly
;
// Governs how often boundp_destroy is called to destroy lost particles
// Mainly used in the CyclotronTracker as of now -DW
int
boundpDestroyFreq
=
10
;
}
classic/5.0/src/Utilities/Options.h
View file @
c2ea9094
...
...
@@ -24,6 +24,8 @@
/// The global OPAL option flags.
// This namespace contains the global option flags.
#include "Utilities/Random.h"
namespace
Options
{
/// Echo flag.
...
...
@@ -53,6 +55,108 @@ namespace Options {
extern
double
remotePartDel
;
extern
double
beamHaloBoundary
;
// CKR: nowhere used
// // true if in bet mode
// extern bool bet;
/// Trace flag.
// If true, print CPU time before and after each command.
extern
bool
mtrace
;
/// Verify flag.
// If true, print warning about undefined variables.
extern
bool
verify
;
/// Warn flag.
// If true, print warning messages.
extern
bool
warn
;
/// 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
;
// CKR: nowhere used
// /// Dump centroid when R >rDump
// extern double rDump;
/// 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
;
/// 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
// if true, in local Cartesian frame, otherwise in global Cartesian frame
extern
bool
psDumpLocalFrame
;
/// 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
;
/// this allows to repeat tracks starting always at the begining of the lattice and
/// generates a new distribution
extern
bool
scan
;
extern
bool
rhoDump
;
extern
bool
ebDump
;
// CKR: nowhere used
// extern bool efDump;
// 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
;
extern
std
::
string
rngtype
;
/// if true
extern
bool
schottkyCorrection
;
///
extern
double
schottkyRennormalization
;
/// Do closed orbit and tune calculation only.
extern
bool
cloTuneOnly
;
}
#endif // OPAL_Options_HH
src/Algorithms/AutophaseTracker.cpp
View file @
c2ea9094
#include "Algorithms/AutophaseTracker.h"
#include "Utilities/ClassicField.h"
#include "AbstractObjects/OpalData.h"
#include "Utilities/
Opal
Options.h"
#include "Utilities/Options.h"
#include "Utilities/Timer.h"
#include <iostream>
...
...
src/Algorithms/ParallelCyclotronTracker.cpp
View file @
c2ea9094
...
...
@@ -73,7 +73,7 @@
#include "Structure/H5PartWrapperForPC.h"
#include "Structure/BoundaryGeometry.h"
#include "Utilities/
Opal
Options.h"
#include "Utilities/Options.h"
#include "Ctunes.h"
#include <cassert>
...
...
src/Algorithms/ParallelSliceTracker.h
View file @
c2ea9094
...
...
@@ -10,7 +10,7 @@
#include "Algorithms/Tracker.h"
#include "Structure/DataSink.h"
#include "Utilities/Options.h"
#include "Utilities/
Opal
Options.h"
#include "Utilities/Options.h"
#include "Physics/Physics.h"
...
...
src/Algorithms/ParallelTTracker.cpp
View file @
c2ea9094
...
...
@@ -59,7 +59,7 @@
#include "AbstractObjects/OpalData.h"
#include "BasicActions/Option.h"
#include "Utilities/
Opal
Options.h"
#include "Utilities/Options.h"
#include "Utilities/Options.h"
#include "Distribution/Distribution.h"
...
...
src/Algorithms/ParallelTTracker.h
View file @
c2ea9094
...
...
@@ -23,7 +23,7 @@
#include "Structure/DataSink.h"
#include "BasicActions/Option.h"
#include "Utilities/
Opal
Options.h"
#include "Utilities/Options.h"
#include "Utilities/Options.h"
#include "Physics/Physics.h"
...
...
src/BasicActions/Option.cpp
View file @
c2ea9094
...
...
@@ -20,7 +20,7 @@
#include "Attributes/Attributes.h"
#include "Parser/FileStream.h"
#include "Utilities/Options.h"
#include "Utilities/
Opal
Options.h"
#include "Utilities/Options.h"
#include "Utilities/Random.h"
#include <ctime>
#include <iostream>
...
...
@@ -157,7 +157,7 @@ Option::Option():
(
"NLHS"
,
"Number of stored old solutions for extrapolating the new starting vector. Default value is 1 and just the last solution is used."
);
itsAttr
[
ENABLEHDF5
]
=
Attributes
::
makeBool
(
"ENABLEHDF5"
,
"If true, HDF5 actions are enabled"
,
true
);
(
"ENABLEHDF5"
,
"If true, HDF5 actions are enabled"
,
enableHDF5
);
itsAttr
[
ASCIIDUMP
]
=
Attributes
::
makeBool
(
"ASCIIDUMP"
,
"If true, some of the elements dump in ASCII instead of HDF5"
,
false
);
...
...
src/Distribution/ClosedOrbitFinder.h
View file @
c2ea9094
...
...
@@ -23,7 +23,7 @@
#include <utility>
#include <vector>
#include "Utilities/
Opal
Options.h"
#include "Utilities/Options.h"
#include "Utilities/Options.h"
#include "Utilities/OpalException.h"
...
...
src/Distribution/Distribution.cpp
View file @
c2ea9094
...
...
@@ -25,7 +25,7 @@
#include "AbstractObjects/Expressions.h"
#include "Attributes/Attributes.h"
#include "Utilities/
Opal
Options.h"
#include "Utilities/Options.h"
#include "Utilities/Options.h"
#include "halton1d_sequence.hh"
#include "AbstractObjects/OpalData.h"
...
...
src/Distribution/SigmaGenerator.h
View file @
c2ea9094
...
...
@@ -30,7 +30,7 @@
#include <vector>
#include "Physics/Physics.h"
#include "Utilities/
Opal
Options.h"
#include "Utilities/Options.h"
#include "Utilities/Options.h"
#include "Utilities/OpalException.h"
...
...
src/Editor/Edit.cpp
View file @
c2ea9094
...
...
@@ -36,7 +36,7 @@
#include "MemoryManagement/Pointer.h"
#include "Tables/Selector.h"
#include "Utilities/OpalException.h"
#include "Utilities/
Opal
Options.h"
#include "Utilities/Options.h"
#include "Utilities/RegularExpression.h"
#include <iostream>
...
...
src/Elements/OpalBeamline.h
View file @
c2ea9094
...
...
@@ -19,7 +19,7 @@
#include "AbsBeamline/Septum.h"
#include "BasicActions/Option.h"
#include "Utilities/
Opal
Options.h"
#include "Utilities/Options.h"
#include "Utilities/Options.h"
#include "Utilities/OpalSection.h"
#include "Utilities/ClassicField.h"
...
...
src/Errors/ErrorCmd.cpp
View file @
c2ea9094
...
...
@@ -26,7 +26,7 @@
#include "Errors/ErrorParser.h"
#include "Errors/MPHandler.h"
#include "Errors/MPRemover.h"
#include "Utilities/
Opal
Options.h"
#include "Utilities/Options.h"
#include "Utilities/Round.h"
...
...
src/Errors/ErrorComp.cpp
View file @
c2ea9094
...
...
@@ -22,7 +22,7 @@
#include "Errors/Error.h"
#include "Errors/MPHandler.h"
#include "Fields/BMultipoleField.h"
#include "Utilities/
Opal
Options.h"
#include "Utilities/Options.h"
#include "Utilities/Options.h"
#include "Utilities/Round.h"
#include <cmath>
...
...
src/Errors/ErrorField.cpp
View file @
c2ea9094
...
...
@@ -22,7 +22,7 @@
#include "Errors/Error.h"
#include "Errors/MPHandler.h"
#include "Fields/BMultipoleField.h"
#include "Utilities/
Opal
Options.h"
#include "Utilities/Options.h"
#include "Utilities/Options.h"
#include "Utilities/Round.h"
#include <cmath>
...
...
src/Expressions/SRefAttr.h
View file @
c2ea9094
...
...
@@ -25,7 +25,7 @@
#include "Expressions/SValue.h"
#include "Utilities/OpalException.h"
//#include "Utilities/Options.h"
#include "Utilities/
Opal
Options.h"
#include "Utilities/Options.h"
#include <vector>
...
...
src/Expressions/SRefExpr.h
View file @
c2ea9094
...
...
@@ -23,7 +23,7 @@
#include "AbstractObjects/OpalData.h"
#include "Expressions/SValue.h"
#include "Utilities/OpalException.h"
#include "Utilities/
Opal
Options.h"
#include "Utilities/Options.h"
#include <iosfwd>
#if defined(__GNUC__) && __GNUC__ < 3
#include <strstream>
...
...
src/Main.cpp
View file @
c2ea9094
...
...
@@ -36,7 +36,7 @@ Inform *gmsg;
#include "FixedAlgebra/FTps.h"
#include "BasicActions/Option.h"
#include "Utilities/
Opal
Options.h"
#include "Utilities/Options.h"
#include "Utilities/Options.h"
#include "Utilities/OpalException.h"
...
...
src/Match/VaryCmd.cpp
View file @
c2ea9094
...
...
@@ -21,7 +21,7 @@
#include "Match/ConcreteVar.h"
#include "Match/Match.h"
#include "Match/MatchLimits.h"
#include "Utilities/
Opal
Options.h"
#include "Utilities/Options.h"
#include <iostream>
...
...
Prev
1
2
Next
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment