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

Small bugfix

parent a125ff82
...@@ -43,7 +43,11 @@ namespace AMDiS { ...@@ -43,7 +43,11 @@ namespace AMDiS {
{ {
interiorMap = interiorDofs; interiorMap = interiorDofs;
coarseSpaceMap = coarseDofs; coarseSpaceMap = coarseDofs;
}
void PetscSolver::updateSubdomainData()
{
if (mpiCommLocal.Get_size() == 1) { if (mpiCommLocal.Get_size() == 1) {
rStartInterior = 0; rStartInterior = 0;
nGlobalOverallInterior = interiorMap->getOverallDofs(); nGlobalOverallInterior = interiorMap->getOverallDofs();
......
...@@ -202,6 +202,8 @@ namespace AMDiS { ...@@ -202,6 +202,8 @@ namespace AMDiS {
/// Returns a vector with the FE spaces of all components of a system vector. /// Returns a vector with the FE spaces of all components of a system vector.
vector<const FiniteElemSpace*> getFeSpaces(SystemVector *vec); vector<const FiniteElemSpace*> getFeSpaces(SystemVector *vec);
void updateSubdomainData();
protected: protected:
MeshDistributor *meshDistributor; MeshDistributor *meshDistributor;
......
...@@ -22,6 +22,7 @@ namespace AMDiS { ...@@ -22,6 +22,7 @@ namespace AMDiS {
FUNCNAME("PetscSolverGlobalMatrix::fillPetscMatrix()"); FUNCNAME("PetscSolverGlobalMatrix::fillPetscMatrix()");
if (coarseSpaceMap != NULL) { if (coarseSpaceMap != NULL) {
updateSubdomainData();
fillPetscMatrixWithCoarseSpace(mat); fillPetscMatrixWithCoarseSpace(mat);
return; return;
} }
...@@ -53,6 +54,7 @@ namespace AMDiS { ...@@ -53,6 +54,7 @@ namespace AMDiS {
o_nnz = NULL; o_nnz = NULL;
} }
updateSubdomainData();
createPetscNnzStructure(mat); createPetscNnzStructure(mat);
lastMeshNnz = meshDistributor->getLastMeshChangeIndex(); lastMeshNnz = meshDistributor->getLastMeshChangeIndex();
} }
...@@ -128,8 +130,6 @@ namespace AMDiS { ...@@ -128,8 +130,6 @@ namespace AMDiS {
int nRowsOverallInterior = interiorMap->getOverallDofs(); int nRowsOverallInterior = interiorMap->getOverallDofs();
if (subdomainLevel == 0) { if (subdomainLevel == 0) {
nGlobalOverallInterior = nRowsOverallInterior;
MatCreateSeqAIJ(mpiCommLocal, nRowsRankInterior, nRowsRankInterior, MatCreateSeqAIJ(mpiCommLocal, nRowsRankInterior, nRowsRankInterior,
60, PETSC_NULL, &matIntInt); 60, PETSC_NULL, &matIntInt);
} else { } else {
......
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