![]() |
Shamrock 2025.10.0
Astrophysical Code
|
Neighbour cache build strategy enum + json serialization/deserialization. More...
#include "shambase/exception.hpp"#include "nlohmann/json.hpp"#include "shamrock/io/json_utils.hpp"#include <string>Go to the source code of this file.
Namespaces | |
| namespace | shammodels |
| namespace for models | |
Enumerations | |
| enum | shammodels::NeighCacheStrategy { shammodels::SingleStage = 0 , shammodels::TwoStage = 1 } |
| Strategy used to build the neighbour cache out of the tree traversal. More... | |
Functions | |
| template<typename BasicJsonType> | |
| void | shammodels::to_json (BasicJsonType &j, const NeighCacheStrategy &e) |
| template<typename BasicJsonType> | |
| void | shammodels::from_json (const BasicJsonType &j, NeighCacheStrategy &e) |
| NeighCacheStrategy | shammodels::neigh_cache_strategy_from_two_stage_search (bool use_two_stage_search) |
| Map the legacy use_two_stage_search boolean onto the strategy enum. | |
| void | shammodels::get_to_neigh_cache_strategy (const nlohmann::json &j, NeighCacheStrategy &value, const std::string &log_ctx, bool &has_used_defaults, bool &has_updated_config) |
| Deserialize the neighbour cache strategy, falling back on the legacy boolean key. | |
Variables | |
| constexpr const char * | shammodels::neigh_cache_strategy_json_key = "neigh_cache_strategy" |
| Json key holding the neighbour cache strategy. | |
| constexpr const char * | shammodels::neigh_cache_strategy_legacy_json_key = "use_two_stage_search" |
| Legacy json key, which used to hold the strategy as a boolean. | |
Neighbour cache build strategy enum + json serialization/deserialization.
Definition in file enum_NeighCacheStrategy.hpp.