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

Moves time explosion off the transport solver to the transport state #2734

Merged
merged 1 commit into from
Jul 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion tardis/simulation/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,6 @@ def iterate(self, no_of_packets, no_of_virtual_packets=0):

v_packets_energy_hist = self.transport.run(
transport_state,
time_explosion=self.simulation_state.time_explosion,
iteration=self.iterations_executed,
total_iterations=self.iterations,
show_progress_bars=self.show_progress_bars,
Expand Down
4 changes: 2 additions & 2 deletions tardis/transport/montecarlo/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ def initialize_transport_state(
estimators,
geometry_state=geometry_state,
opacity_state=opacity_state,
time_explosion=simulation_state.time_explosion,
)

transport_state.enable_full_relativity = (
Expand All @@ -133,7 +134,6 @@ def initialize_transport_state(
def run(
self,
transport_state,
time_explosion,
iteration=0,
total_iterations=0,
show_progress_bars=True,
Expand Down Expand Up @@ -167,7 +167,7 @@ def run(
) = montecarlo_main_loop(
transport_state.packet_collection,
transport_state.geometry_state,
time_explosion.cgs.value,
transport_state.time_explosion.cgs.value,
transport_state.opacity_state,
self.montecarlo_configuration,
transport_state.radfield_mc_estimators,
Expand Down
2 changes: 2 additions & 0 deletions tardis/transport/montecarlo/montecarlo_transport_state.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,15 @@
radfield_mc_estimators,
geometry_state,
opacity_state,
time_explosion,
rpacket_tracker=None,
vpacket_tracker=None,
):
self.packet_collection = packet_collection
self.radfield_mc_estimators = radfield_mc_estimators
self.enable_full_relativity = False
self.enable_continuum_processes = False
self.time_explosion = time_explosion

Check warning on line 70 in tardis/transport/montecarlo/montecarlo_transport_state.py

View check run for this annotation

Codecov / codecov/patch

tardis/transport/montecarlo/montecarlo_transport_state.py#L70

Added line #L70 was not covered by tests
self.geometry_state = geometry_state
self.opacity_state = opacity_state
self.rpacket_tracker = rpacket_tracker
Expand Down
Loading