Skip to content

Commit

Permalink
Merge pull request #382 from MattRolchigo/no_powderdensity_zero
Browse files Browse the repository at this point in the history
Throw error if deprecated input PowderDensity is set to 0
  • Loading branch information
streeve authored Oct 15, 2024
2 parents 6f14c97 + 3f46bce commit 3e824d7
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 3e824d7

Please sign in to comment.