changed: do no assert for user provided data

instead throw an exception
This commit is contained in:
Arne Morten Kvarving 2025-01-02 15:17:19 +01:00
parent a2bd8b5810
commit 1556169221

View File

@ -599,7 +599,10 @@ init_(const UnitSystem& unitSystem)
"Unsupported time step control selected " + control);
// make sure growth factor is something reasonable
assert(growthFactor_ >= 1.0);
if (growthFactor_ < 1.0) {
OPM_THROW(std::runtime_error,
"Growth factor cannot be less than 1.");
}
}
} // namespace Opm