mirror of
https://github.com/NGSolve/netgen.git
synced 2025-04-12 16:17:29 +05:00
fix create vol-element (thx Astrid)
This commit is contained in:
parent
ee4d5e89d8
commit
5b3eb4077a
@ -128,21 +128,22 @@ DLL_HEADER void ExportNetgenMeshing(py::module &m)
|
|||||||
(*instance)[i] = py::extract<PointIndex>(vertices[i])();
|
(*instance)[i] = py::extract<PointIndex>(vertices[i])();
|
||||||
instance->SetIndex(index);
|
instance->SetIndex(index);
|
||||||
}
|
}
|
||||||
if (py::len(vertices) == 6)
|
else if (py::len(vertices) == 6)
|
||||||
{
|
{
|
||||||
new (instance) Element(PRISM);
|
new (instance) Element(PRISM);
|
||||||
for (int i = 0; i < 6; i++)
|
for (int i = 0; i < 6; i++)
|
||||||
(*instance)[i] = py::extract<PointIndex>(vertices[i])();
|
(*instance)[i] = py::extract<PointIndex>(vertices[i])();
|
||||||
instance->SetIndex(index);
|
instance->SetIndex(index);
|
||||||
}
|
}
|
||||||
if (py::len(vertices) == 8)
|
else if (py::len(vertices) == 8)
|
||||||
{
|
{
|
||||||
new (instance) Element(HEX);
|
new (instance) Element(HEX);
|
||||||
for (int i = 0; i < 8; i++)
|
for (int i = 0; i < 8; i++)
|
||||||
(*instance)[i] = py::extract<PointIndex>(vertices[i])();
|
(*instance)[i] = py::extract<PointIndex>(vertices[i])();
|
||||||
instance->SetIndex(index);
|
instance->SetIndex(index);
|
||||||
}
|
}
|
||||||
throw NgException ("cannot create element");
|
else
|
||||||
|
throw NgException ("cannot create element");
|
||||||
},
|
},
|
||||||
py::arg("index")=1,py::arg("vertices"),
|
py::arg("index")=1,py::arg("vertices"),
|
||||||
"create volume element"
|
"create volume element"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user