diff --git a/dune/tectonic/myblockproblem.hh b/dune/tectonic/myblockproblem.hh index e5e7508830094484fb4f78fa43712f89f61fe901..f226fd70a8eaecaa6b3e0672cc44a4ace1b69d3f 100644 --- a/dune/tectonic/myblockproblem.hh +++ b/dune/tectonic/myblockproblem.hh @@ -60,8 +60,14 @@ template <class MyConvexProblemTypeTEMPLATE> class MyBlockProblem { } std::string getOutput(bool header = false) const { - // TODO: implement (not urgent) - return std::string(); + if (header) { + outStream.str(""); + for (int j = 0; j < block_size; ++j) + outStream << " trunc" << std::setw(2) << j; + } + std::string s = outStream.str(); + outStream.str(""); + return s; } void projectCoarseCorrection(VectorType const &u, @@ -186,8 +192,8 @@ template <class MyConvexProblemTypeTEMPLATE> class MyBlockProblem { linearization.b[row][j] = 0.0; } - // for(int j=0; j<block_size; ++j) - // outStream << std::setw(9) << linearization.truncation.countmasked(j); + for (int j = 0; j < block_size; ++j) + outStream << std::setw(9) << linearization.truncation.countmasked(j); } /** \brief Constructs and returns an iterate object */ @@ -203,6 +209,8 @@ template <class MyConvexProblemTypeTEMPLATE> class MyBlockProblem { Bisection bisection; Dune::ParameterTree const &parset; + + mutable std::ostringstream outStream; }; /** \brief Solves one local system using a scalar Gauss-Seidel method */