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
Branches
No related tags found
No related merge requests found
...@@ -60,8 +60,14 @@ template <class MyConvexProblemTypeTEMPLATE> class MyBlockProblem { ...@@ -60,8 +60,14 @@ template <class MyConvexProblemTypeTEMPLATE> class MyBlockProblem {
} }
std::string getOutput(bool header = false) const { std::string getOutput(bool header = false) const {
// TODO: implement (not urgent) if (header) {
return std::string(); 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, void projectCoarseCorrection(VectorType const &u,
...@@ -186,8 +192,8 @@ template <class MyConvexProblemTypeTEMPLATE> class MyBlockProblem { ...@@ -186,8 +192,8 @@ template <class MyConvexProblemTypeTEMPLATE> class MyBlockProblem {
linearization.b[row][j] = 0.0; linearization.b[row][j] = 0.0;
} }
// for(int j=0; j<block_size; ++j) for (int j = 0; j < block_size; ++j)
// outStream << std::setw(9) << linearization.truncation.countmasked(j); outStream << std::setw(9) << linearization.truncation.countmasked(j);
} }
/** \brief Constructs and returns an iterate object */ /** \brief Constructs and returns an iterate object */
...@@ -203,6 +209,8 @@ template <class MyConvexProblemTypeTEMPLATE> class MyBlockProblem { ...@@ -203,6 +209,8 @@ template <class MyConvexProblemTypeTEMPLATE> class MyBlockProblem {
Bisection bisection; Bisection bisection;
Dune::ParameterTree const &parset; Dune::ParameterTree const &parset;
mutable std::ostringstream outStream;
}; };
/** \brief Solves one local system using a scalar Gauss-Seidel method */ /** \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.
Please register or to comment