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

Add a Problem boolean parameter to skip initial conditions when restarting #29064

Open
YaqiWang opened this issue Nov 13, 2024 · 1 comment
Open
Labels
C: Framework T: task An enhancement to the software.

Comments

@YaqiWang
Copy link
Contributor

Motivation

Both restarting and initial conditions can be used to initialize variables. Initial conditions act after the restart. Currently, if both exist, MOOSE will issue an error to let users know there is a competing condition for initializing variables. Users can then set Problem/allow_initial_conditions_with_restart=true to deliberately let the initial condition overwrite the values set by the restart. It can be desired the other way around, i.e. ignore the initial condition. Sometimes, users just want to try a restart file quickly without having to delete existing initial conditions which can be tedious or difficult if the number of initial conditions is large and/or they are set by a custom action.

Design

I suggest we add another control parameter Problem/skip_initial_condition_when_restarting for this. Its default value will be false, and when it is set to true, it also turns on Problem/allow_initial_conditions_with_restart=true. The code should only ignore those initial conditions whose targeting variables are restarted. It is possibly desired to add a screen output to show how a variable is initialized like

var1 none (zero)
var2 restarted
var3 IC:ic1,ic2

Impact

Allow users to have more control on how to initialize variables with restart.

@YaqiWang YaqiWang added the T: task An enhancement to the software. label Nov 13, 2024
@GiudGiud GiudGiud changed the title Add a control parameter to skip initial conditions when restarting Add a Problem boolean parameter to skip initial conditions when restarting Nov 13, 2024
@GiudGiud GiudGiud moved this to Todo in NEAMS MP TA 2025 Nov 13, 2024
@GiudGiud
Copy link
Contributor

The code should only ignore those initial conditions whose targeting variables are restarted

so Problem/skip_initial_condition_when_restarting is not a good name.
Maybe Problem/prioritize_variable_restart_over_initial_conditions or something

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: Framework T: task An enhancement to the software.
Projects
Status: Todo
Development

No branches or pull requests

2 participants