12 constexpr
static auto name() -> std::string_view {
return "grid"; }
15 std::variant<Grid2Options, Grid3Options>
opts;
18 return std::visit([&](
const auto& o) {
return o.get_coordinate_name(); },
opts);
22 std::visit([&](
const auto& o) {
to_json(nlohmann_json_j, o); }, nlohmann_json_t.
opts);
26 spdlog::info(
"{}", nlohmann_json_j.dump());
27 const auto& dimension = nlohmann_json_j[
"dimensions"];
28 assert(dimension.is_array());
30 size_t dsize = dimension.size();
friend void to_json(nlohmann::json &nlohmann_json_j, const GridOptions &nlohmann_json_t)
std::optional< std::string > get_coordinate_name() const
constexpr static auto name() -> std::string_view
std::variant< Grid2Options, Grid3Options > opts
friend void from_json(const nlohmann::json &nlohmann_json_j, GridOptions &nlohmann_json_t)