Code indexing in gitaly is broken and leads to code not being visible to the user. We work on the issue with highest priority.

Skip to content
Snippets Groups Projects
Commit 97f569ab authored by kraus's avatar kraus
Browse files

remove Option VERIFY, replace error msg with exceptions

parent 0e242d94
No related branches found
No related tags found
No related merge requests found
...@@ -100,7 +100,7 @@ a few global quantities. Starting with version 1.6.0 of \opal the option \texttt ...@@ -100,7 +100,7 @@ a few global quantities. Starting with version 1.6.0 of \opal the option \texttt
mandatory in the \opal input file. Example: mandatory in the \opal input file. Example:
\begin{example} \begin{example}
OPTION,ECHO=logical,INFO=logical,TRACE=logical, OPTION,ECHO=logical,INFO=logical,TRACE=logical,
VERIFY=logical,WARN=logical, WARN=logical,
SEED=real,PSDUMPFREQ=integer, SEED=real,PSDUMPFREQ=integer,
STATDUMPFREQ=integer, SPTDUMFREQ=integer, STATDUMPFREQ=integer, SPTDUMFREQ=integer,
REPARTFREQ=integer, REBINFREQ=integer, TELL=logical, VERSION=integer; REPARTFREQ=integer, REBINFREQ=integer, TELL=logical, VERSION=integer;
...@@ -138,11 +138,6 @@ The next five logical flags activate or deactivate execution options: ...@@ -138,11 +138,6 @@ The next five logical flags activate or deactivate execution options:
%% for each executable command. %% for each executable command.
%% This information includes the command name %% This information includes the command name
%% and elapsed CPU time before and after the command. %% and elapsed CPU time before and after the command.
\item[VERIFY]
\index{OPTION!VERIFY}
If this option is on, \opal gives a message for each undefined variable
or element in a beam line.
\item[WARN] \item[WARN]
\index{OPTION!WARN} \index{OPTION!WARN}
If this option is turned off, \opal suppresses all warning messages. If this option is turned off, \opal suppresses all warning messages.
...@@ -225,7 +220,7 @@ The next five logical flags activate or deactivate execution options: ...@@ -225,7 +220,7 @@ The next five logical flags activate or deactivate execution options:
If true the electric csr field component, $E_z$, line density and the derivative of the line density is written into the \filename{data} directory. If true the electric csr field component, $E_z$, line density and the derivative of the line density is written into the \filename{data} directory.
The first line gives the average position of the beam bunch. The first line gives the average position of the beam bunch.
Subsequent lines list $z$ position of longitudinal mesh (with respect to the head of the beam bunch), Subsequent lines list $z$ position of longitudinal mesh (with respect to the head of the beam bunch),
$E_z$, line density and the derivative of the line density. Note that currently the line density derivative $E_z$, line density and the derivative of the line density. Note that currently the line density derivative
needs to be scaled by the inverse of the mesh spacing to get the correct value. The CSR field needs to be scaled by the inverse of the mesh spacing to get the correct value. The CSR field
is dumped at each time step of the calculation. Each text file is named "Bend Name" (from input file) + "-CSRWake" + "time step number in that bend is dumped at each time step of the calculation. Each text file is named "Bend Name" (from input file) + "-CSRWake" + "time step number in that bend
(starting from 1)" + ".txt". (starting from 1)" + ".txt".
...@@ -339,12 +334,12 @@ OPTION,SEED=987456321 ...@@ -339,12 +334,12 @@ OPTION,SEED=987456321
\keyword{TRACE} & = \keyword{FALSE} \\ \keyword{TRACE} & = \keyword{FALSE} \\
\hline \hline
\keyword{WARN} & = \keyword{TRUE} & \keyword{WARN} & = \keyword{TRUE} &
\keyword{VERIFY} & = \keyword{FALSE} & \keyword{SEED} & = \texttt{123456789} &
\keyword{TELL} & = \keyword{FALSE} \\ \keyword{TELL} & = \keyword{FALSE} \\
\hline \hline
\keyword{SEED} & = \texttt{123456789} & \keyword{SPTDUMPFREQ} & = \texttt{1} &
\keyword{VERIFY} & = \keyword{FALSE} & & &
\keyword{SPTDUMPFREQ} & = \texttt{1} \\ & \\
\hline \hline
\keyword{PSDUMPFREQ} & = \texttt{10} & \keyword{PSDUMPFREQ} & = \texttt{10} &
\keyword{STATDUMPFREQ} & = \texttt{10} & \keyword{STATDUMPFREQ} & = \texttt{10} &
...@@ -808,4 +803,4 @@ DOIT(); ...@@ -808,4 +803,4 @@ DOIT();
\index{Control Statements|)} \index{Control Statements|)}
\input{footer} \input{footer}
\ No newline at end of file
...@@ -47,7 +47,6 @@ namespace { ...@@ -47,7 +47,6 @@ namespace {
ECHO, ECHO,
INFO, INFO,
TRACE, TRACE,
VERIFY,
WARN, WARN,
SEED, SEED,
TELL, TELL,
...@@ -101,9 +100,6 @@ Option::Option(): ...@@ -101,9 +100,6 @@ Option::Option():
itsAttr[TRACE] = Attributes::makeBool itsAttr[TRACE] = Attributes::makeBool
("TRACE", "If true, print execution trace", mtrace); ("TRACE", "If true, print execution trace", mtrace);
itsAttr[VERIFY] = Attributes::makeBool
("VERIFY", "If true, print warnings about assumptions", verify);
itsAttr[WARN] = Attributes::makeBool itsAttr[WARN] = Attributes::makeBool
("WARN", "If true, print warning messages", warn); ("WARN", "If true, print warning messages", warn);
...@@ -216,7 +212,6 @@ Option::Option(const std::string &name, Option *parent): ...@@ -216,7 +212,6 @@ Option::Option(const std::string &name, Option *parent):
Attributes::setBool(itsAttr[ECHO], echo); Attributes::setBool(itsAttr[ECHO], echo);
Attributes::setBool(itsAttr[INFO], info); Attributes::setBool(itsAttr[INFO], info);
Attributes::setBool(itsAttr[TRACE], mtrace); Attributes::setBool(itsAttr[TRACE], mtrace);
Attributes::setBool(itsAttr[VERIFY], verify);
Attributes::setBool(itsAttr[WARN], warn); Attributes::setBool(itsAttr[WARN], warn);
Attributes::setReal(itsAttr[SEED], seed); Attributes::setReal(itsAttr[SEED], seed);
Attributes::setReal(itsAttr[PSDUMPFREQ], psDumpFreq); Attributes::setReal(itsAttr[PSDUMPFREQ], psDumpFreq);
...@@ -267,7 +262,6 @@ void Option::execute() { ...@@ -267,7 +262,6 @@ void Option::execute() {
echo = Attributes::getBool(itsAttr[ECHO]); echo = Attributes::getBool(itsAttr[ECHO]);
info = Attributes::getBool(itsAttr[INFO]); info = Attributes::getBool(itsAttr[INFO]);
mtrace = Attributes::getBool(itsAttr[TRACE]); mtrace = Attributes::getBool(itsAttr[TRACE]);
verify = Attributes::getBool(itsAttr[VERIFY]);
warn = Attributes::getBool(itsAttr[WARN]); warn = Attributes::getBool(itsAttr[WARN]);
psDumpEachTurn = Attributes::getBool(itsAttr[PSDUMPEACHTURN]); psDumpEachTurn = Attributes::getBool(itsAttr[PSDUMPEACHTURN]);
scan = Attributes::getBool(itsAttr[SCAN]); scan = Attributes::getBool(itsAttr[SCAN]);
...@@ -437,4 +431,4 @@ std::string DumpFrameToString(DumpFrame df) { ...@@ -437,4 +431,4 @@ std::string DumpFrameToString(DumpFrame df) {
default: default:
return std::string("GLOBAL"); return std::string("GLOBAL");
} }
} }
\ No newline at end of file
...@@ -27,7 +27,6 @@ namespace Options { ...@@ -27,7 +27,6 @@ namespace Options {
// The global program options. // The global program options.
bool mtrace = false; bool mtrace = false;
bool verify = false;
bool warn = true; bool warn = true;
bool psDumpEachTurn = false; bool psDumpEachTurn = false;
DumpFrame psDumpLocalFrame = GLOBAL; DumpFrame psDumpLocalFrame = GLOBAL;
...@@ -94,4 +93,4 @@ namespace Options { ...@@ -94,4 +93,4 @@ namespace Options {
// opal version of input file // opal version of input file
int version = 10000; int version = 10000;
} }
\ No newline at end of file
...@@ -70,10 +70,6 @@ namespace Options { ...@@ -70,10 +70,6 @@ namespace Options {
// If true, print CPU time before and after each command. // If true, print CPU time before and after each command.
extern bool mtrace; extern bool mtrace;
/// Verify flag.
// If true, print warning about undefined variables.
extern bool verify;
/// Warn flag. /// Warn flag.
// If true, print warning messages. // If true, print warning messages.
extern bool warn; extern bool warn;
...@@ -159,4 +155,4 @@ namespace Options { ...@@ -159,4 +155,4 @@ namespace Options {
extern int version; extern int version;
} }
#endif // OPAL_Options_HH #endif // OPAL_Options_HH
\ No newline at end of file
...@@ -222,15 +222,8 @@ namespace Expressions { ...@@ -222,15 +222,8 @@ namespace Expressions {
itsObject = OpalData::getInstance()->find(obj_name); itsObject = OpalData::getInstance()->find(obj_name);
if(itsObject == 0) { if(itsObject == 0) {
if(att_name.empty() && itsIndex <= 0) { if(att_name.empty() && itsIndex <= 0) {
Object *variable = OpalData::getInstance()->find("REAL_VARIABLE"); throw OpalException("SRefAttr::fill()",
itsObject = variable->clone(obj_name); "\nThe <variable> \"" + obj_name + "\" is unknown.\n");
OpalData::getInstance()->define(itsObject);
if(Options::verify) {
std::cerr << "\nThe <variable> \"" << obj_name
<< "\" is unknown, created with zero value.\n"
<< std::endl;
}
} else { } else {
throw OpalException("SRefAttr::fill()", throw OpalException("SRefAttr::fill()",
"Object \"" + obj_name + "\" is unknown."); "Object \"" + obj_name + "\" is unknown.");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment