| Line |
Branch |
Exec |
Source |
| 1 |
|
|
/// @file |
| 2 |
|
|
/// @brief The JSON fields of crater densities, ages, degradation and profiles. |
| 3 |
|
|
#pragma once |
| 4 |
|
|
|
| 5 |
|
|
#include "terraingen/config/config.h" |
| 6 |
|
|
#include "terraingen/config/fields/common.h" |
| 7 |
|
|
|
| 8 |
|
|
#include <string_view> |
| 9 |
|
|
|
| 10 |
|
|
namespace terraingen::config { |
| 11 |
|
|
|
| 12 |
|
|
template <> struct SpecName<PowerLawSpec> { |
| 13 |
|
|
static constexpr std::string_view kName = "power_law"; |
| 14 |
|
|
static constexpr std::string_view kDescription = |
| 15 |
|
|
"A cumulative power law, N(>=D) = coefficient D^-exponent per m^2 with D in metres."; |
| 16 |
|
|
}; |
| 17 |
|
147 |
template <typename IO> void Fields(IO& io, PowerLawSpec& spec) { |
| 18 |
3/3
void terraingen::config::Fields<terraingen::config::(anonymous namespace)::SchemaWriter>(terraingen::config::(anonymous namespace)::SchemaWriter&, terraingen::PowerLawSpec&):
✓ Branch 4 taken 18 times.
void terraingen::config::Fields<terraingen::config::Reader>(terraingen::config::Reader&, terraingen::PowerLawSpec&):
✓ Branch 4 taken 37 times.
void terraingen::config::Fields<terraingen::config::Writer>(terraingen::config::Writer&, terraingen::PowerLawSpec&):
✓ Branch 4 taken 92 times.
|
147 |
io("coefficient", spec.coefficient, |
| 19 |
|
|
"Coefficient of N(>=D) = coefficient D^-exponent, the cumulative count per m^2 with D in " |
| 20 |
|
|
"metres; scales how many there are.", |
| 21 |
|
147 |
"", Above(0.0)); |
| 22 |
3/3
void terraingen::config::Fields<terraingen::config::(anonymous namespace)::SchemaWriter>(terraingen::config::(anonymous namespace)::SchemaWriter&, terraingen::PowerLawSpec&):
✓ Branch 4 taken 18 times.
void terraingen::config::Fields<terraingen::config::Reader>(terraingen::config::Reader&, terraingen::PowerLawSpec&):
✓ Branch 4 taken 37 times.
void terraingen::config::Fields<terraingen::config::Writer>(terraingen::config::Writer&, terraingen::PowerLawSpec&):
✓ Branch 4 taken 92 times.
|
147 |
io("exponent", spec.exponent, |
| 23 |
|
|
"Exponent of the power law; larger values give relatively more small craters or boulders.", |
| 24 |
|
147 |
"", Above(0.0)); |
| 25 |
|
147 |
} |
| 26 |
|
|
|
| 27 |
|
107 |
template <typename IO> void Fields(IO& io, PowerLawSegment& segment) { |
| 28 |
3/3
void terraingen::config::Fields<terraingen::config::(anonymous namespace)::SchemaWriter>(terraingen::config::(anonymous namespace)::SchemaWriter&, terraingen::PowerLawSegment&):
✓ Branch 4 taken 9 times.
void terraingen::config::Fields<terraingen::config::Reader>(terraingen::config::Reader&, terraingen::PowerLawSegment&):
✓ Branch 4 taken 16 times.
void terraingen::config::Fields<terraingen::config::Writer>(terraingen::config::Writer&, terraingen::PowerLawSegment&):
✓ Branch 4 taken 82 times.
|
107 |
io("start", segment.start, |
| 29 |
|
|
"Diameter in metres where this segment begins; it runs up to the next segment's start.", "m", |
| 30 |
|
107 |
AtLeast(0.0)); |
| 31 |
3/3
void terraingen::config::Fields<terraingen::config::(anonymous namespace)::SchemaWriter>(terraingen::config::(anonymous namespace)::SchemaWriter&, terraingen::PowerLawSegment&):
✓ Branch 4 taken 9 times.
void terraingen::config::Fields<terraingen::config::Reader>(terraingen::config::Reader&, terraingen::PowerLawSegment&):
✓ Branch 4 taken 16 times.
void terraingen::config::Fields<terraingen::config::Writer>(terraingen::config::Writer&, terraingen::PowerLawSegment&):
✓ Branch 4 taken 82 times.
|
107 |
io("coefficient", segment.coefficient, |
| 32 |
|
|
"Coefficient of N(>=D) = coefficient D^-exponent, the cumulative count per m^2 with D in " |
| 33 |
|
|
"metres.", |
| 34 |
|
107 |
"", Above(0.0)); |
| 35 |
3/3
void terraingen::config::Fields<terraingen::config::(anonymous namespace)::SchemaWriter>(terraingen::config::(anonymous namespace)::SchemaWriter&, terraingen::PowerLawSegment&):
✓ Branch 4 taken 9 times.
void terraingen::config::Fields<terraingen::config::Reader>(terraingen::config::Reader&, terraingen::PowerLawSegment&):
✓ Branch 4 taken 16 times.
void terraingen::config::Fields<terraingen::config::Writer>(terraingen::config::Writer&, terraingen::PowerLawSegment&):
✓ Branch 4 taken 82 times.
|
107 |
io("exponent", segment.exponent, |
| 36 |
|
|
"Exponent of the segment's power law; larger values give relatively more small craters.", "", |
| 37 |
|
107 |
Above(0.0)); |
| 38 |
|
107 |
} |
| 39 |
|
|
|
| 40 |
|
|
template <> struct SpecName<PiecewisePowerLawSpec> { |
| 41 |
|
|
static constexpr std::string_view kName = "piecewise_power_law"; |
| 42 |
|
|
static constexpr std::string_view kDescription = |
| 43 |
|
|
"A cumulative distribution made of power-law segments over diameter ranges."; |
| 44 |
|
|
}; |
| 45 |
|
67 |
template <typename IO> void Fields(IO& io, PiecewisePowerLawSpec& spec) { |
| 46 |
3/3
void terraingen::config::Fields<terraingen::config::(anonymous namespace)::SchemaWriter>(terraingen::config::(anonymous namespace)::SchemaWriter&, terraingen::PiecewisePowerLawSpec&):
✓ Branch 4 taken 18 times.
void terraingen::config::Fields<terraingen::config::Reader>(terraingen::config::Reader&, terraingen::PiecewisePowerLawSpec&):
✓ Branch 4 taken 9 times.
void terraingen::config::Fields<terraingen::config::Writer>(terraingen::config::Writer&, terraingen::PiecewisePowerLawSpec&):
✓ Branch 4 taken 40 times.
|
67 |
io("segments", spec.segments, |
| 47 |
|
|
"Power-law segments in strictly increasing order of start, each running to the next one's " |
| 48 |
|
|
"start; they must meet at their joins."); |
| 49 |
|
67 |
} |
| 50 |
|
|
|
| 51 |
|
|
template <> struct SpecName<TabulatedSpec> { |
| 52 |
|
|
static constexpr std::string_view kName = "tabulated"; |
| 53 |
|
|
static constexpr std::string_view kDescription = |
| 54 |
|
|
"A cumulative distribution from a table of diameters and counts N(>=D), in units you " |
| 55 |
|
|
"choose."; |
| 56 |
|
|
}; |
| 57 |
|
63 |
template <typename IO> void Fields(IO& io, TabulatedSpec& spec) { |
| 58 |
3/3
void terraingen::config::Fields<terraingen::config::(anonymous namespace)::SchemaWriter>(terraingen::config::(anonymous namespace)::SchemaWriter&, terraingen::TabulatedSpec&):
✓ Branch 4 taken 18 times.
void terraingen::config::Fields<terraingen::config::Reader>(terraingen::config::Reader&, terraingen::TabulatedSpec&):
✓ Branch 4 taken 7 times.
void terraingen::config::Fields<terraingen::config::Writer>(terraingen::config::Writer&, terraingen::TabulatedSpec&):
✓ Branch 4 taken 38 times.
|
63 |
io("diameters", spec.diameters, |
| 59 |
|
|
"Table diameters in diameter units, at least two, positive and strictly increasing; counts " |
| 60 |
|
|
"are interpolated linearly in log D and log N between them.", |
| 61 |
|
63 |
"", Above(0.0)); |
| 62 |
3/3
void terraingen::config::Fields<terraingen::config::(anonymous namespace)::SchemaWriter>(terraingen::config::(anonymous namespace)::SchemaWriter&, terraingen::TabulatedSpec&):
✓ Branch 4 taken 18 times.
void terraingen::config::Fields<terraingen::config::Reader>(terraingen::config::Reader&, terraingen::TabulatedSpec&):
✓ Branch 4 taken 7 times.
void terraingen::config::Fields<terraingen::config::Writer>(terraingen::config::Writer&, terraingen::TabulatedSpec&):
✓ Branch 4 taken 38 times.
|
63 |
io("cumulative", spec.cumulative, |
| 63 |
|
|
"Cumulative count N(>=D) at each diameter, per area unit; positive and not increasing.", "", |
| 64 |
|
63 |
Above(0.0)); |
| 65 |
3/3
void terraingen::config::Fields<terraingen::config::(anonymous namespace)::SchemaWriter>(terraingen::config::(anonymous namespace)::SchemaWriter&, terraingen::TabulatedSpec&):
✓ Branch 4 taken 18 times.
void terraingen::config::Fields<terraingen::config::Reader>(terraingen::config::Reader&, terraingen::TabulatedSpec&):
✓ Branch 4 taken 7 times.
void terraingen::config::Fields<terraingen::config::Writer>(terraingen::config::Writer&, terraingen::TabulatedSpec&):
✓ Branch 4 taken 38 times.
|
63 |
io("diameter_unit", spec.diameterUnit, |
| 66 |
|
63 |
"Metres per table diameter unit: 1 for metres, 1000 for km.", "m", Above(0.0)); |
| 67 |
3/3
void terraingen::config::Fields<terraingen::config::(anonymous namespace)::SchemaWriter>(terraingen::config::(anonymous namespace)::SchemaWriter&, terraingen::TabulatedSpec&):
✓ Branch 4 taken 18 times.
void terraingen::config::Fields<terraingen::config::Reader>(terraingen::config::Reader&, terraingen::TabulatedSpec&):
✓ Branch 4 taken 7 times.
void terraingen::config::Fields<terraingen::config::Writer>(terraingen::config::Writer&, terraingen::TabulatedSpec&):
✓ Branch 4 taken 38 times.
|
63 |
io("area_unit", spec.areaUnit, "Square metres per table area unit: 1 for m^2, 1e6 for km^2.", |
| 68 |
|
63 |
"m^2", Above(0.0)); |
| 69 |
|
63 |
} |
| 70 |
|
|
|
| 71 |
|
94 |
template <typename IO> void Fields(IO& io, UniformBand& band) { |
| 72 |
3/3
void terraingen::config::Fields<terraingen::config::(anonymous namespace)::SchemaWriter>(terraingen::config::(anonymous namespace)::SchemaWriter&, terraingen::UniformBand&):
✓ Branch 5 taken 9 times.
void terraingen::config::Fields<terraingen::config::Reader>(terraingen::config::Reader&, terraingen::UniformBand&):
✓ Branch 5 taken 10 times.
void terraingen::config::Fields<terraingen::config::Writer>(terraingen::config::Writer&, terraingen::UniformBand&):
✓ Branch 5 taken 75 times.
|
94 |
io("min", band.min, "Smallest diameter of the band in metres.", "m", Above(0.0)); |
| 73 |
3/3
void terraingen::config::Fields<terraingen::config::(anonymous namespace)::SchemaWriter>(terraingen::config::(anonymous namespace)::SchemaWriter&, terraingen::UniformBand&):
✓ Branch 5 taken 9 times.
void terraingen::config::Fields<terraingen::config::Reader>(terraingen::config::Reader&, terraingen::UniformBand&):
✓ Branch 5 taken 10 times.
void terraingen::config::Fields<terraingen::config::Writer>(terraingen::config::Writer&, terraingen::UniformBand&):
✓ Branch 5 taken 75 times.
|
94 |
io("max", band.max, "Largest diameter of the band in metres, above min.", "m", Above(0.0)); |
| 74 |
3/3
void terraingen::config::Fields<terraingen::config::(anonymous namespace)::SchemaWriter>(terraingen::config::(anonymous namespace)::SchemaWriter&, terraingen::UniformBand&):
✓ Branch 4 taken 9 times.
void terraingen::config::Fields<terraingen::config::Reader>(terraingen::config::Reader&, terraingen::UniformBand&):
✓ Branch 4 taken 10 times.
void terraingen::config::Fields<terraingen::config::Writer>(terraingen::config::Writer&, terraingen::UniformBand&):
✓ Branch 4 taken 75 times.
|
94 |
io("density", band.density, |
| 75 |
|
|
"Count per m^2 with diameters in the band, spread uniformly across it; a relative weight " |
| 76 |
|
|
"when total is set.", |
| 77 |
|
94 |
"1/m^2", AtLeast(0.0)); |
| 78 |
|
94 |
} |
| 79 |
|
|
|
| 80 |
|
|
template <> struct SpecName<PiecewiseUniformSpec> { |
| 81 |
|
|
static constexpr std::string_view kName = "piecewise_uniform"; |
| 82 |
|
|
static constexpr std::string_view kDescription = |
| 83 |
|
|
"Counts per m^2 in diameter bands, each with diameters spread uniformly across it; none " |
| 84 |
|
|
"outside the bands."; |
| 85 |
|
|
}; |
| 86 |
|
63 |
template <typename IO> void Fields(IO& io, PiecewiseUniformSpec& spec) { |
| 87 |
3/3
void terraingen::config::Fields<terraingen::config::(anonymous namespace)::SchemaWriter>(terraingen::config::(anonymous namespace)::SchemaWriter&, terraingen::PiecewiseUniformSpec&):
✓ Branch 4 taken 18 times.
void terraingen::config::Fields<terraingen::config::Reader>(terraingen::config::Reader&, terraingen::PiecewiseUniformSpec&):
✓ Branch 4 taken 7 times.
void terraingen::config::Fields<terraingen::config::Writer>(terraingen::config::Writer&, terraingen::PiecewiseUniformSpec&):
✓ Branch 4 taken 38 times.
|
63 |
io("bands", spec.bands, |
| 88 |
|
|
"Diameter bands with their counts; overlapping bands add, and gaps between them hold " |
| 89 |
|
|
"none."); |
| 90 |
3/3
void terraingen::config::Fields<terraingen::config::(anonymous namespace)::SchemaWriter>(terraingen::config::(anonymous namespace)::SchemaWriter&, terraingen::PiecewiseUniformSpec&):
✓ Branch 4 taken 18 times.
void terraingen::config::Fields<terraingen::config::Reader>(terraingen::config::Reader&, terraingen::PiecewiseUniformSpec&):
✓ Branch 4 taken 7 times.
void terraingen::config::Fields<terraingen::config::Writer>(terraingen::config::Writer&, terraingen::PiecewiseUniformSpec&):
✓ Branch 4 taken 38 times.
|
63 |
io("total", spec.total, |
| 91 |
|
|
"Count per m^2 of all bands together, shared in proportion to each band's density; 0 uses " |
| 92 |
|
|
"the densities as given.", |
| 93 |
|
63 |
"1/m^2", AtLeast(0.0)); |
| 94 |
|
63 |
} |
| 95 |
|
|
|
| 96 |
|
|
template <> struct SpecName<ProductionSurfaceSpec> { |
| 97 |
|
|
static constexpr std::string_view kName = "production_surface"; |
| 98 |
|
|
static constexpr std::string_view kDescription = |
| 99 |
|
|
"The craters a production function leaves on a surface of a given age, scaled by a " |
| 100 |
|
|
"chronology, with no erosion; cap it with an equilibrium in a minimum."; |
| 101 |
|
|
}; |
| 102 |
|
123 |
template <typename IO> void Fields(IO& io, ProductionSurfaceSpec& spec) { |
| 103 |
3/3
void terraingen::config::Fields<terraingen::config::(anonymous namespace)::SchemaWriter>(terraingen::config::(anonymous namespace)::SchemaWriter&, terraingen::ProductionSurfaceSpec&):
✓ Branch 4 taken 9 times.
void terraingen::config::Fields<terraingen::config::Reader>(terraingen::config::Reader&, terraingen::ProductionSurfaceSpec&):
✓ Branch 4 taken 76 times.
void terraingen::config::Fields<terraingen::config::Writer>(terraingen::config::Writer&, terraingen::ProductionSurfaceSpec&):
✓ Branch 4 taken 37 times.
|
123 |
io("production", spec.production, "Production function that gives the craters' sizes."); |
| 104 |
3/3
void terraingen::config::Fields<terraingen::config::(anonymous namespace)::SchemaWriter>(terraingen::config::(anonymous namespace)::SchemaWriter&, terraingen::ProductionSurfaceSpec&):
✓ Branch 4 taken 9 times.
void terraingen::config::Fields<terraingen::config::Reader>(terraingen::config::Reader&, terraingen::ProductionSurfaceSpec&):
✓ Branch 4 taken 75 times.
void terraingen::config::Fields<terraingen::config::Writer>(terraingen::config::Writer&, terraingen::ProductionSurfaceSpec&):
✓ Branch 4 taken 37 times.
|
122 |
io("chronology", spec.chronology, |
| 105 |
|
|
"Chronology that gives how many craters at least 1 km across the surface holds."); |
| 106 |
3/3
void terraingen::config::Fields<terraingen::config::(anonymous namespace)::SchemaWriter>(terraingen::config::(anonymous namespace)::SchemaWriter&, terraingen::ProductionSurfaceSpec&):
✓ Branch 4 taken 9 times.
void terraingen::config::Fields<terraingen::config::Reader>(terraingen::config::Reader&, terraingen::ProductionSurfaceSpec&):
✓ Branch 4 taken 75 times.
void terraingen::config::Fields<terraingen::config::Writer>(terraingen::config::Writer&, terraingen::ProductionSurfaceSpec&):
✓ Branch 4 taken 37 times.
|
121 |
io("age_gyr", spec.ageGyr, |
| 107 |
|
|
"Age of the surface in Gyr, from 0 to 4.6; older surfaces hold more craters.", "Gyr", |
| 108 |
|
121 |
Between(0.0, 4.6)); |
| 109 |
|
121 |
} |
| 110 |
|
|
|
| 111 |
|
|
template <> struct SpecName<MinimumSpec> { |
| 112 |
|
|
static constexpr std::string_view kName = "minimum"; |
| 113 |
|
|
static constexpr std::string_view kDescription = |
| 114 |
|
|
"The least of several densities at each diameter, such as a production surface capped " |
| 115 |
|
|
"by an equilibrium."; |
| 116 |
|
|
}; |
| 117 |
|
118 |
template <typename IO> void Fields(IO& io, MinimumSpec& spec) { |
| 118 |
3/3
void terraingen::config::Fields<terraingen::config::(anonymous namespace)::SchemaWriter>(terraingen::config::(anonymous namespace)::SchemaWriter&, terraingen::MinimumSpec&):
✓ Branch 4 taken 9 times.
void terraingen::config::Fields<terraingen::config::Reader>(terraingen::config::Reader&, terraingen::MinimumSpec&):
✓ Branch 4 taken 72 times.
void terraingen::config::Fields<terraingen::config::Writer>(terraingen::config::Writer&, terraingen::MinimumSpec&):
✓ Branch 4 taken 36 times.
|
118 |
io("distributions", spec.distributions, |
| 119 |
|
|
"Densities whose least cumulative count at each diameter is used; at least one."); |
| 120 |
|
117 |
} |
| 121 |
|
|
|
| 122 |
|
|
template <> struct SpecName<TraskSpec> { |
| 123 |
|
|
static constexpr std::string_view kName = "trask"; |
| 124 |
|
|
static constexpr std::string_view kDescription = |
| 125 |
|
|
"The Trask (1966) lunar equilibrium density, N(>=D) = 10^-1.1 D^-2."; |
| 126 |
|
|
}; |
| 127 |
|
121 |
template <typename IO> void Fields(IO& /*io*/, TraskSpec& /*spec*/) {} |
| 128 |
|
|
|
| 129 |
|
|
template <> struct SpecName<HartmannSpec> { |
| 130 |
|
|
static constexpr std::string_view kName = "hartmann"; |
| 131 |
|
|
static constexpr std::string_view kDescription = |
| 132 |
|
|
"The Hartmann (1984) lunar equilibrium density, N(>=D) = 10^-1.14 D^-1.83 per km^2 with D " |
| 133 |
|
|
"in km."; |
| 134 |
|
|
}; |
| 135 |
|
29 |
template <typename IO> void Fields(IO& /*io*/, HartmannSpec& /*spec*/) {} |
| 136 |
|
|
|
| 137 |
|
|
template <> struct SpecName<MooreSpec> { |
| 138 |
|
|
static constexpr std::string_view kName = "moore"; |
| 139 |
|
|
static constexpr std::string_view kDescription = |
| 140 |
|
|
"Moore's terrain-specific crater distributions for Lunar Roving Vehicle trafficability."; |
| 141 |
|
|
}; |
| 142 |
|
30 |
template <typename IO> void Fields(IO& io, MooreSpec& spec) { |
| 143 |
3/3
void terraingen::config::Fields<terraingen::config::(anonymous namespace)::SchemaWriter>(terraingen::config::(anonymous namespace)::SchemaWriter&, terraingen::MooreSpec&):
✓ Branch 4 taken 9 times.
void terraingen::config::Fields<terraingen::config::Reader>(terraingen::config::Reader&, terraingen::MooreSpec&):
✓ Branch 4 taken 3 times.
void terraingen::config::Fields<terraingen::config::Writer>(terraingen::config::Writer&, terraingen::MooreSpec&):
✓ Branch 4 taken 18 times.
|
30 |
io("terrain", spec.terrain, "Terrain type whose crater distribution of Moore's to use."); |
| 144 |
|
30 |
} |
| 145 |
|
|
|
| 146 |
|
|
template <> struct SpecName<ViperSpec> { |
| 147 |
|
|
static constexpr std::string_view kName = "viper"; |
| 148 |
|
|
static constexpr std::string_view kDescription = |
| 149 |
|
|
"The VIPER environmental specification crater density, as synthterrain uses it; kept for " |
| 150 |
|
|
"comparison with synthterrain."; |
| 151 |
|
|
}; |
| 152 |
|
30 |
template <typename IO> void Fields(IO& /*io*/, ViperSpec& /*spec*/) {} |
| 153 |
|
|
|
| 154 |
|
|
template <> struct SpecName<FreshAgesSpec> { |
| 155 |
|
|
static constexpr std::string_view kName = "fresh"; |
| 156 |
|
|
static constexpr std::string_view kDescription = |
| 157 |
|
|
"Every crater is fresh, with age and lifetime zero."; |
| 158 |
|
|
}; |
| 159 |
|
31 |
template <typename IO> void Fields(IO& /*io*/, FreshAgesSpec& /*spec*/) {} |
| 160 |
|
|
|
| 161 |
|
|
template <> struct SpecName<UniformAgesSpec> { |
| 162 |
|
|
static constexpr std::string_view kName = "uniform"; |
| 163 |
|
|
static constexpr std::string_view kDescription = |
| 164 |
|
|
"Ages uniform over one lifetime for every diameter, so freshness is uniform between 0 " |
| 165 |
|
|
"and 1."; |
| 166 |
|
|
}; |
| 167 |
|
139 |
template <typename IO> void Fields(IO& io, UniformAgesSpec& spec) { |
| 168 |
3/3
void terraingen::config::Fields<terraingen::config::(anonymous namespace)::SchemaWriter>(terraingen::config::(anonymous namespace)::SchemaWriter&, terraingen::UniformAgesSpec&):
✓ Branch 4 taken 9 times.
void terraingen::config::Fields<terraingen::config::Reader>(terraingen::config::Reader&, terraingen::UniformAgesSpec&):
✓ Branch 4 taken 51 times.
void terraingen::config::Fields<terraingen::config::Writer>(terraingen::config::Writer&, terraingen::UniformAgesSpec&):
✓ Branch 4 taken 79 times.
|
139 |
io("lifetime_gyr", spec.lifetimeGyr, |
| 169 |
|
|
"Lifetime in Gyr, positive, that every crater's age is drawn uniformly within; with " |
| 170 |
|
|
"degradation, a crater this old is fully worn.", |
| 171 |
|
139 |
"Gyr", Above(0.0)); |
| 172 |
|
139 |
} |
| 173 |
|
|
|
| 174 |
|
|
template <> struct SpecName<SteadyStateAgesSpec> { |
| 175 |
|
|
static constexpr std::string_view kName = "steady_state"; |
| 176 |
|
|
static constexpr std::string_view kDescription = |
| 177 |
|
|
"Crater ages where small craters are in equilibrium: a crater lasts until the production " |
| 178 |
|
|
"rate replaces the equilibrium density, or the surface's age, with ages drawn from the " |
| 179 |
|
|
"chronology's formation rate."; |
| 180 |
|
|
}; |
| 181 |
|
106 |
template <typename IO> void Fields(IO& io, SteadyStateAgesSpec& spec) { |
| 182 |
3/3
void terraingen::config::Fields<terraingen::config::(anonymous namespace)::SchemaWriter>(terraingen::config::(anonymous namespace)::SchemaWriter&, terraingen::SteadyStateAgesSpec&):
✓ Branch 4 taken 9 times.
void terraingen::config::Fields<terraingen::config::Reader>(terraingen::config::Reader&, terraingen::SteadyStateAgesSpec&):
✓ Branch 4 taken 65 times.
void terraingen::config::Fields<terraingen::config::Writer>(terraingen::config::Writer&, terraingen::SteadyStateAgesSpec&):
✓ Branch 4 taken 32 times.
|
106 |
io("age_gyr", spec.ageGyr, |
| 183 |
|
|
"Age of the surface in Gyr, from 0 to 4.6; it caps every crater's lifetime, so larger " |
| 184 |
|
|
"craters on an older surface can be older.", |
| 185 |
|
106 |
"Gyr", Between(0.0, 4.6)); |
| 186 |
3/3
void terraingen::config::Fields<terraingen::config::(anonymous namespace)::SchemaWriter>(terraingen::config::(anonymous namespace)::SchemaWriter&, terraingen::SteadyStateAgesSpec&):
✓ Branch 4 taken 9 times.
void terraingen::config::Fields<terraingen::config::Reader>(terraingen::config::Reader&, terraingen::SteadyStateAgesSpec&):
✓ Branch 4 taken 65 times.
void terraingen::config::Fields<terraingen::config::Writer>(terraingen::config::Writer&, terraingen::SteadyStateAgesSpec&):
✓ Branch 4 taken 32 times.
|
106 |
io("production", spec.production, |
| 187 |
|
|
"Production function whose rate, with the equilibrium, sets how long small craters last."); |
| 188 |
3/3
void terraingen::config::Fields<terraingen::config::(anonymous namespace)::SchemaWriter>(terraingen::config::(anonymous namespace)::SchemaWriter&, terraingen::SteadyStateAgesSpec&):
✓ Branch 4 taken 9 times.
void terraingen::config::Fields<terraingen::config::Reader>(terraingen::config::Reader&, terraingen::SteadyStateAgesSpec&):
✓ Branch 4 taken 65 times.
void terraingen::config::Fields<terraingen::config::Writer>(terraingen::config::Writer&, terraingen::SteadyStateAgesSpec&):
✓ Branch 4 taken 32 times.
|
106 |
io("equilibrium", spec.equilibrium, |
| 189 |
|
|
"Equilibrium density that, with the production rate, sets how long small craters last " |
| 190 |
|
|
"before they are erased."); |
| 191 |
3/3
void terraingen::config::Fields<terraingen::config::(anonymous namespace)::SchemaWriter>(terraingen::config::(anonymous namespace)::SchemaWriter&, terraingen::SteadyStateAgesSpec&):
✓ Branch 4 taken 9 times.
void terraingen::config::Fields<terraingen::config::Reader>(terraingen::config::Reader&, terraingen::SteadyStateAgesSpec&):
✓ Branch 4 taken 64 times.
void terraingen::config::Fields<terraingen::config::Writer>(terraingen::config::Writer&, terraingen::SteadyStateAgesSpec&):
✓ Branch 4 taken 32 times.
|
106 |
io("chronology", spec.chronology, |
| 192 |
|
|
"Chronology whose formation rate the craters' ages are drawn from."); |
| 193 |
|
105 |
} |
| 194 |
|
|
|
| 195 |
|
|
template <> struct SpecName<FreshnessDegradationSpec> { |
| 196 |
|
|
static constexpr std::string_view kName = "freshness"; |
| 197 |
|
|
static constexpr std::string_view kDescription = |
| 198 |
|
|
"Scales depth and rim height linearly with freshness, down to a cutoff depth ratio at the " |
| 199 |
|
|
"end of a crater's lifetime."; |
| 200 |
|
|
}; |
| 201 |
|
142 |
template <typename IO> void Fields(IO& io, FreshnessDegradationSpec& spec) { |
| 202 |
3/3
void terraingen::config::Fields<terraingen::config::(anonymous namespace)::SchemaWriter>(terraingen::config::(anonymous namespace)::SchemaWriter&, terraingen::FreshnessDegradationSpec&):
✓ Branch 4 taken 9 times.
void terraingen::config::Fields<terraingen::config::Reader>(terraingen::config::Reader&, terraingen::FreshnessDegradationSpec&):
✓ Branch 4 taken 49 times.
void terraingen::config::Fields<terraingen::config::Writer>(terraingen::config::Writer&, terraingen::FreshnessDegradationSpec&):
✓ Branch 4 taken 84 times.
|
142 |
io("cutoff_depth_ratio", spec.cutoffDepthRatio, |
| 203 |
|
|
"Depth over diameter of a crater at the end of its lifetime, in (0, 0.1); lower values " |
| 204 |
|
|
"let old craters wear shallower.", |
| 205 |
|
142 |
"", Inside(0.0, 0.1)); |
| 206 |
|
142 |
} |
| 207 |
|
|
|
| 208 |
|
|
template <> struct SpecName<NoDegradationSpec> { |
| 209 |
|
|
static constexpr std::string_view kName = "none"; |
| 210 |
|
|
static constexpr std::string_view kDescription = |
| 211 |
|
|
"Craters stay fresh, optionally all with one depth to diameter ratio."; |
| 212 |
|
|
}; |
| 213 |
|
41 |
template <typename IO> void Fields(IO& io, NoDegradationSpec& spec) { |
| 214 |
3/3
void terraingen::config::Fields<terraingen::config::(anonymous namespace)::SchemaWriter>(terraingen::config::(anonymous namespace)::SchemaWriter&, terraingen::NoDegradationSpec&):
✓ Branch 4 taken 9 times.
void terraingen::config::Fields<terraingen::config::Reader>(terraingen::config::Reader&, terraingen::NoDegradationSpec&):
✓ Branch 4 taken 9 times.
void terraingen::config::Fields<terraingen::config::Writer>(terraingen::config::Writer&, terraingen::NoDegradationSpec&):
✓ Branch 4 taken 23 times.
|
41 |
io("depth_ratio", spec.depthRatio, |
| 215 |
|
|
"Depth over diameter given to every crater, positive; unset keeps each crater's fresh " |
| 216 |
|
|
"depth for the body.", |
| 217 |
|
41 |
"", Above(0.0)); |
| 218 |
|
41 |
} |
| 219 |
|
|
|
| 220 |
|
46 |
template <typename IO> void Fields(IO& io, PowerLawDiffusivity& law) { |
| 221 |
3/3
void terraingen::config::Fields<terraingen::config::(anonymous namespace)::SchemaWriter>(terraingen::config::(anonymous namespace)::SchemaWriter&, terraingen::PowerLawDiffusivity&):
✓ Branch 4 taken 9 times.
void terraingen::config::Fields<terraingen::config::Reader>(terraingen::config::Reader&, terraingen::PowerLawDiffusivity&):
✓ Branch 4 taken 6 times.
void terraingen::config::Fields<terraingen::config::Writer>(terraingen::config::Writer&, terraingen::PowerLawDiffusivity&):
✓ Branch 4 taken 31 times.
|
46 |
io("coefficient", law.coefficient, |
| 222 |
|
|
"Diffusivity of a 1 km crater, in m^2/Myr, positive; higher values wear craters down " |
| 223 |
|
|
"faster.", |
| 224 |
|
46 |
"m^2/Myr", Above(0.0)); |
| 225 |
3/3
void terraingen::config::Fields<terraingen::config::(anonymous namespace)::SchemaWriter>(terraingen::config::(anonymous namespace)::SchemaWriter&, terraingen::PowerLawDiffusivity&):
✓ Branch 4 taken 9 times.
void terraingen::config::Fields<terraingen::config::Reader>(terraingen::config::Reader&, terraingen::PowerLawDiffusivity&):
✓ Branch 4 taken 6 times.
void terraingen::config::Fields<terraingen::config::Writer>(terraingen::config::Writer&, terraingen::PowerLawDiffusivity&):
✓ Branch 4 taken 31 times.
|
46 |
io("exponent", law.exponent, |
| 226 |
|
|
"Exponent of the diameter in coefficient (D / 1 km)^exponent; 0 gives the same " |
| 227 |
|
|
"diffusivity for every crater size."); |
| 228 |
3/3
void terraingen::config::Fields<terraingen::config::(anonymous namespace)::SchemaWriter>(terraingen::config::(anonymous namespace)::SchemaWriter&, terraingen::PowerLawDiffusivity&):
✓ Branch 4 taken 9 times.
void terraingen::config::Fields<terraingen::config::Reader>(terraingen::config::Reader&, terraingen::PowerLawDiffusivity&):
✓ Branch 4 taken 6 times.
void terraingen::config::Fields<terraingen::config::Writer>(terraingen::config::Writer&, terraingen::PowerLawDiffusivity&):
✓ Branch 4 taken 31 times.
|
46 |
io("min_diameter", law.minDiameter, |
| 229 |
|
|
"Diameter in metres below which the diffusivity is held at its value at this diameter; " |
| 230 |
|
|
"not negative.", |
| 231 |
|
46 |
"m", AtLeast(0.0)); |
| 232 |
|
46 |
} |
| 233 |
|
|
|
| 234 |
|
|
template <> struct SpecName<DiffusionDegradationSpec> { |
| 235 |
|
|
static constexpr std::string_view kName = "diffusion"; |
| 236 |
|
|
static constexpr std::string_view kDescription = |
| 237 |
|
|
"Wears craters down by topographic diffusion, from each crater's diameter and age."; |
| 238 |
|
|
}; |
| 239 |
|
46 |
template <typename IO> void Fields(IO& io, DiffusionDegradationSpec& spec) { |
| 240 |
3/3
void terraingen::config::Fields<terraingen::config::(anonymous namespace)::SchemaWriter>(terraingen::config::(anonymous namespace)::SchemaWriter&, terraingen::DiffusionDegradationSpec&):
✓ Branch 4 taken 9 times.
void terraingen::config::Fields<terraingen::config::Reader>(terraingen::config::Reader&, terraingen::DiffusionDegradationSpec&):
✓ Branch 4 taken 14 times.
void terraingen::config::Fields<terraingen::config::Writer>(terraingen::config::Writer&, terraingen::DiffusionDegradationSpec&):
✓ Branch 4 taken 22 times.
|
46 |
io("diffusivity", spec.diffusivity, |
| 241 |
|
|
"Model of the diffusion age each crater has from its diameter and age; on Mars only " |
| 242 |
|
|
"power_law is allowed."); |
| 243 |
3/3
void terraingen::config::Fields<terraingen::config::(anonymous namespace)::SchemaWriter>(terraingen::config::(anonymous namespace)::SchemaWriter&, terraingen::DiffusionDegradationSpec&):
✓ Branch 4 taken 9 times.
void terraingen::config::Fields<terraingen::config::Reader>(terraingen::config::Reader&, terraingen::DiffusionDegradationSpec&):
✓ Branch 4 taken 14 times.
void terraingen::config::Fields<terraingen::config::Writer>(terraingen::config::Writer&, terraingen::DiffusionDegradationSpec&):
✓ Branch 4 taken 22 times.
|
45 |
io("power_law", spec.powerLaw, "The diffusivity used when the diffusivity model is power_law."); |
| 244 |
3/3
void terraingen::config::Fields<terraingen::config::(anonymous namespace)::SchemaWriter>(terraingen::config::(anonymous namespace)::SchemaWriter&, terraingen::DiffusionDegradationSpec&):
✓ Branch 4 taken 9 times.
void terraingen::config::Fields<terraingen::config::Reader>(terraingen::config::Reader&, terraingen::DiffusionDegradationSpec&):
✓ Branch 4 taken 14 times.
void terraingen::config::Fields<terraingen::config::Writer>(terraingen::config::Writer&, terraingen::DiffusionDegradationSpec&):
✓ Branch 4 taken 22 times.
|
45 |
io("reach_radii", spec.reachRadii, |
| 245 |
|
|
"Distance from the centre, in crater radii, out to which the diffused profile is solved " |
| 246 |
|
|
"and held at 0; at least the fresh profile's reach."); |
| 247 |
|
45 |
} |
| 248 |
|
|
|
| 249 |
|
|
template <> struct SpecName<FassettThomsonSpec> { |
| 250 |
|
|
static constexpr std::string_view kName = "fassett_thomson"; |
| 251 |
|
|
static constexpr std::string_view kDescription = |
| 252 |
|
|
"Fresh simple-crater profile of Fassett and Thomson (2014), with synthterrain's variants."; |
| 253 |
|
|
}; |
| 254 |
|
56 |
template <typename IO> void Fields(IO& io, FassettThomsonSpec& spec) { |
| 255 |
3/3
void terraingen::config::Fields<terraingen::config::(anonymous namespace)::SchemaWriter>(terraingen::config::(anonymous namespace)::SchemaWriter&, terraingen::FassettThomsonSpec&):
✓ Branch 4 taken 18 times.
void terraingen::config::Fields<terraingen::config::Reader>(terraingen::config::Reader&, terraingen::FassettThomsonSpec&):
✓ Branch 4 taken 7 times.
void terraingen::config::Fields<terraingen::config::Writer>(terraingen::config::Writer&, terraingen::FassettThomsonSpec&):
✓ Branch 4 taken 31 times.
|
56 |
io("rim", spec.rim, "How the profile's interior and exterior fits are joined at the rim."); |
| 256 |
|
56 |
} |
| 257 |
|
|
|
| 258 |
|
|
template <> struct SpecName<MartinParkesDunstanSpec> { |
| 259 |
|
|
static constexpr std::string_view kName = "martin_parkes_dunstan"; |
| 260 |
|
|
static constexpr std::string_view kDescription = |
| 261 |
|
|
"Simple-crater profile of Martin, Parkes and Dunstan (2014), developed for the PANGU " |
| 262 |
|
|
"simulator; degradation rounds its rim."; |
| 263 |
|
|
}; |
| 264 |
|
201 |
template <typename IO> void Fields(IO& /*io*/, MartinParkesDunstanSpec& /*spec*/) {} |
| 265 |
|
|
|
| 266 |
|
|
template <> struct SpecName<ComplexProfileSpec> { |
| 267 |
|
|
static constexpr std::string_view kName = "complex"; |
| 268 |
|
|
static constexpr std::string_view kDescription = |
| 269 |
|
|
"A simple profile below the body's simple-to-complex transition, and complex craters " |
| 270 |
|
|
"with flat floors and central peaks above it."; |
| 271 |
|
|
}; |
| 272 |
|
40 |
template <typename IO> void Fields(IO& io, ComplexProfileSpec& spec) { |
| 273 |
3/3
void terraingen::config::Fields<terraingen::config::(anonymous namespace)::SchemaWriter>(terraingen::config::(anonymous namespace)::SchemaWriter&, terraingen::ComplexProfileSpec&):
✓ Branch 4 taken 9 times.
void terraingen::config::Fields<terraingen::config::Reader>(terraingen::config::Reader&, terraingen::ComplexProfileSpec&):
✓ Branch 4 taken 8 times.
void terraingen::config::Fields<terraingen::config::Writer>(terraingen::config::Writer&, terraingen::ComplexProfileSpec&):
✓ Branch 4 taken 23 times.
|
40 |
io("simple", spec.simple, |
| 274 |
|
|
"Profile of the simple craters, those below the body's simple-to-complex transition " |
| 275 |
|
|
"diameter."); |
| 276 |
|
40 |
} |
| 277 |
|
|
|
| 278 |
|
|
} // namespace terraingen::config |
| 279 |
|
|
|