Skip to content

Commit

Permalink
Throw error if deprecated input PowderDensity is set to 0
Browse files Browse the repository at this point in the history
  • Loading branch information
MattRolchigo committed Oct 14, 2024
1 parent 6f14c97 commit 3f46bce
Showing 1 changed file with 1 addition and 1 deletion.
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

0 comments on commit 3f46bce

Please sign in to comment.