idaholab/moose: framework coverage diff

Base 8960f3 Head #30134 838271
Total Total +/- New
Rate 85.28% 85.30% +0.03% -
Hits 109358 109394 +36 0
Misses 18883 18847 -36 0
Filename Stmts Miss Cover
framework/src/actions/BatchMeshGeneratorAction.C 0 -36 +10.08%
TOTAL 0 -36 +0.03%
code
coverage unchanged
code
coverage increased
code
coverage decreased
+
line added or modified

framework/src/actions/BatchMeshGeneratorAction.C

327  
328  
329  
330  
331  
332  
333  
334  
335  
336  
          processed_batch_vector_input_param_values.push_back(_batch_vector_input_param_values[i]);
          if (_use_decomposed_index)
          {
            processed_batch_indices.push_back(
                std::vector<unsigned int>(_batch_vector_input_param_values[i].size()));
            std::iota(
                processed_batch_indices.back().begin(), processed_batch_indices.back().end(), 0);
          }
        }
        else
384  
385  
386  
387  
388  
389  
390  
391  
392  
393  
394  
395  
396  
397  
398  
399  
400  
401  
402  
403  
404  
405  
406  
407  
408  
409  
410  
411  
412  
413  
414  
415  
416  
417  
418  
419  
420  
421  
422  
      }
      else
      {
        const unsigned int num_new_batch_params = _batch_vector_input_param_values[i].size();
        const unsigned int num_processed_batch_params =
            processed_batch_vector_input_param_values.front().size();
        // All the elements in the processed_batch_vector_input_param_values need to be duplicated
        // for num_new_batch_params times
        for (auto & unit_processed_batch_vector_input_param_values :
             processed_batch_vector_input_param_values)
        {
          auto temp_params = unit_processed_batch_vector_input_param_values;
          for (unsigned int j = 1; j < num_new_batch_params; j++)
          {
            unit_processed_batch_vector_input_param_values.insert(
                unit_processed_batch_vector_input_param_values.end(),
                temp_params.begin(),
                temp_params.end());
          }
        }
        if (_use_decomposed_index)
        {
          // Same for the decomposed indices
          for (auto & unit_processed_batch_indices : processed_batch_indices)
          {
            auto temp_indices = unit_processed_batch_indices;
            for (unsigned int j = 1; j < num_new_batch_params; j++)
            {
              unit_processed_batch_indices.insert(
                  unit_processed_batch_indices.end(), temp_indices.begin(), temp_indices.end());
            }
          }
        }
        // if there are also batch scalar input parameters, it also needs to be duplicated
        for (auto & unit_processed_batch_scalar_input_param_values :
             processed_batch_scalar_input_param_values)
        {
          auto temp_params = unit_processed_batch_scalar_input_param_values;
          for (unsigned int j = 1; j < num_new_batch_params; j++)
429  
430  
431  
432  
433  
434  
435  
436  
437  
438  
439  
440  
441  
442  
443  
444  
445  
446  
447  
448  
        }
        // Then, add a new element to the processed_batch_vector_input_param_values by repeating
        // each element in _batch_vector_input_param_values[i] for num_processed_batch_params times
        processed_batch_vector_input_param_values.push_back({});
        for (const auto & unit_batch_vector_input_param_values :
             _batch_vector_input_param_values[i])
          for (unsigned int j = 0; j < num_processed_batch_params; j++)
            processed_batch_vector_input_param_values.back().push_back(
                unit_batch_vector_input_param_values);
        if (_use_decomposed_index)
        {
          // Same for the decomposed indices
          processed_batch_indices.push_back({});
          for (const auto & unit_batch_vector_input_param_values_index :
               index_range(_batch_vector_input_param_values[i]))
            for (unsigned int j = 0; j < num_processed_batch_params; j++)
              processed_batch_indices.back().push_back(unit_batch_vector_input_param_values_index);
        }
      }
    }
497  
498  
499  
500  
501  
502  
503  
504  
505  
{
  switch (param_type)
  {
    case (ParameterType::REAL):
      params.set<Real>(param_name) = MooseUtils::convert<Real>(param_value);
      break;
    case (ParameterType::SHORT):
      params.set<short>(param_name) = MooseUtils::convert<short>(param_value);
      break;