mirror of
https://github.com/NGSolve/netgen.git
synced 2026-05-31 01:06:10 +08:00
hex20 WIP
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user