From 5162ac8b5076f7bd5c3040dde913ed168df4a3fb Mon Sep 17 00:00:00 2001 From: Christophe Geuzaine <cgeuzaine@ulg.ac.be> Date: Thu, 16 Nov 2017 19:19:33 +0100 Subject: [PATCH] small fix --- Common/gmsh.cpp | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/Common/gmsh.cpp b/Common/gmsh.cpp index b28ca2aa7e..7a342eb79b 100644 --- a/Common/gmsh.cpp +++ b/Common/gmsh.cpp @@ -430,16 +430,14 @@ GMSH_API gmshModelGetMeshElements(const int dim, const int tag, GMSH_API gmshModelSetMeshSize(const vector_pair &dimTags, const double size) { if(!isInitialized()) return GMSH_ERROR(-1); - bool ok = true; for(unsigned int i = 0; i < dimTags.size(); i++){ int dim = dimTags[i].first, tag = dimTags[i].second; - if(dim != 1) ok = false; - GVertex *gv = GModel::current()->getVertexByTag(tag); - if(gv) gv->setPrescribedMeshSizeAtVertex(size); + if(dim == 0){ + GVertex *gv = GModel::current()->getVertexByTag(tag); + if(gv) gv->setPrescribedMeshSizeAtVertex(size); + } } - if(ok) - return GMSH_OK; - return GMSH_ERROR(1); + return GMSH_OK; } GMSH_API gmshModelSetTransfiniteLine(const int tag, const int nPoints, -- GitLab