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

Adding assertions for model constants #262

Conversation

landinjm
Copy link
Contributor

Added assertions for when we try to access an invalid map entry in model_constants.

Say we have:

double MnV = userInputs.get_model_constant_double("not_a_variable");

This will throw this error when compiled in debug mode:

The violated condition was: 
    model_constant_name_map.find(constant_name) != model_constant_name_map.end()
Additional information: 
    PRISMS-PF Error: Mismatch between constants in parameters.prm and
    customPDE.h. The constant that you attempted to access was not_a_variable.

Closes #102

@landinjm landinjm merged commit 9413f0b into prisms-center:development Oct 16, 2024
2 checks passed
@landinjm landinjm deleted the error_handling_customPDE_constants branch October 16, 2024 20:18
@landinjm
Copy link
Contributor Author

Maybe add some more clarity on where the string is coming from

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

Successfully merging this pull request may close these issues.

1 participant