mirror of
https://github.com/NGSolve/netgen.git
synced 2024-12-24 21:10:33 +05:00
add SetDomainLayer for geom2d
This commit is contained in:
parent
33722fcfd6
commit
aca46c49c8
@ -250,7 +250,17 @@ namespace netgen
|
|||||||
if ( layer.Size() ) return layer[domnr-1];
|
if ( layer.Size() ) return layer[domnr-1];
|
||||||
else return 1;
|
else return 1;
|
||||||
}
|
}
|
||||||
|
void SetDomainLayer (int domnr, int layernr)
|
||||||
|
{
|
||||||
|
auto old_size = layer.Size();
|
||||||
|
if(domnr > old_size)
|
||||||
|
{
|
||||||
|
layer.SetSize(domnr);
|
||||||
|
for(size_t i = old_size; i < domnr; i++)
|
||||||
|
layer[i] = 1;
|
||||||
|
}
|
||||||
|
layer[domnr-1] = layernr;
|
||||||
|
}
|
||||||
|
|
||||||
string GetBCName (int bcnr) const;
|
string GetBCName (int bcnr) const;
|
||||||
void SetBCName (int bcnr, string name);
|
void SetBCName (int bcnr, string name);
|
||||||
|
@ -49,6 +49,7 @@ NGCORE_API_EXPORT void ExportGeom2d(py::module &m)
|
|||||||
}))
|
}))
|
||||||
.def(NGSPickle<SplineGeometry2d>())
|
.def(NGSPickle<SplineGeometry2d>())
|
||||||
.def("Load",&SplineGeometry2d::Load)
|
.def("Load",&SplineGeometry2d::Load)
|
||||||
|
.def("SetDomainLayer", &SplineGeometry2d::SetDomainLayer)
|
||||||
.def("AppendPoint", FunctionPointer
|
.def("AppendPoint", FunctionPointer
|
||||||
([](SplineGeometry2d &self, double px, double py, double maxh, double hpref, string name)
|
([](SplineGeometry2d &self, double px, double py, double maxh, double hpref, string name)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user