diff --git a/Common/gmsh.cpp b/Common/gmsh.cpp index 9a367bd54554792f2f25c4c69eef9e6d3ad01c8a..b5ac7ddd5e4997fe20203881c883ed9733a7f981 100644 --- a/Common/gmsh.cpp +++ b/Common/gmsh.cpp @@ -127,12 +127,12 @@ GMSH_API void gmsh::initialize(int argc, char **argv, bool readConfigFiles) for(int i = 0; i < argc; i++) _argv[i] = argv[i]; return; } - throw - 1; + throw -1; } GMSH_API void gmsh::finalize() { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } if(GmshFinalize()) { _argc = 0; if(_argv) delete[] _argv; @@ -146,28 +146,28 @@ GMSH_API void gmsh::finalize() GMSH_API void gmsh::open(const std::string &fileName) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } if(GmshOpenProject(fileName)) return; throw 1; } GMSH_API void gmsh::merge(const std::string &fileName) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } if(GmshMergeFile(fileName)) return; throw 1; } GMSH_API void gmsh::write(const std::string &fileName) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } if(GmshWriteFile(fileName)) return; throw 1; } GMSH_API void gmsh::clear() { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } if(GmshClearProject()) return; throw 1; } @@ -177,7 +177,7 @@ GMSH_API void gmsh::clear() GMSH_API void gmsh::option::setNumber(const std::string &name, const double value) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } std::string c, n; int i; SplitOptionName(name, c, n, i); @@ -187,7 +187,7 @@ GMSH_API void gmsh::option::setNumber(const std::string &name, GMSH_API void gmsh::option::getNumber(const std::string &name, double &value) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } std::string c, n; int i; SplitOptionName(name, c, n, i); @@ -198,7 +198,7 @@ GMSH_API void gmsh::option::getNumber(const std::string &name, double &value) GMSH_API void gmsh::option::setString(const std::string &name, const std::string &value) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } std::string c, n; int i; SplitOptionName(name, c, n, i); @@ -209,7 +209,7 @@ GMSH_API void gmsh::option::setString(const std::string &name, GMSH_API void gmsh::option::getString(const std::string &name, std::string &value) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } std::string c, n; int i; SplitOptionName(name, c, n, i); @@ -220,7 +220,7 @@ GMSH_API void gmsh::option::getString(const std::string &name, GMSH_API void gmsh::option::setColor(const std::string &name, const int r, const int g, const int b, const int a) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } std::string c, n; int i; SplitOptionName(name, c, n, i); @@ -232,7 +232,7 @@ GMSH_API void gmsh::option::setColor(const std::string &name, const int r, GMSH_API void gmsh::option::getColor(const std::string &name, int &r, int &g, int &b, int &a) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } std::string c, n; int i; SplitOptionName(name, c, n, i); @@ -251,14 +251,14 @@ GMSH_API void gmsh::option::getColor(const std::string &name, int &r, int &g, GMSH_API void gmsh::model::add(const std::string &name) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } GModel *m = new GModel(name); if(!m) { throw 1; } } GMSH_API void gmsh::model::remove() { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } GModel *m = GModel::current(); if(!m) { throw 1; } delete m; @@ -266,20 +266,20 @@ GMSH_API void gmsh::model::remove() GMSH_API void gmsh::model::list(std::vector<std::string> &names) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } for(std::size_t i = 0; i < GModel::list.size(); i++) names.push_back(GModel::list[i]->getName()); } GMSH_API void gmsh::model::getCurrent(std::string &name) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } name = GModel::current()->getName(); } GMSH_API void gmsh::model::setCurrent(const std::string &name) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } GModel *m = GModel::findByName(name); if(!m) { throw 1; } GModel::setCurrent(m); @@ -291,7 +291,7 @@ GMSH_API void gmsh::model::setCurrent(const std::string &name) GMSH_API void gmsh::model::getEntities(vectorpair &dimTags, const int dim) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } dimTags.clear(); std::vector<GEntity *> entities; GModel::current()->getEntities(entities, dim); @@ -303,20 +303,20 @@ GMSH_API void gmsh::model::getEntities(vectorpair &dimTags, const int dim) GMSH_API void gmsh::model::setEntityName(const int dim, const int tag, const std::string &name) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } GModel::current()->setElementaryName(dim, tag, name); } GMSH_API void gmsh::model::getEntityName(const int dim, const int tag, std::string &name) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } name = GModel::current()->getElementaryName(dim, tag); } GMSH_API void gmsh::model::getPhysicalGroups(vectorpair &dimTags, const int dim) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } dimTags.clear(); std::map<int, std::vector<GEntity *> > groups[4]; GModel::current()->getPhysicalGroups(groups); @@ -347,7 +347,7 @@ GMSH_API void gmsh::model::getEntitiesForPhysicalGroup(const int dim, const int tag, std::vector<int> &tags) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } tags.clear(); std::map<int, std::vector<GEntity *> > groups; GModel::current()->getPhysicalGroups(dim, groups); @@ -366,7 +366,7 @@ GMSH_API void gmsh::model::getPhysicalGroupsForEntity(const int dim, const int tag, std::vector<int> &physicalTags) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } physicalTags.clear(); GEntity *ge = GModel::current()->getEntityByTag(dim, tag); if(!ge) { @@ -388,7 +388,7 @@ GMSH_API int gmsh::model::addPhysicalGroup(const int dim, // physicals to GModel, we need to add the physicals in GEOInternals and // perform a hidden sync (which should not reset the mesh attributes of the // entities of they have already been created...). - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } int outTag = tag; if(outTag < 0) { outTag = @@ -407,14 +407,14 @@ GMSH_API int gmsh::model::addPhysicalGroup(const int dim, GMSH_API void gmsh::model::setPhysicalName(const int dim, const int tag, const std::string &name) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } GModel::current()->setPhysicalName(name, dim, tag); } GMSH_API void gmsh::model::getPhysicalName(const int dim, const int tag, std::string &name) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } name = GModel::current()->getPhysicalName(dim, tag); } @@ -423,7 +423,7 @@ GMSH_API void gmsh::model::getBoundary(const vectorpair &dimTags, const bool combined, const bool oriented, const bool recursive) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } outDimTags.clear(); if(!GModel::current()->getBoundaryTags(dimTags, outDimTags, combined, oriented, recursive)) { @@ -435,7 +435,7 @@ GMSH_API void gmsh::model::getEntitiesInBoundingBox( const double xmin, const double ymin, const double zmin, const double xmax, const double ymax, const double zmax, vectorpair &dimTags, const int dim) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } dimTags.clear(); SBoundingBox3d box(xmin, ymin, zmin, xmax, ymax, zmax); std::vector<GEntity *> entities; @@ -450,7 +450,7 @@ GMSH_API void gmsh::model::getBoundingBox(const int dim, const int tag, double &zmin, double &xmax, double &ymax, double &zmax) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } SBoundingBox3d box; if(dim < 0 && tag < 0) { @@ -476,7 +476,7 @@ GMSH_API void gmsh::model::getBoundingBox(const int dim, const int tag, GMSH_API int gmsh::model::getDimension() { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } return GModel::current()->getDim(); } @@ -484,7 +484,7 @@ GMSH_API int gmsh::model::getDimension() GMSH_API int gmsh::model::addDiscreteEntity(const int dim, const int tag, const std::vector<int> &boundary) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } int outTag = tag; if(outTag < 0) { outTag = GModel::current()->getMaxElementaryNumber(dim) + 1; @@ -540,19 +540,19 @@ GMSH_API int gmsh::model::addDiscreteEntity(const int dim, const int tag, GMSH_API void gmsh::model::removeEntities(const vectorpair &dimTags, const bool recursive) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } GModel::current()->remove(dimTags, recursive); } GMSH_API void gmsh::model::removeEntityName(const std::string &name) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } GModel::current()->removeElementaryName(name); } GMSH_API void gmsh::model::removePhysicalGroups(const vectorpair &dimTags) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } if(dimTags.empty()) { GModel::current()->getGEOInternals()->resetPhysicalGroups(); GModel::current()->removePhysicalGroups(); @@ -570,14 +570,14 @@ GMSH_API void gmsh::model::removePhysicalGroups(const vectorpair &dimTags) GMSH_API void gmsh::model::removePhysicalName(const std::string &name) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } GModel::current()->removePhysicalName(name); } GMSH_API void gmsh::model::getType(const int dim, const int tag, std::string &entityType) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } GEntity *ge = GModel::current()->getEntityByTag(dim, tag); if(!ge) { Msg::Error("%s does not exist", _getEntityName(dim, tag).c_str()); @@ -589,7 +589,7 @@ GMSH_API void gmsh::model::getType(const int dim, const int tag, GMSH_API void gmsh::model::getParent(const int dim, const int tag, int &parentDim, int &parentTag) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } parentDim = -1; parentTag = -1; GEntity *ge = GModel::current()->getEntityByTag(dim, tag); @@ -607,7 +607,7 @@ GMSH_API void gmsh::model::getParent(const int dim, const int tag, GMSH_API void gmsh::model::getPartitions(const int dim, const int tag, std::vector<int> &partitions) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } partitions.clear(); GEntity *ge = GModel::current()->getEntityByTag(dim, tag); if(!ge) { @@ -637,7 +637,7 @@ GMSH_API void gmsh::model::getValue(const int dim, const int tag, const std::vector<double> ¶metricCoord, std::vector<double> &coord) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } coord.clear(); GEntity *entity = GModel::current()->getEntityByTag(dim, tag); if(!entity) { @@ -676,7 +676,7 @@ gmsh::model::getDerivative(const int dim, const int tag, const std::vector<double> ¶metricCoord, std::vector<double> &deriv) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } deriv.clear(); GEntity *entity = GModel::current()->getEntityByTag(dim, tag); if(!entity) { @@ -713,7 +713,7 @@ gmsh::model::getCurvature(const int dim, const int tag, const std::vector<double> ¶metricCoord, std::vector<double> &curvatures) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } curvatures.clear(); GEntity *entity = GModel::current()->getEntityByTag(dim, tag); if(!entity) { @@ -740,7 +740,7 @@ GMSH_API void gmsh::model::getPrincipalCurvatures( std::vector<double> &curvaturesMax, std::vector<double> &curvaturesMin, std::vector<double> &directionsMax, std::vector<double> &directionsMin) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } GFace *gf = GModel::current()->getFaceByTag(tag); if(!gf) { Msg::Error("%s does not exist", _getEntityName(2, tag).c_str()); @@ -771,7 +771,7 @@ GMSH_API void gmsh::model::getNormal(const int tag, const std::vector<double> ¶metricCoord, std::vector<double> &normals) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } GFace *gf = GModel::current()->getFaceByTag(tag); if(!gf) { Msg::Error("%s does not exist", _getEntityName(2, tag).c_str()); @@ -793,7 +793,7 @@ gmsh::model::getParametrization(const int dim, const int tag, const std::vector<double> &coord, std::vector<double> ¶metricCoord) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } parametricCoord.clear(); GEntity *entity = GModel::current()->getEntityByTag(dim, tag); if(!entity) { @@ -820,12 +820,12 @@ gmsh::model::getParametrization(const int dim, const int tag, } } -GMSH_API void -gmsh::model::getParametrizationBounds(const int dim, const int tag, - std::vector<double> &min, - std::vector<double> &max) +GMSH_API void gmsh::model::getParametrizationBounds(const int dim, + const int tag, + std::vector<double> &min, + std::vector<double> &max) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } min.clear(); max.clear(); GEntity *entity = GModel::current()->getEntityByTag(dim, tag); @@ -840,11 +840,10 @@ gmsh::model::getParametrizationBounds(const int dim, const int tag, } } -GMSH_API int -gmsh::model::isInside(const int dim, const int tag, - const std::vector<double> ¶metricCoord) +GMSH_API int gmsh::model::isInside(const int dim, const int tag, + const std::vector<double> ¶metricCoord) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } GEntity *entity = GModel::current()->getEntityByTag(dim, tag); if(!entity) { Msg::Error("%s does not exist", _getEntityName(dim, tag).c_str()); @@ -868,14 +867,12 @@ gmsh::model::isInside(const int dim, const int tag, return num; } -GMSH_API void -gmsh::model::reparametrizeOnSurface(const int dim, const int tag, - const std::vector<double> ¶metricCoord, - const int surfaceTag, - std::vector<double> &surfaceParametricCoord, - const int which) +GMSH_API void gmsh::model::reparametrizeOnSurface( + const int dim, const int tag, const std::vector<double> ¶metricCoord, + const int surfaceTag, std::vector<double> &surfaceParametricCoord, + const int which) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } surfaceParametricCoord.clear(); GEntity *entity = GModel::current()->getEntityByTag(dim, tag); if(!entity) { @@ -906,7 +903,7 @@ gmsh::model::reparametrizeOnSurface(const int dim, const int tag, GMSH_API void gmsh::model::setVisibility(const vectorpair &dimTags, const int value, const bool recursive) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } for(std::size_t i = 0; i < dimTags.size(); i++) { GEntity *ge = GModel::current()->getEntityByTag( dimTags[i].first, std::abs(dimTags[i].second)); @@ -917,7 +914,7 @@ GMSH_API void gmsh::model::setVisibility(const vectorpair &dimTags, GMSH_API void gmsh::model::getVisibility(const int dim, const int tag, int &value) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } GEntity *ge = GModel::current()->getEntityByTag(dim, tag); if(!ge) { Msg::Error("%s does not exist", _getEntityName(dim, tag).c_str()); @@ -930,7 +927,7 @@ GMSH_API void gmsh::model::setColor(const vectorpair &dimTags, const int r, const int g, const int b, const int a, const bool recursive) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } for(std::size_t i = 0; i < dimTags.size(); i++) { GEntity *ge = GModel::current()->getEntityByTag( dimTags[i].first, std::abs(dimTags[i].second)); @@ -944,7 +941,7 @@ GMSH_API void gmsh::model::setColor(const vectorpair &dimTags, const int r, GMSH_API void gmsh::model::getColor(const int dim, const int tag, int &r, int &g, int &b, int &a) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } GEntity *ge = GModel::current()->getEntityByTag(dim, tag); if(!ge) { Msg::Error("%s does not exist", _getEntityName(dim, tag).c_str()); @@ -960,7 +957,7 @@ GMSH_API void gmsh::model::getColor(const int dim, const int tag, int &r, GMSH_API void gmsh::model::setCoordinates(const int tag, const double x, const double y, const double z) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } GVertex *gv = GModel::current()->getVertexByTag(tag); if(!gv) { Msg::Error("%s does not exist", _getEntityName(0, tag).c_str()); @@ -974,14 +971,14 @@ GMSH_API void gmsh::model::setCoordinates(const int tag, const double x, GMSH_API void gmsh::model::mesh::generate(const int dim) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } GModel::current()->mesh(dim); CTX::instance()->mesh.changed = ENT_ALL; } GMSH_API void gmsh::model::mesh::partition(const int numPart) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } GModel::current()->partitionMesh( numPart >= 0 ? numPart : CTX::instance()->mesh.numPartitions); CTX::instance()->mesh.changed = ENT_ALL; @@ -989,14 +986,14 @@ GMSH_API void gmsh::model::mesh::partition(const int numPart) GMSH_API void gmsh::model::mesh::unpartition() { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } GModel::current()->unpartitionMesh(); CTX::instance()->mesh.changed = ENT_ALL; } GMSH_API void gmsh::model::mesh::refine() { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } GModel::current()->refineMesh(CTX::instance()->mesh.secondOrderLinear, CTX::instance()->mesh.algoSubdivide == 1, CTX::instance()->mesh.algoSubdivide == 2, @@ -1006,7 +1003,7 @@ GMSH_API void gmsh::model::mesh::refine() GMSH_API void gmsh::model::mesh::recombine() { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } GModel::current()->recombineMesh(); CTX::instance()->mesh.changed = ENT_ALL; } @@ -1015,7 +1012,7 @@ GMSH_API void gmsh::model::mesh::optimize(const std::string &how, const bool force, const int niter, const vectorpair &dimTags) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } if(dimTags.size()) { Msg::Warning( "Optimization of specified model entities is not interfaced yet"); @@ -1026,19 +1023,19 @@ GMSH_API void gmsh::model::mesh::optimize(const std::string &how, GMSH_API void gmsh::model::mesh::computeCrossField(std::vector<int> &tags) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } #if defined(HAVE_MESH) if(computeCrossField(GModel::current(), tags)) throw 1; #else Msg::Error("computeCrossField requires the mesh module"); - throw - 1; + throw -1; #endif } GMSH_API void gmsh::model::mesh::splitQuadrangles(const double quality, const int tag) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } #if defined(HAVE_MESH) std::vector<GEntity *> entities; if(tag < 0) { GModel::current()->getEntities(entities, 2); } @@ -1057,13 +1054,13 @@ GMSH_API void gmsh::model::mesh::splitQuadrangles(const double quality, CTX::instance()->mesh.changed = ENT_ALL; #else Msg::Error("splitQuadrangles requires the mesh module"); - throw - 1; + throw -1; #endif } GMSH_API void gmsh::model::mesh::setOrder(const int order) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } GModel::current()->setOrderN(order, CTX::instance()->mesh.secondOrderLinear, CTX::instance()->mesh.secondOrderIncomplete); CTX::instance()->mesh.changed = ENT_ALL; @@ -1071,7 +1068,7 @@ GMSH_API void gmsh::model::mesh::setOrder(const int order) GMSH_API void gmsh::model::mesh::getLastEntityError(vectorpair &dimTags) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } std::vector<GEntity *> e = GModel::current()->getLastMeshEntityError(); dimTags.clear(); for(std::size_t i = 0; i < e.size(); i++) @@ -1081,7 +1078,7 @@ GMSH_API void gmsh::model::mesh::getLastEntityError(vectorpair &dimTags) GMSH_API void gmsh::model::mesh::getLastNodeError(std::vector<std::size_t> &nodeTags) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } std::vector<MVertex *> v = GModel::current()->getLastMeshVertexError(); nodeTags.clear(); for(std::size_t i = 0; i < v.size(); i++) nodeTags.push_back(v[i]->getNum()); @@ -1089,8 +1086,8 @@ gmsh::model::mesh::getLastNodeError(std::vector<std::size_t> &nodeTags) GMSH_API void gmsh::model::mesh::clear(const vectorpair &dimTags) { - if(!_isInitialized()) { throw - 1; } - std::vector<GEntity*> entities; + if(!_isInitialized()) { throw -1; } + std::vector<GEntity *> entities; for(std::size_t i = 0; i < dimTags.size(); i++) { int dim = dimTags[i].first; int tag = dimTags[i].second; @@ -1178,7 +1175,7 @@ GMSH_API void gmsh::model::mesh::getNodes(std::vector<std::size_t> &nodeTags, const bool includeBoundary, const bool returnParametricCoord) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } nodeTags.clear(); coord.clear(); parametricCoord.clear(); @@ -1220,7 +1217,7 @@ GMSH_API void gmsh::model::mesh::getNodesByElementType( std::vector<double> &coord, std::vector<double> ¶metricCoord, const int tag, const bool returnParametricCoord) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } nodeTags.clear(); coord.clear(); parametricCoord.clear(); @@ -1276,7 +1273,7 @@ GMSH_API void gmsh::model::mesh::getNode(const std::size_t nodeTag, std::vector<double> &coord, std::vector<double> ¶metricCoord) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } MVertex *v = GModel::current()->getMeshVertexByTag(nodeTag); if(!v) { Msg::Error("Unknown node %d", nodeTag); @@ -1297,7 +1294,7 @@ gmsh::model::mesh::setNode(const std::size_t nodeTag, const std::vector<double> &coord, const std::vector<double> ¶metricCoord) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } MVertex *v = GModel::current()->getMeshVertexByTag(nodeTag); if(!v) { Msg::Error("Unknown node %d", nodeTag); @@ -1314,7 +1311,7 @@ gmsh::model::mesh::setNode(const std::size_t nodeTag, GMSH_API void gmsh::model::mesh::rebuildNodeCache(bool onlyIfNecessary) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } GModel::current()->rebuildMeshVertexCache(onlyIfNecessary); } @@ -1323,7 +1320,7 @@ gmsh::model::mesh::getNodesForPhysicalGroup(const int dim, const int tag, std::vector<std::size_t> &nodeTags, std::vector<double> &coord) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } nodeTags.clear(); coord.clear(); std::vector<MVertex *> v; @@ -1343,7 +1340,7 @@ GMSH_API void gmsh::model::mesh::addNodes( const int dim, const int tag, const std::vector<std::size_t> &nodeTags, const std::vector<double> &coord, const std::vector<double> ¶metricCoord) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } GEntity *ge = GModel::current()->getEntityByTag(dim, tag); if(!ge) { Msg::Error("%s does not exist", _getEntityName(dim, tag).c_str()); @@ -1389,13 +1386,13 @@ GMSH_API void gmsh::model::mesh::addNodes( GMSH_API void gmsh::model::mesh::reclassifyNodes() { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } GModel::current()->pruneMeshVertexAssociations(); } GMSH_API void gmsh::model::mesh::relocateNodes(const int dim, const int tag) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } std::vector<GEntity *> entities; if(dim >= 0 && tag >= 0) { GEntity *ge = GModel::current()->getEntityByTag(dim, tag); @@ -1473,7 +1470,7 @@ GMSH_API void gmsh::model::mesh::getElements( std::vector<std::vector<std::size_t> > &nodeTags, const int dim, const int tag) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } elementTypes.clear(); elementTags.clear(); nodeTags.clear(); @@ -1505,7 +1502,7 @@ GMSH_API void gmsh::model::mesh::getElement(const std::size_t elementTag, int &elementType, std::vector<std::size_t> &nodeTags) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } MElement *e = GModel::current()->getMeshElementByTag(elementTag); if(!e) { Msg::Error("Unknown element %d", elementTag); @@ -1528,7 +1525,7 @@ GMSH_API void gmsh::model::mesh::getElementByCoordinates( int &elementType, std::vector<std::size_t> &nodeTags, double &u, double &v, double &w, const int dim, const bool strict) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } SPoint3 xyz(x, y, z), uvw; MElement *e = GModel::current()->getMeshElementByCoord(xyz, uvw, dim, strict); if(!e) { @@ -1555,7 +1552,7 @@ GMSH_API void gmsh::model::mesh::getElementsByCoordinates( const double x, const double y, const double z, std::vector<std::size_t> &elementTags, const int dim, const bool strict) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } SPoint3 xyz(x, y, z), uvw; elementTags.clear(); std::vector<MElement *> e = @@ -1573,7 +1570,7 @@ GMSH_API void gmsh::model::mesh::getLocalCoordinatesInElement( const std::size_t elementTag, const double x, const double y, const double z, double &u, double &v, double &w) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } MElement *e = GModel::current()->getMeshElementByTag(elementTag); if(!e) { Msg::Error("Unknown element %d", elementTag); @@ -1671,7 +1668,7 @@ GMSH_API void gmsh::model::mesh::addElements( const std::vector<std::vector<std::size_t> > &elementTags, const std::vector<std::vector<std::size_t> > &nodeTags) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } GEntity *ge = GModel::current()->getEntityByTag(dim, tag); if(!ge) { Msg::Error("%s does not exist", _getEntityName(dim, tag).c_str()); @@ -1696,7 +1693,7 @@ GMSH_API void gmsh::model::mesh::addElementsByType( const std::vector<std::size_t> &elementTags, const std::vector<std::size_t> &nodeTags) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } int dim = ElementType::getDimension(elementType); GEntity *ge = GModel::current()->getEntityByTag(dim, tag); if(!ge) { @@ -1710,7 +1707,7 @@ GMSH_API void gmsh::model::mesh::addElementsByType( GMSH_API void gmsh::model::mesh::getElementTypes(std::vector<int> &elementTypes, const int dim, const int tag) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } elementTypes.clear(); std::map<int, std::vector<GEntity *> > typeEnt; _getEntitiesForElementTypes(dim, tag, typeEnt); @@ -1725,7 +1722,7 @@ GMSH_API int gmsh::model::mesh::getElementType(const std::string &family, const int order, const bool serendip) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } int familyType = (family == "point") ? TYPE_PNT : (family == "line") ? @@ -1754,7 +1751,7 @@ GMSH_API void gmsh::model::mesh::getElementProperties( const int elementType, std::string &name, int &dim, int &order, int &numNodes, std::vector<double> &localNodeCoord, int &numPrimaryNodes) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } const char *n; MElement::getInfoMSH(elementType, &n); name = n; @@ -1784,7 +1781,7 @@ GMSH_API void gmsh::model::mesh::getElementsByType( std::vector<std::size_t> &nodeTags, const int tag, const std::size_t task, const std::size_t numTasks) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } int dim = ElementType::getDimension(elementType); std::map<int, std::vector<GEntity *> > typeEnt; _getEntitiesForElementTypes(dim, tag, typeEnt); @@ -1845,7 +1842,7 @@ GMSH_API void gmsh::model::mesh::preallocateElementsByType( std::vector<std::size_t> &elementTags, std::vector<std::size_t> &nodeTags, const int tag) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } int dim = ElementType::getDimension(elementType); std::map<int, std::vector<GEntity *> > typeEnt; _getEntitiesForElementTypes(dim, tag, typeEnt); @@ -1920,7 +1917,7 @@ GMSH_API void gmsh::model::mesh::getJacobians( std::vector<double> &coord, const int tag, const std::size_t task, const std::size_t numTasks) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } int dim = ElementType::getDimension(elementType); std::map<int, std::vector<GEntity *> > typeEnt; _getEntitiesForElementTypes(dim, tag, typeEnt); @@ -2157,12 +2154,12 @@ GMSH_API void gmsh::model::mesh::getJacobians( } GMSH_API void gmsh::model::mesh::preallocateJacobians( - const int elementType, const int numPoints, - const bool allocateJacobians, const bool allocateDeterminants, - const bool allocateCoord, std::vector<double> &jacobians, - std::vector<double> &determinants, std::vector<double> &coord, const int tag) + const int elementType, const int numPoints, const bool allocateJacobians, + const bool allocateDeterminants, const bool allocateCoord, + std::vector<double> &jacobians, std::vector<double> &determinants, + std::vector<double> &coord, const int tag) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } int dim = ElementType::getDimension(elementType); BasisFactory::getNodalBasis(elementType); std::map<int, std::vector<GEntity *> > typeEnt; @@ -2189,9 +2186,10 @@ GMSH_API void gmsh::model::mesh::preallocateJacobians( GMSH_API void gmsh::model::mesh::getBasisFunctions( const int elementType, const std::vector<double> &localCoord, const std::string &functionSpaceType, int &numComponents, - std::vector<double> &basisFunctions, int &numOrientations) + std::vector<double> &basisFunctions, int &numOrientations, + const std::vector<int> &wantedOrientations) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } numComponents = 0; basisFunctions.clear(); std::string fsName = ""; @@ -2206,6 +2204,22 @@ GMSH_API void gmsh::model::mesh::getBasisFunctions( const int familyType = ElementType::getParentType(elementType); if(fsName == "Lagrange" || fsName == "GradLagrange") { // Lagrange type + // Check if there is no error in wantedOrientations + if(wantedOrientations.size() != 0) { + if(wantedOrientations.size() > 1) { + Msg::Error("Asking for more orientation that there exist."); + throw 10; + } + + if(wantedOrientations[0] != 0) { + Msg::Error( + "Orientation %i does not exist for function stace named '%s' on %s.", + wantedOrientations[0], fsName.c_str(), + ElementType::nameOfParentType(familyType, true).c_str()); + throw 11; + } + } + const nodalBasis *basis = 0; if(numComponents) { if(fsOrder == -1) { // isoparametric @@ -2305,15 +2319,43 @@ GMSH_API void gmsh::model::mesh::getBasisFunctions( basis->getnTriFaceFunction() + basis->getnQuadFaceFunction(); const std::size_t maxOrientation = basis->getNumberOfOrientations(); numOrientations = maxOrientation; - const std::size_t numFunctionsPerElement = vSize + - bSize + - eSize + - fSize; + const std::size_t numFunctionsPerElement = vSize + bSize + eSize + fSize; const unsigned int numVertices = ElementType::getNumVertices(ElementType::getType(familyType, 1, false)); - basisFunctions.resize(maxOrientation * numberOfGaussPoints * - numFunctionsPerElement * numComponents); + basisFunctions.resize( + (wantedOrientations.size() == 0 ? maxOrientation : + wantedOrientations.size()) * + numberOfGaussPoints * numFunctionsPerElement * numComponents); + + // Check if there is no error in wantedOrientations + if(wantedOrientations.size() != 0) { + if(wantedOrientations.size() > maxOrientation) { + Msg::Error("Asking for more orientation that there exist."); + throw 10; + } + for(unsigned int i = 0; i < wantedOrientations.size(); ++i) { + if(wantedOrientations[i] >= static_cast<int>(maxOrientation) || + wantedOrientations[i] < 0) { + Msg::Error("Orientation %i does not exist for function stace named " + "'%s' on %s.", + wantedOrientations[i], fsName.c_str(), + ElementType::nameOfParentType(familyType, true).c_str()); + throw 11; + } + } + std::vector<int> sortedWantedOrientations = wantedOrientations; + std::sort(sortedWantedOrientations.begin(), + sortedWantedOrientations.end()); + int previousInt = sortedWantedOrientations[0]; + for(unsigned int i = 1; i < sortedWantedOrientations.size(); ++i) { + if(previousInt == sortedWantedOrientations[i]) { + Msg::Error("Duplicate wanted orientation found."); + throw 12; + } + previousInt = sortedWantedOrientations[i]; + } + } std::vector<MVertex *> vertices(numVertices); for(unsigned int i = 0; i < numVertices; ++i) { @@ -2404,8 +2446,23 @@ GMSH_API void gmsh::model::mesh::getBasisFunctions( numberOfGaussPoints, std::vector<double>(fSize, 0)); // use fTableCopy to orient the faces + unsigned int iOrientationIndex = 0; for(unsigned int iOrientation = 0; iOrientation < maxOrientation; ++iOrientation) { + if(wantedOrientations.size() != 0) { + std::vector<int>::const_iterator it = std::find( + wantedOrientations.begin(), wantedOrientations.end(), iOrientation); + if(it != wantedOrientations.end()) { + iOrientationIndex = &(*it) - &wantedOrientations[0]; + } + else { + continue; + } + } + else { + iOrientationIndex = iOrientation; + } + if(eSize != 0) { for(int iEdge = 0; iEdge < basis->getNumEdge(); ++iEdge) { MEdge edge = element->getEdge(iEdge); @@ -2439,7 +2496,7 @@ GMSH_API void gmsh::model::mesh::getBasisFunctions( } const std::size_t offsetOrientation = - iOrientation * numberOfGaussPoints * numFunctionsPerElement; + iOrientationIndex * numberOfGaussPoints * numFunctionsPerElement; for(unsigned int q = 0; q < numberOfGaussPoints; ++q) { const std::size_t offsetGP = q * numFunctionsPerElement; @@ -2544,8 +2601,23 @@ GMSH_API void gmsh::model::mesh::getBasisFunctions( fSize, std::vector<double>(3, 0.))); // use fTableCopy to orient the faces + unsigned int iOrientationIndex = 0; for(unsigned int iOrientation = 0; iOrientation < maxOrientation; ++iOrientation) { + if(wantedOrientations.size() != 0) { + std::vector<int>::const_iterator it = std::find( + wantedOrientations.begin(), wantedOrientations.end(), iOrientation); + if(it != wantedOrientations.end()) { + iOrientationIndex = &(*it) - &wantedOrientations[0]; + } + else { + continue; + } + } + else { + iOrientationIndex = iOrientation; + } + if(eSize != 0) { for(int iEdge = 0; iEdge < basis->getNumEdge(); ++iEdge) { MEdge edge = element->getEdge(iEdge); @@ -2579,7 +2651,7 @@ GMSH_API void gmsh::model::mesh::getBasisFunctions( } const std::size_t offsetOrientation = - iOrientation * numberOfGaussPoints * numFunctionsPerElement * 3; + iOrientationIndex * numberOfGaussPoints * numFunctionsPerElement * 3; for(unsigned int q = 0; q < numberOfGaussPoints; ++q) { const std::size_t offsetGP = q * numFunctionsPerElement * 3; @@ -2630,9 +2702,7 @@ GMSH_API void gmsh::model::mesh::getBasisFunctions( } } - for(unsigned int i = 0; i < numVertices; ++i) { - delete vertices[i]; - } + for(unsigned int i = 0; i < numVertices; ++i) { delete vertices[i]; } delete element; delete basis; } @@ -2645,7 +2715,7 @@ GMSH_API void gmsh::model::mesh::getBasisFunctionsOrientationForElements( std::vector<int> &basisFunctionsOrientation, const int tag, const std::size_t task, const std::size_t numTasks) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } if(!basisFunctionsOrientation.size()) { if(numTasks > 1) { @@ -2737,7 +2807,8 @@ GMSH_API void gmsh::model::mesh::getBasisFunctionsOrientationForElements( } } - basisFunctionsOrientation[entityOffset + iElement] = (int)elementOrientation; + basisFunctionsOrientation[entityOffset + iElement] = + (int)elementOrientation; } entityOffset += localNumElements; @@ -2747,12 +2818,41 @@ GMSH_API void gmsh::model::mesh::getBasisFunctionsOrientationForElements( return; } +GMSH_API int +gmsh::model::mesh::getNumberOfOrientations(const int elementType, + const std::string &functionSpaceType) +{ + if(!_isInitialized()) { throw -1; } + + int basisOrder = 0; + std::string fsName = ""; + int numComponents = 0; + if(!_getFunctionSpaceInfo(functionSpaceType, fsName, basisOrder, + numComponents)) { + Msg::Error("Unknown function space type '%s'", functionSpaceType.c_str()); + throw 2; + } + + if(fsName == "Lagrange" || fsName == "GradLagrange") { // Lagrange type + return 1; + } + else { // Hierarchical type + const int familyType = ElementType::getParentType(elementType); + const unsigned int numVertices = + ElementType::getNumVertices(ElementType::getType(familyType, 1, false)); + const std::size_t factorial[8] = {1, 1, 2, 6, 24, 120, 720, 5040}; + return factorial[numVertices]; + } + + return 0; +} + GMSH_API void gmsh::model::mesh::preallocateBasisFunctionsOrientationForElements( const int elementType, std::vector<int> &basisFunctionsOrientation, const int tag) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } const int dim = ElementType::getDimension(elementType); std::map<int, std::vector<GEntity *> > typeEnt; @@ -2769,7 +2869,6 @@ gmsh::model::mesh::preallocateBasisFunctionsOrientationForElements( basisFunctionsOrientation.resize(numElements); } - GMSH_API void gmsh::model::mesh::getEdgeNumber(const std::vector<int> &edgeNodes, std::vector<int> &edgeNum) @@ -2849,7 +2948,7 @@ GMSH_API void gmsh::model::mesh::getKeysForElements( gmsh::vectorpair &keys, std::vector<double> &coord, const int tag, const bool generateCoord) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } coord.clear(); keys.clear(); int order = 0; @@ -3313,7 +3412,7 @@ GMSH_API void gmsh::model::mesh::getBarycenters( std::vector<double> &barycenters, const std::size_t task, const std::size_t numTasks) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } int dim = ElementType::getDimension(elementType); std::map<int, std::vector<GEntity *> > typeEnt; _getEntitiesForElementTypes(dim, tag, typeEnt); @@ -3382,13 +3481,11 @@ static bool _getIntegrationInfo(const std::string &intType, return false; } -GMSH_API void -gmsh::model::mesh::getIntegrationPoints(const int elementType, - const std::string &integrationType, - std::vector<double> &localCoord, - std::vector<double> &weigths) +GMSH_API void gmsh::model::mesh::getIntegrationPoints( + const int elementType, const std::string &integrationType, + std::vector<double> &localCoord, std::vector<double> &weigths) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } localCoord.clear(); weigths.clear(); std::string intName = ""; @@ -3419,7 +3516,7 @@ gmsh::model::mesh::getIntegrationPoints(const int elementType, GMSH_API void gmsh::model::mesh::preallocateBarycenters( const int elementType, std::vector<double> &barycenters, const int tag) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } int dim = ElementType::getDimension(elementType); std::map<int, std::vector<GEntity *> > typeEnt; _getEntitiesForElementTypes(dim, tag, typeEnt); @@ -3436,7 +3533,7 @@ GMSH_API void gmsh::model::mesh::getElementEdgeNodes( const int elementType, std::vector<std::size_t> &nodeTags, const int tag, const bool primary, const std::size_t task, const std::size_t numTasks) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } int dim = ElementType::getDimension(elementType); std::map<int, std::vector<GEntity *> > typeEnt; _getEntitiesForElementTypes(dim, tag, typeEnt); @@ -3500,7 +3597,7 @@ GMSH_API void gmsh::model::mesh::getElementFaceNodes( const int tag, const bool primary, const std::size_t task, const std::size_t numTasks) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } int dim = ElementType::getDimension(elementType); std::map<int, std::vector<GEntity *> > typeEnt; _getEntitiesForElementTypes(dim, tag, typeEnt); @@ -3572,7 +3669,7 @@ gmsh::model::mesh::getGhostElements(const int dim, const int tag, std::vector<std::size_t> &elementTags, std::vector<int> &partitions) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } elementTags.clear(); partitions.clear(); GEntity *ge = GModel::current()->getEntityByTag(dim, tag); @@ -3599,7 +3696,7 @@ gmsh::model::mesh::getGhostElements(const int dim, const int tag, GMSH_API void gmsh::model::mesh::setSize(const vectorpair &dimTags, const double size) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } for(std::size_t i = 0; i < dimTags.size(); i++) { int dim = dimTags[i].first, tag = dimTags[i].second; if(dim == 0) { @@ -3610,24 +3707,22 @@ GMSH_API void gmsh::model::mesh::setSize(const vectorpair &dimTags, } GMSH_API void gmsh::model::mesh::setSizeAtParametricPoints( - const int dim, const int tag, - const std::vector<double> ¶metricCoord, - const std::vector<double> &sizes) + const int dim, const int tag, const std::vector<double> ¶metricCoord, + const std::vector<double> &sizes) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } if(dim == 1) { GEdge *ge = GModel::current()->getEdgeByTag(tag); if(ge) ge->setMeshSizeParametric(parametricCoord, sizes); } } - GMSH_API void gmsh::model::mesh::setTransfiniteCurve(const int tag, const int numNodes, const std::string &meshType, const double coef) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } GEdge *ge = GModel::current()->getEdgeByTag(tag); if(!ge) { Msg::Error("%s does not exist", _getEntityName(1, tag).c_str()); @@ -3649,7 +3744,7 @@ gmsh::model::mesh::setTransfiniteSurface(const int tag, const std::string &arrangement, const std::vector<int> &cornerTags) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } GFace *gf = GModel::current()->getFaceByTag(tag); if(!gf) { Msg::Error("%s does not exist", _getEntityName(2, tag).c_str()); @@ -3677,7 +3772,7 @@ GMSH_API void gmsh::model::mesh::setTransfiniteVolume(const int tag, const std::vector<int> &cornerTags) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } GRegion *gr = GModel::current()->getRegionByTag(tag); if(!gr) { Msg::Error("%s does not exist", _getEntityName(3, tag).c_str()); @@ -3694,7 +3789,7 @@ gmsh::model::mesh::setTransfiniteVolume(const int tag, GMSH_API void gmsh::model::mesh::setRecombine(const int dim, const int tag) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } if(dim != 2) { throw 2; } GFace *gf = GModel::current()->getFaceByTag(tag); if(!gf) { @@ -3708,7 +3803,7 @@ GMSH_API void gmsh::model::mesh::setRecombine(const int dim, const int tag) GMSH_API void gmsh::model::mesh::setSmoothing(const int dim, const int tag, const int val) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } if(dim != 2) { throw 2; } GFace *gf = GModel::current()->getFaceByTag(tag); if(!gf) { @@ -3721,7 +3816,7 @@ GMSH_API void gmsh::model::mesh::setSmoothing(const int dim, const int tag, GMSH_API void gmsh::model::mesh::setReverse(const int dim, const int tag, const bool val) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } if(dim == 1) { GEdge *ge = GModel::current()->getEdgeByTag(tag); if(!ge) { @@ -3743,7 +3838,7 @@ GMSH_API void gmsh::model::mesh::setReverse(const int dim, const int tag, GMSH_API void gmsh::model::mesh::setAlgorithm(const int dim, const int tag, const int val) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } if(dim == 2) { GFace *gf = GModel::current()->getFaceByTag(tag); if(!gf) { @@ -3758,7 +3853,7 @@ GMSH_API void gmsh::model::mesh::setSizeFromBoundary(const int dim, const int tag, const int val) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } if(dim == 2) { GFace *gf = GModel::current()->getFaceByTag(tag); if(!gf) { @@ -3772,7 +3867,7 @@ GMSH_API void gmsh::model::mesh::setSizeFromBoundary(const int dim, GMSH_API void gmsh::model::mesh::setCompound(const int dim, const std::vector<int> &tags) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } std::vector<GEntity *> ents; for(std::size_t i = 0; i < tags.size(); i++) { GEntity *ent = GModel::current()->getEntityByTag(dim, tags[i]); @@ -3786,7 +3881,7 @@ GMSH_API void gmsh::model::mesh::setCompound(const int dim, GMSH_API void gmsh::model::mesh::setOutwardOrientation(const int tag) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } GRegion *gr = GModel::current()->getRegionByTag(tag); if(!gr) { Msg::Error("%s does not exist", _getEntityName(3, tag).c_str()); @@ -3799,7 +3894,7 @@ GMSH_API void gmsh::model::mesh::embed(const int dim, const std::vector<int> &tags, const int inDim, const int inTag) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } if(inDim == 2) { GFace *gf = GModel::current()->getFaceByTag(inTag); if(!gf) { @@ -3863,7 +3958,7 @@ GMSH_API void gmsh::model::mesh::embed(const int dim, GMSH_API void gmsh::model::mesh::removeEmbedded(const vectorpair &dimTags, const int rdim) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } for(std::size_t i = 0; i < dimTags.size(); i++) { int dim = dimTags[i].first, tag = dimTags[i].second; if(dim == 2) { @@ -3892,7 +3987,7 @@ GMSH_API void gmsh::model::mesh::reorderElements(const int elementType, const int tag, const std::vector<std::size_t> &ordering) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } int dim = ElementType::getDimension(elementType); std::map<int, std::vector<GEntity *> > typeEnt; _getEntitiesForElementTypes(dim, tag, typeEnt); @@ -3911,13 +4006,13 @@ gmsh::model::mesh::reorderElements(const int elementType, const int tag, GMSH_API void gmsh::model::mesh::renumberNodes() { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } GModel::current()->renumberMeshVertices(); } GMSH_API void gmsh::model::mesh::renumberElements() { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } GModel::current()->renumberMeshElements(); } @@ -3926,7 +4021,7 @@ gmsh::model::mesh::setPeriodic(const int dim, const std::vector<int> &tags, const std::vector<int> &tagsMaster, const std::vector<double> &affineTransform) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } if(tags.size() != tagsMaster.size()) { Msg::Error("Incompatible number of tags and master tags for periodic mesh"); throw 2; @@ -3973,7 +4068,7 @@ GMSH_API void gmsh::model::mesh::getPeriodicNodes( std::vector<std::size_t> &nodeTags, std::vector<std::size_t> &nodeTagsMaster, std::vector<double> &affineTransform) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } GEntity *ge = GModel::current()->getEntityByTag(dim, tag); if(!ge) { Msg::Error("%s does not exist", _getEntityName(dim, tag).c_str()); @@ -3999,7 +4094,7 @@ GMSH_API void gmsh::model::mesh::getPeriodicNodes( GMSH_API void gmsh::model::mesh::removeDuplicateNodes() { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } GModel::current()->removeDuplicateMeshVertices( CTX::instance()->geom.tolerance); CTX::instance()->mesh.changed = ENT_ALL; @@ -4010,21 +4105,21 @@ gmsh::model::mesh::classifySurfaces(const double angle, const bool boundary, const bool forReparametrization, const double curveAngle) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } GModel::current()->classifySurfaces(angle, boundary, forReparametrization, curveAngle); } GMSH_API void gmsh::model::mesh::createGeometry() { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } GModel::current()->createGeometryOfDiscreteEntities(); } GMSH_API void gmsh::model::mesh::createTopology(const bool makeSimplyConnected, const bool exportDiscrete) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } if(makeSimplyConnected) { GModel::current()->makeDiscreteRegionsSimplyConnected(); @@ -4042,7 +4137,7 @@ gmsh::model::mesh::computeHomology(const std::vector<int> &domainTags, const std::vector<int> &subdomainTags, const std::vector<int> &dims) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } GModel::current()->addHomologyRequest("Homology", domainTags, subdomainTags, dims); } @@ -4052,7 +4147,7 @@ gmsh::model::mesh::computeCohomology(const std::vector<int> &domainTags, const std::vector<int> &subdomainTags, const std::vector<int> &dims) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } GModel::current()->addHomologyRequest("Cohomology", domainTags, subdomainTags, dims); } @@ -4062,7 +4157,7 @@ gmsh::model::mesh::computeCohomology(const std::vector<int> &domainTags, GMSH_API int gmsh::model::mesh::field::add(const std::string &fieldType, const int tag) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } int outTag = tag; #if defined(HAVE_MESH) if(outTag < 0) { outTag = GModel::current()->getFields()->newId(); } @@ -4075,14 +4170,14 @@ GMSH_API int gmsh::model::mesh::field::add(const std::string &fieldType, #endif #else Msg::Error("Fields require the mesh module"); - throw - 1; + throw -1; #endif return outTag; } GMSH_API void gmsh::model::mesh::field::remove(const int tag) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } #if defined(HAVE_MESH) GModel::current()->getFields()->deleteField(tag); #if defined(HAVE_FLTK) @@ -4090,7 +4185,7 @@ GMSH_API void gmsh::model::mesh::field::remove(const int tag) #endif #else Msg::Error("Fields require the mesh module"); - throw - 1; + throw -1; #endif } @@ -4116,7 +4211,7 @@ GMSH_API void gmsh::model::mesh::field::setNumber(const int tag, const std::string &option, const double value) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } #if defined(HAVE_MESH) FieldOption *o = _getFieldOption(tag, option); if(!o) { throw 1; } @@ -4129,7 +4224,7 @@ GMSH_API void gmsh::model::mesh::field::setNumber(const int tag, } #else Msg::Error("Fields require the mesh module"); - throw - 1; + throw -1; #endif } @@ -4137,7 +4232,7 @@ GMSH_API void gmsh::model::mesh::field::setString(const int tag, const std::string &option, const std::string &value) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } #if defined(HAVE_MESH) FieldOption *o = _getFieldOption(tag, option); if(!o) { throw 1; } @@ -4150,7 +4245,7 @@ GMSH_API void gmsh::model::mesh::field::setString(const int tag, } #else Msg::Error("Fields require the mesh module"); - throw - 1; + throw -1; #endif } @@ -4158,7 +4253,7 @@ GMSH_API void gmsh::model::mesh::field::setNumbers(const int tag, const std::string &option, const std::vector<double> &value) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } #if defined(HAVE_MESH) FieldOption *o = _getFieldOption(tag, option); if(!o) { throw 1; } @@ -4180,29 +4275,29 @@ gmsh::model::mesh::field::setNumbers(const int tag, const std::string &option, } #else Msg::Error("Fields require the mesh module"); - throw - 1; + throw -1; #endif } GMSH_API void gmsh::model::mesh::field::setAsBackgroundMesh(const int tag) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } #if defined(HAVE_MESH) GModel::current()->getFields()->setBackgroundFieldId(tag); #else Msg::Error("Fields require the mesh module"); - throw - 1; + throw -1; #endif } GMSH_API void gmsh::model::mesh::field::setAsBoundaryLayer(const int tag) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } #if defined(HAVE_MESH) GModel::current()->getFields()->addBoundaryLayerFieldId(tag); #else Msg::Error("Fields require the mesh module"); - throw - 1; + throw -1; #endif } @@ -4212,7 +4307,7 @@ GMSH_API int gmsh::model::geo::addPoint(const double x, const double y, const double z, const double meshSize, const int tag) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } int outTag = tag; double xx = CTX::instance()->geom.scalingFactor * x; double yy = CTX::instance()->geom.scalingFactor * y; @@ -4227,7 +4322,7 @@ GMSH_API int gmsh::model::geo::addPoint(const double x, const double y, GMSH_API int gmsh::model::geo::addLine(const int startTag, const int endTag, const int tag) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } int outTag = tag; if(!GModel::current()->getGEOInternals()->addLine(outTag, startTag, endTag)) { throw 1; @@ -4241,7 +4336,7 @@ GMSH_API int gmsh::model::geo::addCircleArc(const int startTag, const double nx, const double ny, const double nz) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } int outTag = tag; if(!GModel::current()->getGEOInternals()->addCircleArc( outTag, startTag, centerTag, endTag, nx, ny, nz)) { @@ -4254,7 +4349,7 @@ GMSH_API int gmsh::model::geo::addEllipseArc( const int startTag, const int centerTag, const int majorTag, const int endTag, const int tag, const double nx, const double ny, const double nz) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } int outTag = tag; if(!GModel::current()->getGEOInternals()->addEllipseArc( outTag, startTag, centerTag, majorTag, endTag, nx, ny, nz)) { @@ -4266,7 +4361,7 @@ GMSH_API int gmsh::model::geo::addEllipseArc( GMSH_API int gmsh::model::geo::addSpline(const std::vector<int> &pointTags, const int tag) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } int outTag = tag; if(!GModel::current()->getGEOInternals()->addSpline(outTag, pointTags)) { throw 1; @@ -4277,7 +4372,7 @@ GMSH_API int gmsh::model::geo::addSpline(const std::vector<int> &pointTags, GMSH_API int gmsh::model::geo::addBSpline(const std::vector<int> &pointTags, const int tag) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } int outTag = tag; if(!GModel::current()->getGEOInternals()->addBSpline(outTag, pointTags)) { throw 1; @@ -4288,7 +4383,7 @@ GMSH_API int gmsh::model::geo::addBSpline(const std::vector<int> &pointTags, GMSH_API int gmsh::model::geo::addBezier(const std::vector<int> &pointTags, const int tag) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } int outTag = tag; if(!GModel::current()->getGEOInternals()->addBezier(outTag, pointTags)) { throw 1; @@ -4300,7 +4395,7 @@ GMSH_API int gmsh::model::geo::addCompoundSpline(const std::vector<int> &curveTags, const int numIntervals, const int tag) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } int outTag = tag; if(!GModel::current()->getGEOInternals()->addCompoundSpline(outTag, curveTags, numIntervals)) { @@ -4313,7 +4408,7 @@ GMSH_API int gmsh::model::geo::addCompoundBSpline(const std::vector<int> &curveTags, const int numIntervals, const int tag) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } int outTag = tag; if(!GModel::current()->getGEOInternals()->addCompoundBSpline( outTag, curveTags, numIntervals)) { @@ -4325,7 +4420,7 @@ gmsh::model::geo::addCompoundBSpline(const std::vector<int> &curveTags, GMSH_API int gmsh::model::geo::addCurveLoop(const std::vector<int> &curveTags, const int tag) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } int outTag = tag; if(!GModel::current()->getGEOInternals()->addLineLoop(outTag, curveTags)) { throw 1; @@ -4336,7 +4431,7 @@ GMSH_API int gmsh::model::geo::addCurveLoop(const std::vector<int> &curveTags, GMSH_API int gmsh::model::geo::addPlaneSurface(const std::vector<int> &wireTags, const int tag) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } int outTag = tag; if(!GModel::current()->getGEOInternals()->addPlaneSurface(outTag, wireTags)) { throw 1; @@ -4348,7 +4443,7 @@ GMSH_API int gmsh::model::geo::addSurfaceFilling(const std::vector<int> &wireTags, const int tag, const int sphereCenterTag) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } int outTag = tag; if(!GModel::current()->getGEOInternals()->addSurfaceFilling( outTag, wireTags, sphereCenterTag)) { @@ -4361,7 +4456,7 @@ GMSH_API int gmsh::model::geo::addSurfaceLoop(const std::vector<int> &surfaceTags, const int tag) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } int outTag = tag; if(!GModel::current()->getGEOInternals()->addSurfaceLoop(outTag, surfaceTags)) { @@ -4373,7 +4468,7 @@ gmsh::model::geo::addSurfaceLoop(const std::vector<int> &surfaceTags, GMSH_API int gmsh::model::geo::addVolume(const std::vector<int> &shellTags, const int tag) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } int outTag = tag; if(!GModel::current()->getGEOInternals()->addVolume(outTag, shellTags)) { throw 1; @@ -4410,7 +4505,7 @@ GMSH_API void gmsh::model::geo::extrude(const vectorpair &dimTags, const std::vector<double> &heights, const bool recombine) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } outDimTags.clear(); if(dx || dy || dz) { if(!GModel::current()->getGEOInternals()->extrude( @@ -4434,7 +4529,7 @@ GMSH_API void gmsh::model::geo::revolve( vectorpair &outDimTags, const std::vector<int> &numElements, const std::vector<double> &heights, const bool recombine) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } outDimTags.clear(); if(!GModel::current()->getGEOInternals()->revolve( dimTags, x, y, z, ax, ay, az, angle, outDimTags, @@ -4450,7 +4545,7 @@ GMSH_API void gmsh::model::geo::twist( const std::vector<int> &numElements, const std::vector<double> &heights, const bool recombine) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } outDimTags.clear(); if(!GModel::current()->getGEOInternals()->twist( dimTags, x, y, z, dx, dy, dz, ax, ay, az, angle, outDimTags, @@ -4463,7 +4558,7 @@ GMSH_API void gmsh::model::geo::translate(const vectorpair &dimTags, const double dx, const double dy, const double dz) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } if(!GModel::current()->getGEOInternals()->translate(dimTags, dx, dy, dz)) { throw 1; } @@ -4475,7 +4570,7 @@ GMSH_API void gmsh::model::geo::rotate(const vectorpair &dimTags, const double ay, const double az, const double angle) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } if(!GModel::current()->getGEOInternals()->rotate(dimTags, x, y, z, ax, ay, az, angle)) { throw 1; @@ -4487,7 +4582,7 @@ GMSH_API void gmsh::model::geo::dilate(const vectorpair &dimTags, const double z, const double a, const double b, const double c) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } if(!GModel::current()->getGEOInternals()->dilate(dimTags, x, y, z, a, b, c)) { throw 1; } @@ -4497,7 +4592,7 @@ GMSH_API void gmsh::model::geo::mirror(const vectorpair &dimTags, const double a, const double b, const double c, const double d) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } if(!GModel::current()->getGEOInternals()->symmetry(dimTags, a, b, c, d)) { throw 1; } @@ -4514,7 +4609,7 @@ GMSH_API void gmsh::model::geo::symmetrize(const vectorpair &dimTags, GMSH_API void gmsh::model::geo::copy(const vectorpair &dimTags, vectorpair &outDimTags) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } outDimTags.clear(); if(!GModel::current()->getGEOInternals()->copy(dimTags, outDimTags)) { throw 1; @@ -4524,7 +4619,7 @@ GMSH_API void gmsh::model::geo::copy(const vectorpair &dimTags, GMSH_API void gmsh::model::geo::remove(const vectorpair &dimTags, const bool recursive) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } if(!GModel::current()->getGEOInternals()->remove(dimTags, recursive)) { throw 1; } @@ -4532,7 +4627,7 @@ GMSH_API void gmsh::model::geo::remove(const vectorpair &dimTags, GMSH_API void gmsh::model::geo::removeAllDuplicates() { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } GModel::current()->getGEOInternals()->removeAllDuplicates(); } @@ -4540,7 +4635,7 @@ GMSH_API void gmsh::model::geo::splitCurve(const int tag, const std::vector<int> &pointTags, std::vector<int> &curveTags) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } if(!GModel::current()->getGEOInternals()->splitCurve(tag, pointTags, curveTags)) { throw 1; @@ -4549,19 +4644,19 @@ GMSH_API void gmsh::model::geo::splitCurve(const int tag, GMSH_API int gmsh::model::geo::getMaxTag(const int dim) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } return GModel::current()->getGEOInternals()->getMaxTag(dim); } GMSH_API void gmsh::model::geo::setMaxTag(const int dim, const int maxTag) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } GModel::current()->getGEOInternals()->setMaxTag(dim, maxTag); } GMSH_API void gmsh::model::geo::synchronize() { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } GModel::current()->getGEOInternals()->synchronize(GModel::current()); } @@ -4572,7 +4667,7 @@ gmsh::model::geo::mesh::setTransfiniteCurve(const int tag, const int nPoints, const std::string &meshType, const double coef) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } int t = (meshType == "Progression" || meshType == "Power") ? 1 : (meshType == "Bump") ? 2 : 1; @@ -4586,7 +4681,7 @@ GMSH_API void gmsh::model::geo::mesh::setTransfiniteSurface( const int tag, const std::string &arrangement, const std::vector<int> &cornerTags) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } int t = (arrangement == "Right") ? 1 : (arrangement == "Left") ? -1 : @@ -4603,21 +4698,21 @@ GMSH_API void gmsh::model::geo::mesh::setTransfiniteVolume(const int tag, const std::vector<int> &cornerTags) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } GModel::current()->getGEOInternals()->setTransfiniteVolume(tag, cornerTags); } GMSH_API void gmsh::model::geo::mesh::setRecombine(const int dim, const int tag, const double angle) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } GModel::current()->getGEOInternals()->setRecombine(dim, tag, angle); } GMSH_API void gmsh::model::geo::mesh::setSmoothing(const int dim, const int tag, const int val) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } if(dim != 2) { throw 2; } GModel::current()->getGEOInternals()->setSmoothing(tag, val); } @@ -4625,14 +4720,14 @@ GMSH_API void gmsh::model::geo::mesh::setSmoothing(const int dim, const int tag, GMSH_API void gmsh::model::geo::mesh::setReverse(const int dim, const int tag, const bool val) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } GModel::current()->getGEOInternals()->setReverseMesh(dim, tag, val); } GMSH_API void gmsh::model::geo::mesh::setAlgorithm(const int dim, const int tag, const int val) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } GModel::current()->getGEOInternals()->setMeshAlgorithm(dim, tag, val); } @@ -4640,21 +4735,20 @@ GMSH_API void gmsh::model::geo::mesh::setSizeFromBoundary(const int dim, const int tag, const int val) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } GModel::current()->getGEOInternals()->setMeshSizeFromBoundary(dim, tag, val); } GMSH_API void gmsh::model::geo::mesh::setSize(const vectorpair &dimTags, const double size) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } for(std::size_t i = 0; i < dimTags.size(); i++) { int dim = dimTags[i].first, tag = dimTags[i].second; GModel::current()->getGEOInternals()->setMeshSize(dim, tag, size); } } - // gmsh::model::occ static void _createOcc() @@ -4667,7 +4761,7 @@ GMSH_API int gmsh::model::occ::addPoint(const double x, const double y, const double z, const double meshSize, const int tag) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } _createOcc(); int outTag = tag; if(!GModel::current()->getOCCInternals()->addVertex(outTag, x, y, z, @@ -4680,7 +4774,7 @@ GMSH_API int gmsh::model::occ::addPoint(const double x, const double y, GMSH_API int gmsh::model::occ::addLine(const int startTag, const int endTag, const int tag) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } _createOcc(); int outTag = tag; if(!GModel::current()->getOCCInternals()->addLine(outTag, startTag, endTag)) { @@ -4693,7 +4787,7 @@ GMSH_API int gmsh::model::occ::addCircleArc(const int startTag, const int centerTag, const int endTag, const int tag) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } _createOcc(); int outTag = tag; if(!GModel::current()->getOCCInternals()->addCircleArc(outTag, startTag, @@ -4708,7 +4802,7 @@ GMSH_API int gmsh::model::occ::addCircle(const double x, const double y, const int tag, const double angle1, const double angle2) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } _createOcc(); int outTag = tag; if(!GModel::current()->getOCCInternals()->addCircle(outTag, x, y, z, r, @@ -4723,7 +4817,7 @@ GMSH_API int gmsh::model::occ::addEllipseArc(const int startTag, const int majorTag, const int endTag, const int tag) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } _createOcc(); int outTag = tag; if(!GModel::current()->getOCCInternals()->addEllipseArc( @@ -4739,7 +4833,7 @@ GMSH_API int gmsh::model::occ::addEllipse(const double x, const double y, const double angle1, const double angle2) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } _createOcc(); int outTag = tag; if(!GModel::current()->getOCCInternals()->addEllipse(outTag, x, y, z, r1, r2, @@ -4752,7 +4846,7 @@ GMSH_API int gmsh::model::occ::addEllipse(const double x, const double y, GMSH_API int gmsh::model::occ::addSpline(const std::vector<int> &pointTags, const int tag) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } _createOcc(); int outTag = tag; if(!GModel::current()->getOCCInternals()->addSpline(outTag, pointTags)) { @@ -4766,7 +4860,7 @@ GMSH_API int gmsh::model::occ::addBSpline( const std::vector<double> &weights, const std::vector<double> &knots, const std::vector<int> &multiplicities) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } int outTag = tag; if(!GModel::current()->getOCCInternals()->addBSpline( outTag, pointTags, degree, weights, knots, multiplicities)) { @@ -4778,7 +4872,7 @@ GMSH_API int gmsh::model::occ::addBSpline( GMSH_API int gmsh::model::occ::addBezier(const std::vector<int> &pointTags, const int tag) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } _createOcc(); int outTag = tag; if(!GModel::current()->getOCCInternals()->addBezier(outTag, pointTags)) { @@ -4790,7 +4884,7 @@ GMSH_API int gmsh::model::occ::addBezier(const std::vector<int> &pointTags, GMSH_API int gmsh::model::occ::addWire(const std::vector<int> &curveTags, const int tag, const bool checkClosed) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } _createOcc(); int outTag = tag; if(!GModel::current()->getOCCInternals()->addWire(outTag, curveTags, @@ -4803,7 +4897,7 @@ GMSH_API int gmsh::model::occ::addWire(const std::vector<int> &curveTags, GMSH_API int gmsh::model::occ::addCurveLoop(const std::vector<int> &curveTags, const int tag) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } _createOcc(); int outTag = tag; if(!GModel::current()->getOCCInternals()->addLineLoop(outTag, curveTags)) { @@ -4817,7 +4911,7 @@ GMSH_API int gmsh::model::occ::addRectangle(const double x, const double y, const double dy, const int tag, const double roundedRadius) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } _createOcc(); int outTag = tag; if(!GModel::current()->getOCCInternals()->addRectangle(outTag, x, y, z, dx, @@ -4831,7 +4925,7 @@ GMSH_API int gmsh::model::occ::addDisk(const double xc, const double yc, const double zc, const double rx, const double ry, const int tag) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } _createOcc(); int outTag = tag; if(!GModel::current()->getOCCInternals()->addDisk(outTag, xc, yc, zc, rx, @@ -4844,7 +4938,7 @@ GMSH_API int gmsh::model::occ::addDisk(const double xc, const double yc, GMSH_API int gmsh::model::occ::addPlaneSurface(const std::vector<int> &wireTags, const int tag) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } _createOcc(); int outTag = tag; if(!GModel::current()->getOCCInternals()->addPlaneSurface(outTag, wireTags)) { @@ -4857,7 +4951,7 @@ GMSH_API int gmsh::model::occ::addSurfaceFilling(const int wireTag, const int tag, const std::vector<int> &pointTags) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } _createOcc(); int outTag = tag; if(!GModel::current()->getOCCInternals()->addSurfaceFilling(outTag, wireTag, @@ -4871,7 +4965,7 @@ GMSH_API int gmsh::model::occ::addSurfaceLoop(const std::vector<int> &surfaceTags, const int tag, const bool sewing) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } _createOcc(); int outTag = tag; if(!GModel::current()->getOCCInternals()->addSurfaceLoop(outTag, surfaceTags, @@ -4884,7 +4978,7 @@ gmsh::model::occ::addSurfaceLoop(const std::vector<int> &surfaceTags, GMSH_API int gmsh::model::occ::addVolume(const std::vector<int> &shellTags, const int tag) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } _createOcc(); int outTag = tag; if(!GModel::current()->getOCCInternals()->addVolume(outTag, shellTags)) { @@ -4899,7 +4993,7 @@ GMSH_API int gmsh::model::occ::addSphere(const double xc, const double yc, const double angle2, const double angle3) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } _createOcc(); int outTag = tag; if(!GModel::current()->getOCCInternals()->addSphere( @@ -4914,7 +5008,7 @@ GMSH_API int gmsh::model::occ::addBox(const double x, const double y, const double dy, const double dz, const int tag) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } _createOcc(); int outTag = tag; if(!GModel::current()->getOCCInternals()->addBox(outTag, x, y, z, dx, dy, @@ -4930,7 +5024,7 @@ GMSH_API int gmsh::model::occ::addCylinder(const double x, const double y, const double r, const int tag, const double angle) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } _createOcc(); int outTag = tag; if(!GModel::current()->getOCCInternals()->addCylinder(outTag, x, y, z, dx, dy, @@ -4946,7 +5040,7 @@ GMSH_API int gmsh::model::occ::addCone(const double x, const double y, const double r1, const double r2, const int tag, const double angle) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } _createOcc(); int outTag = tag; if(!GModel::current()->getOCCInternals()->addCone(outTag, x, y, z, dx, dy, dz, @@ -4961,7 +5055,7 @@ GMSH_API int gmsh::model::occ::addWedge(const double x, const double y, const double dy, const double dz, const int tag, const double ltx) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } _createOcc(); int outTag = tag; if(!GModel::current()->getOCCInternals()->addWedge(outTag, x, y, z, dx, dy, @@ -4976,7 +5070,7 @@ GMSH_API int gmsh::model::occ::addTorus(const double x, const double y, const double r2, const int tag, const double angle) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } _createOcc(); int outTag = tag; if(!GModel::current()->getOCCInternals()->addTorus(outTag, x, y, z, r1, r2, @@ -4986,13 +5080,11 @@ GMSH_API int gmsh::model::occ::addTorus(const double x, const double y, return outTag; } -GMSH_API void -gmsh::model::occ::addThruSections(const std::vector<int> &wireTags, - vectorpair &outDimTags, const int tag, - const bool makeSolid, const bool makeRuled, - const int maxDegree) +GMSH_API void gmsh::model::occ::addThruSections( + const std::vector<int> &wireTags, vectorpair &outDimTags, const int tag, + const bool makeSolid, const bool makeRuled, const int maxDegree) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } _createOcc(); outDimTags.clear(); if(!GModel::current()->getOCCInternals()->addThruSections( @@ -5005,7 +5097,7 @@ GMSH_API void gmsh::model::occ::addThickSolid( const int volumeTag, const std::vector<int> &excludeSurfaceTags, const double offset, vectorpair &outDimTags, const int tag) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } _createOcc(); outDimTags.clear(); if(!GModel::current()->getOCCInternals()->addThickSolid( @@ -5021,7 +5113,7 @@ GMSH_API void gmsh::model::occ::extrude(const vectorpair &dimTags, const std::vector<double> &heights, const bool recombine) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } _createOcc(); outDimTags.clear(); if(!GModel::current()->getOCCInternals()->extrude( @@ -5037,7 +5129,7 @@ GMSH_API void gmsh::model::occ::revolve( vectorpair &outDimTags, const std::vector<int> &numElements, const std::vector<double> &heights, const bool recombine) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } _createOcc(); outDimTags.clear(); if(!GModel::current()->getOCCInternals()->revolve( @@ -5051,7 +5143,7 @@ GMSH_API void gmsh::model::occ::addPipe(const vectorpair &dimTags, const int wireTag, vectorpair &outDimTags) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } _createOcc(); outDimTags.clear(); if(!GModel::current()->getOCCInternals()->addPipe(dimTags, wireTag, @@ -5066,7 +5158,7 @@ GMSH_API void gmsh::model::occ::fillet(const std::vector<int> &volumeTags, vectorpair &outDimTags, const bool removeVolume) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } _createOcc(); outDimTags.clear(); if(!GModel::current()->getOCCInternals()->fillet(volumeTags, curveTags, radii, @@ -5082,7 +5174,7 @@ GMSH_API void gmsh::model::occ::chamfer(const std::vector<int> &volumeTags, vectorpair &outDimTags, const bool removeVolume) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } _createOcc(); outDimTags.clear(); if(!GModel::current()->getOCCInternals()->chamfer(volumeTags, curveTags, @@ -5099,7 +5191,7 @@ GMSH_API void gmsh::model::occ::fuse(const vectorpair &objectDimTags, const int tag, const bool removeObject, const bool removeTool) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } _createOcc(); outDimTags.clear(); outDimTagsMap.clear(); @@ -5115,7 +5207,7 @@ GMSH_API void gmsh::model::occ::intersect( vectorpair &outDimTags, std::vector<vectorpair> &outDimTagsMap, const int tag, const bool removeObject, const bool removeTool) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } _createOcc(); outDimTags.clear(); outDimTagsMap.clear(); @@ -5133,7 +5225,7 @@ GMSH_API void gmsh::model::occ::cut(const vectorpair &objectDimTags, const int tag, const bool removeObject, const bool removeTool) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } _createOcc(); outDimTags.clear(); outDimTagsMap.clear(); @@ -5151,7 +5243,7 @@ GMSH_API void gmsh::model::occ::fragment(const vectorpair &objectDimTags, const int tag, const bool removeObject, const bool removeTool) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } _createOcc(); outDimTags.clear(); outDimTagsMap.clear(); @@ -5166,7 +5258,7 @@ GMSH_API void gmsh::model::occ::translate(const vectorpair &dimTags, const double dx, const double dy, const double dz) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } _createOcc(); if(!GModel::current()->getOCCInternals()->translate(dimTags, dx, dy, dz)) { throw 1; @@ -5179,7 +5271,7 @@ GMSH_API void gmsh::model::occ::rotate(const vectorpair &dimTags, const double ay, const double az, const double angle) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } _createOcc(); if(!GModel::current()->getOCCInternals()->rotate(dimTags, x, y, z, ax, ay, az, angle)) { @@ -5192,7 +5284,7 @@ GMSH_API void gmsh::model::occ::dilate(const vectorpair &dimTags, const double z, const double a, const double b, const double c) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } _createOcc(); if(!GModel::current()->getOCCInternals()->dilate(dimTags, x, y, z, a, b, c)) { throw 1; @@ -5203,7 +5295,7 @@ GMSH_API void gmsh::model::occ::mirror(const vectorpair &dimTags, const double a, const double b, const double c, const double d) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } _createOcc(); if(!GModel::current()->getOCCInternals()->symmetry(dimTags, a, b, c, d)) { throw 1; @@ -5220,7 +5312,7 @@ GMSH_API void gmsh::model::occ::symmetrize(const vectorpair &dimTags, GMSH_API void gmsh::model::occ::affineTransform(const vectorpair &dimTags, const std::vector<double> &a) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } _createOcc(); if(!GModel::current()->getOCCInternals()->affine(dimTags, a)) { throw 1; } } @@ -5228,7 +5320,7 @@ GMSH_API void gmsh::model::occ::affineTransform(const vectorpair &dimTags, GMSH_API void gmsh::model::occ::copy(const vectorpair &dimTags, vectorpair &outDimTags) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } _createOcc(); outDimTags.clear(); if(!GModel::current()->getOCCInternals()->copy(dimTags, outDimTags)) { @@ -5239,7 +5331,7 @@ GMSH_API void gmsh::model::occ::copy(const vectorpair &dimTags, GMSH_API void gmsh::model::occ::remove(const vectorpair &dimTags, const bool recursive) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } _createOcc(); if(!GModel::current()->getOCCInternals()->remove(dimTags, recursive)) { throw 1; @@ -5248,7 +5340,7 @@ GMSH_API void gmsh::model::occ::remove(const vectorpair &dimTags, GMSH_API void gmsh::model::occ::removeAllDuplicates() { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } _createOcc(); GModel::current()->getOCCInternals()->removeAllDuplicates(); } @@ -5258,7 +5350,7 @@ GMSH_API void gmsh::model::occ::healShapes( const bool fixDegenerated, const bool fixSmallEdges, const bool fixSmallFaces, const bool sewFaces, const bool makeSolids) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } _createOcc(); outDimTags.clear(); if(!GModel::current()->getOCCInternals()->healShapes( @@ -5273,7 +5365,7 @@ GMSH_API void gmsh::model::occ::importShapes(const std::string &fileName, const bool highestDimOnly, const std::string &format) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } _createOcc(); outDimTags.clear(); if(!GModel::current()->getOCCInternals()->importShapes( @@ -5285,7 +5377,7 @@ GMSH_API void gmsh::model::occ::importShapes(const std::string &fileName, GMSH_API void gmsh::model::occ::importShapesNativePointer( const void *shape, vectorpair &outDimTags, const bool highestDimOnly) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } _createOcc(); outDimTags.clear(); #if defined(HAVE_OCC) @@ -5295,13 +5387,13 @@ GMSH_API void gmsh::model::occ::importShapesNativePointer( } #else Msg::Error("Gmsh requires OpenCASCADE to import native shape"); - throw - 1; + throw -1; #endif } GMSH_API void gmsh::model::occ::getEntities(vectorpair &dimTags, const int dim) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } _createOcc(); if(!GModel::current()->getOCCInternals()->getEntities(dimTags, dim)) { throw 1; @@ -5312,10 +5404,10 @@ GMSH_API void gmsh::model::occ::getEntitiesInBoundingBox( const double xmin, const double ymin, const double zmin, const double xmax, const double ymax, const double zmax, vectorpair &dimTags, const int dim) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } dimTags.clear(); - if(!GModel::current()->getOCCInternals()->getEntitiesInBoundingBox - (xmin, ymin, zmin, xmax, ymax, zmax, dimTags, dim)) { + if(!GModel::current()->getOCCInternals()->getEntitiesInBoundingBox( + xmin, ymin, zmin, xmax, ymax, zmax, dimTags, dim)) { throw 1; } } @@ -5325,10 +5417,10 @@ GMSH_API void gmsh::model::occ::getBoundingBox(const int dim, const int tag, double &zmin, double &xmax, double &ymax, double &zmax) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } _createOcc(); - if(!GModel::current()->getOCCInternals()->getBoundingBox - (dim, tag, xmin, ymin, zmin, xmax, ymax, zmax)) { + if(!GModel::current()->getOCCInternals()->getBoundingBox( + dim, tag, xmin, ymin, zmin, xmax, ymax, zmax)) { throw 1; } } @@ -5336,7 +5428,7 @@ GMSH_API void gmsh::model::occ::getBoundingBox(const int dim, const int tag, GMSH_API void gmsh::model::occ::getMass(const int dim, const int tag, double &mass) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } _createOcc(); if(!GModel::current()->getOCCInternals()->getMass(dim, tag, mass)) { throw 1; @@ -5346,7 +5438,7 @@ GMSH_API void gmsh::model::occ::getMass(const int dim, const int tag, GMSH_API void gmsh::model::occ::getCenterOfMass(const int dim, const int tag, double &x, double &y, double &z) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } _createOcc(); if(!GModel::current()->getOCCInternals()->getCenterOfMass(dim, tag, x, y, z)) { @@ -5357,7 +5449,7 @@ GMSH_API void gmsh::model::occ::getCenterOfMass(const int dim, const int tag, GMSH_API void gmsh::model::occ::getMatrixOfInertia(const int dim, const int tag, std::vector<double> &m) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } _createOcc(); if(!GModel::current()->getOCCInternals()->getMatrixOfInertia(dim, tag, m)) { throw 1; @@ -5366,19 +5458,19 @@ GMSH_API void gmsh::model::occ::getMatrixOfInertia(const int dim, const int tag, GMSH_API int gmsh::model::occ::getMaxTag(const int dim) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } return GModel::current()->getOCCInternals()->getMaxTag(dim); } GMSH_API void gmsh::model::occ::setMaxTag(const int dim, const int maxTag) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } GModel::current()->getOCCInternals()->setMaxTag(dim, maxTag); } GMSH_API void gmsh::model::occ::synchronize() { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } _createOcc(); GModel::current()->getOCCInternals()->synchronize(GModel::current()); } @@ -5388,7 +5480,7 @@ GMSH_API void gmsh::model::occ::synchronize() GMSH_API void gmsh::model::occ::mesh::setSize(const vectorpair &dimTags, const double size) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } _createOcc(); for(std::size_t i = 0; i < dimTags.size(); i++) { int dim = dimTags[i].first, tag = dimTags[i].second; @@ -5400,7 +5492,7 @@ GMSH_API void gmsh::model::occ::mesh::setSize(const vectorpair &dimTags, GMSH_API int gmsh::view::add(const std::string &name, const int tag) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } #if defined(HAVE_POST) PView *view = new PView(tag); view->getData()->setName(name); @@ -5410,13 +5502,13 @@ GMSH_API int gmsh::view::add(const std::string &name, const int tag) return view->getTag(); #else Msg::Error("Views require the post-processing module"); - throw - 1; + throw -1; #endif } GMSH_API void gmsh::view::remove(const int tag) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } #if defined(HAVE_POST) PView *view = PView::getViewByTag(tag); if(!view) { @@ -5429,13 +5521,13 @@ GMSH_API void gmsh::view::remove(const int tag) #endif #else Msg::Error("Views require the post-processing module"); - throw - 1; + throw -1; #endif } GMSH_API int gmsh::view::getIndex(const int tag) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } #if defined(HAVE_POST) PView *view = PView::getViewByTag(tag); if(!view) { @@ -5445,29 +5537,29 @@ GMSH_API int gmsh::view::getIndex(const int tag) return view->getIndex(); #else Msg::Error("Views require the post-processing module"); - throw - 1; + throw -1; #endif } GMSH_API void gmsh::view::getTags(std::vector<int> &tags) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } #if defined(HAVE_POST) tags.clear(); for(std::size_t i = 0; i < PView::list.size(); i++) tags.push_back(PView::list[i]->getTag()); #else Msg::Error("Views require the post-processing module"); - throw - 1; + throw -1; #endif } template <class T> -static void _addModelData( - const int tag, const int step, const std::string &modelName, - const std::string &dataType, const std::vector<std::size_t> &tags, - const T &data, const double time, const int numComponents, - const int partition) +static void +_addModelData(const int tag, const int step, const std::string &modelName, + const std::string &dataType, const std::vector<std::size_t> &tags, + const T &data, const double time, const int numComponents, + const int partition) { #if defined(HAVE_POST) PView *view = PView::getViewByTag(tag); @@ -5517,7 +5609,7 @@ static void _addModelData( view->getOptions()->targetError); #else Msg::Error("Views require the post-processing module"); - throw - 1; + throw -1; #endif } @@ -5527,24 +5619,24 @@ GMSH_API void gmsh::view::addModelData( const std::vector<std::vector<double> > &data, const double time, const int numComponents, const int partition) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } if(tags.size() != data.size()) { Msg::Error("Incompatible number of tags and data"); throw 2; } - _addModelData(tag, step, modelName, dataType, tags, data, time, - numComponents, partition); + _addModelData(tag, step, modelName, dataType, tags, data, time, numComponents, + partition); } GMSH_API void gmsh::view::addHomogeneousModelData( const int tag, const int step, const std::string &modelName, const std::string &dataType, const std::vector<std::size_t> &tags, - const std::vector<double> &data, const double time, - const int numComponents, const int partition) + const std::vector<double> &data, const double time, const int numComponents, + const int partition) { - if(!_isInitialized()) { throw - 1; } - _addModelData(tag, step, modelName, dataType, tags, data, time, - numComponents, partition); + if(!_isInitialized()) { throw -1; } + _addModelData(tag, step, modelName, dataType, tags, data, time, numComponents, + partition); } GMSH_API void gmsh::view::getModelData(const int tag, const int step, @@ -5553,7 +5645,7 @@ GMSH_API void gmsh::view::getModelData(const int tag, const int step, std::vector<std::vector<double> > &data, double &time, int &numComponents) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } #if defined(HAVE_POST) PView *view = PView::getViewByTag(tag); if(!view) { @@ -5607,7 +5699,7 @@ GMSH_API void gmsh::view::getModelData(const int tag, const int step, } #else Msg::Error("Views require the post-processing module"); - throw - 1; + throw -1; #endif } @@ -5691,7 +5783,7 @@ GMSH_API void gmsh::view::addListData(const int tag, const int numElements, const std::vector<double> &data) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } #if defined(HAVE_POST) PView *view = PView::getViewByTag(tag); if(!view) { @@ -5720,7 +5812,7 @@ GMSH_API void gmsh::view::addListData(const int tag, throw 2; #else Msg::Error("Views require the post-processing module"); - throw - 1; + throw -1; #endif } @@ -5729,7 +5821,7 @@ GMSH_API void gmsh::view::getListData(const int tag, std::vector<int> &numElements, std::vector<std::vector<double> > &data) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } #if defined(HAVE_POST) PView *view = PView::getViewByTag(tag); if(!view) { @@ -5756,7 +5848,7 @@ GMSH_API void gmsh::view::getListData(const int tag, } #else Msg::Error("Views require the post-processing module"); - throw - 1; + throw -1; #endif } @@ -5764,11 +5856,11 @@ static double getStringStyle(const std::vector<std::string> &style) { if(style.empty()) return 0.; int align = 0, font = 0, fontsize = CTX::instance()->glFontSize; - if(style.size() % 2){ + if(style.size() % 2) { Msg::Error("Number of string style attributes should be even"); } - else{ - for(std::size_t i = 0 ; i < style.size(); i += 2){ + else { + for(std::size_t i = 0; i < style.size(); i += 2) { std::string key = style[i], val = style[i + 1]; #if defined(HAVE_OPENGL) if(key == "Font") @@ -5780,15 +5872,15 @@ static double getStringStyle(const std::vector<std::string> &style) #endif } } - return (double)((align<<16)|(font<<8)|(fontsize)); + return (double)((align << 16) | (font << 8) | (fontsize)); } -GMSH_API void gmsh::view::addListDataString(const int tag, - const std::vector<double> &coord, - const std::vector<std::string> &data, - const std::vector<std::string> &style) +GMSH_API void +gmsh::view::addListDataString(const int tag, const std::vector<double> &coord, + const std::vector<std::string> &data, + const std::vector<std::string> &style) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } #if defined(HAVE_POST) PView *view = PView::getViewByTag(tag); if(!view) { @@ -5808,8 +5900,7 @@ GMSH_API void gmsh::view::addListDataString(const int tag, d->T3D.push_back(coord[0]); d->T3D.push_back(coord[1]); d->T3D.push_back(coord[2]); - d->T3D.push_back(getStringStyle(style)), - d->T3D.push_back(d->T3C.size()); + d->T3D.push_back(getStringStyle(style)), d->T3D.push_back(d->T3C.size()); d->NbT3++; for(std::size_t i = 0; i < data.size(); i++) { for(std::size_t j = 0; j < data[i].size(); j++) { @@ -5821,8 +5912,7 @@ GMSH_API void gmsh::view::addListDataString(const int tag, else if(coord.size() == 2) { d->T2D.push_back(coord[0]); d->T2D.push_back(coord[1]); - d->T2D.push_back(getStringStyle(style)), - d->T2D.push_back(d->T2C.size()); + d->T2D.push_back(getStringStyle(style)), d->T2D.push_back(d->T2C.size()); d->NbT2++; for(std::size_t i = 0; i < data.size(); i++) { for(std::size_t j = 0; j < data[i].size(); j++) { @@ -5834,7 +5924,7 @@ GMSH_API void gmsh::view::addListDataString(const int tag, d->finalize(); #else Msg::Error("Views require the post-processing module"); - throw - 1; + throw -1; #endif } @@ -5843,7 +5933,7 @@ GMSH_API void gmsh::view::getListDataStrings(const int tag, const int dim, std::vector<std::string> &data, std::vector<std::string> &style) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } #if defined(HAVE_POST) PView *view = PView::getViewByTag(tag); if(!view) { @@ -5895,14 +5985,14 @@ GMSH_API void gmsh::view::getListDataStrings(const int tag, const int dim, } #else Msg::Error("Views require the post-processing module"); - throw - 1; + throw -1; #endif } GMSH_API int gmsh::view::addAlias(const int refTag, const bool copyOptions, const int tag) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } #if defined(HAVE_POST) PView *ref = PView::getViewByTag(refTag); if(!ref) { @@ -5916,13 +6006,13 @@ GMSH_API int gmsh::view::addAlias(const int refTag, const bool copyOptions, return view->getTag(); #else Msg::Error("Views require the post-processing module"); - throw - 1; + throw -1; #endif } GMSH_API void gmsh::view::copyOptions(const int refTag, const int tag) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } #if defined(HAVE_POST) PView *ref = PView::getViewByTag(refTag); if(!ref) { @@ -5940,7 +6030,7 @@ GMSH_API void gmsh::view::copyOptions(const int refTag, const int tag) #endif #else Msg::Error("Views require the post-processing module"); - throw - 1; + throw -1; #endif } @@ -5948,7 +6038,7 @@ GMSH_API void gmsh::view::combine(const std::string &what, const std::string &how, const bool remove, const bool copyOptions) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } #if defined(HAVE_POST) bool time = (what == "steps") ? true : false; // "elements" int ihow = (how == "all") ? 1 : (how == "name") ? 2 : 0; // "visible" @@ -5958,7 +6048,7 @@ GMSH_API void gmsh::view::combine(const std::string &what, #endif #else Msg::Error("Views require the post-processing module"); - throw - 1; + throw -1; #endif } @@ -5970,7 +6060,7 @@ GMSH_API void gmsh::view::probe(const int tag, const double x, const double y, const std::vector<double> &yElemCoord, const std::vector<double> &zElemCoord) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } #if defined(HAVE_POST) PView *view = PView::getViewByTag(tag); if(!view) { @@ -6019,14 +6109,14 @@ GMSH_API void gmsh::view::probe(const int tag, const double x, const double y, if(found) value.insert(value.end(), val.begin(), val.end()); #else Msg::Error("Views require the post-processing module"); - throw - 1; + throw -1; #endif } GMSH_API void gmsh::view::write(const int tag, const std::string &fileName, const bool append) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } #if defined(HAVE_POST) PView *view = PView::getViewByTag(tag); if(!view) { @@ -6036,7 +6126,7 @@ GMSH_API void gmsh::view::write(const int tag, const std::string &fileName, view->write(fileName, 10, append); #else Msg::Error("Views require the post-processing module"); - throw - 1; + throw -1; #endif } @@ -6046,7 +6136,7 @@ GMSH_API void gmsh::plugin::setNumber(const std::string &name, const std::string &option, const double value) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } #if defined(HAVE_PLUGINS) try { PluginManager::instance()->setPluginOption(name, option, value); @@ -6056,7 +6146,7 @@ GMSH_API void gmsh::plugin::setNumber(const std::string &name, } #else Msg::Error("Views require the post-processing and plugin modules"); - throw - 1; + throw -1; #endif } @@ -6064,7 +6154,7 @@ GMSH_API void gmsh::plugin::setString(const std::string &name, const std::string &option, const std::string &value) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } #if defined(HAVE_PLUGINS) try { PluginManager::instance()->setPluginOption(name, option, value); @@ -6074,13 +6164,13 @@ GMSH_API void gmsh::plugin::setString(const std::string &name, } #else Msg::Error("Views require the post-processing and plugin modules"); - throw - 1; + throw -1; #endif } GMSH_API void gmsh::plugin::run(const std::string &name) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } #if defined(HAVE_PLUGINS) try { PluginManager::instance()->action(name, "Run", 0); @@ -6090,7 +6180,7 @@ GMSH_API void gmsh::plugin::run(const std::string &name) } #else Msg::Error("Views require the post-processing and plugin modules"); - throw - 1; + throw -1; #endif } @@ -6113,25 +6203,25 @@ static void error_handler(const char *fmt, ...) vsnprintf(str, sizeof(str), fmt, args); va_end(args); Msg::Error("%s (FLTK internal error)", str); - throw - 1; + throw -1; } GMSH_API void gmsh::fltk::initialize() { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } #if defined(HAVE_FLTK) FlGui::instance(_argc, _argv, false, error_handler); FlGui::setFinishedProcessingCommandLine(); FlGui::check(true); #else Msg::Error("Fltk not available"); - throw - 1; + throw -1; #endif } GMSH_API int gmsh::fltk::isAvailable() { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } #if defined(HAVE_FLTK) return FlGui::available() ? 1 : 0; #else @@ -6141,7 +6231,7 @@ GMSH_API int gmsh::fltk::isAvailable() GMSH_API void gmsh::fltk::wait(const double time) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } #if defined(HAVE_FLTK) if(!FlGui::available()) FlGui::instance(_argc, _argv, false, error_handler); if(time >= 0) @@ -6150,64 +6240,64 @@ GMSH_API void gmsh::fltk::wait(const double time) FlGui::wait(true); #else Msg::Error("Fltk not available"); - throw - 1; + throw -1; #endif } GMSH_API void gmsh::fltk::lock() { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } #if defined(HAVE_FLTK) FlGui::lock(); #else Msg::Error("Fltk not available"); - throw - 1; + throw -1; #endif } GMSH_API void gmsh::fltk::unlock() { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } #if defined(HAVE_FLTK) FlGui::unlock(); #else Msg::Error("Fltk not available"); - throw - 1; + throw -1; #endif } GMSH_API void gmsh::fltk::update() { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } #if defined(HAVE_FLTK) if(!FlGui::available()) FlGui::instance(_argc, _argv, false, error_handler); FlGui::instance()->updateViews(true, true); #else Msg::Error("Fltk not available"); - throw - 1; + throw -1; #endif } GMSH_API void gmsh::fltk::awake(const std::string &action) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } #if defined(HAVE_FLTK) FlGui::awake(action); #else Msg::Error("Fltk not available"); - throw - 1; + throw -1; #endif } GMSH_API void gmsh::fltk::run() { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } #if defined(HAVE_FLTK) if(!FlGui::available()) FlGui::instance(_argc, _argv, false, error_handler); FlGui::instance()->run(); // this calls draw() once #else Msg::Error("Fltk not available"); - throw - 1; + throw -1; #endif } @@ -6227,7 +6317,7 @@ static int selectionCode(char val) GMSH_API int gmsh::fltk::selectEntities(vectorpair &dimTags, const int dim) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } dimTags.clear(); #if defined(HAVE_FLTK) if(!FlGui::available()) FlGui::instance(_argc, _argv, false, error_handler); @@ -6259,7 +6349,7 @@ GMSH_API int gmsh::fltk::selectEntities(vectorpair &dimTags, const int dim) GMSH_API int gmsh::fltk::selectElements(std::vector<std::size_t> &elementTags) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } elementTags.clear(); #if defined(HAVE_FLTK) if(!FlGui::available()) FlGui::instance(_argc, _argv, false, error_handler); @@ -6278,7 +6368,7 @@ GMSH_API int gmsh::fltk::selectElements(std::vector<std::size_t> &elementTags) GMSH_API int gmsh::fltk::selectViews(std::vector<int> &viewTags) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } viewTags.clear(); #if defined(HAVE_FLTK) if(!FlGui::available()) FlGui::instance(_argc, _argv, false, error_handler); @@ -6296,7 +6386,7 @@ GMSH_API int gmsh::fltk::selectViews(std::vector<int> &viewTags) GMSH_API void gmsh::onelab::set(const std::string &data, const std::string &format) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } #if defined(HAVE_ONELAB) if(format == "json") { if(!::onelab::server::instance()->fromJSON(data)) @@ -6306,14 +6396,14 @@ GMSH_API void gmsh::onelab::set(const std::string &data, Msg::Error("Unknown data format"); #else Msg::Error("ONELAB not available"); - throw - 1; + throw -1; #endif } GMSH_API void gmsh::onelab::get(std::string &data, const std::string &name, const std::string &format) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } #if defined(HAVE_ONELAB) data.clear(); if(name.empty()) { @@ -6344,14 +6434,14 @@ GMSH_API void gmsh::onelab::get(std::string &data, const std::string &name, } #else Msg::Error("ONELAB not available"); - throw - 1; + throw -1; #endif } GMSH_API void gmsh::onelab::setNumber(const std::string &name, const std::vector<double> &value) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } #if defined(HAVE_ONELAB) ::onelab::number p(name); std::vector< ::onelab::number> ps; @@ -6361,14 +6451,14 @@ GMSH_API void gmsh::onelab::setNumber(const std::string &name, ::onelab::server::instance()->set(p); #else Msg::Error("ONELAB not available"); - throw - 1; + throw -1; #endif } GMSH_API void gmsh::onelab::getNumber(const std::string &name, std::vector<double> &value) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } #if defined(HAVE_ONELAB) value.clear(); std::vector< ::onelab::number> ps; @@ -6376,14 +6466,14 @@ GMSH_API void gmsh::onelab::getNumber(const std::string &name, if(ps.size()) value = ps[0].getValues(); #else Msg::Error("ONELAB not available"); - throw - 1; + throw -1; #endif } GMSH_API void gmsh::onelab::setString(const std::string &name, const std::vector<std::string> &value) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } #if defined(HAVE_ONELAB) ::onelab::string p(name); std::vector< ::onelab::string> ps; @@ -6393,14 +6483,14 @@ GMSH_API void gmsh::onelab::setString(const std::string &name, ::onelab::server::instance()->set(p); #else Msg::Error("ONELAB not available"); - throw - 1; + throw -1; #endif } GMSH_API void gmsh::onelab::getString(const std::string &name, std::vector<std::string> &value) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } #if defined(HAVE_ONELAB) value.clear(); std::vector< ::onelab::string> ps; @@ -6408,25 +6498,25 @@ GMSH_API void gmsh::onelab::getString(const std::string &name, if(ps.size()) value = ps[0].getValues(); #else Msg::Error("ONELAB not available"); - throw - 1; + throw -1; #endif } GMSH_API void gmsh::onelab::clear(const std::string &name) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } #if defined(HAVE_ONELAB) ::onelab::server::instance()->clear(name); #else Msg::Error("ONELAB not available"); - throw - 1; + throw -1; #endif } GMSH_API void gmsh::onelab::run(const std::string &name, const std::string &command) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } #if defined(HAVE_ONELAB) onelabUtils::runClient(name, command); #endif @@ -6437,7 +6527,7 @@ GMSH_API void gmsh::onelab::run(const std::string &name, GMSH_API void gmsh::logger::write(const std::string &message, const std::string &level) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } if(level == "error") Msg::Error("%s", message.c_str()); else if(level == "warning") @@ -6461,7 +6551,7 @@ public: GMSH_API void gmsh::logger::start() { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } GmshMessage *msg = Msg::GetCallback(); if(msg) { Msg::Warning("Logger already started - ignoring"); } else { @@ -6472,7 +6562,7 @@ GMSH_API void gmsh::logger::start() GMSH_API void gmsh::logger::get(std::vector<std::string> &log) { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } apiMsg *msg = dynamic_cast<apiMsg *>(Msg::GetCallback()); if(msg) { msg->get(log); } else { @@ -6482,7 +6572,7 @@ GMSH_API void gmsh::logger::get(std::vector<std::string> &log) GMSH_API void gmsh::logger::stop() { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } GmshMessage *msg = Msg::GetCallback(); if(msg) { delete msg; @@ -6495,12 +6585,12 @@ GMSH_API void gmsh::logger::stop() GMSH_API double gmsh::logger::getWallTime() { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } return TimeOfDay(); } GMSH_API double gmsh::logger::getCpuTime() { - if(!_isInitialized()) { throw - 1; } + if(!_isInitialized()) { throw -1; } return Cpu(); } diff --git a/api/gen.py b/api/gen.py index b05811ddc28a514efb2c9c48a597ab214d948031..7bd28efa181c12656652b47c2d550c0a492ff999 100644 --- a/api/gen.py +++ b/api/gen.py @@ -312,11 +312,14 @@ doc = '''Preallocate data before calling `getJacobians' with `numTasks' > 1. For mesh.add_special('preallocateJacobians', doc, ['onlycc++'], None, iint('elementType'), iint('numEvaluationPoints'), ibool('allocateJacobians'), ibool('allocateDeterminants'), ibool('allocateCoord'), ovectordouble('jacobians'), ovectordouble('determinants'), ovectordouble('coord'), iint('tag', '-1')) doc = '''Get the basis functions of the element of type `elementType' at the evaluation points `localCoord' (given as concatenated triplets of coordinates in the reference element [g1u, g1v, g1w, ..., gGu, gGv, gGw]), for the function space `functionSpaceType' (e.g. "Lagrange" or "GradLagrange" for Lagrange basis functions or their gradient, in the u, v, w coordinates of the reference element; or "H1Legendre3" or "GradH1Legendre3" for 3rd order hierarchical H1 Legendre functions). `numComponents' returns the number C of components of a basis function. `basisFunctions' returns the value of the N basis functions at the evaluation points, i.e. [g1f1, g1f2, ..., g1fN, g2f1, ...] when C == 1 or [g1f1u, g1f1v, g1f1w, g1f2u, ..., g1fNw, g2f1u, ...] when C == 3. For basis functions that depend on the orientation of the elements, all values for the first orientation are returned first, followed by values for the secondd, etc. `numOrientations' returns the overall number of orientations.''' -mesh.add('getBasisFunctions', doc, None, iint('elementType'), ivectordouble('localCoord'), istring('functionSpaceType'), oint('numComponents'), ovectordouble('basisFunctions'), oint('numOrientations')) +mesh.add('getBasisFunctions', doc, None, iint('elementType'), ivectordouble('localCoord'), istring('functionSpaceType'), oint('numComponents'), ovectordouble('basisFunctions'), oint('numOrientations'), ivectorint('wantedOrientations', 'std::vector<int>()', "[]", "[]")) doc = '''Get the orientation index of the elements of type `elementType' in the entity of tag `tag'. The arguments have the same meaning as in `getBasisFunctions'. `basisFunctionsOrientation' is a vector giving for each element the orientation index in the values returned by `getBasisFunctions'. For Lagrange basis functions the call is superfluous as it will return a vector of zeros.''' mesh.add('getBasisFunctionsOrientationForElements', doc, None, iint('elementType'), istring('functionSpaceType'), ovectorint('basisFunctionsOrientation'), iint('tag','-1'), isize('task', '0'), isize('numTasks', '1')) +doc = '''Get the number of possible orientations for elements of type `elementType' and function space named `functionSpaceType'.''' +mesh.add('getNumberOfOrientations', doc, oint, iint('elementType'), istring('functionSpaceType')) + doc = '''Preallocate data before calling `getBasisFunctionsOrientationForElements' with `numTasks' > 1. For C and C++ only.''' mesh.add_special('preallocateBasisFunctionsOrientationForElements', doc, ['onlycc++'], None, iint('elementType'), ovectorint('basisFunctionsOrientation'), iint('tag', '-1')) diff --git a/api/gmsh.h b/api/gmsh.h index 9a7c36d840196c69fbf304ab5459d4ff2eeb739d..8f6280453e830387b3cc7ac93259f56b84abb909 100644 --- a/api/gmsh.h +++ b/api/gmsh.h @@ -719,8 +719,8 @@ namespace gmsh { // Top-level functions // Search the mesh for an element located at coordinates (`x', `y', `z'). // This function performs a search in a spatial octree. If an element is // found, return its tag, type and node tags, as well as the local - // coordinates (`u', `v', `w') within the element corresponding to search - // location. If `dim' is >= 0, only search for elements of the given + // coordinates (`u', `v', `w') within the reference element corresponding to + // search location. If `dim' is >= 0, only search for elements of the given // dimension. If `strict' is not set, use a tolerance to find elements near // the search location. GMSH_API void getElementByCoordinates(const double x, @@ -935,7 +935,8 @@ namespace gmsh { // Top-level functions const std::string & functionSpaceType, int & numComponents, std::vector<double> & basisFunctions, - int & numOrientations); + int & numOrientations, + const std::vector<int> & wantedOrientations = std::vector<int>()); // gmsh::model::mesh::getBasisFunctionsOrientationForElements // @@ -952,6 +953,13 @@ namespace gmsh { // Top-level functions const std::size_t task = 0, const std::size_t numTasks = 1); + // gmsh::model::mesh::getNumberOfOrientations + // + // Get the number of possible orientations for elements of type `elementType' + // and function space named `functionSpaceType'. + GMSH_API int getNumberOfOrientations(const int elementType, + const std::string & functionSpaceType); + // gmsh::model::mesh::preallocateBasisFunctionsOrientationForElements // // Preallocate data before calling `getBasisFunctionsOrientationForElements' diff --git a/api/gmsh.h_cwrap b/api/gmsh.h_cwrap index 16439a7d060269581feaca683046a1c9ee25bab2..d3d3887a268df9a3b9492a0d1c404e914a04ba1e 100644 --- a/api/gmsh.h_cwrap +++ b/api/gmsh.h_cwrap @@ -1108,8 +1108,8 @@ namespace gmsh { // Top-level functions // Search the mesh for an element located at coordinates (`x', `y', `z'). // This function performs a search in a spatial octree. If an element is // found, return its tag, type and node tags, as well as the local - // coordinates (`u', `v', `w') within the element corresponding to search - // location. If `dim' is >= 0, only search for elements of the given + // coordinates (`u', `v', `w') within the reference element corresponding to + // search location. If `dim' is >= 0, only search for elements of the given // dimension. If `strict' is not set, use a tolerance to find elements near // the search location. inline void getElementByCoordinates(const double x, @@ -1410,15 +1410,18 @@ namespace gmsh { // Top-level functions const std::string & functionSpaceType, int & numComponents, std::vector<double> & basisFunctions, - int & numOrientations) + int & numOrientations, + const std::vector<int> & wantedOrientations = std::vector<int>()) { int ierr = 0; double *api_localCoord_; size_t api_localCoord_n_; vector2ptr(localCoord, &api_localCoord_, &api_localCoord_n_); double *api_basisFunctions_; size_t api_basisFunctions_n_; - gmshModelMeshGetBasisFunctions(elementType, api_localCoord_, api_localCoord_n_, functionSpaceType.c_str(), &numComponents, &api_basisFunctions_, &api_basisFunctions_n_, &numOrientations, &ierr); + int *api_wantedOrientations_; size_t api_wantedOrientations_n_; vector2ptr(wantedOrientations, &api_wantedOrientations_, &api_wantedOrientations_n_); + gmshModelMeshGetBasisFunctions(elementType, api_localCoord_, api_localCoord_n_, functionSpaceType.c_str(), &numComponents, &api_basisFunctions_, &api_basisFunctions_n_, &numOrientations, api_wantedOrientations_, api_wantedOrientations_n_, &ierr); if(ierr) throw ierr; gmshFree(api_localCoord_); basisFunctions.assign(api_basisFunctions_, api_basisFunctions_ + api_basisFunctions_n_); gmshFree(api_basisFunctions_); + gmshFree(api_wantedOrientations_); } // Get the orientation index of the elements of type `elementType' in the @@ -1441,6 +1444,17 @@ namespace gmsh { // Top-level functions basisFunctionsOrientation.assign(api_basisFunctionsOrientation_, api_basisFunctionsOrientation_ + api_basisFunctionsOrientation_n_); gmshFree(api_basisFunctionsOrientation_); } + // Get the number of possible orientations for elements of type `elementType' + // and function space named `functionSpaceType'. + inline int getNumberOfOrientations(const int elementType, + const std::string & functionSpaceType) + { + int ierr = 0; + int result_api_ = gmshModelMeshGetNumberOfOrientations(elementType, functionSpaceType.c_str(), &ierr); + if(ierr) throw ierr; + return result_api_; + } + // Preallocate data before calling `getBasisFunctionsOrientationForElements' // with `numTasks' > 1. For C and C++ only. inline void preallocateBasisFunctionsOrientationForElements(const int elementType, diff --git a/api/gmsh.jl b/api/gmsh.jl index c6b64b07b5da8369856b8262f4def6b89323818d..d18a22f961645d23bf6b0665d512b850ac6ca371 100644 --- a/api/gmsh.jl +++ b/api/gmsh.jl @@ -1472,8 +1472,8 @@ end Search the mesh for an element located at coordinates (`x`, `y`, `z`). This function performs a search in a spatial octree. If an element is found, return its tag, type and node tags, as well as the local coordinates (`u`, `v`, `w`) -within the element corresponding to search location. If `dim` is >= 0, only -search for elements of the given dimension. If `strict` is not set, use a +within the reference element corresponding to search location. If `dim` is >= 0, +only search for elements of the given dimension. If `strict` is not set, use a tolerance to find elements near the search location. Return `elementTag`, `elementType`, `nodeTags`, `u`, `v`, `w`. @@ -1748,7 +1748,7 @@ function getJacobians(elementType, localCoord, tag = -1, task = 0, numTasks = 1) end """ - gmsh.model.mesh.getBasisFunctions(elementType, localCoord, functionSpaceType) + gmsh.model.mesh.getBasisFunctions(elementType, localCoord, functionSpaceType, wantedOrientations = Cint[]) Get the basis functions of the element of type `elementType` at the evaluation points `localCoord` (given as concatenated triplets of coordinates in the @@ -1766,15 +1766,15 @@ first orientation are returned first, followed by values for the secondd, etc. Return `numComponents`, `basisFunctions`, `numOrientations`. """ -function getBasisFunctions(elementType, localCoord, functionSpaceType) +function getBasisFunctions(elementType, localCoord, functionSpaceType, wantedOrientations = Cint[]) api_numComponents_ = Ref{Cint}() api_basisFunctions_ = Ref{Ptr{Cdouble}}() api_basisFunctions_n_ = Ref{Csize_t}() api_numOrientations_ = Ref{Cint}() ierr = Ref{Cint}() ccall((:gmshModelMeshGetBasisFunctions, gmsh.lib), Cvoid, - (Cint, Ptr{Cdouble}, Csize_t, Ptr{Cchar}, Ptr{Cint}, Ptr{Ptr{Cdouble}}, Ptr{Csize_t}, Ptr{Cint}, Ptr{Cint}), - elementType, convert(Vector{Cdouble}, localCoord), length(localCoord), functionSpaceType, api_numComponents_, api_basisFunctions_, api_basisFunctions_n_, api_numOrientations_, ierr) + (Cint, Ptr{Cdouble}, Csize_t, Ptr{Cchar}, Ptr{Cint}, Ptr{Ptr{Cdouble}}, Ptr{Csize_t}, Ptr{Cint}, Ptr{Cint}, Csize_t, Ptr{Cint}), + elementType, convert(Vector{Cdouble}, localCoord), length(localCoord), functionSpaceType, api_numComponents_, api_basisFunctions_, api_basisFunctions_n_, api_numOrientations_, convert(Vector{Cint}, wantedOrientations), length(wantedOrientations), ierr) ierr[] != 0 && error("gmshModelMeshGetBasisFunctions returned non-zero error code: $(ierr[])") basisFunctions = unsafe_wrap(Array, api_basisFunctions_[], api_basisFunctions_n_[], own=true) return api_numComponents_[], basisFunctions, api_numOrientations_[] @@ -1803,6 +1803,23 @@ function getBasisFunctionsOrientationForElements(elementType, functionSpaceType, return basisFunctionsOrientation end +""" + gmsh.model.mesh.getNumberOfOrientations(elementType, functionSpaceType) + +Get the number of possible orientations for elements of type `elementType` and +function space named `functionSpaceType`. + +Return an integer value. +""" +function getNumberOfOrientations(elementType, functionSpaceType) + ierr = Ref{Cint}() + api__result__ = ccall((:gmshModelMeshGetNumberOfOrientations, gmsh.lib), Cint, + (Cint, Ptr{Cchar}, Ptr{Cint}), + elementType, functionSpaceType, ierr) + ierr[] != 0 && error("gmshModelMeshGetNumberOfOrientations returned non-zero error code: $(ierr[])") + return api__result__ +end + """ gmsh.model.mesh.getEdgeNumber(edgeNodes) diff --git a/api/gmsh.py b/api/gmsh.py index e727d6c178ea943fec6462f4894f167659c04082..c74dcf90d0c6ab135c1f8fb9524aa5cd3690a012 100644 --- a/api/gmsh.py +++ b/api/gmsh.py @@ -1890,9 +1890,9 @@ class model: Search the mesh for an element located at coordinates (`x', `y', `z'). This function performs a search in a spatial octree. If an element is found, return its tag, type and node tags, as well as the local coordinates (`u', - `v', `w') within the element corresponding to search location. If `dim' is - >= 0, only search for elements of the given dimension. If `strict' is not - set, use a tolerance to find elements near the search location. + `v', `w') within the reference element corresponding to search location. If + `dim' is >= 0, only search for elements of the given dimension. If `strict' + is not set, use a tolerance to find elements near the search location. Return `elementTag', `elementType', `nodeTags', `u', `v', `w'. """ @@ -2255,9 +2255,9 @@ class model: _ovectordouble(api_coord_, api_coord_n_.value)) @staticmethod - def getBasisFunctions(elementType, localCoord, functionSpaceType): + def getBasisFunctions(elementType, localCoord, functionSpaceType, wantedOrientations=[]): """ - gmsh.model.mesh.getBasisFunctions(elementType, localCoord, functionSpaceType) + gmsh.model.mesh.getBasisFunctions(elementType, localCoord, functionSpaceType, wantedOrientations=[]) Get the basis functions of the element of type `elementType' at the evaluation points `localCoord' (given as concatenated triplets of @@ -2280,6 +2280,7 @@ class model: api_numComponents_ = c_int() api_basisFunctions_, api_basisFunctions_n_ = POINTER(c_double)(), c_size_t() api_numOrientations_ = c_int() + api_wantedOrientations_, api_wantedOrientations_n_ = _ivectorint(wantedOrientations) ierr = c_int() lib.gmshModelMeshGetBasisFunctions( c_int(elementType), @@ -2288,6 +2289,7 @@ class model: byref(api_numComponents_), byref(api_basisFunctions_), byref(api_basisFunctions_n_), byref(api_numOrientations_), + api_wantedOrientations_, api_wantedOrientations_n_, byref(ierr)) if ierr.value != 0: raise ValueError( @@ -2328,6 +2330,27 @@ class model: ierr.value) return _ovectorint(api_basisFunctionsOrientation_, api_basisFunctionsOrientation_n_.value) + @staticmethod + def getNumberOfOrientations(elementType, functionSpaceType): + """ + gmsh.model.mesh.getNumberOfOrientations(elementType, functionSpaceType) + + Get the number of possible orientations for elements of type `elementType' + and function space named `functionSpaceType'. + + Return an integer value. + """ + ierr = c_int() + api__result__ = lib.gmshModelMeshGetNumberOfOrientations( + c_int(elementType), + c_char_p(functionSpaceType.encode()), + byref(ierr)) + if ierr.value != 0: + raise ValueError( + "gmshModelMeshGetNumberOfOrientations returned non-zero error code: ", + ierr.value) + return api__result__ + @staticmethod def getEdgeNumber(edgeNodes): """ diff --git a/api/gmshc.cpp b/api/gmshc.cpp index cfeb20f7dc94db7f0da0a37c03af9cde874605f0..2db6cd2ee5ccd31feb9a329d934072b34c8c2aec 100644 --- a/api/gmshc.cpp +++ b/api/gmshc.cpp @@ -1202,13 +1202,14 @@ GMSH_API void gmshModelMeshPreallocateJacobians(const int elementType, const int } } -GMSH_API void gmshModelMeshGetBasisFunctions(const int elementType, double * localCoord, size_t localCoord_n, const char * functionSpaceType, int * numComponents, double ** basisFunctions, size_t * basisFunctions_n, int * numOrientations, int * ierr) +GMSH_API void gmshModelMeshGetBasisFunctions(const int elementType, double * localCoord, size_t localCoord_n, const char * functionSpaceType, int * numComponents, double ** basisFunctions, size_t * basisFunctions_n, int * numOrientations, int * wantedOrientations, size_t wantedOrientations_n, int * ierr) { if(ierr) *ierr = 0; try { std::vector<double> api_localCoord_(localCoord, localCoord + localCoord_n); std::vector<double> api_basisFunctions_; - gmsh::model::mesh::getBasisFunctions(elementType, api_localCoord_, functionSpaceType, *numComponents, api_basisFunctions_, *numOrientations); + std::vector<int> api_wantedOrientations_(wantedOrientations, wantedOrientations + wantedOrientations_n); + gmsh::model::mesh::getBasisFunctions(elementType, api_localCoord_, functionSpaceType, *numComponents, api_basisFunctions_, *numOrientations, api_wantedOrientations_); vector2ptr(api_basisFunctions_, basisFunctions, basisFunctions_n); } catch(int api_ierr_){ @@ -1229,6 +1230,19 @@ GMSH_API void gmshModelMeshGetBasisFunctionsOrientationForElements(const int ele } } +GMSH_API int gmshModelMeshGetNumberOfOrientations(const int elementType, const char * functionSpaceType, int * ierr) +{ + int result_api_ = 0; + if(ierr) *ierr = 0; + try { + result_api_ = gmsh::model::mesh::getNumberOfOrientations(elementType, functionSpaceType); + } + catch(int api_ierr_){ + if(ierr) *ierr = api_ierr_; + } + return result_api_; +} + GMSH_API void gmshModelMeshPreallocateBasisFunctionsOrientationForElements(const int elementType, int ** basisFunctionsOrientation, size_t * basisFunctionsOrientation_n, const int tag, int * ierr) { if(ierr) *ierr = 0; diff --git a/api/gmshc.h b/api/gmshc.h index 8f1d361225780f6db9ffc1da6c7ddb7ccbccaa16..41ddb6e583927e9d1f9f3d6520124ec2bb9ddacd 100644 --- a/api/gmshc.h +++ b/api/gmshc.h @@ -614,9 +614,9 @@ GMSH_API void gmshModelMeshGetElement(const size_t elementTag, /* Search the mesh for an element located at coordinates (`x', `y', `z'). This * function performs a search in a spatial octree. If an element is found, * return its tag, type and node tags, as well as the local coordinates (`u', - * `v', `w') within the element corresponding to search location. If `dim' is - * >= 0, only search for elements of the given dimension. If `strict' is not - * set, use a tolerance to find elements near the search location. */ + * `v', `w') within the reference element corresponding to search location. If + * `dim' is >= 0, only search for elements of the given dimension. If `strict' + * is not set, use a tolerance to find elements near the search location. */ GMSH_API void gmshModelMeshGetElementByCoordinates(const double x, const double y, const double z, @@ -815,6 +815,7 @@ GMSH_API void gmshModelMeshGetBasisFunctions(const int elementType, int * numComponents, double ** basisFunctions, size_t * basisFunctions_n, int * numOrientations, + int * wantedOrientations, size_t wantedOrientations_n, int * ierr); /* Get the orientation index of the elements of type `elementType' in the @@ -831,6 +832,12 @@ GMSH_API void gmshModelMeshGetBasisFunctionsOrientationForElements(const int ele const size_t numTasks, int * ierr); +/* Get the number of possible orientations for elements of type `elementType' + * and function space named `functionSpaceType'. */ +GMSH_API int gmshModelMeshGetNumberOfOrientations(const int elementType, + const char * functionSpaceType, + int * ierr); + /* Preallocate data before calling `getBasisFunctionsOrientationForElements' * with `numTasks' > 1. For C and C++ only. */ GMSH_API void gmshModelMeshPreallocateBasisFunctionsOrientationForElements(const int elementType, diff --git a/doc/texinfo/api.texi b/doc/texinfo/api.texi index 688b20764c3481fe730da6c5b44d2d4f62b2b199..522b6729230b640276898e0ff2921f1cb6384d56 100644 --- a/doc/texinfo/api.texi +++ b/doc/texinfo/api.texi @@ -288,8 +288,6 @@ the same name, select the one that was added first. - @item Return: - -@item Examples: -Python (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/python/x3.py#L123,x3.py}) @end table @item gmsh/model/getEntities @@ -331,7 +329,7 @@ Get the name of the entity of dimension @code{dim} and tag @code{tag}. @item Return: - @item Examples: -C++ (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/c++/x1.cpp#L90,x1.cpp}), Python (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/python/x1.py#L80,x1.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/step_assembly.py#L13,step_assembly.py}) +C++ (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/c++/x1.cpp#L90,x1.cpp}), Python (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/python/x1.py#L80,x1.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/step_assembly.py#L14,step_assembly.py}) @end table @item gmsh/model/getPhysicalGroups @@ -507,7 +505,7 @@ overall model. @item Return: integer value @item Examples: -C++ (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/c++/x2.cpp#L77,x2.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/discrete.cpp#L11,discrete.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/edges.cpp#L63,edges.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/faces.cpp#L63,faces.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/plugin.cpp#L11,plugin.cpp}, ...), Python (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/python/x2.py#L74,x2.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/python/x3.py#L72,x3.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/discrete.py#L10,discrete.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/mesh_from_discrete_curve.py#L11,mesh_from_discrete_curve.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/plugin.py#L9,plugin.py}, ...) +C++ (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/c++/x2.cpp#L77,x2.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/discrete.cpp#L11,discrete.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/edges.cpp#L63,edges.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/faces.cpp#L63,faces.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/plugin.cpp#L11,plugin.cpp}, ...), Python (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/python/x2.py#L74,x2.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/discrete.py#L10,discrete.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/mesh_from_discrete_curve.py#L11,mesh_from_discrete_curve.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/plugin.py#L9,plugin.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/reparamOnFace.py#L23,reparamOnFace.py}, ...) @end table @item gmsh/model/removeEntities @@ -573,7 +571,7 @@ Get the type of the entity of dimension @code{dim} and tag @code{tag}. @item Return: - @item Examples: -C++ (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/c++/t21.cpp#L115,t21.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/c++/x1.cpp#L88,x1.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/explore.cpp#L36,explore.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/partition.cpp#L55,partition.cpp}), Python (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/python/t21.py#L96,t21.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/python/x1.py#L79,x1.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/explore.py#L18,explore.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/partition.py#L44,partition.py}) +C++ (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/c++/t21.cpp#L115,t21.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/c++/x1.cpp#L88,x1.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/explore.cpp#L36,explore.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/partition.cpp#L55,partition.cpp}), Python (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/python/t21.py#L96,t21.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/python/x1.py#L79,x1.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/explore.py#L18,explore.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/partition.py#L45,partition.py}) @end table @item gmsh/model/getParent @@ -589,7 +587,7 @@ tag @code{tag}, i.e. from which the entity is a part of, if any. @item Return: - @item Examples: -C++ (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/c++/t21.cpp#L123,t21.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/c++/x1.cpp#L135,x1.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/explore.cpp#L47,explore.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/partition.cpp#L63,partition.cpp}), Python (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/python/t21.py#L98,t21.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/python/x1.py#L108,x1.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/explore.py#L32,explore.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/partition.py#L46,partition.py}) +C++ (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/c++/t21.cpp#L123,t21.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/c++/x1.cpp#L135,x1.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/explore.cpp#L47,explore.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/partition.cpp#L63,partition.cpp}), Python (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/python/t21.py#L98,t21.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/python/x1.py#L108,x1.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/explore.py#L32,explore.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/partition.py#L47,partition.py}) @end table @item gmsh/model/getPartitions @@ -604,7 +602,7 @@ belongs. @item Return: - @item Examples: -C++ (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/c++/t21.cpp#L112,t21.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/c++/x1.cpp#L129,x1.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/explore.cpp#L41,explore.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/partition.cpp#L52,partition.cpp}), Python (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/python/t21.py#L93,t21.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/python/x1.py#L105,x1.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/explore.py#L29,explore.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/partition.py#L41,partition.py}) +C++ (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/c++/t21.cpp#L112,t21.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/c++/x1.cpp#L129,x1.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/explore.cpp#L41,explore.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/partition.cpp#L52,partition.cpp}), Python (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/python/t21.py#L93,t21.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/python/x1.py#L105,x1.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/explore.py#L29,explore.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/partition.py#L42,partition.py}) @end table @item gmsh/model/getValue @@ -624,7 +622,7 @@ coordinates in @code{coord}, concatenated: [p1x, p1y, p1z, p2x, ...]. @item Return: - @item Examples: -C++ (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/c++/t2.cpp#L91,t2.cpp}), Python (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/python/t2.py#L87,t2.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/reparamOnFace.py#L20,reparamOnFace.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/terrain_stl.py#L36,terrain_stl.py}) +C++ (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/c++/t2.cpp#L91,t2.cpp}), Python (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/python/t2.py#L87,t2.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/reparamOnFace.py#L21,reparamOnFace.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/terrain_stl.py#L36,terrain_stl.py}) @end table @item gmsh/model/getDerivative @@ -727,7 +725,7 @@ entity of dimension @code{dim} and tag @code{tag}. @item Return: - @item Examples: -Python (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/reparamOnFace.py#L17,reparamOnFace.py}) +Python (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/reparamOnFace.py#L18,reparamOnFace.py}) @end table @item gmsh/model/isInside @@ -762,7 +760,7 @@ subset of entities, depending on the underyling geometrical representation. @item Return: - @item Examples: -Python (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/reparamOnFace.py#L19,reparamOnFace.py}) +Python (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/reparamOnFace.py#L20,reparamOnFace.py}) @end table @item gmsh/model/setVisibility @@ -777,7 +775,7 @@ the visibility setting recursively if @code{recursive} is true. @item Return: - @item Examples: -C++ (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/c++/t5.cpp#L201,t5.cpp}), Python (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/python/t5.py#L196,t5.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/gui.py#L30,gui.py}) +C++ (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/c++/t5.cpp#L201,t5.cpp}), Python (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/python/t5.py#L196,t5.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/gui.py#L31,gui.py}) @end table @item gmsh/model/getVisibility @@ -807,7 +805,7 @@ should be integers between 0 and 255. Apply the color setting recursively if @item Return: - @item Examples: -C++ (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/c++/t4.cpp#L158,t4.cpp}), Python (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/python/t4.py#L168,t4.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/gui.py#L32,gui.py}) +C++ (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/c++/t4.cpp#L158,t4.cpp}), Python (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/python/t4.py#L168,t4.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/gui.py#L33,gui.py}) @end table @item gmsh/model/getColor @@ -835,7 +833,7 @@ Set the @code{x}, @code{y}, @code{z} coordinates of a geometrical point. @item Return: - @item Examples: -C++ (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/c++/x2.cpp#L78,x2.cpp}), Python (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/python/x2.py#L75,x2.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/reparamOnFace.py#L23,reparamOnFace.py}) +C++ (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/c++/x2.cpp#L78,x2.cpp}), Python (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/python/x2.py#L75,x2.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/reparamOnFace.py#L24,reparamOnFace.py}) @end table @end ftable @@ -869,7 +867,7 @@ Partition the mesh of the current model into @code{numPart} partitions. @item Return: - @item Examples: -C++ (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/c++/t21.cpp#L87,t21.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/boolean.cpp#L36,boolean.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/partition.cpp#L30,partition.cpp}), Python (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/python/t21.py#L73,t21.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/boolean.py#L36,boolean.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/partition.py#L26,partition.py}) +C++ (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/c++/t21.cpp#L87,t21.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/boolean.cpp#L36,boolean.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/partition.cpp#L30,partition.cpp}), Python (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/python/t21.py#L73,t21.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/boolean.py#L36,boolean.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/partition.py#L27,partition.py}) @end table @item gmsh/model/mesh/unpartition @@ -1106,7 +1104,7 @@ automatically assigned to the nodes. @item Return: - @item Examples: -C++ (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/c++/x2.cpp#L91,x2.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/discrete.cpp#L14,discrete.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/plugin.cpp#L12,plugin.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/view.cpp#L11,view.cpp}), Python (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/python/x2.py#L88,x2.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/python/x3.py#L73,x3.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/discrete.py#L13,discrete.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/flatten.py#L37,flatten.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/mesh_from_discrete_curve.py#L16,mesh_from_discrete_curve.py}, ...) +C++ (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/c++/x2.cpp#L91,x2.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/discrete.cpp#L14,discrete.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/plugin.cpp#L12,plugin.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/view.cpp#L11,view.cpp}), Python (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/python/x2.py#L88,x2.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/discrete.py#L13,discrete.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/flatten.py#L37,flatten.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/mesh_from_discrete_curve.py#L16,mesh_from_discrete_curve.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/plugin.py#L10,plugin.py}, ...) @end table @item gmsh/model/mesh/reclassifyNodes @@ -1185,8 +1183,8 @@ otherwise); for large meshes accessing elements in bulk is often preferable. Search the mesh for an element located at coordinates (@code{x}, @code{y}, @code{z}). This function performs a search in a spatial octree. If an element is found, return its tag, type and node tags, as well as the local coordinates -(@code{u}, @code{v}, @code{w}) within the element corresponding to search -location. If @code{dim} is >= 0, only search for elements of the given +(@code{u}, @code{v}, @code{w}) within the reference element corresponding to +search location. If @code{dim} is >= 0, only search for elements of the given dimension. If @code{strict} is not set, use a tolerance to find elements near the search location. @@ -1360,7 +1358,7 @@ are automatically assigned to the elements. @item Return: - @item Examples: -C++ (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/c++/x2.cpp#L97,x2.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/edges.cpp#L67,edges.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/faces.cpp#L67,faces.cpp}), Python (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/python/x2.py#L94,x2.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/python/x3.py#L78,x3.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/terrain.py#L59,terrain.py}) +C++ (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/c++/x2.cpp#L97,x2.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/edges.cpp#L67,edges.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/faces.cpp#L67,faces.cpp}), Python (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/python/x2.py#L94,x2.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/terrain.py#L59,terrain.py}) @end table @item gmsh/model/mesh/getIntegrationPoints @@ -1440,7 +1438,7 @@ orientations. @table @asis @item Input: -@code{elementType}, @code{localCoord}, @code{functionSpaceType} +@code{elementType}, @code{localCoord}, @code{functionSpaceType}, @code{wantedOrientations = []} @item Output: @code{numComponents}, @code{basisFunctions}, @code{numOrientations} @item Return: @@ -1466,6 +1464,19 @@ as it will return a vector of zeros. - @end table +@item gmsh/model/mesh/getNumberOfOrientations +Get the number of possible orientations for elements of type @code{elementType} +and function space named @code{functionSpaceType}. + +@table @asis +@item Input: +@code{elementType}, @code{functionSpaceType} +@item Output: +- +@item Return: +integer value +@end table + @item gmsh/model/mesh/preallocateBasisFunctionsOrientationForElements Preallocate data before calling @code{getBasisFunctionsOrientationForElements} with @code{numTasks} > 1. For C and C++ only. @@ -1653,7 +1664,7 @@ entities of dimension 0 (points) are handled. @item Return: - @item Examples: -C++ (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/c++/t16.cpp#L115,t16.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/c++/t18.cpp#L32,t18.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/c++/t21.cpp#L48,t21.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/adapt_mesh.cpp#L235,adapt_mesh.cpp}), Python (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/python/t16.py#L97,t16.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/python/t18.py#L29,t18.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/python/t21.py#L36,t21.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/adapt_mesh.py#L75,adapt_mesh.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/periodic.py#L12,periodic.py}, ...) +C++ (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/c++/t16.cpp#L115,t16.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/c++/t18.cpp#L32,t18.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/c++/t21.cpp#L48,t21.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/adapt_mesh.cpp#L235,adapt_mesh.cpp}), Python (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/python/t16.py#L97,t16.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/python/t18.py#L29,t18.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/python/t21.py#L36,t21.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/adapt_mesh.py#L82,adapt_mesh.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/periodic.py#L12,periodic.py}, ...) @end table @item gmsh/model/mesh/setSizeAtParametricPoints @@ -1947,7 +1958,7 @@ Remove duplicate nodes in the mesh of the current model. @item Return: - @item Examples: -Python (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/glue_and_remesh_stl.py#L15,glue_and_remesh_stl.py}) +Python (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/glue_and_remesh_stl.py#L16,glue_and_remesh_stl.py}) @end table @item gmsh/model/mesh/splitQuadrangles @@ -1980,7 +1991,7 @@ less than Pi, also force curves to be split according to @code{curveAngle}. @item Return: - @item Examples: -C++ (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/c++/t13.cpp#L45,t13.cpp}), Python (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/python/t13.py#L38,t13.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/glue_and_remesh_stl.py#L19,glue_and_remesh_stl.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/remesh_stl.py#L18,remesh_stl.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/terrain.py#L70,terrain.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/terrain_stl.py#L17,terrain_stl.py}) +C++ (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/c++/t13.cpp#L45,t13.cpp}), Python (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/python/t13.py#L38,t13.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/glue_and_remesh_stl.py#L20,glue_and_remesh_stl.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/remesh_stl.py#L19,remesh_stl.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/terrain.py#L70,terrain.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/terrain_stl.py#L17,terrain_stl.py}) @end table @item gmsh/model/mesh/createGeometry @@ -1996,7 +2007,7 @@ assuming that each can be parametrized with a single map. @item Return: - @item Examples: -C++ (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/c++/t13.cpp#L51,t13.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/c++/x2.cpp#L110,x2.cpp}), Python (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/python/t13.py#L44,t13.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/python/x2.py#L106,x2.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/glue_and_remesh_stl.py#L32,glue_and_remesh_stl.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/remesh_stl.py#L22,remesh_stl.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/terrain.py#L76,terrain.py}, ...) +C++ (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/c++/t13.cpp#L51,t13.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/c++/x2.cpp#L110,x2.cpp}), Python (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/python/t13.py#L44,t13.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/python/x2.py#L106,x2.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/glue_and_remesh_stl.py#L33,glue_and_remesh_stl.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/remesh_stl.py#L23,remesh_stl.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/terrain.py#L76,terrain.py}, ...) @end table @item gmsh/model/mesh/createTopology @@ -2015,7 +2026,7 @@ in CAD kernel. @item Return: - @item Examples: -Python (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/glue_and_remesh_stl.py#L27,glue_and_remesh_stl.py}) +Python (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/glue_and_remesh_stl.py#L28,glue_and_remesh_stl.py}) @end table @item gmsh/model/mesh/computeHomology @@ -2092,7 +2103,7 @@ the field tag. @item Return: integer value @item Examples: -C++ (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/c++/t7.cpp#L46,t7.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/c++/t10.cpp#L46,t10.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/c++/t11.cpp#L38,t11.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/c++/t13.cpp#L65,t13.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/c++/t17.cpp#L41,t17.cpp}, ...), Python (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/python/t7.py#L38,t7.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/python/t10.py#L44,t10.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/python/t13.py#L55,t13.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/python/t17.py#L35,t17.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/adapt_mesh.py#L106,adapt_mesh.py}) +C++ (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/c++/t7.cpp#L46,t7.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/c++/t10.cpp#L46,t10.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/c++/t11.cpp#L38,t11.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/c++/t13.cpp#L65,t13.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/c++/t17.cpp#L41,t17.cpp}, ...), Python (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/python/t7.py#L38,t7.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/python/t10.py#L44,t10.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/python/t13.py#L55,t13.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/python/t17.py#L35,t17.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/adapt_mesh.py#L113,adapt_mesh.py}) @end table @item gmsh/model/mesh/field/remove @@ -2119,7 +2130,7 @@ Set the numerical option @code{option} to value @code{value} for field @item Return: - @item Examples: -C++ (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/c++/t10.cpp#L48,t10.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/adapt_mesh.cpp#L271,adapt_mesh.cpp}), Python (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/python/t10.py#L46,t10.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/adapt_mesh.py#L107,adapt_mesh.py}) +C++ (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/c++/t10.cpp#L48,t10.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/adapt_mesh.cpp#L271,adapt_mesh.cpp}), Python (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/python/t10.py#L46,t10.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/adapt_mesh.py#L114,adapt_mesh.py}) @end table @item gmsh/model/mesh/field/setString @@ -2162,7 +2173,7 @@ Set the field @code{tag} as the background mesh size field. @item Return: - @item Examples: -C++ (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/c++/t7.cpp#L49,t7.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/c++/t10.cpp#L108,t10.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/c++/t11.cpp#L41,t11.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/c++/t13.cpp#L70,t13.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/c++/t17.cpp#L42,t17.cpp}, ...), Python (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/python/t7.py#L41,t7.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/python/t10.py#L102,t10.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/python/t13.py#L60,t13.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/python/t17.py#L36,t17.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/adapt_mesh.py#L108,adapt_mesh.py}) +C++ (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/c++/t7.cpp#L49,t7.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/c++/t10.cpp#L108,t10.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/c++/t11.cpp#L41,t11.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/c++/t13.cpp#L70,t13.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/c++/t17.cpp#L42,t17.cpp}, ...), Python (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/python/t7.py#L41,t7.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/python/t10.py#L102,t10.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/python/t13.py#L60,t13.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/python/t17.py#L36,t17.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/adapt_mesh.py#L115,adapt_mesh.py}) @end table @item gmsh/model/mesh/field/setAsBoundaryLayer @@ -2396,7 +2407,7 @@ automatically. Return the tag of the shell. @item Return: integer value @item Examples: -C++ (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/c++/t2.cpp#L114,t2.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/c++/t5.cpp#L69,t5.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/c++/t13.cpp#L58,t13.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/c++/x2.cpp#L140,x2.cpp}), Python (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/python/t2.py#L110,t2.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/python/t5.py#L103,t5.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/python/t13.py#L48,t13.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/python/x2.py#L136,x2.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/glue_and_remesh_stl.py#L38,glue_and_remesh_stl.py}, ...) +C++ (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/c++/t2.cpp#L114,t2.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/c++/t5.cpp#L69,t5.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/c++/t13.cpp#L58,t13.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/c++/x2.cpp#L140,x2.cpp}), Python (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/python/t2.py#L110,t2.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/python/t5.py#L103,t5.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/python/t13.py#L48,t13.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/python/x2.py#L136,x2.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/glue_and_remesh_stl.py#L39,glue_and_remesh_stl.py}, ...) @end table @item gmsh/model/geo/addVolume @@ -2413,7 +2424,7 @@ selected automatically. Return the tag of the volume. @item Return: integer value @item Examples: -C++ (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/c++/t2.cpp#L115,t2.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/c++/t5.cpp#L70,t5.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/c++/t13.cpp#L59,t13.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/c++/x2.cpp#L141,x2.cpp}), Python (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/python/t2.py#L111,t2.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/python/t5.py#L163,t5.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/python/t13.py#L49,t13.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/python/x2.py#L137,x2.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/glue_and_remesh_stl.py#L39,glue_and_remesh_stl.py}, ...) +C++ (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/c++/t2.cpp#L115,t2.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/c++/t5.cpp#L70,t5.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/c++/t13.cpp#L59,t13.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/c++/x2.cpp#L141,x2.cpp}), Python (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/python/t2.py#L111,t2.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/python/t5.py#L163,t5.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/python/t13.py#L49,t13.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/python/x2.py#L137,x2.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/glue_and_remesh_stl.py#L40,glue_and_remesh_stl.py}, ...) @end table @item gmsh/model/geo/extrude @@ -2816,7 +2827,7 @@ the occ module.) @item Return: integer value @item Examples: -C++ (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/c++/t19.cpp#L67,t19.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/spline.cpp#L11,spline.cpp}), Python (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/python/t19.py#L59,t19.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/crack.py#L14,crack.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/spline.py#L10,spline.py}) +C++ (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/c++/t19.cpp#L67,t19.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/spline.cpp#L11,spline.cpp}), Python (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/python/t19.py#L59,t19.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/crack.py#L13,crack.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/spline.py#L11,spline.py}) @end table @item gmsh/model/occ/addLine @@ -2832,7 +2843,7 @@ new tag is selected automatically. Return the tag of the line. @item Return: integer value @item Examples: -Python (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/crack.py#L16,crack.py}) +Python (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/crack.py#L15,crack.py}) @end table @item gmsh/model/occ/addCircleArc @@ -2916,7 +2927,7 @@ same. Return the tag of the spline curve. @item Return: integer value @item Examples: -C++ (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/c++/t19.cpp#L71,t19.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/spline.cpp#L13,spline.cpp}), Python (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/python/t19.py#L62,t19.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/spline.py#L12,spline.py}) +C++ (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/c++/t19.cpp#L71,t19.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/spline.cpp#L13,spline.cpp}), Python (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/python/t19.py#L62,t19.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/spline.py#L13,spline.py}) @end table @item gmsh/model/occ/addBSpline @@ -2935,7 +2946,7 @@ tag of the b-spline curve. @item Return: integer value @item Examples: -C++ (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/spline.cpp#L14,spline.cpp}), Python (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/spline.py#L13,spline.py}) +C++ (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/spline.cpp#L14,spline.cpp}), Python (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/spline.py#L14,spline.py}) @end table @item gmsh/model/occ/addBezier @@ -2951,7 +2962,7 @@ Return the tag of the Bezier curve. @item Return: integer value @item Examples: -C++ (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/spline.cpp#L15,spline.cpp}), Python (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/spline.py#L14,spline.py}) +C++ (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/spline.cpp#L15,spline.cpp}), Python (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/spline.py#L15,spline.py}) @end table @item gmsh/model/occ/addWire @@ -3006,7 +3017,7 @@ tag of the rectangle. @item Return: integer value @item Examples: -C++ (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/c++/t1.cpp#L162,t1.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/c++/t17.cpp#L28,t17.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/c++/t20.cpp#L63,t20.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/c++/t21.cpp#L40,t21.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/adapt_mesh.cpp#L229,adapt_mesh.cpp}, ...), Python (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/python/t1.py#L157,t1.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/python/t17.py#L27,t17.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/python/t20.py#L52,t20.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/python/t21.py#L32,t21.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/adapt_mesh.py#L70,adapt_mesh.py}, ...) +C++ (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/c++/t1.cpp#L162,t1.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/c++/t17.cpp#L28,t17.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/c++/t20.cpp#L63,t20.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/c++/t21.cpp#L40,t21.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/adapt_mesh.cpp#L229,adapt_mesh.cpp}, ...), Python (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/python/t1.py#L157,t1.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/python/t17.py#L27,t17.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/python/t20.py#L52,t20.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/python/t21.py#L32,t21.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/adapt_mesh.py#L77,adapt_mesh.py}, ...) @end table @item gmsh/model/occ/addDisk @@ -3105,7 +3116,7 @@ sphere. @item Return: integer value @item Examples: -C++ (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/c++/t16.cpp#L53,t16.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/c++/t18.cpp#L61,t18.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/boolean.cpp#L23,boolean.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/faces.cpp#L18,faces.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/gui.cpp#L21,gui.cpp}), Python (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/python/t16.py#L47,t16.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/python/t18.py#L59,t18.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/boolean.py#L23,boolean.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/gui.py#L19,gui.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/normals.py#L6,normals.py}, ...) +C++ (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/c++/t16.cpp#L53,t16.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/c++/t18.cpp#L61,t18.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/boolean.cpp#L23,boolean.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/faces.cpp#L18,faces.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/gui.cpp#L21,gui.cpp}), Python (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/python/t16.py#L47,t16.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/python/t18.py#L59,t18.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/boolean.py#L23,boolean.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/gui.py#L20,gui.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/normals.py#L6,normals.py}, ...) @end table @item gmsh/model/occ/addBox @@ -3122,7 +3133,7 @@ box. @item Return: integer value @item Examples: -C++ (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/c++/t16.cpp#L31,t16.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/c++/t18.cpp#L27,t18.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/boolean.cpp#L22,boolean.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/faces.cpp#L16,faces.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/gui.cpp#L20,gui.cpp}), Python (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/python/t16.py#L28,t16.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/python/t18.py#L26,t18.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/boolean.py#L22,boolean.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/gui.py#L18,gui.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/neighbors.py#L11,neighbors.py}, ...) +C++ (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/c++/t16.cpp#L31,t16.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/c++/t18.cpp#L27,t18.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/boolean.cpp#L22,boolean.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/faces.cpp#L16,faces.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/gui.cpp#L20,gui.cpp}), Python (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/python/t16.py#L28,t16.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/python/t18.py#L26,t18.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/boolean.py#L22,boolean.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/gui.py#L19,gui.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/neighbors.py#L11,neighbors.py}, ...) @end table @item gmsh/model/occ/addCylinder @@ -3141,7 +3152,7 @@ Return the tag of the cylinder. @item Return: integer value @item Examples: -C++ (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/boolean.cpp#L25,boolean.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/gui.cpp#L23,gui.cpp}), Python (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/boolean.py#L25,boolean.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/gui.py#L21,gui.py}) +C++ (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/boolean.cpp#L25,boolean.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/gui.cpp#L23,gui.cpp}), Python (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/boolean.py#L25,boolean.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/gui.py#L22,gui.py}) @end table @item gmsh/model/occ/addCone @@ -3333,7 +3344,7 @@ is set. Remove the tool if @code{removeTool} is set. @item Return: - @item Examples: -C++ (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/boolean.cpp#L28,boolean.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/gui.cpp#L26,gui.cpp}), Python (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/boolean.py#L28,boolean.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/gui.py#L24,gui.py}) +C++ (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/boolean.cpp#L28,boolean.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/gui.cpp#L26,gui.cpp}), Python (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/boolean.py#L28,boolean.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/gui.py#L25,gui.py}) @end table @item gmsh/model/occ/intersect @@ -3352,7 +3363,7 @@ set. @item Return: - @item Examples: -C++ (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/boolean.cpp#L24,boolean.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/gui.cpp#L22,gui.cpp}), Python (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/boolean.py#L24,boolean.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/gui.py#L20,gui.py}) +C++ (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/boolean.cpp#L24,boolean.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/gui.cpp#L22,gui.cpp}), Python (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/boolean.py#L24,boolean.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/gui.py#L21,gui.py}) @end table @item gmsh/model/occ/cut @@ -3370,7 +3381,7 @@ is set. Remove the tool if @code{removeTool} is set. @item Return: - @item Examples: -C++ (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/c++/t16.cpp#L41,t16.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/boolean.cpp#L29,boolean.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/gui.cpp#L27,gui.cpp}), Python (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/python/t16.py#L32,t16.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/boolean.py#L29,boolean.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/gui.py#L25,gui.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/spherical_surf.py#L13,spherical_surf.py}) +C++ (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/c++/t16.cpp#L41,t16.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/boolean.cpp#L29,boolean.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/gui.cpp#L27,gui.cpp}), Python (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/python/t16.py#L32,t16.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/boolean.py#L29,boolean.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/gui.py#L26,gui.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/spherical_surf.py#L13,spherical_surf.py}) @end table @item gmsh/model/occ/fragment @@ -3389,7 +3400,7 @@ set. @item Return: - @item Examples: -C++ (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/c++/t16.cpp#L61,t16.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/c++/t18.cpp#L75,t18.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/c++/t20.cpp#L72,t20.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/c++/t21.cpp#L44,t21.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/edges.cpp#L23,edges.cpp}, ...), Python (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/python/t16.py#L54,t16.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/python/t18.py#L70,t18.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/python/t20.py#L56,t20.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/python/t21.py#L34,t21.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/crack.py#L21,crack.py}, ...) +C++ (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/c++/t16.cpp#L61,t16.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/c++/t18.cpp#L75,t18.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/c++/t20.cpp#L72,t20.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/c++/t21.cpp#L44,t21.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/edges.cpp#L23,edges.cpp}, ...), Python (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/python/t16.py#L54,t16.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/python/t18.py#L70,t18.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/python/t20.py#L56,t20.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/python/t21.py#L34,t21.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/crack.py#L20,crack.py}, ...) @end table @item gmsh/model/occ/translate @@ -3635,7 +3646,7 @@ Get the mass of the OpenCASCADE entity of dimension @code{dim} and tag @item Return: - @item Examples: -Python (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/step_assembly.py#L18,step_assembly.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/volume.py#L10,volume.py}) +Python (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/step_assembly.py#L19,step_assembly.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/volume.py#L10,volume.py}) @end table @item gmsh/model/occ/getCenterOfMass @@ -3744,7 +3755,7 @@ associate a new tag. Return the view tag. @item Return: integer value @item Examples: -C++ (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/c++/t4.cpp#L111,t4.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/adapt_mesh.cpp#L246,adapt_mesh.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/plugin.cpp#L18,plugin.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/view.cpp#L17,view.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/viewlist.cpp#L20,viewlist.cpp}), Python (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/python/t4.py#L119,t4.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/python/x3.py#L27,x3.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/adapt_mesh.py#L83,adapt_mesh.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/normals.py#L41,normals.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/plugin.py#L16,plugin.py}, ...) +C++ (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/c++/t4.cpp#L111,t4.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/adapt_mesh.cpp#L246,adapt_mesh.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/plugin.cpp#L18,plugin.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/view.cpp#L17,view.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/viewlist.cpp#L20,viewlist.cpp}), Python (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/python/t4.py#L119,t4.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/adapt_mesh.py#L90,adapt_mesh.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/normals.py#L41,normals.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/plugin.py#L16,plugin.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/poisson.py#L228,poisson.py}, ...) @end table @item gmsh/view/remove @@ -3813,7 +3824,7 @@ data. @code{partition} allows to specify data in several sub-sets. @item Return: - @item Examples: -C++ (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/adapt_mesh.cpp#L248,adapt_mesh.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/plugin.cpp#L19,plugin.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/view.cpp#L21,view.cpp}), Python (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/python/x3.py#L86,x3.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/adapt_mesh.py#L84,adapt_mesh.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/plugin.py#L17,plugin.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/poisson.py#L229,poisson.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/view.py#L20,view.py}) +C++ (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/adapt_mesh.cpp#L248,adapt_mesh.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/plugin.cpp#L19,plugin.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/view.cpp#L21,view.cpp}), Python (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/adapt_mesh.py#L91,adapt_mesh.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/plugin.py#L17,plugin.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/poisson.py#L229,poisson.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/view.py#L20,view.py}) @end table @item gmsh/view/addHomogeneousModelData @@ -3831,8 +3842,6 @@ but only if data is associated to elements of the same type for - @item Return: - -@item Examples: -Python (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/python/x3.py#L96,x3.py}) @end table @item gmsh/view/getModelData @@ -3866,7 +3875,7 @@ contains the data for the @code{numEle} elements. @item Return: - @item Examples: -C++ (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/viewlist.cpp#L25,viewlist.cpp}), Python (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/python/x3.py#L44,x3.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/normals.py#L42,normals.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/view_combine.py#L19,view_combine.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/viewlist.py#L20,viewlist.py}) +C++ (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/viewlist.cpp#L25,viewlist.cpp}), Python (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/normals.py#L42,normals.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/view_combine.py#L19,view_combine.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/viewlist.py#L20,viewlist.py}) @end table @item gmsh/view/getListData @@ -3900,7 +3909,7 @@ views) strings. @code{style} contains pairs of styling parameters, concatenated. @item Return: - @item Examples: -C++ (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/c++/t4.cpp#L115,t4.cpp}), Python (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/python/t4.py#L123,t4.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/python/x3.py#L50,x3.py}) +C++ (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/c++/t4.cpp#L115,t4.cpp}), Python (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/python/t4.py#L123,t4.py}) @end table @item gmsh/view/getListDataStrings @@ -3996,7 +4005,7 @@ file extension. Append to the file if @code{append} is set. @item Return: - @item Examples: -C++ (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/adapt_mesh.cpp#L249,adapt_mesh.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/plugin.cpp#L44,plugin.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/view.cpp#L25,view.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/viewlist.cpp#L27,viewlist.cpp}), Python (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/python/x3.py#L121,x3.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/adapt_mesh.py#L86,adapt_mesh.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/normals.py#L43,normals.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/plugin.py#L34,plugin.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/view.py#L28,view.py}, ...) +C++ (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/adapt_mesh.cpp#L249,adapt_mesh.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/plugin.cpp#L44,plugin.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/view.cpp#L25,view.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/viewlist.cpp#L27,viewlist.cpp}), Python (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/adapt_mesh.py#L93,adapt_mesh.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/normals.py#L43,normals.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/plugin.py#L34,plugin.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/view.py#L28,view.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/view_combine.py#L26,view_combine.py}, ...) @end table @end ftable @@ -4017,7 +4026,7 @@ Set the numerical option @code{option} to the value @code{value} for plugin @item Return: - @item Examples: -C++ (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/c++/t9.cpp#L38,t9.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/c++/t21.cpp#L95,t21.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/partition.cpp#L32,partition.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/plugin.cpp#L34,plugin.cpp}), Python (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/python/t9.py#L31,t9.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/python/t21.py#L80,t21.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/crack.py#L36,crack.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/partition.py#L28,partition.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/plugin.py#L25,plugin.py}, ...) +C++ (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/c++/t9.cpp#L38,t9.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/c++/t21.cpp#L95,t21.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/partition.cpp#L32,partition.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/plugin.cpp#L34,plugin.cpp}), Python (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/python/t9.py#L31,t9.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/python/t21.py#L80,t21.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/crack.py#L35,crack.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/partition.py#L29,partition.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/plugin.py#L25,plugin.py}, ...) @end table @item gmsh/plugin/setString @@ -4046,7 +4055,7 @@ Run the plugin @code{name}. @item Return: - @item Examples: -C++ (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/c++/t9.cpp#L40,t9.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/c++/t21.cpp#L98,t21.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/partition.cpp#L33,partition.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/perf.cpp#L13,perf.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/plugin.cpp#L35,plugin.cpp}), Python (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/python/t9.py#L33,t9.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/python/t21.py#L83,t21.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/crack.py#L37,crack.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/partition.py#L29,partition.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/perf.py#L10,perf.py}, ...) +C++ (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/c++/t9.cpp#L40,t9.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/c++/t21.cpp#L98,t21.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/partition.cpp#L33,partition.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/perf.cpp#L13,perf.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/plugin.cpp#L35,plugin.cpp}), Python (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/python/t9.py#L33,t9.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/python/t21.py#L83,t21.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/crack.py#L36,crack.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/partition.py#L30,partition.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/perf.py#L10,perf.py}, ...) @end table @end ftable @@ -4066,7 +4075,7 @@ Draw all the OpenGL scenes. @item Return: - @item Examples: -C++ (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/c++/t8.cpp#L149,t8.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/gui.cpp#L33,gui.cpp}), Python (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/python/t8.py#L179,t8.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/gui.py#L36,gui.py}) +C++ (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/c++/t8.cpp#L149,t8.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/gui.cpp#L33,gui.cpp}), Python (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/python/t8.py#L179,t8.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/gui.py#L37,gui.py}) @end table @end ftable @@ -4086,7 +4095,7 @@ Create the FLTK graphical user interface. Can only be called in the main thread. @item Return: - @item Examples: -C++ (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/c++/t8.cpp#L75,t8.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/custom_gui.cpp#L72,custom_gui.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/gui.cpp#L10,gui.cpp}), Python (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/python/t8.py#L72,t8.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/crack.py#L5,crack.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/custom_gui.py#L70,custom_gui.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/gui.py#L8,gui.py}) +C++ (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/c++/t8.cpp#L75,t8.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/custom_gui.cpp#L72,custom_gui.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/gui.cpp#L10,gui.cpp}), Python (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/python/t8.py#L72,t8.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/custom_gui.py#L72,custom_gui.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/gui.py#L9,gui.py}) @end table @item gmsh/fltk/wait @@ -4103,7 +4112,7 @@ thread. @item Return: - @item Examples: -C++ (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/custom_gui.cpp#L79,custom_gui.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/gui.cpp#L35,gui.cpp}), Python (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/custom_gui.py#L78,custom_gui.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/gui.py#L38,gui.py}) +C++ (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/custom_gui.cpp#L79,custom_gui.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/gui.cpp#L35,gui.cpp}), Python (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/custom_gui.py#L80,custom_gui.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/gui.py#L39,gui.py}) @end table @item gmsh/fltk/update @@ -4120,7 +4129,7 @@ update of the user interface from another thread. @item Return: - @item Examples: -C++ (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/custom_gui.cpp#L90,custom_gui.cpp}), Python (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/custom_gui.py#L89,custom_gui.py}) +C++ (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/custom_gui.cpp#L90,custom_gui.cpp}), Python (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/custom_gui.py#L91,custom_gui.py}) @end table @item gmsh/fltk/awake @@ -4135,7 +4144,7 @@ perform an action (currently the only @code{action} allowed is "update"). @item Return: - @item Examples: -C++ (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/custom_gui.cpp#L39,custom_gui.cpp}), Python (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/custom_gui.py#L62,custom_gui.py}) +C++ (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/custom_gui.cpp#L39,custom_gui.cpp}), Python (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/custom_gui.py#L63,custom_gui.py}) @end table @item gmsh/fltk/lock @@ -4149,7 +4158,7 @@ Block the current thread until it can safely modify the user interface. @item Return: - @item Examples: -C++ (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/custom_gui.cpp#L32,custom_gui.cpp}), Python (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/custom_gui.py#L55,custom_gui.py}) +C++ (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/custom_gui.cpp#L32,custom_gui.cpp}), Python (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/custom_gui.py#L56,custom_gui.py}) @end table @item gmsh/fltk/unlock @@ -4163,7 +4172,7 @@ Release the lock that was set using lock. @item Return: - @item Examples: -C++ (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/custom_gui.cpp#L34,custom_gui.cpp}), Python (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/custom_gui.py#L57,custom_gui.py}) +C++ (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/custom_gui.cpp#L34,custom_gui.cpp}), Python (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/custom_gui.py#L58,custom_gui.py}) @end table @item gmsh/fltk/run @@ -4193,7 +4202,7 @@ Check if the user interface is available (e.g. to detect if it has been closed). @item Return: integer value @item Examples: -C++ (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/custom_gui.cpp#L76,custom_gui.cpp}), Python (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/custom_gui.py#L74,custom_gui.py}) +C++ (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/custom_gui.cpp#L76,custom_gui.cpp}), Python (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/custom_gui.py#L76,custom_gui.py}) @end table @item gmsh/fltk/selectEntities @@ -4250,7 +4259,7 @@ Set one or more parameters in the ONELAB database, encoded in @code{format}. @item Return: - @item Examples: -C++ (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/custom_gui.cpp#L69,custom_gui.cpp}), Python (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/custom_gui.py#L29,custom_gui.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/onelab_test.py#L11,onelab_test.py}) +C++ (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/custom_gui.cpp#L69,custom_gui.cpp}), Python (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/custom_gui.py#L30,custom_gui.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/onelab_test.py#L11,onelab_test.py}) @end table @item gmsh/onelab/get @@ -4280,7 +4289,7 @@ the parameter if it does not exist; update the value if the parameter exists. @item Return: - @item Examples: -C++ (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/custom_gui.cpp#L43,custom_gui.cpp}), Python (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/custom_gui.py#L63,custom_gui.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/onelab_test.py#L42,onelab_test.py}) +C++ (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/custom_gui.cpp#L43,custom_gui.cpp}), Python (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/custom_gui.py#L64,custom_gui.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/onelab_test.py#L42,onelab_test.py}) @end table @item gmsh/onelab/setString @@ -4295,7 +4304,7 @@ the parameter if it does not exist; update the value if the parameter exists. @item Return: - @item Examples: -C++ (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/custom_gui.cpp#L29,custom_gui.cpp}), Python (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/custom_gui.py#L52,custom_gui.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/onelab_test.py#L43,onelab_test.py}) +C++ (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/custom_gui.cpp#L29,custom_gui.cpp}), Python (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/custom_gui.py#L53,custom_gui.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/onelab_test.py#L43,onelab_test.py}) @end table @item gmsh/onelab/getNumber @@ -4310,7 +4319,7 @@ Return an empty vector if the parameter does not exist. @item Return: - @item Examples: -C++ (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/custom_gui.cpp#L16,custom_gui.cpp}), Python (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/custom_gui.py#L37,custom_gui.py}) +C++ (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/custom_gui.cpp#L16,custom_gui.cpp}), Python (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/custom_gui.py#L38,custom_gui.py}) @end table @item gmsh/onelab/getString @@ -4325,7 +4334,7 @@ Return an empty vector if the parameter does not exist. @item Return: - @item Examples: -C++ (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/custom_gui.cpp#L84,custom_gui.cpp}), Python (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/custom_gui.py#L82,custom_gui.py}) +C++ (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/custom_gui.cpp#L84,custom_gui.cpp}), Python (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/custom_gui.py#L84,custom_gui.py}) @end table @item gmsh/onelab/clear @@ -4375,7 +4384,7 @@ Write a @code{message}. @code{level} can be "info", "warning" or "error". @item Return: - @item Examples: -C++ (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/c++/t7.cpp#L40,t7.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/c++/t8.cpp#L41,t8.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/c++/t9.cpp#L31,t9.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/c++/t13.cpp#L24,t13.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/c++/t16.cpp#L34,t16.cpp}, ...), Python (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/custom_gui.py#L56,custom_gui.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/terrain_stl.py#L27,terrain_stl.py}) +C++ (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/c++/t7.cpp#L40,t7.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/c++/t8.cpp#L41,t8.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/c++/t9.cpp#L31,t9.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/c++/t13.cpp#L24,t13.cpp}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/tutorial/c++/t16.cpp#L34,t16.cpp}, ...), Python (@url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/custom_gui.py#L57,custom_gui.py}, @url{https://gitlab.onelab.info/gmsh/gmsh/tree/master/demos/api/terrain_stl.py#L27,terrain_stl.py}) @end table @item gmsh/logger/start