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