mirror of
https://github.com/NGSolve/netgen.git
synced 2024-12-25 05:20:34 +05:00
2d hprefinement
This commit is contained in:
parent
1a6ace7138
commit
f3a1325ca8
@ -36,18 +36,19 @@ DLL_HEADER void ExportGeom2d()
|
|||||||
|
|
||||||
.def("Load",&SplineGeometry2d::Load)
|
.def("Load",&SplineGeometry2d::Load)
|
||||||
.def("AppendPoint", FunctionPointer
|
.def("AppendPoint", FunctionPointer
|
||||||
([](SplineGeometry2d &self, double px, double py, double maxh)
|
([](SplineGeometry2d &self, double px, double py, double maxh, bool hpref)
|
||||||
{
|
{
|
||||||
Point<2> p;
|
Point<2> p;
|
||||||
p(0) = px;
|
p(0) = px;
|
||||||
p(1) = py;
|
p(1) = py;
|
||||||
GeomPoint<2> gp(p);
|
GeomPoint<2> gp(p);
|
||||||
gp.hmax = maxh;
|
gp.hmax = maxh;
|
||||||
|
gp.hpref = hpref;
|
||||||
self.geompoints.Append(gp);
|
self.geompoints.Append(gp);
|
||||||
return self.geompoints.Size()-1;
|
return self.geompoints.Size()-1;
|
||||||
}),
|
}),
|
||||||
(bp::arg("self"), bp::arg("x"), bp::arg("y"), bp::arg("maxh") = 1e99))
|
(bp::arg("self"), bp::arg("x"), bp::arg("y"), bp::arg("maxh") = 1e99, bp::arg("hpref")=false))
|
||||||
.def("Append", FunctionPointer([](SplineGeometry2d &self, bp::list segment, int leftdomain, int rightdomain, bp::object bc, double maxh)
|
.def("Append", FunctionPointer([](SplineGeometry2d &self, bp::list segment, int leftdomain, int rightdomain, bp::object bc, double maxh, bool hpref)
|
||||||
{
|
{
|
||||||
bp::extract<std::string> segtype(segment[0]);
|
bp::extract<std::string> segtype(segment[0]);
|
||||||
|
|
||||||
@ -77,6 +78,8 @@ DLL_HEADER void ExportGeom2d()
|
|||||||
seg->leftdom = leftdomain;
|
seg->leftdom = leftdomain;
|
||||||
seg->rightdom = rightdomain;
|
seg->rightdom = rightdomain;
|
||||||
seg->hmax = maxh;
|
seg->hmax = maxh;
|
||||||
|
seg->hpref_left = hpref;
|
||||||
|
seg->hpref_right = hpref;
|
||||||
seg->reffak = 1;
|
seg->reffak = 1;
|
||||||
seg->copyfrom = -1;
|
seg->copyfrom = -1;
|
||||||
if (bp::extract<int>(bc).check())
|
if (bp::extract<int>(bc).check())
|
||||||
@ -93,7 +96,7 @@ DLL_HEADER void ExportGeom2d()
|
|||||||
seg->bc = self.GetNSplines()+1;
|
seg->bc = self.GetNSplines()+1;
|
||||||
self.AppendSegment(seg);
|
self.AppendSegment(seg);
|
||||||
}), (bp::arg("self"), bp::arg("point_indices"), bp::arg("leftdomain") = 1, bp::arg("rightdomain") = 0,
|
}), (bp::arg("self"), bp::arg("point_indices"), bp::arg("leftdomain") = 1, bp::arg("rightdomain") = 0,
|
||||||
bp::arg("bc")=bp::object(), bp::arg("maxh")=1e99
|
bp::arg("bc")=bp::object(), bp::arg("maxh")=1e99, bp::arg("hpref")=false
|
||||||
))
|
))
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user