Commit 2e5d837b authored by Thomas Witkowski's avatar Thomas Witkowski
Browse files

Fixed bug with dirichlet values.

parent 2fc80215
...@@ -537,7 +537,7 @@ namespace AMDiS { ...@@ -537,7 +537,7 @@ namespace AMDiS {
inserter_type &ins = *inserter; inserter_type &ins = *inserter;
for (std::set<int>::iterator it = dirichletDofs.begin(); for (std::set<int>::iterator it = dirichletDofs.begin();
it != dirichletDofs.end(); ++it) it != dirichletDofs.end(); ++it)
ins[*it][*it] = 1.0; ins[*it][*it] = 1.0;
} }
......
...@@ -81,4 +81,13 @@ namespace AMDiS { ...@@ -81,4 +81,13 @@ namespace AMDiS {
} }
} }
void DirichletBC::initVector(DOFVectorBase<double>* vec)
{
FUNCNAME("DirichletBC::initVector()");
if (dynamic_cast<DOFVector<double>*>(vec))
dynamic_cast<DOFVector<double>*>(vec)->getDirichletValues().clear();
}
} }
...@@ -68,6 +68,9 @@ namespace AMDiS { ...@@ -68,6 +68,9 @@ namespace AMDiS {
const BoundaryType* localBound, const BoundaryType* localBound,
int nBasFcts); int nBasFcts);
///
void initVector(DOFVectorBase<double>*);
/// Implementation of BoundaryCondition::boundResidual(). /// Implementation of BoundaryCondition::boundResidual().
double boundResidual(ElInfo*, double boundResidual(ElInfo*,
DOFMatrix *, DOFMatrix *,
......
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
#include <mpi.h> #include <mpi.h>
#include "DirichletBC.h" #include "DirichletBC.h"
#include "DOFVector.h"
#include "parallel/PetscSolverGlobalMatrix.h" #include "parallel/PetscSolverGlobalMatrix.h"
#include "parallel/StdMpi.h" #include "parallel/StdMpi.h"
#include "parallel/MpiHelper.h" #include "parallel/MpiHelper.h"
...@@ -750,7 +751,7 @@ namespace AMDiS { ...@@ -750,7 +751,7 @@ namespace AMDiS {
for (dofIt.reset(); !dofIt.end(); ++dofIt) { for (dofIt.reset(); !dofIt.end(); ++dofIt) {
DegreeOfFreedom dof = dofIt.getDOFIndex(); DegreeOfFreedom dof = dofIt.getDOFIndex();
if (rankOnly && !(*interiorMap)[rowComp].isRankDof(dof)) if (rankOnly && !(*interiorMap)[rowComp].isRankDof(dof))
continue; continue;
......
Supports Markdown
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