Skip to content

Add hipace.initial_step option for restarting simulations#1339

Merged
AlexanderSinn merged 10 commits into
Hi-PACE:developmentfrom
AlexanderSinn:Add_hipace_initial_step_option_for_restarting_simulations
Mar 20, 2026
Merged

Add hipace.initial_step option for restarting simulations#1339
AlexanderSinn merged 10 commits into
Hi-PACE:developmentfrom
AlexanderSinn:Add_hipace_initial_step_option_for_restarting_simulations

Conversation

@AlexanderSinn
Copy link
Copy Markdown
Member

@AlexanderSinn AlexanderSinn commented Jan 8, 2026

This PR adds the

hipace.initial_step = 0

input parameter, which shifts the starting step to make it easier to restart simulations.

This can be used in combination with the from_file beam and laser input types to restart a simulation. To combine the diagnostic output with the previous run, it can also be useful to remove the diagnostic output of the first new step so that wont be duplicated.

hipace.initial_step = 100
hipace.initial_time = 1e-7

diagnostic.output_period = if(step==100, 0, 1)

beam1.injection_type = from_file
beam2.injection_type = from_file
beams.input_file = ...
beams.iteration = 100

laser1.init_type = from_file
laser1.input_file  = ...
laser1.iteration = 100
  • Small enough (< few 100s of lines), otherwise it should probably be split into smaller PRs
  • Tested (describe the tests in the PR description)
  • Runs on GPU (basic: the code compiles and run well with the new module)
  • Contains an automated test (checksum and/or comparison with theory)
  • Documented: all elements (classes and their members, functions, namespaces, etc.) are documented
  • Constified (All that can be const is const)
  • Code is clean (no unwanted comments, )
  • Style and code conventions are respected at the bottom of https://github.com/Hi-PACE/hipace
  • Proper label and GitHub project, if applicable

@AlexanderSinn AlexanderSinn added the component: diagnostics About any types of diagnostics label Jan 8, 2026
@AlexanderSinn AlexanderSinn linked an issue Jan 8, 2026 that may be closed by this pull request
Copy link
Copy Markdown
Member

@MaxThevenet MaxThevenet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, thanks! Could you give a more detailed example use case in the description?

@AlexanderSinn AlexanderSinn merged commit ac10226 into Hi-PACE:development Mar 20, 2026
11 checks passed
@AlexanderSinn AlexanderSinn deleted the Add_hipace_initial_step_option_for_restarting_simulations branch April 8, 2026 10:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component: diagnostics About any types of diagnostics

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Restart with diags start from non-zero step

2 participants