Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug in how RPacketTracker tracks the rpacket. #2671

Closed
1 of 2 tasks
Sumit112192 opened this issue Jun 21, 2024 · 0 comments
Closed
1 of 2 tasks

Bug in how RPacketTracker tracks the rpacket. #2671

Sumit112192 opened this issue Jun 21, 2024 · 0 comments

Comments

@Sumit112192
Copy link
Contributor

Sumit112192 commented Jun 21, 2024

Describe the bug
Can someone please verify if the current implementation of RPacketTracker has a bug?
In the single_packet_loop function, the trace_packet function returns the distance, interaction_type, and delta_shell that the packet went through

distance, interaction_type, delta_shell = trace_packet(
r_packet,
numba_radial_1d_geometry,
time_explosion,
opacity_state,
estimators,
chi_continuum,
escat_prob,
montecarlo_configuration.CONTINUUM_PROCESSES_ENABLED,
montecarlo_configuration.ENABLE_FULL_RELATIVITY,
montecarlo_configuration.DISABLE_LINE_SCATTERING,
)

interaction_type could be BOUNDARY, LINE, ESCATTERING, etc.
if interaction_type == InteractionType.BOUNDARY:
move_r_packet(

elif interaction_type == InteractionType.ESCATTERING:
r_packet.last_interaction_type = 1

elif (
montecarlo_configuration.CONTINUUM_PROCESSES_ENABLED

Here's the issue
Say the packet went through a LINE interaction in shell_id=1; we track that in rpacket_tracker correctly, but now, if it went through a BOUNDARY, we are now using the previous value of r_packet to say that we have got a LINE interaction with the updated values of r and shell_id. Even though we are not going through a LINE interaction.Please correct me if I am wrong here.A proposed solution would be to update the rpacket_tracker only when it's not BOUNDARY Interaction.

Screenshots
image
As we can see, the last interaction type keeps getting copied over when the packet moves to the next boundary.

System

  • OS:
    • GNU/Linux
    • macOS
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant