Skip to content

Commit

Permalink
Get a specific particle
Browse files Browse the repository at this point in the history
  • Loading branch information
janhclem committed Feb 27, 2025
1 parent 2dab198 commit 197d246
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/mptrac.c
Original file line number Diff line number Diff line change
Expand Up @@ -12386,9 +12386,17 @@ void dd_communicate_particles_cleo(

if (rank==0) {


int ip_ap = 0;
for (int ip = 0; ip < nparticles; ip++) {
if (target_ranks[ip] != rank) {
ip_ap = ip;
}
}

printf("== Particle in MPTRAC==\n");
for (int iq=1; iq < NQ ; iq++) {
printf("q[%d],%f\n",iq, *particles[nparticles-1].q[iq]);
for (int iq=1; iq < NQ ; iq++) {
printf("q[%d],%f\n",iq, *particles[ip_ap].q[iq]);
}
}

Expand Down

0 comments on commit 197d246

Please sign in to comment.