Fixed bug, where electrons being reflected by spectrometers would not be logged twice / properly.
This commit is contained in:
@@ -34,7 +34,7 @@ inline void Drift_Base::move(Particle *movePart, const double ¯oSigma_m2) {
|
||||
newLoc_m[2] = znew_m;
|
||||
|
||||
movePart->set_x_m(newLoc_m);
|
||||
Logger->log(*movePart,oldLoc_m);
|
||||
Logger->log(*movePart, oldLoc_m);
|
||||
Population->increase_density(*movePart, oldLoc_m);
|
||||
}
|
||||
|
||||
|
||||
@@ -26,6 +26,7 @@ void E_Mover_Drift::doWallInteraction(Particle *movePart, vec3 *oldLoc_m, double
|
||||
|
||||
// Log Movement before Reflection
|
||||
reverseLoc_m[2] = z_WGTS_end_m;
|
||||
movePart->set_x_m(reverseLoc_m);
|
||||
Logger->log(*movePart, *oldLoc_m);
|
||||
Population->increase_density(*movePart, *oldLoc_m);
|
||||
|
||||
|
||||
@@ -190,14 +190,7 @@ void Simulation::sync_cpus() {
|
||||
sync_populations();
|
||||
}
|
||||
|
||||
void Simulation::sync_populations() {
|
||||
double time1, time2;
|
||||
uint64_t t1, t2;
|
||||
if (mpi_rank == 0) {
|
||||
__asm volatile ("rdtsc" : "=A"(t1));
|
||||
time1 = MPI_Wtime();
|
||||
}
|
||||
|
||||
void Simulation::sync_populations() {
|
||||
Population_Manager *populations = looper.get_populations();
|
||||
Population_Container *container;
|
||||
double *global_delta_cumulated_time_s;
|
||||
@@ -235,13 +228,6 @@ void Simulation::sync_populations() {
|
||||
delete[] local_delta_cumulated_time_s;
|
||||
delete[] local_delta_offset;
|
||||
}
|
||||
if (mpi_rank == 0) {
|
||||
__asm volatile ("rdtsc" : "=A"(t2));
|
||||
time2=MPI_Wtime();
|
||||
cout<<"number of cycles: \t"<<(t2-t1)<<"\n";
|
||||
cout<<"time: \t"<<(time2-time1)<<"\n";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void Simulation::do_statusUpdate() {
|
||||
|
||||
Reference in New Issue
Block a user