Commit b3c2a547 authored by kraus's avatar kraus

Merge remote-tracking branch 'origin/master'

parents 22ec1592 d6979fba
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
......
This diff is collapsed.
......@@ -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)
......@@ -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
......
......@@ -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,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment