Python export of second order trigs

This commit is contained in:
Christopher Lackner 2018-01-23 16:45:20 +01:00
parent 02dbd45759
commit 301ba176e5

View File

@ -270,15 +270,25 @@ DLL_HEADER void ExportNetgenMeshing(py::module &m)
for (int i = 0; i < 3; i++)
(*instance)[i] = py::extract<PointIndex>(vertices[i])();
instance->SetIndex(index);
return;
}
else
if (py::len(vertices) == 4)
{
new (instance) Element2d(QUAD);
for (int i = 0; i < 4; i++)
(*instance)[i] = py::extract<PointIndex>(vertices[i])();
instance->SetIndex(index);
return;
}
if (py::len(vertices) == 6)
{
new (instance) Element2d(TRIG6);
for(int i = 0; i<6; i++)
(*instance)[i] = py::extract<PointIndex>(vertices[i])();
instance->SetIndex(index);
return;
}
throw NgException("Inconsistent number of vertices in Element2D");
},
py::arg("index")=1,py::arg("vertices"),
"create surface element"