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

Cosmetic changes; to be more similar to dune-tnnmg

parent 686810b1
No related branches found
No related tags found
No related merge requests found
...@@ -211,14 +211,16 @@ template <class MyConvexProblemTypeTEMPLATE> class MyBlockProblem { ...@@ -211,14 +211,16 @@ template <class MyConvexProblemTypeTEMPLATE> class MyBlockProblem {
assert(D[1] <= 0); assert(D[1] <= 0);
} }
// apply truncation to system // apply truncation to stiffness matrix and rhs
for (size_t row = 0; row < linearization.A.N(); ++row) { for (size_t row = 0; row < linearization.A.N(); ++row) {
auto const end = linearization.A[row].end(); auto const col_end = linearization.A[row].end();
for (auto it = linearization.A[row].begin(); it != end; ++it) { for (auto col_it = linearization.A[row].begin(); col_it != col_end;
int const col = it.index(); ++col_it) {
for (size_t i = 0; i < it->N(); ++i) { int const col = col_it.index();
auto const blockEnd = (*it)[i].end(); for (size_t i = 0; i < col_it->N(); ++i) {
for (auto blockIt = (*it)[i].begin(); blockIt != blockEnd; ++blockIt) auto const blockEnd = (*col_it)[i].end();
for (auto blockIt = (*col_it)[i].begin(); blockIt != blockEnd;
++blockIt)
if (linearization.truncation[row][i] or linearization if (linearization.truncation[row][i] or linearization
.truncation[col][blockIt.index()]) .truncation[col][blockIt.index()])
*blockIt = 0.0; *blockIt = 0.0;
......
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