Skip to content
Open
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
11 changes: 6 additions & 5 deletions src/abel/classes/stage/impl/stage_hipace.py
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,12 @@ def track(self, beam_incoming, savedepth=0, runnable=None, verbose=False):
path_input = tmpfolder + filename_input
hipace_write_inputs(path_input, filename_beam, filename_driver, self.plasma_density, self.num_steps, time_step, box_range_z, box_size_xy, ion_motion=self.ion_motion, ion_species=self.ion_species, beam_ionization=self.beam_ionization, radiation_reaction=self.radiation_reaction, output_period=output_period, num_cell_xy=self.num_cell_xy, num_cell_z=num_cell_z, driver_only=self.driver_only, density_table_file=density_table_file, no_plasma=self.no_plasma, external_focusing_gradient=self._external_focusing_gradient, mesh_refinement=self.mesh_refinement, do_spin_tracking=self.do_spin_tracking)


# move the HiPACE++ input file to be stored
if runnable is not None:
shutil.copy(path_input, runnable.shot_path())
elif self.run_path is not None:
shutil.copy(path_input, self.run_path)

## RUN SIMULATION

# make job script
Expand Down Expand Up @@ -398,10 +403,6 @@ def track(self, beam_incoming, savedepth=0, runnable=None, verbose=False):
# extract insitu diagnostics and wakefield data
self.__extract_evolution(tmpfolder, beam0, runnable)
self.__extract_initial_and_final_step(tmpfolder, beam0, runnable)

# move the HiPACE++ input file to be stored
if self.run_path is not None:
shutil.move(path_input, self.run_path)

# delete temp folder
shutil.rmtree(tmpfolder)
Expand Down
Loading