Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
kraus
src
Commits
d6e6e76f
Commit
d6e6e76f
authored
Mar 26, 2019
by
snuverink_j
Browse files
code improvements
parent
1b34f8b8
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
8 additions
and
13 deletions
+8
-13
ippl/src/Utility/Inform.cpp
ippl/src/Utility/Inform.cpp
+4
-0
ippl/src/Utility/Inform.h
ippl/src/Utility/Inform.h
+0
-6
src/Classic/AbsBeamline/Cyclotron.cpp
src/Classic/AbsBeamline/Cyclotron.cpp
+2
-3
src/Optimize/OptimizeCmd.cpp
src/Optimize/OptimizeCmd.cpp
+2
-3
src/addToDoxygenMainPage.h
src/addToDoxygenMainPage.h
+0
-1
No files found.
ippl/src/Utility/Inform.cpp
View file @
d6e6e76f
...
...
@@ -31,6 +31,10 @@
#include <fstream>
#include <cstring>
// range of Inform message levels
constexpr
int
MIN_INFORM_LEVEL
=
1
;
constexpr
int
MAX_INFORM_LEVEL
=
5
;
/////////////////////////////////////////////////////////////////////
// manipulator functions
...
...
ippl/src/Utility/Inform.h
View file @
d6e6e76f
...
...
@@ -35,12 +35,6 @@
#include <iomanip>
#include <sstream>
// range of Inform message levels
#define MIN_INFORM_LEVEL 1
#define MAX_INFORM_LEVEL 5
// how large is the buffer for this object?
#define MAX_INFORM_MSG_SIZE 32000
#define INFORM_ALL_NODES (-1)
...
...
src/Classic/AbsBeamline/Cyclotron.cpp
View file @
d6e6e76f
...
...
@@ -347,8 +347,7 @@ bool Cyclotron::apply(const size_t &id, const double &t, Vector_t &E, Vector_t &
bool
flagNeedUpdate
=
false
;
const
double
rpos
=
sqrt
(
RefPartBunch_m
->
R
[
id
](
0
)
*
RefPartBunch_m
->
R
[
id
](
0
)
+
RefPartBunch_m
->
R
[
id
](
1
)
*
RefPartBunch_m
->
R
[
id
](
1
));
const
double
rpos
=
std
::
hypot
(
RefPartBunch_m
->
R
[
id
](
0
),
RefPartBunch_m
->
R
[
id
](
1
));
const
double
zpos
=
RefPartBunch_m
->
R
[
id
](
2
);
if
(
zpos
>
maxz_m
||
zpos
<
minz_m
||
rpos
>
maxr_m
||
rpos
<
minr_m
){
...
...
@@ -377,7 +376,7 @@ bool Cyclotron::apply(const size_t &id, const double &t, Vector_t &E, Vector_t &
bool
Cyclotron
::
apply
(
const
Vector_t
&
R
,
const
Vector_t
&
P
,
const
double
&
t
,
Vector_t
&
E
,
Vector_t
&
B
)
{
const
double
rad
=
s
qrt
(
R
[
0
]
*
R
[
0
]
+
R
[
1
]
*
R
[
1
]);
const
double
rad
=
s
td
::
hypot
(
R
[
0
],
R
[
1
]);
const
double
tempv
=
atan
(
R
[
1
]
/
R
[
0
]);
double
tet
=
tempv
;
...
...
src/Optimize/OptimizeCmd.cpp
View file @
d6e6e76f
...
...
@@ -436,8 +436,7 @@ void OptimizeCmd::execute() {
std
::
ifstream
infile
(
tmplFile
.
c_str
());
std
::
map
<
std
::
string
,
short
>
dvarCheck
;
auto
itr
=
dvars
.
begin
();
for
(;
itr
!=
dvars
.
end
();
++
itr
)
{
for
(
auto
itr
=
dvars
.
begin
();
itr
!=
dvars
.
end
();
++
itr
)
{
dvarCheck
.
insert
(
std
::
make_pair
(
boost
::
get
<
0
>
(
itr
->
second
),
0
));
}
...
...
@@ -447,7 +446,7 @@ void OptimizeCmd::execute() {
//XXX doing the inverse would be better
for
(
auto
&
check
:
dvarCheck
)
{
size_t
pos
=
line
.
find
(
"_"
+
check
.
first
+
"_"
);
pos
=
line
.
find
(
"_"
+
check
.
first
+
"_"
);
if
(
pos
!=
std
::
string
::
npos
&&
dvarCheck
.
find
(
check
.
first
)
!=
dvarCheck
.
end
())
{
dvarCheck
.
at
(
check
.
first
)
=
1
;
...
...
src/addToDoxygenMainPage.h
View file @
d6e6e76f
...
...
@@ -33,7 +33,6 @@ Daniel Winklehner (MIT)
For further information contact: <a href="mailto:andreas.adelmann@psi.ch">andreas.adelmann@psi.ch</a> -
Andreas Adelmann
</P>
Last modified today
</P>
<P>
...
...
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