fixed: make getCorner in ASMu2D behave like other ASMs
namely have it return the actual node id for a basis' corner, and not the node id within the basis.
This commit is contained in:
parent
c0b02fba77
commit
41116a0d84
@ -306,8 +306,7 @@ public:
|
|||||||
int getCorner(int vertex, int basis)
|
int getCorner(int vertex, int basis)
|
||||||
{
|
{
|
||||||
static const int indices[4][2] = {{-1,-1}, {1, -1}, {-1, 1}, {1,1}};
|
static const int indices[4][2] = {{-1,-1}, {1, -1}, {-1, 1}, {1,1}};
|
||||||
size_t ofs = getStartNode(basis);
|
return pch->getCorner(indices[vertex-1][0], indices[vertex-1][1], basis);
|
||||||
return ofs + pch->getCorner(indices[vertex-1][0], indices[vertex-1][1], basis);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//! \copydoc NodalConstraintASM2DHelper::constrainEdge
|
//! \copydoc NodalConstraintASM2DHelper::constrainEdge
|
||||||
|
@ -245,10 +245,10 @@ TEST_P(TestSIMNodalConstraint, Edge2DLRmx)
|
|||||||
}
|
}
|
||||||
for (size_t i=1; i <= pch.getNoNodes(2); ++i) {
|
for (size_t i=1; i <= pch.getNoNodes(2); ++i) {
|
||||||
if (std::find(nodes.begin(), nodes.end(), i+ofs) != nodes.end() &&
|
if (std::find(nodes.begin(), nodes.end(), i+ofs) != nodes.end() &&
|
||||||
i != ofs+pch.getCorner(1,-1,2) && GetParam() == 1)
|
i+ofs != pch.getCorner(1,-1,2) && GetParam() == 1)
|
||||||
check_mpc(pch.findMPC(i+ofs, 1), ofs+pch.getCorner(1,-1,2));
|
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)
|
else if (std::find(nodes.begin(), nodes.end(), i+ofs) != nodes.end() && GetParam() == 3)
|
||||||
check_mpc(pch.findMPC(i+ofs, 1), ofs+pch.getCorner(1,1,2));
|
check_mpc(pch.findMPC(i+ofs, 1), pch.getCorner(1,1,2));
|
||||||
else if (std::find(nodes.begin(), nodes.end(), i+ofs) != nodes.end())
|
else if (std::find(nodes.begin(), nodes.end(), i+ofs) != nodes.end())
|
||||||
check_mpc(pch.findMPC(i+ofs, 1), ofs+1);
|
check_mpc(pch.findMPC(i+ofs, 1), ofs+1);
|
||||||
else
|
else
|
||||||
|
@ -719,13 +719,17 @@ int ASMu2D::getCorner(int I, int J, int basis) const
|
|||||||
<<" corners returned from LRSplineSurface::getEdgeFunctions()"
|
<<" corners returned from LRSplineSurface::getEdgeFunctions()"
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
|
|
||||||
return edgeFunctions.front()->getId()+1;
|
size_t ofs = 1;
|
||||||
|
for (int i = 1; i < basis; i++)
|
||||||
|
ofs += this->getNoNodes(i);
|
||||||
|
|
||||||
|
return edgeFunctions.front()->getId()+ofs;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void ASMu2D::constrainCorner (int I, int J, int dof, int code, char)
|
void ASMu2D::constrainCorner (int I, int J, int dof, int code, char basis)
|
||||||
{
|
{
|
||||||
int corner = getCorner(I, J, 1);
|
int corner = getCorner(I, J, basis);
|
||||||
if (corner == 0)
|
if (corner == 0)
|
||||||
return;
|
return;
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user