Skip to content

Commit

Permalink
Moves time explosion off the transport solver to the transport state
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewfullard committed Jul 23, 2024
1 parent 38a35c3 commit a2aba1d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
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 @@ def __init__(
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

0 comments on commit a2aba1d

Please sign in to comment.