Skip to content
Snippets Groups Projects
Commit 5162ac8b authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

small fix

parent 8d81d975
No related branches found
No related tags found
No related merge requests found
......@@ -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,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment