Commit 8e323a3f authored by Thomas Witkowski's avatar Thomas Witkowski
Browse files

Removed bug for assembling matrices in vectorial problems.

parent 9c259dfb
......@@ -678,7 +678,7 @@ namespace AMDiS {
componentSpaces[j]->getAdmin()->getUsedSize());
// Reuse old sparsity information (if available) or default
dof_matrix->startInsertion(nnz_per_row);
// dof_matrix->startInsertion(nnz_per_row);
}
}
}
......@@ -800,8 +800,8 @@ namespace AMDiS {
// Finish insertion
for (int i = 0; i < nComponents; i++)
for (int j = 0; j < nComponents; j++)
if ((*systemMatrix)[i][j])
(*systemMatrix)[i][j]->finishInsertion();
if ((*systemMatrix)[i][j])
(*systemMatrix)[i][j]->finishInsertion();
solverMatrix.setMatrix(*systemMatrix);
createPrecon();
......@@ -1080,13 +1080,29 @@ namespace AMDiS {
#ifdef _OPENMP
#pragma omp critical
#endif
{
matrix->getBaseMatrix() += tmpMatrix->getBaseMatrix();
matrix->getBaseMatrix() += tmpMatrix->getBaseMatrix();
}
// Remove rows corresponding to DOFs on a Dirichlet boundary.
matrix->removeRowsWithDBC(tmpMatrix->getApplyDBCs());
#ifdef _OPENMP
#pragma omp barrier
#endif
#ifdef _OPENMP
#pragma omp master
#endif
{
if (matrix) {
matrix->startInsertion();
}
}
if (matrix) {
// Remove rows corresponding to DOFs on a Dirichlet boundary.
#ifdef _OPENMP
#pragma omp critical
#endif
matrix->removeRowsWithDBC(tmpMatrix->getApplyDBCs());
DELETE tmpMatrix;
}
......
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