![]() |
Shamrock 2025.10.0
Astrophysical Code
|
namespace for the main framework More...
Namespaces | |
| namespace | algs |
| namespace | backends |
| namespace | external |
| namespace | math |
| namespace | model_gsph |
| namespace | model_ramses |
| namespace | model_sph |
| namespace | model_zeus |
| namespace | phys |
| namespace | sys |
| namespace | tree |
| namespace | utils |
Classes | |
| class | ComputeField |
| class | DataInserterUtility |
| Class to insert data in the PatchScheduler. More... | |
| class | ExperimentalClassMarker |
| class | InterfacesUtility |
| class | LegacyVtkWriter |
| class | MergedPatchData |
| class | MergedPatchDataField |
| class | PatchDataFieldSpan |
| Represents a span of data within a PatchDataField. More... | |
| class | ReattributeDataUtility |
| Utility class used to move the objects between patches. More... | |
| class | SchedulerUtility |
| struct | type_tag |
| struct | variant_to_tuple |
| struct | variant_to_tuple< std::variant< Ts... > > |
| class | VecToNumpy |
| class | VecToNumpy< sycl::vec< T, 16 > > |
| class | VecToNumpy< sycl::vec< T, 2 > > |
| class | VecToNumpy< sycl::vec< T, 3 > > |
| class | VecToNumpy< sycl::vec< T, 4 > > |
| class | VecToNumpy< sycl::vec< T, 8 > > |
Typedefs | |
| template<typename T > | |
| using | variant_to_tuple_t = typename variant_to_tuple< T >::type |
| template<class T > | |
| using | pdat_span_rw_dyn = details::PatchDataFieldSpan_access_rw_dyn_nvar< T > |
| Alias for PatchDataFieldSpan_access_rw_dyn_nvar. | |
| template<class T > | |
| using | pdat_span_ro_dyn = details::PatchDataFieldSpan_access_ro_dyn_nvar< T > |
| Alias for PatchDataFieldSpan_access_ro_dyn_nvar. | |
| template<class T , u32 nvar> | |
| using | pdat_span_rw = details::PatchDataFieldSpan_access_rw_static_nvar< T, nvar > |
| Alias for PatchDataFieldSpan_access_rw_static_nvar. | |
| template<class T , u32 nvar> | |
| using | pdat_span_ro = details::PatchDataFieldSpan_access_ro_static_nvar< T, nvar > |
| Alias for PatchDataFieldSpan_access_ro_static_nvar. | |
| template<class T > | |
| using | PatchDataFieldSpanPointer = PatchDataFieldSpan< T, dynamic_nvar, access_t_pointer > |
Enumerations | |
| enum | DataSetTypes { UnstructuredGrid } |
Functions | |
| template<class T > | |
| void | append_to_map (std::string key, std::vector< std::reference_wrapper< shamrock::patch::PatchDataLayer > > ref_lst, py::dict &dic_out) |
| template<class T > | |
| void | append_to_map (std::string key, std::vector< std::unique_ptr< shamrock::patch::PatchDataLayer > > &lst, py::dict &dic_out) |
| py::dict | pdat_to_dic (shamrock::patch::PatchDataLayer &pdat) |
| bool | are_experimental_features_allowed () |
| Allow the use of experimental features. | |
| void | enable_experimental_features () |
| Allow the use of experimental features. | |
| void | experimental_feature_check (const std::string &message, SourceLocation loc=SourceLocation{}) |
| Check if experimental features are enabled, if not throw with the given message. | |
| std::string | json_diff_str (const nlohmann::json &j1, const nlohmann::json &j2) |
| std::string | log_json_changes (const nlohmann::json &j_current, const nlohmann::json &j, bool has_used_defaults, bool has_updated_config) |
| Shown the changes between two JSON objects to log config changes. | |
| template<class T > | |
| void | get_to_if_contains (const nlohmann::json &j, const std::string &key, T &value, bool &has_used_defaults) |
| template<class T > | |
| void | get_to_if_contains_fallbacks (const nlohmann::json &j, const std::string &key, T &value, std::initializer_list< const char * > fallbacks, bool &has_used_defaults, bool &has_updated_config) |
| template<class Functor , typename... Ts> | |
| bool | on_variant_match (const std::string &type_id, Functor &&callback, const std::variant< Ts... > &var) |
| template<class Functor , typename... Ts> | |
| void | on_variant_cases (Functor &&callback, const std::variant< Ts... > &var) |
| template<typename... Ts> | |
| void | json_deserialize_variant (const nlohmann::json &j, const std::string &type_id, std::variant< Ts... > &var) |
| void | write_shamrock_dump (std::string fname, std::string metadata_user, PatchScheduler &sched) |
| Write a Shamrock dump file containing the current state of the patches and user supplied metadata. | |
| void | load_shamrock_dump (std::string fname, std::string &metadata_user, ShamrockCtx &ctx) |
| Load a Shamrock dump file and restore the state of the patches and retreive user metadata. | |
Variables | |
| str | SHAM_IMPORT_MODE = "global" |
| constexpr u32 | dynamic_nvar = u32_max |
| Constant for dynamic number of variables. | |
| constexpr bool | access_t_pointer = true |
| constexpr bool | access_t_span = !access_t_pointer |
namespace for the main framework
Main shamrock module.
| using shamrock.PatchDataFieldSpanPointer = typedef PatchDataFieldSpan<T, dynamic_nvar, access_t_pointer> |
Definition at line 353 of file PatchDataFieldSpan.hpp.
| using shamrock.pdat_span_ro = typedef details::PatchDataFieldSpan_access_ro_static_nvar<T, nvar> |
Alias for PatchDataFieldSpan_access_ro_static_nvar.
Definition at line 104 of file PatchDataFieldSpan.hpp.
| using shamrock.pdat_span_ro_dyn = typedef details::PatchDataFieldSpan_access_ro_dyn_nvar<T> |
Alias for PatchDataFieldSpan_access_ro_dyn_nvar.
Definition at line 96 of file PatchDataFieldSpan.hpp.
| using shamrock.pdat_span_rw = typedef details::PatchDataFieldSpan_access_rw_static_nvar<T, nvar> |
Alias for PatchDataFieldSpan_access_rw_static_nvar.
Definition at line 100 of file PatchDataFieldSpan.hpp.
| using shamrock.pdat_span_rw_dyn = typedef details::PatchDataFieldSpan_access_rw_dyn_nvar<T> |
Alias for PatchDataFieldSpan_access_rw_dyn_nvar.
Definition at line 92 of file PatchDataFieldSpan.hpp.
| using shamrock.variant_to_tuple_t = typedef typename variant_to_tuple<T>::type |
Definition at line 37 of file json_variant.hpp.
| enum shamrock::DataSetTypes |
Definition at line 118 of file LegacyVtkWriter.hpp.
| void shamrock::append_to_map | ( | std::string | key, |
| std::vector< std::reference_wrapper< shamrock::patch::PatchDataLayer > > | ref_lst, | ||
| py::dict & | dic_out | ||
| ) |
Definition at line 161 of file PatchDataToPy.hpp.
| void shamrock::append_to_map | ( | std::string | key, |
| std::vector< std::unique_ptr< shamrock::patch::PatchDataLayer > > & | lst, | ||
| py::dict & | dic_out | ||
| ) |
Definition at line 207 of file PatchDataToPy.hpp.
| bool shamrock::are_experimental_features_allowed | ( | ) |
Allow the use of experimental features.
Definition at line 33 of file experimental_features.cpp.
Here is the call graph for this function:| void shamrock::enable_experimental_features | ( | ) |
Allow the use of experimental features.
Definition at line 53 of file experimental_features.cpp.
|
inline |
Check if experimental features are enabled, if not throw with the given message.
Definition at line 32 of file experimental_features.hpp.
|
inline |
Get a value from a JSON object if it contains the key, otherwise keep the value as is and set has_used_defaults to true
Definition at line 35 of file json_utils.hpp.
|
inline |
Get a value from a JSON object if it contains the key, otherwise try the fallback names (set has_updated_config to true if found) and if it is still not found, keep the value as is and set has_used_defaults to true
Definition at line 48 of file json_utils.hpp.
Here is the call graph for this function:
|
inline |
Definition at line 72 of file json_variant.hpp.
|
inline |
Definition at line 27 of file json_print_diff.hpp.
| void shamrock::load_shamrock_dump | ( | std::string | fname, |
| std::string & | metadata_user, | ||
| ShamrockCtx & | ctx | ||
| ) |
Load a Shamrock dump file and restore the state of the patches and retreive user metadata.
| fname | The file name to read from |
| metadata_user | The user-provided metadata to store |
| ctx | The Shamrock context to restore |
Definition at line 162 of file ShamrockDump.cpp.
Here is the call graph for this function:| std::string shamrock::log_json_changes | ( | const nlohmann::json & | j_current, |
| const nlohmann::json & | j, | ||
| bool | has_used_defaults, | ||
| bool | has_updated_config | ||
| ) |
Shown the changes between two JSON objects to log config changes.
Definition at line 29 of file json_utils.cpp.
|
inline |
Definition at line 62 of file json_variant.hpp.
|
inline |
Definition at line 45 of file json_variant.hpp.
|
inline |
Definition at line 222 of file PatchDataToPy.hpp.
| void shamrock::write_shamrock_dump | ( | std::string | fname, |
| std::string | metadata_user, | ||
| PatchScheduler & | sched | ||
| ) |
Write a Shamrock dump file containing the current state of the patches and user supplied metadata.
| fname | The file name to write to |
| metadata_user | The user-provided metadata to add to the dump |
| sched | The patch scheduler to dump |
Definition at line 24 of file ShamrockDump.cpp.
Here is the call graph for this function:
|
inlineconstexpr |
Definition at line 109 of file PatchDataFieldSpan.hpp.
|
inlineconstexpr |
Definition at line 110 of file PatchDataFieldSpan.hpp.
Constant for dynamic number of variables.
Definition at line 107 of file PatchDataFieldSpan.hpp.
| str shamrock.SHAM_IMPORT_MODE = "global" |
Definition at line 9 of file __init__.py.