Commit 08de9147 authored by Dave Moxey's avatar Dave Moxey
Browse files

Fix top vertex check, change double -> NekDouble

parent 34086100
......@@ -397,23 +397,30 @@ namespace Nektar
}
// set up top vertex
if (m_edges[4]->GetVid(0) == m_edges[5]->GetVid(0) ||
m_edges[4]->GetVid(1) == m_edges[5]->GetVid(1))
{
m_verts.push_back(m_edges[4]->GetVertex(0));
}
else if (m_edges[4]->GetVid(1) == m_edges[5]->GetVid(0) ||
m_edges[4]->GetVid(0) == m_edges[5]->GetVid(1))
if (m_edges[4]->GetVid(0) == m_verts[0]->GetVid())
{
m_verts.push_back(m_edges[4]->GetVertex(1));
}
else
{
std::ostringstream errstrm;
errstrm << "Connected edges " << m_edges[4]->GetEid()
<< " and " << m_edges[5]->GetEid()
<< " do not share a common vertex.";
m_verts.push_back(m_edges[4]->GetVertex(0));
}
int check = 0;
for (int i = 5; i < 8; ++i)
{
if( (m_edges[i]->GetVid(0) == m_verts[i-4]->GetVid()
&& m_edges[i]->GetVid(1) == m_verts[4]->GetVid())
||(m_edges[i]->GetVid(1) == m_verts[i-4]->GetVid()
&& m_edges[i]->GetVid(0) == m_verts[4]->GetVid()))
{
check++;
}
}
if (check != 3) {
std::ostringstream errstrm;
errstrm << "Connected edges do not share a vertex. Edges ";
errstrm << m_edges[3]->GetEid() << ", " << m_edges[2]->GetEid();
ASSERTL0(false, errstrm.str());
}
}
......
......@@ -576,7 +576,7 @@ namespace Nektar
for (k = 0; k < Qz; ++k)
{
double sum = 0.0;
NekDouble sum = 0.0;
for (j = 0; j < Qy; ++j)
{
sum += by[j + Qy*q]*f[j+Qy*k];
......@@ -587,7 +587,7 @@ namespace Nektar
for (it_r = it_q->second.begin(); it_r != it_q->second.end(); ++it_r)
{
const int rpqr = it_r->second.second;
double sum = 0.0;
NekDouble sum = 0.0;
for (k = 0; k < Qz; ++k)
{
sum += bz[k + Qz*rpqr]*fb[k];
......@@ -1200,7 +1200,7 @@ namespace Nektar
default:
ASSERTL0(false, "Face to element map unavailable.");
}
if (fid > 0)
{
// Triangles only have one possible orientation (base
......
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