Commit 690cedf9 authored by Daniel Winklehner's avatar Daniel Winklehner
Browse files

Cosmetics, Typo, and an indexing error in Distribution.cpp that lead to...

Cosmetics, Typo, and an indexing error in Distribution.cpp that lead to (n_processors - 1) extra particles
parent fa42c672
......@@ -4252,7 +4252,7 @@ void ParallelCyclotronTracker::bunchDumpPhaseSpaceStatData() {
<< ", beta * gamma = " << betagamma_temp << endl;
*gmsg << "* Bunch position: R = " << referenceR << " mm"
<< ", Theta = " << referenceTheta << " Deg"
<< ", Z = " << referenceZ << " m" << endl;
<< ", Z = " << referenceZ << " mm" << endl;
*gmsg << "* Local Azimuth = " << phi / pi * 180.0 << " Deg"
<< ", Local Elevation = " << psi / pi * 180.0 << " Deg" << endl;
......
......@@ -703,7 +703,8 @@ void Distribution::DoRestartOpalCycl(PartBunch &beam, size_t Np, int restartStep
}
}
*gmsg << "Restart from hdf5 format file " << fn << ", read phase space data of DumpStep " << (int)restartStep << endl;
*gmsg << "Restart from hdf5 format file " << fn
<< ", read phase space data of DumpStep " << (int)restartStep << endl;
rc = H5SetStep(H5file, restartStep);
if(rc != H5_SUCCESS)
......@@ -719,8 +720,8 @@ void Distribution::DoRestartOpalCycl(PartBunch &beam, size_t Np, int restartStep
if(Ippl::myNode() == Ippl::getNodes() - 1)
endi = -1;
else
endi = starti + numberOfParticlesPerNode;
endi = starti + numberOfParticlesPerNode - 1;
rc = H5PartSetView(H5file, starti, endi);
if(rc != H5_SUCCESS)
ERRORMSG("H5 rc= " << rc << " in " << __FILE__ << " @ line " << __LINE__ << endl);
......@@ -748,6 +749,11 @@ void Distribution::DoRestartOpalCycl(PartBunch &beam, size_t Np, int restartStep
if(rc != H5_SUCCESS)
ERRORMSG("H5 rc= " << rc << " in " << __FILE__ << " @ line " << __LINE__ << endl);
referencePt_m = 0.0;
rc = H5ReadStepAttribFloat64(H5file, "REFPT",&referencePt_m);
if(rc != H5_SUCCESS)
ERRORMSG("H5 rc= " << rc << " in " << __FILE__ << " @ line " << __LINE__ << endl);
referencePz_m = 0.0;
rc = H5ReadStepAttribFloat64(H5file, "REFPZ",&referencePz_m);
if(rc != H5_SUCCESS)
......
......@@ -595,7 +595,6 @@ void TrackRun::execute() {
if(!OPAL->hasBunchAllocated() && !Options::scan) {
*gmsg << "* ********************************************************************************** " << endl;
*gmsg << " Selected Tracking Method == CYCLOTRON-T, NEW TRACK" << endl;
*gmsg << "* ********************************************************************************** " << endl;
} else if(OPAL->hasBunchAllocated() && !Options::scan) {
*gmsg << "* ********************************************************************************** " << endl;
......@@ -638,7 +637,7 @@ void TrackRun::execute() {
*gmsg << *dist << endl;
*gmsg << *beam << endl;
*gmsg << *fs << endl;
// *gmsg << *Track::block->bunch << endl;
// *gmsg << *Track::block->bunch << endl;
if(specifiedNumBunch > 1) {
......
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