From 2a8a7642732aec81246904254769a455f77334de Mon Sep 17 00:00:00 2001 From: Elias Pipping <elias.pipping@fu-berlin.de> Date: Tue, 3 Jan 2012 15:58:43 +0100 Subject: [PATCH] Truncate ignore nodes as well --- dune/tectonic/myblockproblem.hh | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/dune/tectonic/myblockproblem.hh b/dune/tectonic/myblockproblem.hh index a8d2818d..e5e75088 100644 --- a/dune/tectonic/myblockproblem.hh +++ b/dune/tectonic/myblockproblem.hh @@ -118,10 +118,16 @@ template <class MyConvexProblemTypeTEMPLATE> class MyBlockProblem { // determine truncation pattern linearization.truncation.resize(u.size()); linearization.truncation.unsetAll(); - for (size_t i = 0; i < u.size(); ++i) - // TODO: should ignoreNodes be truncated as well? - if (problem.phi.regularity(i, u[i]) > 1e8) // TODO + for (size_t i = 0; i < u.size(); ++i) { + if (problem.phi.regularity(i, u[i]) > 1e8) { linearization.truncation[i] = true; + continue; + } + + for (int j = 0; j < block_size; ++j) + if (linearization.ignore[i][j]) + linearization.truncation[i][j] = true; + } // construct sparsity pattern for linearization Dune::MatrixIndexSet indices(problem.A.N(), problem.A.M()); -- GitLab