mirror of
https://github.com/NGSolve/netgen.git
synced 2024-11-11 16:49:16 +05:00
Implement and export SplineGeometry2d::SetDomainTensorMeshing
This commit is contained in:
parent
efbd71c8d5
commit
5bea3bb612
@ -133,7 +133,7 @@ namespace netgen
|
||||
NgArray<char*> materials;
|
||||
NgArray<double> maxh;
|
||||
NgArray<bool> quadmeshing;
|
||||
NgArray<bool> tensormeshing;
|
||||
Array<bool> tensormeshing;
|
||||
NgArray<int> layer;
|
||||
NgArray<string*> bcnames;
|
||||
double elto0 = 1.0;
|
||||
@ -216,9 +216,20 @@ namespace netgen
|
||||
}
|
||||
bool GetDomainTensorMeshing ( int domnr )
|
||||
{
|
||||
if ( tensormeshing.Size() ) return tensormeshing[domnr-1];
|
||||
if ( tensormeshing.Size()>=domnr ) return tensormeshing[domnr-1];
|
||||
else return false;
|
||||
}
|
||||
void SetDomainTensorMeshing ( int domnr, bool tm )
|
||||
{
|
||||
if ( tensormeshing.Size()<domnr )
|
||||
{
|
||||
auto oldsize = tensormeshing.Size();
|
||||
tensormeshing.SetSize(domnr);
|
||||
for(auto i : IntRange(oldsize, domnr-1))
|
||||
tensormeshing[i] = false;
|
||||
}
|
||||
tensormeshing[domnr-1] = tm;
|
||||
}
|
||||
int GetDomainLayer ( int domnr )
|
||||
{
|
||||
if ( layer.Size() ) return layer[domnr-1];
|
||||
|
@ -392,6 +392,7 @@ DLL_HEADER void ExportGeom2d(py::module &m)
|
||||
}, py::arg("mp") = nullptr,
|
||||
py::call_guard<py::gil_scoped_release>(),
|
||||
meshingparameter_description.c_str())
|
||||
.def("_SetDomainTensorMeshing", &SplineGeometry2d::SetDomainTensorMeshing)
|
||||
;
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user