19#include "nlohmann/json.hpp"
49 bool use_two_stage_search) {
69 const nlohmann::json &j,
71 const std::string &log_ctx,
72 bool &has_used_defaults,
73 bool &has_updated_config) {
83 has_updated_config =
true;
94 has_used_defaults =
true;
This header file contains utility functions related to exception handling in the code.
#define SHAMROCK_JSON_SERIALIZE_ENUM(ENUM_TYPE,...)
Macro to serialize/deserialize an enum to/from a JSON object modified from the NLOHMANN_JSON_SERIALIZ...
i32 world_rank()
Gives the rank of the current process in the MPI communicator.
constexpr const char * neigh_cache_strategy_legacy_json_key
Legacy json key, which used to hold the strategy as a boolean.
constexpr const char * neigh_cache_strategy_json_key
Json key holding the neighbour cache strategy.
void 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.
NeighCacheStrategy neigh_cache_strategy_from_two_stage_search(bool use_two_stage_search)
Map the legacy use_two_stage_search boolean onto the strategy enum.
NeighCacheStrategy
Strategy used to build the neighbour cache out of the tree traversal.
@ SingleStage
Single tree traversal per particle.
@ TwoStage
Two stage neighbours search (see shamrock paper).
void warn_ln(std::string module_name, Types... var2)
Prints a log message with multiple arguments followed by a newline.