15std::vector<const PostProcessor*>
18 std::vector<const PostProcessor*> scalar_pp_list;
21 const auto& scope = pp->PrintScope();
24 if (std::find(scope.begin(), scope.end(), event.
Name()) == scope.end())
27 if (pp->Type() ==
PPType::SCALAR) scalar_pp_list.push_back(&(*pp));
30 return scalar_pp_list;
34std::vector<const PostProcessor*>
37 std::vector<const PostProcessor*> scalar_pp_list;
40 const auto& scope = pp->PrintScope();
43 if (std::find(scope.begin(), scope.end(), event.
Name()) == scope.end())
46 if (pp->Type() ==
PPType::VECTOR) scalar_pp_list.push_back(&(*pp));
49 return scalar_pp_list;
53std::vector<const PostProcessor*>
56 std::vector<const PostProcessor*> scalar_pp_list;
59 const auto& scope = pp->PrintScope();
62 if (std::find(scope.begin(), scope.end(), event.
Name()) == scope.end())
68 return scalar_pp_list;
72std::vector<std::vector<std::string>>
75 size_t time_history_limit,
76 const std::vector<const PostProcessor*>& pp_sub_list)
78 if (pp_sub_list.empty())
return {};
81 const size_t num_rows =
82 std::min(
size_t(time_history_limit + 2), timehistsize + 2);
83 const size_t num_cols = pp_sub_list.size() + 1;
85 std::max(0,
int(timehistsize) -
int(time_history_limit));
87 const auto& front_time_hist = pp_sub_list.front()->GetTimeHistory();
89 typedef std::vector<std::string> VecStr;
90 typedef std::vector<VecStr> MatStr;
91 MatStr value_matrix(num_rows, VecStr(num_cols,
""));
94 value_matrix[0][0] =
"Time";
95 for (
size_t j = 1; j <= pp_sub_list.size(); ++j)
96 value_matrix[0][j] = pp_sub_list.at(j - 1)->Name();
99 for (
size_t t = 0; t < (num_rows - 2); ++t)
101 for (
size_t j = 0; j <= pp_sub_list.size(); ++j)
104 value_matrix[t + 1][j] =
105 std::to_string(front_time_hist[t + offset].time_);
108 const auto& pp = pp_sub_list.at(j - 1);
109 value_matrix[t + 1][j] =
110 pp->ConvertValueToString(pp->GetTimeHistory().at(t + offset).value_);
117 size_t t = num_rows - 1;
118 value_matrix[t][0] =
"Latest";
119 for (
size_t j = 0; j < pp_sub_list.size(); ++j)
121 const auto& pp = pp_sub_list.at(j);
122 value_matrix[t][j + 1] = pp->ConvertValueToString(pp->GetValue());
static std::vector< chi::PostProcessorPtr > postprocessor_stack
const std::string & Name() const
static std::vector< const PostProcessor * > GetArbitraryPostProcessorsList(const Event &event)
static std::vector< const PostProcessor * > GetVectorPostProcessorsList(const Event &event)
static std::vector< const PostProcessor * > GetScalarPostProcessorsList(const Event &event)
static std::vector< std::vector< std::string > > BuildPPHistoryMatrix(size_t timehistsize, size_t time_history_limit, const std::vector< const PostProcessor * > &pp_sub_list)