Skip to content

Commit

Permalink
Fixed bugs in updateParticleOnStack and getParticleFromStack:
Browse files Browse the repository at this point in the history
Forgot to subtract 2 from ir before saving to the_stack.
  • Loading branch information
blakewalters authored and ftessier committed Jun 30, 2022
1 parent c6cea9c commit fac4264
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions HEN_HOUSE/egs++/egs_advanced_application.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1320,7 +1320,7 @@ EGS_Particle EGS_AdvancedApplication::getParticleFromStack(int ip) {
p.q = the_stack->iq[ip];
p.E = the_stack->E[ip];
p.latch = the_stack->latch[ip];
p.ir = the_stack->ir[ip];
p.ir = the_stack->ir[ip]-2;
p.wt = the_stack->wt[ip];
p.x = EGS_Vector(the_stack->x[ip],the_stack->y[ip],the_stack->z[ip]);
p.u = EGS_Vector(the_stack->u[ip],the_stack->v[ip],the_stack->w[ip]);
Expand All @@ -1332,7 +1332,7 @@ void EGS_AdvancedApplication::updateParticleOnStack(int ip, EGS_Particle p, EGS_
the_stack->iq[ip] = p.q;
the_stack->E[ip] = p.E;
the_stack->latch[ip] = p.latch;
the_stack->ir[ip] = p.ir;
the_stack->ir[ip] = p.ir+2;
the_stack->wt[ip] = p.wt;
the_stack->x[ip] = p.x.x;
the_stack->y[ip] = p.x.y;
Expand Down

0 comments on commit fac4264

Please sign in to comment.