From d32efd7857770983813abe1e213417f3ab672bfd Mon Sep 17 00:00:00 2001 From: Thomas Witkowski <thomas.witkowski@gmx.de> Date: Mon, 21 Sep 2009 10:11:40 +0000 Subject: [PATCH] Small bugfix for periodic boundary conditions. --- AMDiS/src/ProblemVec.cc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/AMDiS/src/ProblemVec.cc b/AMDiS/src/ProblemVec.cc index a4fbd4c6..b8b8249d 100644 --- a/AMDiS/src/ProblemVec.cc +++ b/AMDiS/src/ProblemVec.cc @@ -760,14 +760,14 @@ namespace AMDiS { ERROR_EXIT("Not yet implemented!\n"); } - // TODO: ExitMatrix should be called after finishInsertion! - if (assembleMatrix && matrix->getBoundaryManager()) - matrix->getBoundaryManager()->exitMatrix(matrix); - assembledMatrix[i][j] = true; if (assembleMatrix) matrix->finishInsertion(); + + // TODO: ExitMatrix should be called after finishInsertion! + if (assembleMatrix && matrix->getBoundaryManager()) + matrix->getBoundaryManager()->exitMatrix(matrix); if (matrix) nnz += matrix->getBaseMatrix().nnz(); @@ -966,7 +966,7 @@ namespace AMDiS { if (systemMatrix && (*systemMatrix)[row][col]) (*systemMatrix)[row][col]->getBoundaryManager()->addBoundaryCondition(periodic); - if (rhs) + if (rhs && row == col) rhs->getDOFVector(row)->getBoundaryManager()->addBoundaryCondition(periodic); } -- GitLab