From fbe10859703d72b225dd7f0ca3eab90ecac581a9 Mon Sep 17 00:00:00 2001 From: Thomas Witkowski <thomas.witkowski@gmx.de> Date: Wed, 29 Apr 2009 10:09:08 +0000 Subject: [PATCH] Some small bug fixes when compiling AMDiS in debug mode. --- AMDiS/src/Cholesky.cc | 3 +-- AMDiS/src/DOFMatrix.cc | 4 ++-- AMDiS/src/DOFMatrix.h | 7 ------- AMDiS/src/ProblemVec.cc | 12 ++++++------ 4 files changed, 9 insertions(+), 17 deletions(-) diff --git a/AMDiS/src/Cholesky.cc b/AMDiS/src/Cholesky.cc index 16078c9b..79242413 100644 --- a/AMDiS/src/Cholesky.cc +++ b/AMDiS/src/Cholesky.cc @@ -2,10 +2,9 @@ bool Cholesky::factorization(Matrix<double> *A, Vector<double> *p) { - FUNCNAME("Cholesky::factorization"); + FUNCNAME("Cholesky::factorization()"); int n = A->getNumRows(); - TEST_EXIT(n == A->getNumCols())("Matrix is not quadratic!\n"); // Checking memory for vector P of diagonal elements of factorization. static Vector<double> *pT = NULL; diff --git a/AMDiS/src/DOFMatrix.cc b/AMDiS/src/DOFMatrix.cc index 4000fa39..774aad5f 100644 --- a/AMDiS/src/DOFMatrix.cc +++ b/AMDiS/src/DOFMatrix.cc @@ -179,9 +179,9 @@ namespace AMDiS { const BoundaryType *bound, bool add) { - FUNCNAME("DOFMatrix::addElementMatrix"); + FUNCNAME("DOFMatrix::addElementMatrix()"); - TEST_EXIT(inserter)("DOFMatrix is not in insertion mode"); + TEST_EXIT_DBG(inserter)("DOFMatrix is not in insertion mode"); inserter_type &ins= *inserter; DegreeOfFreedom row, col; diff --git a/AMDiS/src/DOFMatrix.h b/AMDiS/src/DOFMatrix.h index 577a5fc1..25d51723 100644 --- a/AMDiS/src/DOFMatrix.h +++ b/AMDiS/src/DOFMatrix.h @@ -284,13 +284,6 @@ namespace AMDiS { return rowFESpace->getAdmin()->getUsedSize(); } - // Only fake, shouldn't be called - /** \brief - * Returns number of cols. For that, the function iteratos over all - * rows and searchs for the entry with the highest col number. - */ - int getNumCols() const; - /// Returns \ref name inline const std::string& getName() const { return name; diff --git a/AMDiS/src/ProblemVec.cc b/AMDiS/src/ProblemVec.cc index a40ac76b..a0a5e6f8 100644 --- a/AMDiS/src/ProblemVec.cc +++ b/AMDiS/src/ProblemVec.cc @@ -774,12 +774,6 @@ namespace AMDiS { assembleFlag, assembleMatrix ? matrix : NULL, ((i == j) && asmVector) ? rhs->getDOFVector(i) : NULL); - - TEST_EXIT_DBG(matrix->getUsedSize() == componentSpaces[i]->getAdmin()->getUsedSize()) - ("Assembled matrix has wrong dimension!\n"); - TEST_EXIT_DBG(matrix->getNumCols() == componentSpaces[j]->getAdmin()->getUsedSize()) - ("Assembled matrix has wrong dimension!\n"); - } else { ERROR_EXIT("Not yet implemented!\n"); } @@ -1132,6 +1126,9 @@ namespace AMDiS { if (useGetBound) bound = GET_MEMORY(BoundaryType, basisFcts->getNumber()); + if (matrix) + matrix->startInsertion(); + DualTraverse dualTraverse; ElInfo *rowElInfo, *colElInfo; ElInfo *largeElInfo, *smallElInfo; @@ -1182,6 +1179,9 @@ namespace AMDiS { BoundaryType *bound = NULL; if (useGetBound) bound = GET_MEMORY(BoundaryType, basisFcts->getNumber()); + + if (matrix) + matrix->startInsertion(); DualTraverse dualTraverse; ElInfo *mainElInfo, *auxElInfo; -- GitLab