diff --git a/Geo/GModel.cpp b/Geo/GModel.cpp index 6406bd99f9d5db663736b79a354202f00e8f0297..096918d28027447ca7a0511c908eefb6732ab34f 100644 --- a/Geo/GModel.cpp +++ b/Geo/GModel.cpp @@ -450,7 +450,7 @@ int GModel::setPhysicalName(std::string name, int dim, int number) return number; } -std::string GModel::getPhysicalName(int dim, int number) +std::string GModel::getPhysicalName(int dim, int number) const { //Emi debug here // printf("getPhysName size %d \n", physicalNames.size()); @@ -460,7 +460,7 @@ std::string GModel::getPhysicalName(int dim, int number) // printf("par (%d,%d) \n", itt->first.first, itt->first.second); // } - std::map<std::pair<int, int>, std::string>::iterator it = + std::map<std::pair<int, int>, std::string>::const_iterator it = physicalNames.find(std::pair<int, int>(dim, number)); if(it != physicalNames.end()) return it->second; return ""; diff --git a/Geo/GModel.h b/Geo/GModel.h index e165f688273570d63805414de53397b78447851a..f026f38b6ce8ee25f0d002eeffc46a0a7abf6339 100644 --- a/Geo/GModel.h +++ b/Geo/GModel.h @@ -325,7 +325,7 @@ class GModel // get the name (if any) of a given physical group of dimension // "dim" and id number "num" - std::string getPhysicalName(int dim, int num); + std::string getPhysicalName(int dim, int num) const; // get the number of a given physical group of dimension // "dim" and name "name". return -1 if not found diff --git a/Geo/MElementOctree.cpp b/Geo/MElementOctree.cpp index ac433331dab9b548adc79a3502d9f809e418f6e8..ce8db23964fa307ab2ca2b4611364a0d605b6aa0 100644 --- a/Geo/MElementOctree.cpp +++ b/Geo/MElementOctree.cpp @@ -187,7 +187,7 @@ std::vector<MElement *> MElementOctree::findAll(double x, double y, double z, return e; } -MElement *MElementOctree::find(double x, double y, double z, int dim, bool strict) +MElement *MElementOctree::find(double x, double y, double z, int dim, bool strict) const { double P[3] = {x, y, z}; MElement *e = (MElement*)Octree_Search(P, _octree); diff --git a/Geo/MElementOctree.h b/Geo/MElementOctree.h index 4775828ee80662d5c2f4c1c398ebc09e65dae7c3..a52316f37e71b1c50a1aff1356daaa31f1bf5436 100644 --- a/Geo/MElementOctree.h +++ b/Geo/MElementOctree.h @@ -21,7 +21,7 @@ class MElementOctree{ MElementOctree(GModel *); MElementOctree(std::vector<MElement*> &); ~MElementOctree(); - MElement *find(double x, double y, double z, int dim = -1, bool strict = false); + MElement *find(double x, double y, double z, int dim = -1, bool strict = false) const; Octree *getInternalOctree(){ return _octree; } std::vector<MElement *> findAll(double x, double y, double z, int dim, bool strict = false); };