hex20 WIP

This commit is contained in:
Joachim Schöberl
2019-01-17 22:08:35 +01:00
parent c0d0a3a1ab
commit 66ac2f1a4f
5 changed files with 33 additions and 8 deletions

View File

@@ -263,6 +263,13 @@ DLL_HEADER void ExportNetgenMeshing(py::module &m)
(*newel)[i] = py::extract<PointIndex>(vertices[i])();
newel->SetIndex(index);
}
else if (py::len(vertices) == 20)
{
newel = new Element(HEX20);
for (int i = 0; i < 20; i++)
(*newel)[i] = py::extract<PointIndex>(vertices[i])();
newel->SetIndex(index);
}
else
throw NgException ("cannot create element");
return newel;
@@ -316,6 +323,13 @@ DLL_HEADER void ExportNetgenMeshing(py::module &m)
(*newel)[i] = py::extract<PointIndex>(vertices[i])();
newel->SetIndex(index);
}
else if (py::len(vertices) == 8)
{
newel = new Element2d(QUAD8);
for(int i = 0; i<8; i++)
(*newel)[i] = py::extract<PointIndex>(vertices[i])();
newel->SetIndex(index);
}
else
throw NgException("Inconsistent number of vertices in Element2D");
return newel;