@@ -18,7 +18,7 @@ template <class MainModel> class JobAdapter;
1818
1919template <class MainModel > class JobAdapter : public JobInterface <JobAdapter<MainModel>> {
2020 public:
21- using MainModelType = typename MainModel::MainModelType ;
21+ using ModelType = typename MainModel::ImplType ;
2222
2323 JobAdapter (std::reference_wrapper<MainModel> model_reference,
2424 std::reference_wrapper<MainModelOptions const > options)
@@ -88,12 +88,12 @@ template <class MainModel> class JobAdapter : public JobInterface<JobAdapter<Mai
8888 std::reference_wrapper<MainModel> model_reference_;
8989 std::reference_wrapper<MainModelOptions const > options_;
9090
91- typename MainModelType ::ComponentFlags components_to_update_{};
92- typename MainModelType ::UpdateIndependence update_independence_{};
93- typename MainModelType ::ComponentFlags independence_flags_{};
94- std::shared_ptr<typename MainModelType ::SequenceIdx> all_scenarios_sequence_;
91+ typename ModelType ::ComponentFlags components_to_update_{};
92+ typename ModelType ::UpdateIndependence update_independence_{};
93+ typename ModelType ::ComponentFlags independence_flags_{};
94+ std::shared_ptr<typename ModelType ::SequenceIdx> all_scenarios_sequence_;
9595 // current_scenario_sequence_cache_ is calculated per scenario, so it is excluded from the constructors.
96- typename MainModelType ::SequenceIdx current_scenario_sequence_cache_{};
96+ typename ModelType ::SequenceIdx current_scenario_sequence_cache_{};
9797
9898 Logger* log_{nullptr };
9999
@@ -124,17 +124,17 @@ template <class MainModel> class JobAdapter : public JobInterface<JobAdapter<Mai
124124 // cache component update order where possible.
125125 // the order for a cacheable (independent) component by definition is the same across all scenarios
126126 components_to_update_ = model_reference_.get ().get_components_to_update (update_data);
127- update_independence_ = main_core::update::independence::check_update_independence<MainModelType >(
127+ update_independence_ = main_core::update::independence::check_update_independence<ModelType >(
128128 model_reference_.get ().state (), update_data);
129129 std::ranges::transform (update_independence_, independence_flags_.begin (),
130130 [](auto const & comp) { return comp.is_independent (); });
131- all_scenarios_sequence_ = std::make_shared< typename MainModelType::SequenceIdx>(
132- main_core::update::get_all_sequence_idx_map<MainModelType >(
131+ all_scenarios_sequence_ =
132+ std::make_shared< typename ModelType::SequenceIdx>( main_core::update::get_all_sequence_idx_map<ModelType >(
133133 model_reference_.get ().state (), update_data, 0 , components_to_update_, update_independence_, false ));
134134 }
135135
136136 void setup_impl (ConstDataset const & update_data, Idx scenario_idx) {
137- current_scenario_sequence_cache_ = main_core::update::get_all_sequence_idx_map<MainModelType >(
137+ current_scenario_sequence_cache_ = main_core::update::get_all_sequence_idx_map<ModelType >(
138138 model_reference_.get ().state (), update_data, scenario_idx, components_to_update_, update_independence_,
139139 true );
140140 auto const current_scenario_sequence = get_current_scenario_sequence_view_ ();
@@ -148,8 +148,8 @@ template <class MainModel> class JobAdapter : public JobInterface<JobAdapter<Mai
148148 }
149149
150150 auto get_current_scenario_sequence_view_ () const {
151- return MainModelType ::run_functor_with_all_component_types_return_array ([this ]<typename CT>() {
152- constexpr auto comp_idx = MainModelType ::template index_of_component<CT>;
151+ return ModelType ::run_functor_with_all_component_types_return_array ([this ]<typename CT>() {
152+ constexpr auto comp_idx = ModelType ::template index_of_component<CT>;
153153 if (std::get<comp_idx>(independence_flags_)) {
154154 return std::span<Idx2D const >{std::get<comp_idx>(*all_scenarios_sequence_)};
155155 }
0 commit comments