mirror of
https://github.com/NGSolve/netgen.git
synced 2024-11-11 16:49:16 +05:00
fix IdentifyPeriodic points in mesh in 2d mesh
This commit is contained in:
parent
7f666547c9
commit
d72801d19a
@ -6838,11 +6838,12 @@ namespace netgen
|
||||
continue;
|
||||
auto pt = (*this)[pi];
|
||||
auto mapped_pt = mapping(pt);
|
||||
auto other_nr = GetElementOfPoint(mapped_pt, lami, true);
|
||||
// auto other_nr = GetElementOfPoint(mapped_pt, lami, true);
|
||||
auto other_nr = GetSurfaceElementOfPoint(mapped_pt, lami);
|
||||
int index = -1;
|
||||
if(other_nr != 0)
|
||||
{
|
||||
auto other_el = VolumeElement(other_nr);
|
||||
auto other_el = SurfaceElement(other_nr);
|
||||
for(auto i : Range(other_el.PNums().Size()))
|
||||
if((mapped_pt - (*this)[other_el.PNums()[i]]).Length() < pointTolerance)
|
||||
{
|
||||
|
@ -203,6 +203,15 @@ DLL_HEADER void ExportNetgenMeshing(py::module &m)
|
||||
.def("__mul__", [](Transformation<3> a, Transformation<3> b)->Transformation<3>
|
||||
{ Transformation<3> res; res.Combine(a,b); return res; })
|
||||
.def("__call__", [] (Transformation<3> trafo, Point<3> p) { return trafo(p); })
|
||||
.def_property("mat", &Transformation<3>::GetMatrix,
|
||||
[](Transformation<3>& self, py::array_t<double> np_mat)
|
||||
{
|
||||
if(np_mat.size() != 9)
|
||||
throw Exception("Invalid dimension of input array!");
|
||||
for(int i = 0; i < 3; i++)
|
||||
for(int j = 0; j < 3; j++)
|
||||
self.GetMatrix()(i,j) = np_mat.at(i*3+j);
|
||||
})
|
||||
;
|
||||
|
||||
m.def ("GetTransformation", [] () { return global_trafo; });
|
||||
|
Loading…
Reference in New Issue
Block a user