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

Opal maps

Merged snuverink_j requested to merge OPAL-maps into master
Compare and Show latest version
1 file
+ 40
43
Compare changes
  • Side-by-side
  • Inline
@@ -31,9 +31,6 @@
#include "Physics/Physics.h"
// debug info
#define PHIL_WRITE 1
//
// Class ThickTracker
// ------------------------------------------------------------------------
@@ -218,12 +215,6 @@ void ThickTracker::execute() {
itsBunch_m->set_sPos(zstart_m);
#ifdef PHIL_WRITE
std::ofstream disp; // stat
disp.open("dispersion.txt");
disp << std::setprecision(10);
#endif
// IpplTimings::startTimer(mapCreation_m);
// TODO need a way to implement Initial dispersion Values
@@ -498,42 +489,48 @@ void ThickTracker::advanceDispersion_m(fMatrix_t tempMatrix,
FMatrix<double, 1, 4> initialVal,
double pos)
{
#ifdef PHIL_WRITE
std::ofstream disp;
disp.open ("dispersion.txt",std::ios::app);
disp << std::setprecision(16);
#else
Inform msg("ThickTracker", *gmsg);
msg << "Activate PHIL_WRITE to use this Function! " << endl;
#endif
FMatrix<double, 2, 2> subx, suby;
FMatrix<double, 2, 1> subdx, subdy;
FMatrix<double, 2, 1> dxi, dyi, dx, dy;
for (int i=0; i<2; i++){
dxi[i][0]= initialVal[0][i];
dyi[i][0]= initialVal[0][i+2];
subdx[i][0]=tempMatrix[i][5]*itsBunch_m->getInitialBeta();
subdy[i][0]=tempMatrix[i+2][5]*itsBunch_m->getInitialBeta();
for (int j=0; j<2; j++){
subx[i][j]=tempMatrix[i][j];
suby[i][j]=tempMatrix[i+2][j+2];
if ( Ippl::myNode() == 0 ) {
static bool first = true;
std::ofstream out;
std::string fn = OpalData::getInstance()->getInputBasename() + ".dispersion";
if ( first ) {
first = false;
out.open(fn, std::ios::out);
} else {
out.open(fn, std::ios::app);
}
out << std::setprecision(16);
FMatrix<double, 2, 2> subx, suby;
FMatrix<double, 2, 1> subdx, subdy;
FMatrix<double, 2, 1> dxi, dyi, dx, dy;
for (int i=0; i<2; i++){
dxi[i][0]= initialVal[0][i];
dyi[i][0]= initialVal[0][i+2];
subdx[i][0]=tempMatrix[i][5]*itsBunch_m->getInitialBeta();
subdy[i][0]=tempMatrix[i+2][5]*itsBunch_m->getInitialBeta();
for (int j=0; j<2; j++){
subx[i][j]=tempMatrix[i][j];
suby[i][j]=tempMatrix[i+2][j+2];
}
}
dx= subx*dxi + subdx;
dy= suby*dyi + subdy;
out <<pos<< "\t" << dx[0][0] << "\t" << dx[0][1] << "\t" << dy[0][0] << "\t" << dy[0][1] << std::endl;
}
dx= subx*dxi + subdx;
dy= suby*dyi + subdy;
disp <<pos<< "\t" << dx[0][0] << "\t" << dx[0][1] << "\t" << dy[0][0] << "\t" << dy[0][1] << std::endl;
}
Loading