@@ -104,25 +104,26 @@ std::string make_key(LogEvent code) {
104104}
105105
106106auto get_benchmark_run_title (Option const & option, MainModelOptions const & model_options) {
107- auto const mv_ring_type = option.has_mv_ring ? " meshed grid" : " radial grid" ;
107+ using namespace std ::string_literals;
108+ auto const mv_ring_type = option.has_mv_ring ? " meshed grid" s : " radial grid" s;
108109 auto const sym_type =
109- model_options.calculation_symmetry == CalculationSymmetry::symmetric ? " symmetric" : " asymmetric" ;
110+ model_options.calculation_symmetry == CalculationSymmetry::symmetric ? " symmetric" s : " asymmetric" s ;
110111 auto const method = [calculation_method = model_options.calculation_method ] {
111112 using enum CalculationMethod;
112113
113114 switch (calculation_method) {
114115 case newton_raphson:
115- return " Newton-Raphson method" ;
116+ return " Newton-Raphson method" s ;
116117 case linear:
117- return " Linear method" ;
118+ return " Linear method" s ;
118119 case linear_current:
119- return " Linear current method" ;
120+ return " Linear current method" s ;
120121 case iterative_current:
121- return " Iterative current method" ;
122+ return " Iterative current method" s ;
122123 case iterative_linear:
123- return " Iterative linear method" ;
124+ return " Iterative linear method" s ;
124125 case iec60909:
125- return " IEC 60909 method" ;
126+ return " IEC 60909 method" s ;
126127 default :
127128 throw MissingCaseForEnumError{" get_benchmark_run_title" , calculation_method};
128129 }
@@ -171,15 +172,18 @@ struct PowerGridBenchmark {
171172 auto const run = [this , &model_options, &info](Idx batch_size_) {
172173 switch (model_options.calculation_type ) {
173174 case short_circuit:
174- return run_calculation<ShortCircuitOutputData>(model_options, batch_size_, info);
175+ run_calculation<ShortCircuitOutputData>(model_options, batch_size_, info);
176+ break ;
175177 case power_flow:
176178 [[fallthrough]];
177179 case state_estimation: {
178180 switch (model_options.calculation_symmetry ) {
179181 case CalculationSymmetry::symmetric:
180- return run_calculation<OutputData<symmetric_t >>(model_options, batch_size_, info);
182+ run_calculation<OutputData<symmetric_t >>(model_options, batch_size_, info);
183+ break ;
181184 case CalculationSymmetry::asymmetric:
182- return run_calculation<OutputData<asymmetric_t >>(model_options, batch_size_, info);
185+ run_calculation<OutputData<asymmetric_t >>(model_options, batch_size_, info);
186+ break ;
183187 default :
184188 throw MissingCaseForEnumError{" run_benchmark<calculation_symmetry>" ,
185189 model_options.calculation_symmetry };
@@ -231,11 +235,6 @@ struct PowerGridBenchmark {
231235} // namespace
232236} // namespace power_grid_model::benchmark
233237
234- namespace {
235- using power_grid_model::asymmetric_t ;
236- using power_grid_model::symmetric_t ;
237- } // namespace
238-
239238int main (int /* argc */ , char ** /* argv */ ) {
240239 using enum power_grid_model::CalculationType;
241240 using enum power_grid_model::CalculationMethod;
0 commit comments