mirror of
https://github.com/NGSolve/netgen.git
synced 2025-01-13 14:40:35 +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)
|
if (mesh.GetDimension() == 2)
|
||||||
{
|
{
|
||||||
outfile << nseg << "\n";
|
outfile << nseg << "\n";
|
||||||
for (i = 1; i <= nseg; i++)
|
for (int i = 1; i <= nseg; i++)
|
||||||
{
|
{
|
||||||
const Segment & seg = mesh.LineSegment(i);
|
const Segment & seg = mesh.LineSegment(i);
|
||||||
outfile.width(4);
|
outfile.width(4);
|
||||||
outfile << seg.si << " ";
|
outfile << seg.si << " ";
|
||||||
|
|
||||||
|
for (int j = 0; j < seg.GetNP(); j++)
|
||||||
|
{
|
||||||
|
outfile << " ";
|
||||||
|
outfile.width(8);
|
||||||
|
outfile << seg[j];
|
||||||
|
}
|
||||||
|
/*
|
||||||
outfile << " ";
|
outfile << " ";
|
||||||
outfile.width(8);
|
outfile.width(8);
|
||||||
outfile << seg[0];
|
outfile << seg[0];
|
||||||
@ -255,6 +262,7 @@ void WriteNeutralFormat (const Mesh & mesh,
|
|||||||
outfile.width(8);
|
outfile.width(8);
|
||||||
outfile << seg[2];
|
outfile << seg[2];
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
outfile << "\n";
|
outfile << "\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -284,6 +284,14 @@ DLL_HEADER void ExportNetgenMeshing(py::module &m)
|
|||||||
li.append(py::cast(self[i]));
|
li.append(py::cast(self[i]));
|
||||||
return li;
|
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")
|
py::class_<Segment>(m, "Element1D")
|
||||||
@ -316,6 +324,14 @@ DLL_HEADER void ExportNetgenMeshing(py::module &m)
|
|||||||
li.append (py::cast(self[i]));
|
li.append (py::cast(self[i]));
|
||||||
return li;
|
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",
|
.def_property_readonly("surfaces",
|
||||||
FunctionPointer ([](const Segment & self) -> py::list
|
FunctionPointer ([](const Segment & self) -> py::list
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user