From da8bed73e4fbcf464a99c5d29325a4e7095757bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carsten=20Gr=C3=A4ser?= <graeser@dune-project.org> Date: Tue, 8 Mar 2016 18:05:10 +0100 Subject: [PATCH] [amg][bugfix] Fix dirichlet processing in FastAMG The comment and surroundig code indicate that FastAMG should solve during pre() for dirichlet entries. This is determined by checking if a row does contain a diagonal entry while all other entries are zero. The check for this was buggy because hasDiagonal was always false. Now it's set to true if a diagonal entry is found and nonzero. --- dune/istl/paamg/fastamg.hh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dune/istl/paamg/fastamg.hh b/dune/istl/paamg/fastamg.hh index cbf1fea1..74240d94 100644 --- a/dune/istl/paamg/fastamg.hh +++ b/dune/istl/paamg/fastamg.hh @@ -471,7 +471,7 @@ namespace Dune for(ColIter col=row->begin(); col!=row->end(); ++col) { if(row.index()==col.index()) { diag = col; - hasDiagonal = false; + hasDiagonal = (*col != zero); }else{ if(*col!=zero) isDirichlet = false; -- GitLab