Commit fbe10859 authored by Thomas Witkowski's avatar Thomas Witkowski
Browse files

Some small bug fixes when compiling AMDiS in debug mode.

parent e5d797df
...@@ -2,10 +2,9 @@ ...@@ -2,10 +2,9 @@
bool Cholesky::factorization(Matrix<double> *A, Vector<double> *p) bool Cholesky::factorization(Matrix<double> *A, Vector<double> *p)
{ {
FUNCNAME("Cholesky::factorization"); FUNCNAME("Cholesky::factorization()");
int n = A->getNumRows(); int n = A->getNumRows();
TEST_EXIT(n == A->getNumCols())("Matrix is not quadratic!\n");
// Checking memory for vector P of diagonal elements of factorization. // Checking memory for vector P of diagonal elements of factorization.
static Vector<double> *pT = NULL; static Vector<double> *pT = NULL;
......
...@@ -179,9 +179,9 @@ namespace AMDiS { ...@@ -179,9 +179,9 @@ namespace AMDiS {
const BoundaryType *bound, const BoundaryType *bound,
bool add) 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; inserter_type &ins= *inserter;
DegreeOfFreedom row, col; DegreeOfFreedom row, col;
......
...@@ -284,13 +284,6 @@ namespace AMDiS { ...@@ -284,13 +284,6 @@ namespace AMDiS {
return rowFESpace->getAdmin()->getUsedSize(); 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 /// Returns \ref name
inline const std::string& getName() const { inline const std::string& getName() const {
return name; return name;
......
...@@ -774,12 +774,6 @@ namespace AMDiS { ...@@ -774,12 +774,6 @@ namespace AMDiS {
assembleFlag, assembleFlag,
assembleMatrix ? matrix : NULL, assembleMatrix ? matrix : NULL,
((i == j) && asmVector) ? rhs->getDOFVector(i) : 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 { } else {
ERROR_EXIT("Not yet implemented!\n"); ERROR_EXIT("Not yet implemented!\n");
} }
...@@ -1132,6 +1126,9 @@ namespace AMDiS { ...@@ -1132,6 +1126,9 @@ namespace AMDiS {
if (useGetBound) if (useGetBound)
bound = GET_MEMORY(BoundaryType, basisFcts->getNumber()); bound = GET_MEMORY(BoundaryType, basisFcts->getNumber());
if (matrix)
matrix->startInsertion();
DualTraverse dualTraverse; DualTraverse dualTraverse;
ElInfo *rowElInfo, *colElInfo; ElInfo *rowElInfo, *colElInfo;
ElInfo *largeElInfo, *smallElInfo; ElInfo *largeElInfo, *smallElInfo;
...@@ -1182,6 +1179,9 @@ namespace AMDiS { ...@@ -1182,6 +1179,9 @@ namespace AMDiS {
BoundaryType *bound = NULL; BoundaryType *bound = NULL;
if (useGetBound) if (useGetBound)
bound = GET_MEMORY(BoundaryType, basisFcts->getNumber()); bound = GET_MEMORY(BoundaryType, basisFcts->getNumber());
if (matrix)
matrix->startInsertion();
DualTraverse dualTraverse; DualTraverse dualTraverse;
ElInfo *mainElInfo, *auxElInfo; ElInfo *mainElInfo, *auxElInfo;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment