fixed: wrong indices for projected b.c's in ASMu2D

This commit is contained in:
Arne Morten Kvarving 2016-10-20 17:16:29 +02:00
parent 8829994ec3
commit 6e3f35a2df
2 changed files with 2 additions and 2 deletions

View File

@ -245,7 +245,7 @@ TEST_P(TestSIMNodalConstraint, Edge2DLRmx)
}
for (size_t i=1; i <= pch.getNoNodes(2); ++i) {
if (std::find(nodes.begin(), nodes.end(), i+ofs) != nodes.end() &&
i+ofs != pch.getCorner(1,-1,2) && GetParam() == 1)
i+ofs != (size_t)pch.getCorner(1,-1,2) && GetParam() == 1)
check_mpc(pch.findMPC(i+ofs, 1), pch.getCorner(1,-1,2));
else if (std::find(nodes.begin(), nodes.end(), i+ofs) != nodes.end() && GetParam() == 3)
check_mpc(pch.findMPC(i+ofs, 1), pch.getCorner(1,1,2));

View File

@ -658,7 +658,7 @@ void ASMu2D::constrainEdge (int dir, bool open, int dof, int code, char basis)
for (size_t i = 0; i < nodes.size(); i++)
if (this->prescribe(nodes[i],dof,-code) == 0 && code > 0)
dirich.back().nodes.push_back(std::make_pair(i,nodes[i]));
dirich.back().nodes.push_back(std::make_pair(i+1,nodes[i]));
if (!open)
this->prescribe(c2,dof,bcode);