mirror of
https://github.com/NGSolve/netgen.git
synced 2024-12-26 05:50:32 +05:00
second order segments available for Python
This commit is contained in:
parent
792ff477be
commit
f2f3e92125
@ -238,12 +238,19 @@ void WriteNeutralFormat (const Mesh & mesh,
|
||||
if (mesh.GetDimension() == 2)
|
||||
{
|
||||
outfile << nseg << "\n";
|
||||
for (i = 1; i <= nseg; i++)
|
||||
for (int i = 1; i <= nseg; i++)
|
||||
{
|
||||
const Segment & seg = mesh.LineSegment(i);
|
||||
outfile.width(4);
|
||||
outfile << seg.si << " ";
|
||||
|
||||
for (int j = 0; j < seg.GetNP(); j++)
|
||||
{
|
||||
outfile << " ";
|
||||
outfile.width(8);
|
||||
outfile << seg[j];
|
||||
}
|
||||
/*
|
||||
outfile << " ";
|
||||
outfile.width(8);
|
||||
outfile << seg[0];
|
||||
@ -255,6 +262,7 @@ void WriteNeutralFormat (const Mesh & mesh,
|
||||
outfile.width(8);
|
||||
outfile << seg[2];
|
||||
}
|
||||
*/
|
||||
outfile << "\n";
|
||||
}
|
||||
}
|
||||
|
@ -284,6 +284,14 @@ DLL_HEADER void ExportNetgenMeshing(py::module &m)
|
||||
li.append(py::cast(self[i]));
|
||||
return li;
|
||||
}))
|
||||
.def_property_readonly("points",
|
||||
FunctionPointer ([](const Element2d & self) -> py::list
|
||||
{
|
||||
py::list li;
|
||||
for (int i = 0; i < self.GetNP(); i++)
|
||||
li.append (py::cast(self[i]));
|
||||
return li;
|
||||
}))
|
||||
;
|
||||
|
||||
py::class_<Segment>(m, "Element1D")
|
||||
@ -316,6 +324,14 @@ DLL_HEADER void ExportNetgenMeshing(py::module &m)
|
||||
li.append (py::cast(self[i]));
|
||||
return li;
|
||||
}))
|
||||
.def_property_readonly("points",
|
||||
FunctionPointer ([](const Segment & self) -> py::list
|
||||
{
|
||||
py::list li;
|
||||
for (int i = 0; i < self.GetNP(); i++)
|
||||
li.append (py::cast(self[i]));
|
||||
return li;
|
||||
}))
|
||||
.def_property_readonly("surfaces",
|
||||
FunctionPointer ([](const Segment & self) -> py::list
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user