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

New error when two different ICs are specified #29672

Open
wants to merge 1 commit into
base: next
Choose a base branch
from

Conversation

DanielYankura
Copy link
Contributor

-Error thrown if an initial_condition parameter is provided along with an initial_from_file_var parameter for the same variable.

closes #20944

Reason

This added error check will make debugging input files easier.

Design

Previously an error was only thrown if two initial_condition parameters were supplied for the same variable. Now an error is also thrown if an initial_from_file_var is also provided.

Impact

-Error thrown if an initial_condition parameter is provided along with an initial_from_file_var parameter for the same variable.

closes idaholab#20944
@moosebuild
Copy link
Contributor

Job Documentation, step Docs: sync website on 0db280d wanted to post the following:

View the site here

This comment will be updated on new commits.

Copy link
Contributor

@GiudGiud GiudGiud left a comment

Choose a reason for hiding this comment

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

Good idea!

Comment on lines +138 to +140
mooseError("Two initial conditions have been provided for the variable ",
name(),
". One from the user and one from the restart input file.");
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
mooseError("Two initial conditions have been provided for the variable ",
name(),
". One from the user and one from the restart input file.");
paramError("initial_condition", "Two initial conditions have been provided for the variable ",
name(),
" using the 'initial_condition' and 'initial_from_file_var' parameters. Please remove one of them.");

@GiudGiud GiudGiud self-assigned this Jan 10, 2025
@@ -56,6 +56,7 @@ AddVariableAction::validParams()
"Specifies a scaling factor to apply to this variable");
params.addParam<std::vector<Real>>("initial_condition",
"Specifies a constant initial condition for this variable");
params.addParam<std::string>("initial_from_file_var", "Initial from file");
Copy link
Contributor

Choose a reason for hiding this comment

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

let's use transferParam here (see examples in the Navier Stokes physics for example). So the names stay in sync

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

No error or warning on specifying two different initial conditions
3 participants