Skip to content
Snippets Groups Projects
Commit 68c111f6 authored by Elias Pipping's avatar Elias Pipping
Browse files

[Cleanup] Cosmetics

parent 842d3033
No related branches found
No related tags found
No related merge requests found
......@@ -22,7 +22,7 @@
/** \brief Base class for problems where each block can be solved with a
* modified gradient method */
template <class ConvexProblem>
class MyBlockProblem : /* NOT PUBLIC */ BlockNonlinearGSProblem<ConvexProblem> {
class MyBlockProblem : /* not public */ BlockNonlinearGSProblem<ConvexProblem> {
private:
typedef BlockNonlinearGSProblem<ConvexProblem> Base;
......@@ -107,8 +107,7 @@ class MyBlockProblem : /* NOT PUBLIC */ BlockNonlinearGSProblem<ConvexProblem> {
auto const psi = restrict(problem_.A, problem_.f, u, v, problem_.phi);
Dune::Solvers::Interval<double> D;
psi.subDiff(0, D);
// NOTE: Numerical instability can actually get us here
if (D[1] > 0)
if (D[1] > 0) // NOTE: Numerical instability can actually get us here
return 0;
int bisectionsteps = 0;
......@@ -175,17 +174,15 @@ class MyBlockProblem : /* NOT PUBLIC */ BlockNonlinearGSProblem<ConvexProblem> {
auto const blockEnd = std::end((*col_it)[i]);
for (auto blockIt = std::begin((*col_it)[i]); blockIt != blockEnd;
++blockIt)
if (linearization.truncation[row][i] ||
if (linearization.truncation[row][i] or
linearization.truncation[col][blockIt.index()])
*blockIt = 0.0;
}
}
for (size_t j = 0; j < block_size; ++j)
if (linearization.truncation[row][j])
linearization.b[row][j] = 0.0;
}
for (size_t j = 0; j < block_size; ++j)
outStream << std::setw(9) << linearization.truncation.countmasked(j);
}
......@@ -266,13 +263,9 @@ class MyBlockProblem<ConvexProblem>::IterateObject {
}
private:
// problem data
ConvexProblem const &problem;
std::vector<double> maxEigenvalues_;
Bisection const bisection_;
// state data for smoothing procedure used by:
// setIterate, updateIterate, solveLocalProblem
VectorType u;
......
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