Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
S
src
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
71
Issues
71
List
Boards
Labels
Service Desk
Milestones
Merge Requests
5
Merge Requests
5
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Code Review
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OPAL
src
Commits
b3c2a547
Commit
b3c2a547
authored
May 24, 2015
by
kraus
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
22ec1592
d6979fba
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
91 additions
and
225 deletions
+91
-225
CMakeLists.txt
CMakeLists.txt
+1
-1
src/Algorithms/ParallelTTracker.cpp
src/Algorithms/ParallelTTracker.cpp
+63
-185
src/CMakeLists.txt
src/CMakeLists.txt
+2
-2
src/Structure/BoundaryGeometry.cpp
src/Structure/BoundaryGeometry.cpp
+21
-32
src/Structure/BoundaryGeometry.h
src/Structure/BoundaryGeometry.h
+4
-5
No files found.
CMakeLists.txt
View file @
b3c2a547
CMAKE_MINIMUM_REQUIRED
(
VERSION 2.8.10
)
PROJECT
(
OPAL
)
SET
(
OPAL_VERSION_MAJOR 1
)
SET
(
OPAL_VERSION_MINOR 3.99
)
SET
(
OPAL_VERSION_MINOR 3.99
.1
)
IF
(
NOT CMAKE_CONFIGURATION_TYPES AND NOT CMAKE_BUILD_TYPE
)
SET
(
CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING
...
...
src/Algorithms/ParallelTTracker.cpp
View file @
b3c2a547
This diff is collapsed.
Click to expand it.
src/CMakeLists.txt
View file @
b3c2a547
...
...
@@ -4,7 +4,7 @@ set (PACKAGE \"opal\")
set
(
PACKAGE_BUGREPORT \"opal@lists.psi.ch\"
)
set
(
PACKAGE_NAME \"OPAL\"
)
set
(
PACKAGE_TARNAME \"opal\"
)
set
(
PACKAGE_VERSION \"1.3.99\"
)
set
(
PACKAGE_VERSION \"1.3.99
.1
\"
)
configure_file
(
config.h.in
${
CMAKE_CURRENT_SOURCE_DIR
}
/config.h
)
...
...
@@ -115,4 +115,4 @@ install (FILES opal.h DESTINATION "${CMAKE_INSTALL_PREFIX}/include")
install
(
FILES Utilities/OpalException.h DESTINATION
"
${
CMAKE_INSTALL_PREFIX
}
/include/Utilities"
)
set
(
OPAL_LIBS
${
OPAL_LIBS
}
PARENT_SCOPE
)
set
(
OPAL_CXX_FLAGS
${
CMAKE_CXX_FLAGS
}
PARENT_SCOPE
)
\ No newline at end of file
set
(
OPAL_CXX_FLAGS
${
CMAKE_CXX_FLAGS
}
PARENT_SCOPE
)
src/Structure/BoundaryGeometry.cpp
View file @
b3c2a547
...
...
@@ -2046,12 +2046,9 @@ BoundaryGeometry::PartInside (
IpplTimings
::
startTimer
(
TPartInside_m
);
// set P1 to next particle position
const
double
p_sq
=
dot
(
v
,
v
);
const
double
betaP
=
1.0
/
sqrt
(
1.0
+
p_sq
);
const
Vector_t
P0
=
r
;
//particle position in timestep n;
const
Vector_t
P1
=
r
+
(
Physics
::
c
*
betaP
*
v
*
dt
);
//particle position in tstep n+1
// P0, P1: particle position in time steps n and n+1
const
Vector_t
P0
=
r
;
const
Vector_t
P1
=
r
+
(
Physics
::
c
*
v
*
dt
/
sqrt
(
1.0
+
dot
(
v
,
v
)));
Vector_t
tmp_intersect_pt
=
0.0
;
int
tmp_triangle_id
=
-
1
;
...
...
@@ -2161,7 +2158,7 @@ BoundaryGeometry::printInfo (Inform& os) const {
Determine physical behaviour when particle hits the boundary triangle,
non secondary emission version.
*/
int
BoundaryGeometry
::
doBGphysics
(
int
BoundaryGeometry
::
emitSecondaryNone
(
const
Vector_t
&
intecoords
,
const
int
&
triId
)
{
...
...
@@ -2180,7 +2177,7 @@ int BoundaryGeometry::doBGphysics (
Determine physical behaviour when particle hits the boundary triangle,
call Furman-Pivi's secondary emission model.
*/
int
BoundaryGeometry
::
doBGphysics
(
int
BoundaryGeometry
::
emitSecondaryFurmanPivi
(
const
Vector_t
&
intecoords
,
const
int
&
triId
,
const
double
&
incQ
,
...
...
@@ -2188,8 +2185,6 @@ int BoundaryGeometry::doBGphysics (
PartBunch
*
itsBunch
,
double
&
seyNum
)
{
Inform
msg
(
"BGphyDebug"
);
const
double
p_sq
=
dot
(
incMomentum
,
incMomentum
);
const
double
incEnergy
=
Physics
::
m_e
*
(
sqrt
(
1.0
+
p_sq
)
-
1.0
)
*
1.0e9
;
// energy in eV
...
...
@@ -2203,19 +2198,15 @@ int BoundaryGeometry::doBGphysics (
}
else
if
(
BGtag
&
BGphysics
::
SecondaryEmission
)
{
int
se_Num
=
0
;
int
seType
=
0
;
double
cosTheta
=
-
dot
(
incMomentum
,
TriNormals_m
[
triId
])
/
sqrt
(
dot
(
incMomentum
,
incMomentum
));
double
cosTheta
=
-
dot
(
incMomentum
,
TriNormals_m
[
triId
])
/
sqrt
(
p_sq
);
if
(
cosTheta
<
0
)
{
//cosTheta should be positive
ERRORMSG
(
"cosTheta = "
<<
cosTheta
<<
" intecoords = "
<<
intecoords
<<
endl
);
ERRORMSG
(
"incident momentum = "
<<
incMomentum
<<
" triNormal = "
<<
TriNormals_m
[
triId
]
<<
endl
);
ERRORMSG
(
" cosTheta = "
<<
cosTheta
<<
" < 0 (!)"
<<
endl
<<
" incident momentum="
<<
incMomentum
<<
endl
<<
" triNormal="
<<
TriNormals_m
[
triId
]
<<
endl
<<
" dot="
<<
dot
(
incMomentum
,
TriNormals_m
[
triId
])
<<
endl
<<
" intecoords = "
<<
intecoords
<<
endl
);
assert
(
cosTheta
>=
0
);
}
assert
(
cosTheta
>=
0
);
int
idx
=
0
;
if
(
intecoords
!=
Point
(
triId
,
1
))
{
idx
=
1
;
// intersection is not the 1st vertex
...
...
@@ -2244,14 +2235,13 @@ int BoundaryGeometry::doBGphysics (
Determine physical behaviour when particle hits the boundary triangle,
call Vaughan's secondary emission model.
*/
int
BoundaryGeometry
::
doBGphysics
(
int
BoundaryGeometry
::
emitSecondaryVaughan
(
const
Vector_t
&
intecoords
,
const
int
&
triId
,
const
double
&
incQ
,
const
Vector_t
&
incMomentum
,
PartBunch
*
itsBunch
,
double
&
seyNum
,
const
int
&
para_null
double
&
seyNum
)
{
const
double
p_sq
=
dot
(
incMomentum
,
incMomentum
);
const
double
incEnergy
=
Physics
::
m_e
*
(
sqrt
(
1.0
+
p_sq
)
-
1.0
)
*
1.0e9
;
// energy in eV
...
...
@@ -2266,17 +2256,16 @@ int BoundaryGeometry::doBGphysics (
}
else
if
(
BGtag
&
BGphysics
::
SecondaryEmission
)
{
int
se_Num
=
0
;
int
seType
=
0
;
double
cosTheta
=
-
dot
(
incMomentum
,
TriNormals_m
[
triId
])
/
sqrt
(
dot
(
incMomentum
,
incMomentum
));
double
cosTheta
=
-
dot
(
incMomentum
,
TriNormals_m
[
triId
])
/
sqrt
(
p_sq
);
//cosTheta should be positive
if
(
cosTheta
<
0
)
{
INFOMSG
(
"incident momentum="
<<
incMomentum
<<
" triNormal="
<<
TriNormals_m
[
triId
]
<<
" dot="
<<
dot
(
incMomentum
,
TriNormals_m
[
triId
])
<<
" cosTheta = "
<<
cosTheta
<<
endl
);
ERRORMSG
(
" cosTheta = "
<<
cosTheta
<<
" < 0 (!)"
<<
endl
<<
" incident momentum="
<<
incMomentum
<<
endl
<<
" triNormal="
<<
TriNormals_m
[
triId
]
<<
endl
<<
" dot="
<<
dot
(
incMomentum
,
TriNormals_m
[
triId
])
<<
endl
<<
" intecoords = "
<<
intecoords
<<
endl
);
assert
(
cosTheta
>=
0
);
}
//assert(cosTheta>=0);
int
idx
=
0
;
if
(
intecoords
!=
Point
(
triId
,
1
))
{
// intersection is not the 1st vertex
...
...
src/Structure/BoundaryGeometry.h
View file @
b3c2a547
...
...
@@ -90,12 +90,12 @@ public:
int
&
triId
);
// non secondary emission version.
int
doBGphysics
(
int
emitSecondaryNone
(
const
Vector_t
&
intecoords
,
const
int
&
triId
);
// call Furman-Pivi's model
int
doBGphysics
(
int
emitSecondaryFurmanPivi
(
const
Vector_t
&
intecoords
,
const
int
&
triId
,
const
double
&
incQ
,
...
...
@@ -104,14 +104,13 @@ public:
double
&
seyNum
);
// call Vaughan's model
int
doBGphysics
(
int
emitSecondaryVaughan
(
const
Vector_t
&
intecoords
,
const
int
&
triId
,
const
double
&
incQ
,
const
Vector_t
&
incMomentum
,
PartBunch
*
itsBunch
,
double
&
seyNum
,
const
int
&
para_null
);
double
&
seyNum
);
size_t
doFNemission
(
OpalBeamline
&
itsOpalBeamline
,
...
...
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