1 #include "../../include/userInputParameters.h" 5 const std::vector<unsigned int> & userGivenTimeStepList)
7 std::vector<unsigned int> timeStepList;
9 if (numberOfOutputs > 0) {
10 if (outputSpacingType ==
"EQUAL_SPACING"){
11 if (numberOfOutputs > totalIncrements)
12 numberOfOutputs = totalIncrements;
14 for (
unsigned int iter = 0; iter <= totalIncrements; iter += totalIncrements/numberOfOutputs){
15 timeStepList.push_back(iter);
18 else if (outputSpacingType ==
"LOG_SPACING"){
19 timeStepList.push_back(0);
20 for (
unsigned int output = 1; output <= numberOfOutputs; output++){
21 timeStepList.push_back(round(std::pow(10,
double(output)/
double(numberOfOutputs)*std::log10(totalIncrements))));
24 else if (outputSpacingType ==
"N_PER_DECADE"){
25 timeStepList.push_back(0);
26 timeStepList.push_back(1);
27 for (
unsigned int iter = 2; iter <= totalIncrements; iter++){
28 int decade = std::ceil(std::log10(iter));
29 int step_size = (std::pow(10,decade))/numberOfOutputs;
30 if (iter%step_size == 0){
31 timeStepList.push_back(iter);
36 else if (outputSpacingType ==
"LIST"){
37 timeStepList = userGivenTimeStepList;
41 timeStepList.push_back(totalIncrements+1);
48 #include "../../include/userInputParameters_template_instantiations.h"