Skip to content
Snippets Groups Projects
Commit 764506db authored by Elias Pipping's avatar Elias Pipping Committed by Elias Pipping
Browse files

Implement getOutput()

parent 08722574
No related branches found
No related tags found
No related merge requests found
......@@ -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 */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment