Commit 16e2f085 authored by Siqi Ling's avatar Siqi Ling
Browse files

fix bug in 3d domain boundary (face dofs)

parent 87e85533
......@@ -254,17 +254,20 @@ namespace AMDiS {
{
set_to_zero(elementMatrix);
bool addMatrix = false;
std::vector<Operator*>::iterator it = operators.begin();
std::vector<double*>::iterator factorIt = operatorFactor.begin();
for (; it != operators.end(); ++it, ++factorIt)
if ((*it)->getNeedDualTraverse() == false &&
(*factorIt == NULL || **factorIt != 0.0))
(*factorIt == NULL || **factorIt != 0.0)) {
(*it)->getElementMatrix(elInfo, elementMatrix, *factorIt ? **factorIt : 1.0);
addMatrix = true;
}
if (factor != 1.0)
elementMatrix *= factor;
if (operators.size())
if (operators.size() && addMatrix)
addElementMatrix(elementMatrix, bound, elInfo, NULL);
}
......
......@@ -1194,8 +1194,9 @@ namespace AMDiS {
matrix->assemble2(1.0, mainElInfo, auxElInfo,
dualElInfo.smallElInfo, dualElInfo.largeElInfo, bound);
if (matrix && matrix->getBoundaryManager())
matrix->getBoundaryManager()->fillBoundaryConditions(mainElInfo, matrix);
if (componentMeshes[i] == meshes[0] && newEl0 || componentMeshes[i] == meshes[1] && newEl1)
if (matrix && matrix->getBoundaryManager())
matrix->getBoundaryManager()->fillBoundaryConditions(mainElInfo, matrix);
} else {
......@@ -1219,8 +1220,9 @@ namespace AMDiS {
matrix->assemble(1.0, rowElInfo, colElInfo,
dualElInfo.smallElInfo, dualElInfo.largeElInfo, bound);
if (matrix->getBoundaryManager())
matrix->getBoundaryManager()->fillBoundaryConditions(rowElInfo, matrix);
if (componentMeshes[i] == meshes[0] && newEl0 || componentMeshes[i] == meshes[1] && newEl1)
if (matrix->getBoundaryManager())
matrix->getBoundaryManager()->fillBoundaryConditions(rowElInfo, matrix);
}
if (i == j) {
......
......@@ -279,14 +279,16 @@ namespace AMDiS {
child[1]->getNodeDofs(feSpace, nextBound1, dofs, baseDofPtr);
if (addDof)
dofs.push_back(&(child[0]->getDof()[3][n0]));
if (std::find(dofs.begin(), dofs.end(), &(child[0]->getDof()[3][n0])) == dofs.end())
dofs.push_back(&(child[0]->getDof()[3][n0]));
child[0]->getNodeDofs(feSpace, nextBound0, dofs, baseDofPtr);
} else {
child[0]->getNodeDofs(feSpace, nextBound0, dofs, baseDofPtr);
if (addDof)
dofs.push_back(&(child[0]->getDof()[3][n0]));
if (std::find(dofs.begin(), dofs.end(), &(child[0]->getDof()[3][n0])) == dofs.end())
dofs.push_back(&(child[0]->getDof()[3][n0]));
child[1]->getNodeDofs(feSpace, nextBound1, dofs, baseDofPtr);
}
......
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