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

Throw error if deprecated input PowderDensity is set to 0 #382

Merged
merged 1 commit into from
Oct 15, 2024
Merged
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
2 changes: 1 addition & 1 deletion src/CAinputs.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ struct Inputs {
else {
double powder_density_input = input_data["Substrate"]["PowderDensity"];
double powder_active_fraction = powder_density_input * pow(10, 12) * pow(domain.deltax, 3);
if ((powder_active_fraction < 0.0) || (powder_active_fraction > 1.0))
if ((powder_active_fraction <= 0.0) || (powder_active_fraction > 1.0))
throw std::runtime_error(
"Error: Density of powder surface sites active must be larger than 0 and less "
"than 1/(CA cell volume)");
Expand Down
Loading