From bcc9f43f76d97d9a5af28ec658601e158839d787 Mon Sep 17 00:00:00 2001 From: Joachim Schoeberl Date: Sun, 22 Dec 2024 21:38:50 +0100 Subject: [PATCH] idmap using PointIndex --- libsrc/csg/identify.cpp | 22 +++++---- libsrc/csg/identify.hpp | 6 +-- libsrc/interface/nginterface.cpp | 4 +- libsrc/interface/nginterface_v2.cpp | 8 ++-- libsrc/interface/writejcm.cpp | 69 ++++++++++++++++------------- libsrc/interface/writetet.cpp | 4 +- libsrc/meshing/bisect.cpp | 25 ++++++----- libsrc/meshing/improve3.cpp | 8 ++-- libsrc/meshing/improve3.hpp | 2 +- libsrc/meshing/meshclass.hpp | 2 +- libsrc/meshing/meshfunc.cpp | 2 +- libsrc/meshing/meshtype.cpp | 7 ++- libsrc/meshing/meshtype.hpp | 7 +-- libsrc/meshing/refine.cpp | 8 ++-- libsrc/meshing/secondorder.cpp | 8 ++-- libsrc/meshing/smoothing3.cpp | 8 ++-- libsrc/meshing/validate.cpp | 2 +- libsrc/meshing/validate.hpp | 2 +- 18 files changed, 106 insertions(+), 88 deletions(-) diff --git a/libsrc/csg/identify.cpp b/libsrc/csg/identify.cpp index 41f03eff..8878c695 100644 --- a/libsrc/csg/identify.cpp +++ b/libsrc/csg/identify.cpp @@ -65,10 +65,10 @@ ShortEdge (const SpecialPoint & sp1, const SpecialPoint & sp2) const return 0; } -int Identification :: GetIdentifiedPoint (class Mesh & mesh, int pi) +PointIndex Identification :: GetIdentifiedPoint (class Mesh & mesh, PointIndex pi) { cout << "Identification::GetIdentifiedPoint called for base-class" << endl; - return -1; + return PointIndex::INVALID; } void Identification :: IdentifyPoints (Mesh & mesh) @@ -261,8 +261,8 @@ Identifiable (const Point<3> & p1, const Point<3> & p2) const -int PeriodicIdentification :: -GetIdentifiedPoint (class Mesh & mesh, int pi) +PointIndex PeriodicIdentification :: +GetIdentifiedPoint (class Mesh & mesh, PointIndex pi) { const Surface *snew; const Point<3> & p = mesh.Point (pi); @@ -885,17 +885,21 @@ ShortEdge (const SpecialPoint & sp1, const SpecialPoint & sp2) const -int CloseSurfaceIdentification :: -GetIdentifiedPoint (class Mesh & mesh, int pi) +PointIndex CloseSurfaceIdentification :: +GetIdentifiedPoint (class Mesh & mesh, PointIndex pi) { const Surface *snew; const Point<3> & p = mesh.Point (pi); - NgArray identmap(mesh.GetNP()); + idmap_type identmap(mesh.GetNP()); mesh.GetIdentifications().GetMap (nr, identmap); + /* if (identmap.Get(pi)) return identmap.Get(pi); - + */ + if (identmap[pi].IsValid()) + return identmap[pi]; + if (s1->PointOnSurface (p)) snew = s2; @@ -1229,7 +1233,7 @@ BuildSurfaceElements (NgArray & segs, bool found = 0; int cntquads = 0; - NgArray identmap; + idmap_type identmap; identmap = 0; mesh.GetIdentifications().GetMap (nr, identmap); diff --git a/libsrc/csg/identify.hpp b/libsrc/csg/identify.hpp index 90e5f4b0..c8570238 100644 --- a/libsrc/csg/identify.hpp +++ b/libsrc/csg/identify.hpp @@ -56,7 +56,7 @@ namespace netgen virtual void IdentifyFaces (class Mesh & mesh); /// get point on other surface, add entry in mesh identifications - virtual int GetIdentifiedPoint (class Mesh & mesh, int pi1); + virtual PointIndex GetIdentifiedPoint (class Mesh & mesh, PointIndex pi1); /// copy surfaces, or fill rectangles virtual void BuildSurfaceElements (NgArray & segs, @@ -97,7 +97,7 @@ namespace netgen const TABLE & specpoint2surface) const override; virtual int Identifiable (const Point<3> & p1, const Point<3> & sp2) const override; - virtual int GetIdentifiedPoint (class Mesh & mesh, int pi1) override; + virtual PointIndex GetIdentifiedPoint (class Mesh & mesh, PointIndex pi1) override; virtual void IdentifyPoints (class Mesh & mesh) override; virtual void IdentifyFaces (class Mesh & mesh) override; virtual void BuildSurfaceElements (NgArray & segs, @@ -153,7 +153,7 @@ namespace netgen virtual int Identifiable (const Point<3> & p1, const Point<3> & sp2) const; virtual int IdentifiableCandidate (const SpecialPoint & sp1) const; virtual int ShortEdge (const SpecialPoint & sp1, const SpecialPoint & sp2) const; - virtual int GetIdentifiedPoint (class Mesh & mesh, int pi1); + virtual PointIndex GetIdentifiedPoint (class Mesh & mesh, PointIndex pi1); const Array & GetSlices () const { return slices; } virtual void IdentifyPoints (class Mesh & mesh); virtual void IdentifyFaces (class Mesh & mesh); diff --git a/libsrc/interface/nginterface.cpp b/libsrc/interface/nginterface.cpp index 1c79ff78..083418df 100644 --- a/libsrc/interface/nginterface.cpp +++ b/libsrc/interface/nginterface.cpp @@ -1827,7 +1827,7 @@ void Ng_GetPeriodicVertices (int idnr, int * pairs) int Ng_GetNPeriodicEdges (int idnr) { - NgArray map; + idmap_type map; //const MeshTopology & top = mesh->GetTopology(); int nse = mesh->GetNSeg(); @@ -1854,7 +1854,7 @@ int Ng_GetNPeriodicEdges (int idnr) void Ng_GetPeriodicEdges (int idnr, int * pairs) { - NgArray map; + idmap_type map; const MeshTopology & top = mesh->GetTopology(); int nse = mesh->GetNSeg(); diff --git a/libsrc/interface/nginterface_v2.cpp b/libsrc/interface/nginterface_v2.cpp index 9233c5a7..f26971c5 100644 --- a/libsrc/interface/nginterface_v2.cpp +++ b/libsrc/interface/nginterface_v2.cpp @@ -1361,7 +1361,7 @@ size_t Ngx_Mesh :: GetGlobalVertexNum (int locnum) const FlatArray Ngx_Mesh :: GetDistantProcs (int nodetype, int locnum) const { -#ifdef PARALLEL + // #ifdef PARALLEL if (mesh->GetCommunicator().Size() == 1) return FlatArray(0,nullptr); @@ -1379,9 +1379,9 @@ FlatArray Ngx_Mesh :: GetDistantProcs (int nodetype, int locnum) const default: return FlatArray(0, nullptr); } -#else - return FlatArray(0,nullptr); -#endif + // #else + // return FlatArray(0,nullptr); + // #endif } } diff --git a/libsrc/interface/writejcm.cpp b/libsrc/interface/writejcm.cpp index 0c33263b..1c21f322 100644 --- a/libsrc/interface/writejcm.cpp +++ b/libsrc/interface/writejcm.cpp @@ -33,7 +33,7 @@ void WriteJCMFormat (const Mesh & mesh, int np = mesh.GetNP(); // Identic points - NgArray identmap1, identmap2, identmap3; + idmap_type identmap1, identmap2, identmap3; mesh.GetIdentifications().GetMap(1, identmap1); mesh.GetIdentifications().GetMap(2, identmap2); mesh.GetIdentifications().GetMap(3, identmap3); @@ -52,19 +52,21 @@ void WriteJCMFormat (const Mesh & mesh, for (j = 1; j <= 4; j++) for (jj = 1; jj <=4; jj++) { - if (identmap1.Elem(el.PNum(j)) == el.PNum(jj)) + // if (identmap1.Elem(el.PNum(j)) == el.PNum(jj)) + if (identmap1[el.PNum(j)] == el.PNum(jj)) { cout << "\n Error: two points on a tetrahedron identified (1) with each other" << "\n REFINE MESH !" << endl; return; } - if (identmap2.Elem(el.PNum(j)) == el.PNum(jj)) + // if (identmap2.Elem(el.PNum(j)) == el.PNum(jj)) + if (identmap2[el.PNum(j)] == el.PNum(jj)) { cout << "\n Error: two points on a tetrahedron identified (2) with each other" << "\n REFINE MESH !" << endl; return; } - if (identmap3.Elem(el.PNum(j)) == el.PNum(jj)) + if (identmap3[el.PNum(j)] == el.PNum(jj)) { cout << "\n Error: two points on a tetrahedron identified (3) with each other" << "\n REFINE MESH !" << endl; @@ -271,6 +273,7 @@ void WriteJCMFormat (const Mesh & mesh, int npid1 = 0; int npid2 = 0; int npid3 = 0; + /* for (i=1; i<=np; i++) { if (identmap1.Elem(i)) @@ -280,6 +283,10 @@ void WriteJCMFormat (const Mesh & mesh, if (identmap3.Elem(i)) npid3++; } + */ + for (auto pi : identmap1) if (pi.IsValid()) npid1++; + for (auto pi : identmap2) if (pi.IsValid()) npid1++; + for (auto pi : identmap3) if (pi.IsValid()) npid1++; outfile << "\n"; outfile << "# Boundary triangles\n"; @@ -302,31 +309,31 @@ void WriteJCMFormat (const Mesh & mesh, outfile << mesh.GetFaceDescriptor (el.GetIndex()).BCProperty() << "\n"; if (mesh.GetFaceDescriptor (el.GetIndex()).BCProperty() == bc_at_infinity) outfile << "-2\n\n"; - else if (identmap1.Elem(el.PNum(1)) - &&identmap1.Elem(el.PNum(2)) - &&identmap1.Elem(el.PNum(3))) + else if (identmap1[el.PNum(1)].IsValid() + &&identmap1[el.PNum(2)].IsValid() + &&identmap1[el.PNum(3)].IsValid()) { outfile << "-1\n"; for (j = 1; j <= 3; j++) - outfile << identmap1.Elem(el.PNum(j))<<"\n"; + outfile << identmap1[el.PNum(j)]<<"\n"; outfile << "\n"; } - else if (identmap2.Elem(el.PNum(1)) - &&identmap2.Elem(el.PNum(2)) - &&identmap2.Elem(el.PNum(3))) + else if (identmap2[el.PNum(1)].IsValid() + &&identmap2[el.PNum(2)].IsValid() + &&identmap2[el.PNum(3)].IsValid()) { outfile << "-1\n"; for (j = 1; j <= 3; j++) - outfile << identmap2.Elem(el.PNum(j))<<"\n"; + outfile << identmap2[el.PNum(j)]<<"\n"; outfile << "\n"; } - else if (identmap3.Elem(el.PNum(1)) - &&identmap3.Elem(el.PNum(2)) - &&identmap3.Elem(el.PNum(3))) + else if (identmap3[el.PNum(1)].IsValid() + &&identmap3[el.PNum(2)].IsValid() + &&identmap3[el.PNum(3)].IsValid()) { outfile << "-1\n"; for (j = 1; j <= 3; j++) - outfile << identmap3.Elem(el.PNum(j))<<"\n"; + outfile << identmap3[el.PNum(j)]<<"\n"; outfile << "\n"; } else @@ -373,10 +380,10 @@ void WriteJCMFormat (const Mesh & mesh, outfile << "-2\n\n"; cout << "\nWarning: Quadrilateral at infinity found (this should not occur)!"<= 5 ) jj = jj - 4; - outfile << identmap1.Elem(el.PNum(jj))<<"\n"; + outfile << identmap1[el.PNum(jj)]<<"\n"; } outfile << "\n"; } - else if ( identmap2.Elem(el.PNum(1)) && - identmap2.Elem(el.PNum(2)) && - identmap2.Elem(el.PNum(3)) && - identmap2.Elem(el.PNum(4)) ) + else if ( identmap2[el.PNum(1)].IsValid() && + identmap2[el.PNum(2)].IsValid() && + identmap2[el.PNum(3)].IsValid() && + identmap2[el.PNum(4)].IsValid() ) { outfile << "-1\n"; for (j = 1; j <= 4; j++) @@ -399,14 +406,14 @@ void WriteJCMFormat (const Mesh & mesh, jj = j + ct; if ( jj >= 5 ) jj = jj - 4; - outfile << identmap2.Elem(el.PNum(jj))<<"\n"; + outfile << identmap2[el.PNum(jj)] <<"\n"; } outfile << "\n"; } - else if ( identmap3.Elem(el.PNum(1)) && - identmap3.Elem(el.PNum(2)) && - identmap3.Elem(el.PNum(3)) && - identmap3.Elem(el.PNum(4)) ) + else if ( identmap3[el.PNum(1)].IsValid() && + identmap3[el.PNum(2)].IsValid() && + identmap3[el.PNum(3)].IsValid() && + identmap3[el.PNum(4)].IsValid() ) { outfile << "-1\n"; for (j = 1; j <= 4; j++) @@ -414,7 +421,7 @@ void WriteJCMFormat (const Mesh & mesh, jj = j + ct; if ( jj >= 5 ) jj = jj - 4; - outfile << identmap3.Elem(el.PNum(jj))<<"\n"; + outfile << identmap3[el.PNum(jj)]<<"\n"; } outfile << "\n"; } diff --git a/libsrc/interface/writetet.cpp b/libsrc/interface/writetet.cpp index 89e9f278..912a3fa4 100644 --- a/libsrc/interface/writetet.cpp +++ b/libsrc/interface/writetet.cpp @@ -366,12 +366,12 @@ namespace netgen uidpid = "UID"; - NgArray< NgArray* > idmaps; + NgArray< idmap_type* > idmaps; for(int i=1; i<=mesh.GetIdentifications().GetMaxNr(); i++) { if(mesh.GetIdentifications().GetType(i) == Identifications::PERIODIC) { - idmaps.Append(new NgArray); + idmaps.Append(new idmap_type); mesh.GetIdentifications().GetMap(i,*idmaps.Last(),true); } } diff --git a/libsrc/meshing/bisect.cpp b/libsrc/meshing/bisect.cpp index 30761a2c..b0347e23 100644 --- a/libsrc/meshing/bisect.cpp +++ b/libsrc/meshing/bisect.cpp @@ -296,7 +296,7 @@ namespace netgen int BTSortEdges (const Mesh & mesh, - const NgArray< NgArray* > & idmaps, + const NgArray & idmaps, INDEX_2_CLOSED_HASHTABLE & edgenumber) { PrintMessage(4,"sorting ... "); @@ -981,7 +981,7 @@ namespace netgen bool BTDefineMarkedId(const Element2d & el, INDEX_2_CLOSED_HASHTABLE & edgenumber, - const NgArray & idmap, + const idmap_type & idmap, MarkedIdentification & mi) { @@ -1983,7 +1983,7 @@ namespace netgen void BisectTetsCopyMesh (Mesh & mesh, const NetgenGeometry *, BisectionOptions & opt, - const NgArray< NgArray* > & idmaps, + const NgArray & idmaps, const string & refinfofile) { auto& mtets = *mesh.bisectioninfo.mtets; @@ -2192,7 +2192,7 @@ namespace netgen auto seg = mesh[j]; for (auto map : idmaps) { - if (seg[0].IsValid() && seg[1].IsValid() && (*map)[seg[0]] && (*map)[seg[1]]) + if (seg[0].IsValid() && seg[1].IsValid() && (*map)[seg[0]].IsValid() && (*map)[seg[1]].IsValid()) { MarkedIdentification mi; mi.np = 2; @@ -2491,7 +2491,7 @@ namespace netgen void UpdateEdgeMarks (Mesh & mesh, - const NgArray< NgArray* > & idmaps) + const NgArray< idmap_type* > & idmaps) //const NgArray < NgArray* > & elements_before, //const NgArray < NgArray* > & markedelts_num, // const NgArray < NgArray* > & surfelements_before, @@ -2769,12 +2769,12 @@ namespace netgen LocalizeEdgePoints(mesh); delete loct; - NgArray< NgArray* > idmaps; + NgArray< idmap_type* > idmaps; for(int i=1; i<=mesh.GetIdentifications().GetMaxNr(); i++) { if(mesh.GetIdentifications().GetType(i) == Identifications::PERIODIC) { - idmaps.Append(new NgArray); + idmaps.Append(new idmap_type); mesh.GetIdentifications().GetMap(i,*idmaps.Last(),true); } } @@ -2873,7 +2873,8 @@ namespace netgen #ifndef SABINE //Nachbarelemente mit ordx,ordy,ordz - NgArray v_order (mesh.GetNP()); + // NgArray v_order (mesh.GetNP()); + Array v_order (mesh.GetNP()); v_order = 0; // for (ElementIndex ei = 0; ei < ne; ei++) @@ -3978,7 +3979,7 @@ namespace netgen // update identification tables for (int i = 1; i <= mesh.GetIdentifications().GetMaxNr(); i++) { - NgArray identmap; + idmap_type identmap; mesh.GetIdentifications().GetMap (i, identmap); @@ -4004,11 +4005,11 @@ namespace netgen for (int j = 0; j < cutedges.Size(); j++) if (cutedges.UsedPos0(j)) { - INDEX_2 i2; + PointIndices<2> i2; PointIndex newpi; cutedges.GetData0 (j, i2, newpi); - INDEX_2 oi2(identmap.Get(i2.I1()), - identmap.Get(i2.I2())); + PointIndices<2> oi2(identmap[i2[0]], + identmap[i2[1]]); oi2.Sort(); if (cutedges.Used (oi2)) { diff --git a/libsrc/meshing/improve3.cpp b/libsrc/meshing/improve3.cpp index 10175c91..53a409c9 100644 --- a/libsrc/meshing/improve3.cpp +++ b/libsrc/meshing/improve3.cpp @@ -1467,10 +1467,10 @@ void MeshOptimize3d :: SwapImprove (const NgBitArray * working_elements) void MeshOptimize3d :: SwapImproveSurface ( const NgBitArray * working_elements, - const NgArray< NgArray* > * idmaps) + const NgArray< idmap_type* > * idmaps) { - NgArray< NgArray* > locidmaps; - const NgArray< NgArray* > * used_idmaps; + NgArray< idmap_type* > locidmaps; + const NgArray< idmap_type* > * used_idmaps; if(idmaps) used_idmaps = idmaps; @@ -1482,7 +1482,7 @@ void MeshOptimize3d :: SwapImproveSurface ( { if(mesh.GetIdentifications().GetType(i) == Identifications::PERIODIC) { - locidmaps.Append(new NgArray); + locidmaps.Append(new idmap_type); mesh.GetIdentifications().GetMap(i,*locidmaps.Last(),true); } } diff --git a/libsrc/meshing/improve3.hpp b/libsrc/meshing/improve3.hpp index ceca4c26..1123a99d 100644 --- a/libsrc/meshing/improve3.hpp +++ b/libsrc/meshing/improve3.hpp @@ -44,7 +44,7 @@ public: double SwapImproveEdge (const NgBitArray * working_elements, Table & elementsonnode, INDEX_3_HASHTABLE & faces, PointIndex pi1, PointIndex pi2, bool check_only=false); void SwapImprove (const NgBitArray * working_elements = NULL); void SwapImproveSurface (const NgBitArray * working_elements = NULL, - const NgArray< NgArray* > * idmaps = NULL); + const NgArray< idmap_type* > * idmaps = NULL); void SwapImprove2 (); double SwapImprove2 (ElementIndex eli1, int face, Table & elementsonnode, TABLE & belementsonnode, bool check_only=false ); diff --git a/libsrc/meshing/meshclass.hpp b/libsrc/meshing/meshclass.hpp index 31d0fb01..26d71127 100644 --- a/libsrc/meshing/meshclass.hpp +++ b/libsrc/meshing/meshclass.hpp @@ -612,7 +612,7 @@ namespace netgen const NgBitArray & usepoint, const NgArray< Vec<3>* > & nv, OPTIMIZEGOAL goal = OPT_QUALITY, - const NgArray< NgArray* > * idmaps = NULL); + const NgArray< idmap_type* > * idmaps = NULL); /** free nodes in environment of openelements for optimiztion diff --git a/libsrc/meshing/meshfunc.cpp b/libsrc/meshing/meshfunc.cpp index 9a1cf028..a23fd670 100644 --- a/libsrc/meshing/meshfunc.cpp +++ b/libsrc/meshing/meshfunc.cpp @@ -210,7 +210,7 @@ namespace netgen if(!have_closesurfaces) return; - NgArray map; + idmap_type map; std::set> hex_faces; for(auto identnr : Range(1,nmax+1)) { diff --git a/libsrc/meshing/meshtype.cpp b/libsrc/meshing/meshtype.cpp index 5dfebfc7..2584bd10 100644 --- a/libsrc/meshing/meshtype.cpp +++ b/libsrc/meshing/meshtype.cpp @@ -2785,7 +2785,7 @@ namespace netgen } - void Identifications :: GetMap (int identnr, NgArray & identmap, bool symmetric) const + void Identifications :: GetMap (int identnr, idmap_type & identmap, bool symmetric) const { identmap.SetSize (mesh.GetNP()); identmap = 0; @@ -2812,9 +2812,14 @@ namespace netgen if (i3.I3() == identnr || !identnr) { + /* identmap.Elem(i3.I1()) = i3.I2(); if(symmetric) identmap.Elem(i3.I2()) = i3.I1(); + */ + identmap[i3.I1()] = i3.I2(); + if(symmetric) + identmap[i3.I2()] = i3.I1(); } } } diff --git a/libsrc/meshing/meshtype.hpp b/libsrc/meshing/meshtype.hpp index 37f6736a..c89f5a22 100644 --- a/libsrc/meshing/meshtype.hpp +++ b/libsrc/meshing/meshtype.hpp @@ -1653,8 +1653,9 @@ namespace netgen - - + // typedef NgArray idmap_type; + typedef Array idmap_type; + /** @@ -1731,7 +1732,7 @@ namespace netgen } /// - void GetMap (int identnr, NgArray & identmap, bool symmetric = false) const; + void GetMap (int identnr, idmap_type & identmap, bool symmetric = false) const; /// ID_TYPE GetType(int identnr) const { diff --git a/libsrc/meshing/refine.cpp b/libsrc/meshing/refine.cpp index 7f9ed6ad..e3779598 100644 --- a/libsrc/meshing/refine.cpp +++ b/libsrc/meshing/refine.cpp @@ -749,17 +749,17 @@ namespace netgen // update identification tables for (int i = 1; i <= mesh.GetIdentifications().GetMaxNr(); i++) { - NgArray identmap; + idmap_type identmap; mesh.GetIdentifications().GetMap (i, identmap); for (int j = 1; j <= between.GetNBags(); j++) for (int k = 1; k <= between.GetBagSize(j); k++) { - INDEX_2 i2; + PointIndices<2> i2; PointIndex newpi; between.GetData (j, k, i2, newpi); - INDEX_2 oi2(identmap.Get(i2.I1()), - identmap.Get(i2.I2())); + PointIndices<2> oi2(identmap[i2[0]], + identmap[i2[1]]); oi2.Sort(); if (between.Used (oi2)) { diff --git a/libsrc/meshing/secondorder.cpp b/libsrc/meshing/secondorder.cpp index b69b1474..a0b8e468 100644 --- a/libsrc/meshing/secondorder.cpp +++ b/libsrc/meshing/secondorder.cpp @@ -351,17 +351,17 @@ namespace netgen // update identification tables for (int i = 1; i <= mesh.GetIdentifications().GetMaxNr(); i++) { - NgArray identmap; + idmap_type identmap; mesh.GetIdentifications().GetMap (i, identmap); for (INDEX_2_HASHTABLE::Iterator it = between.Begin(); it != between.End(); it++) { - INDEX_2 i2; + PointIndices<2> i2; PointIndex newpi; between.GetData (it, i2, newpi); - INDEX_2 oi2(identmap.Get(i2.I1()), - identmap.Get(i2.I2())); + PointIndices<2> oi2(identmap[i2[0]], + identmap[i2[1]]); oi2.Sort(); if (between.Used (oi2)) { diff --git a/libsrc/meshing/smoothing3.cpp b/libsrc/meshing/smoothing3.cpp index 4af0128a..74370a05 100644 --- a/libsrc/meshing/smoothing3.cpp +++ b/libsrc/meshing/smoothing3.cpp @@ -1611,7 +1611,7 @@ void Mesh :: ImproveMeshJacobianOnSurface (const MeshingParameters & mp, const NgBitArray & usepoint, const NgArray< Vec<3>* > & nv, OPTIMIZEGOAL goal, - const NgArray< NgArray* > * idmaps) + const NgArray< idmap_type* > * idmaps) { // int i, j; @@ -1628,8 +1628,8 @@ void Mesh :: ImproveMeshJacobianOnSurface (const MeshingParameters & mp, JacobianPointFunction pf(points, volelements); - NgArray< NgArray* > locidmaps; - const NgArray< NgArray* > * used_idmaps; + NgArray< idmap_type* > locidmaps; + const NgArray< idmap_type* > * used_idmaps; if(idmaps) used_idmaps = idmaps; @@ -1641,7 +1641,7 @@ void Mesh :: ImproveMeshJacobianOnSurface (const MeshingParameters & mp, { if(GetIdentifications().GetType(i) == Identifications::PERIODIC) { - locidmaps.Append(new NgArray); + locidmaps.Append(new idmap_type); GetIdentifications().GetMap(i,*locidmaps.Last(),true); } } diff --git a/libsrc/meshing/validate.cpp b/libsrc/meshing/validate.cpp index 31bf499a..31b4abfe 100644 --- a/libsrc/meshing/validate.cpp +++ b/libsrc/meshing/validate.cpp @@ -155,7 +155,7 @@ namespace netgen const NgBitArray & isnewpoint, const Refinement & refinement, const NgArray & pure_badness, double max_worsening, const bool uselocalworsening, - const NgArray< NgArray* > & idmaps) + const NgArray< idmap_type* > & idmaps) { ostringstream ostrstr; diff --git a/libsrc/meshing/validate.hpp b/libsrc/meshing/validate.hpp index 5e646d5d..ae61a133 100644 --- a/libsrc/meshing/validate.hpp +++ b/libsrc/meshing/validate.hpp @@ -14,7 +14,7 @@ namespace netgen const NgBitArray & isnewpoint, const Refinement & refinement, const NgArray & pure_badness, double max_worsening, const bool uselocalworsening, - const NgArray< NgArray* > & idmaps); + const NgArray< idmap_type* > & idmaps); }