7#ifndef POSTPROCESSINGCONTROLLER_H_
8#define POSTPROCESSINGCONTROLLER_H_
24 m_step = (step < 0) ? 0 : step;
28 std::vector<PostProcessingInterface*>
m_PP;
49 m_log <<
"##################################################################" << std::endl;
50 m_log <<
"## Postprocessing ##" << std::endl;
51 m_log <<
"##################################################################" << std::endl << std::endl;
54 m_ppOrder.resize(m_maxNoSteps, std::vector<MBool>(noPP(),
true));
55 if(m_maxNoSteps > 1) {
56 for(
MInt p = 0; p < noPP(); p++) {
57 const MString propName =
"postprocessingOrder_" + std::to_string(p);
58 for(
MInt step = 0; step < m_maxNoSteps; step++) {
59 m_ppOrder[step][p] = (
MBool)Context::getBasicProperty<MInt>(propName, AT_, step);
65 for(
auto&& pp : m_PP) {
66 pp->mSolver()->startLoadTimer(AT_);
67 pp->initPostProcessing();
68 pp->mSolver()->stopLoadTimer(AT_);
76 for(
auto&& pp : m_PP) {
77 pp->mSolver()->startLoadTimer(AT_);
78 pp->postprocessPreSolve();
79 pp->mSolver()->stopLoadTimer(AT_);
88 for(
auto&& pp : m_PP) {
89 if(m_ppOrder[m_step][pp->a_postprocessingId()]) {
90 pp->mSolver()->startLoadTimer(AT_);
91 pp->postprocessInSolve(finalTimeStep);
92 pp->mSolver()->stopLoadTimer(AT_);
101 for(
auto&& pp : m_PP) {
102 pp->mSolver()->disableDlbTimers();
103 pp->postprocessSolution();
104 pp->mSolver()->enableDlbTimers();
112 for(
auto&& pp : m_PP) {
113 pp->mSolver()->startLoadTimer(AT_);
114 pp->postprocessPostSolve();
115 pp->mSolver()->stopLoadTimer(AT_);
static MBool propertyExists(const MString &name, MInt solver=m_noSolvers)
This function checks if a property exists in general.
void setStep(const MInt step)
PostProcessingController(std::vector< PostProcessingInterface * > pp)
std::vector< std::vector< MBool > > m_ppOrder
void inSolve(MBool finalTimeStep)
std::vector< PostProcessingInterface * > m_PP
std::basic_string< char > MString