From 864e2aca2ec480df325238bd62fe2bdef83fc7cb Mon Sep 17 00:00:00 2001 From: Christophe Geuzaine <cgeuzaine@ulg.ac.be> Date: Mon, 28 Nov 2016 12:38:57 +0000 Subject: [PATCH] make old compounds with automatic partitioning work again (missing createGeometry on discrete edges) --- Geo/GEdgeCompound.cpp | 10 ++++++++-- Mesh/meshGFace.cpp | 6 +++--- doc/VERSIONS.txt | 5 +++-- 3 files changed, 14 insertions(+), 7 deletions(-) diff --git a/Geo/GEdgeCompound.cpp b/Geo/GEdgeCompound.cpp index c7937afcdf..d2cfb9ad78 100644 --- a/Geo/GEdgeCompound.cpp +++ b/Geo/GEdgeCompound.cpp @@ -51,8 +51,11 @@ GEdgeCompound::GEdgeCompound(GModel *m, int tag, std::vector<GEdge*> &compound, return; } - for (unsigned int i = 0; i < _compound.size(); i++) + for (unsigned int i = 0; i < _compound.size(); i++){ _compound[i]->setCompound(this); + discreteEdge *de = dynamic_cast<discreteEdge*> (_compound[i]); + if(de) de->createGeometry(); + } for(std::vector<GEdge*>::iterator it = _compound.begin(); it != _compound.end(); ++it){ if(!(*it)){ @@ -82,8 +85,11 @@ GEdgeCompound::GEdgeCompound(GModel *m, int tag, std::vector<GEdge*> &compound) return; } - for (unsigned int i = 0; i < _compound.size(); i++) + for (unsigned int i = 0; i < _compound.size(); i++){ _compound[i]->setCompound(this); + discreteEdge *de = dynamic_cast<discreteEdge*> (_compound[i]); + if(de) de->createGeometry(); + } parametrize(); } diff --git a/Mesh/meshGFace.cpp b/Mesh/meshGFace.cpp index c4f82aa4a2..c6151f4351 100644 --- a/Mesh/meshGFace.cpp +++ b/Mesh/meshGFace.cpp @@ -807,7 +807,7 @@ static void modifyInitialMeshForTakingIntoAccountBoundaryLayers(GFace *gf) deMeshGFace kil_; kil_(gf); meshGenerator(gf, 0, 0, true , false, &hop); - + gf->quadrangles = blQuads; gf->triangles.insert(gf->triangles.begin(),blTris.begin(),blTris.end()); gf->mesh_vertices.insert(gf->mesh_vertices.begin(),verts.begin(),verts.end()); @@ -2597,8 +2597,8 @@ void partitionAndRemesh(GFaceCompound *gf) Msg::Info("*** Starting meshing 1D edges ...:"); for (int i = 0; i < NE; i++){ GEdge *gec = gf->model()->getEdgeByTag(nume + NE + i); - meshGEdge mge; - mge(gec); + meshGEdge mge; + mge(gec); } double t2 = Cpu(); Msg::Info("*** Meshing 1D edges done (%gs)", t2-t1); diff --git a/doc/VERSIONS.txt b/doc/VERSIONS.txt index 0059dc46cd..0848b28dc5 100644 --- a/doc/VERSIONS.txt +++ b/doc/VERSIONS.txt @@ -1,5 +1,6 @@ -2.14.2: fixed regression in multi-file partitioned grid export; fixed regression -for Mesh.SubdivisionAlgorithm=1; simplified 2D boundary layer field. +2.15.0: fixed several regressions (multi-file partitioned grid export, mesh +subdivision, old compound mesher); simplified 2D boundary layer field; faster +rendering of large meshes. 2.14.1 (October 30, 2016): fixed regression in periodic meshes; small bug fixes and code cleanups. -- GitLab