Commit 04ede2fe authored by kraus's avatar kraus
Browse files

don't reflect distribution from file

parent ee78ade8
......@@ -1931,7 +1931,7 @@ void Distribution::CreateOpalCycl(PartBunch &beam,
* For now we just cut the number of generated particles in half.
*/
if (Options::cZero)
if (Options::cZero && !distrTypeT_m == DistrTypeT::FROMFILE)
numberOfPartToCreate /= 2;
// Set distribution type.
......@@ -1944,7 +1944,7 @@ void Distribution::CreateOpalCycl(PartBunch &beam,
Create(numberOfPartToCreate, beam.getM());
// Now reflect particles if Options::cZero is true.
if (Options::cZero)
if (Options::cZero && !distrTypeT_m == DistrTypeT::FROMFILE)
ReflectDistribution(numberOfPartToCreate);
// Setup energy bins.
......@@ -2065,7 +2065,7 @@ void Distribution::CreateOpalT(PartBunch &beam,
*
* For now we just cut the number of generated particles in half.
*/
if (Options::cZero)
if (Options::cZero && !distrTypeT_m == DistrTypeT::FROMFILE)
numberOfParticles /= 2;
// Set distribution type(s).
......@@ -2108,7 +2108,7 @@ void Distribution::CreateOpalT(PartBunch &beam,
AddDistributions();
// Now reflect particles if Options::cZero is true
if (Options::cZero)
if (Options::cZero && !distrTypeT_m == DistrTypeT::FROMFILE)
ReflectDistribution(numberOfParticles);
// Check number of particles in distribution.
......@@ -3476,7 +3476,7 @@ void Distribution::PrintDist(Inform &os, size_t numberOfParticles) const {
if (numberOfParticles > 0) {
os << "Number of particles: "
<< numberOfParticles * (Options::cZero ? 2: 1)
<< numberOfParticles * (Options::cZero && !distrTypeT_m == DistrTypeT::FROMFILE? 2: 1)
<< endl
<< endl;
}
......
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