diff --git a/source/world_builder/features/subducting_plate_models/temperature/mass_conserving.cc b/source/world_builder/features/subducting_plate_models/temperature/mass_conserving.cc index e7f14142e..e497729a4 100644 --- a/source/world_builder/features/subducting_plate_models/temperature/mass_conserving.cc +++ b/source/world_builder/features/subducting_plate_models/temperature/mass_conserving.cc @@ -276,9 +276,9 @@ namespace WorldBuilder subducting_velocities, ridge_spreading_velocities.first); - const double km2m = 1.0e3; // 1000 m/km - const double cm2m = 100; // 100 cm/m - const double my = 1.0e6; // 1e6 y/my + constexpr double km2m = 1.0e3; // 1000 m/km + constexpr double cm2m = 100; // 100 cm/m + constexpr double my = 1.0e6; // 1e6 y/my /* information about nearest point on the slab segment */ const double distance_along_plane = distance_from_planes.distance_along_plane; diff --git a/source/world_builder/utilities.cc b/source/world_builder/utilities.cc index e581e4b33..55285a855 100644 --- a/source/world_builder/utilities.cc +++ b/source/world_builder/utilities.cc @@ -1473,7 +1473,8 @@ namespace WorldBuilder // Plate age increases with distance along the slab in the mantle double effective_plate_age = plate_age_sec + (distance_along_plane / subducting_velocity + effective_age_shift) * seconds_in_year; // m/(m/y) = y(seconds_in_year) - + WBAssertThrow(effective_plate_age >= 0, "The age of the subducting plate is less than or equal to 0. " + "Effective plate age: " << effective_plate_age); std::vector result; result.push_back(age_at_trench); result.push_back(effective_plate_age);