1 #ifndef ERF_STRUCTURE_MODEL_REGISTRY_H
2 #define ERF_STRUCTURE_MODEL_REGISTRY_H
64 #define ERF_STRUCTURE_MODEL_CONCAT_(a, b) a##b
65 #define ERF_STRUCTURE_MODEL_CONCAT(a, b) ERF_STRUCTURE_MODEL_CONCAT_(a, b)
71 #define ERF_REGISTER_STRUCTURE_MODEL(Class, name) \
73 [[maybe_unused]] const bool ERF_STRUCTURE_MODEL_CONCAT(erf_structure_model_registered_, __LINE__) = \
74 register_structure_model((name), [](int max_level) -> std::unique_ptr<StructureModel> { \
75 return std::make_unique<Class>(max_level); \
std::string name
Definition: ERF_Plotfile2DCatalog.cpp:139
std::unique_ptr< StructureModel > make_structure_model_from_inputs(int max_level)
The model erf.structures.model selects, or nullptr when the key is not set.
Definition: ERF_StructureModelRegistry.cpp:54
std::function< std::unique_ptr< StructureModel >(int max_level)> StructureModelCreator
Creates a model; the model reads its own inputs in its constructor.
Definition: ERF_StructureModelRegistry.H:30
std::unique_ptr< StructureModel > make_structure_model(const std::string &name, int max_level)
The model registered as name, or nullptr when no model has that name.
Definition: ERF_StructureModelRegistry.cpp:45
bool register_structure_model(const std::string &name, StructureModelCreator creator)
Add a model to the registry; aborts on an empty name or a name registered twice.
Definition: ERF_StructureModelRegistry.cpp:22
std::vector< std::string > structure_model_names()
Names erf.structures.model accepts, sorted; empty when no model is compiled in.
Definition: ERF_StructureModelRegistry.cpp:37
void check_structure_plot_names(const StructureModel &model, const std::vector< std::string > &taken)
Stop the run when the model's plot_var_names() cannot all be plotted.
Definition: ERF_StructureModelRegistry.cpp:73
The interface between ERF and a model of structures in the flow.
A model of structures in the flow, behind ERF's structure coupling.
Definition: ERF_StructureModel.H:164