diff --git a/Geo/GModelIO_GEO.cpp b/Geo/GModelIO_GEO.cpp
index 99ec64ad165f616f889a6697caf32f4e909d1ffb..90f010d16f725da1d31427108409788dc32f11d8 100644
--- a/Geo/GModelIO_GEO.cpp
+++ b/Geo/GModelIO_GEO.cpp
@@ -1229,20 +1229,16 @@ void GEO_Internals::synchronize(GModel *model)
       if(c->Num >= 0) {
         GEdge *e = model->getEdgeByTag(c->Num);
 
-        printf("syncing curve %d:", c->Num);
         if(!e && c->beg && c->end) {
-          printf("case 1\n");
           e = new gmshEdge(model, c, model->getVertexByTag(c->beg->Num),
                            model->getVertexByTag(c->end->Num));
           model->add(e);
         }
         else if(!e) {
-          printf("case 2\n");
           e = new gmshEdge(model, c, 0, 0);
           model->add(e);
         }
         else {
-          printf("case 3\n");
           if(e->getNativeType() == GEntity::GmshModel) {
             if(c->beg && c->end)
               ((gmshEdge *)e)
diff --git a/Geo/discreteEdge.cpp b/Geo/discreteEdge.cpp
index 525527cc3bc3b05eae86c264152b69b03688c714..a1baac6f033ae2571be9398d2415185bbd06cb0b 100644
--- a/Geo/discreteEdge.cpp
+++ b/Geo/discreteEdge.cpp
@@ -34,6 +34,12 @@ discreteEdge::discreteEdge(GModel *model, int num) : GEdge(model, num)
   CreateReversedCurve(c);
 }
 
+discreteEdge::discreteEdge(GModel *model) : GEdge(model, 0)
+{
+  // used for temporary discrete edges, that should not lead to the creation of
+  // the corresponding entity in GEO internals
+}
+
 bool discreteEdge::_orderMLines(bool isCompound)
 {
   std::size_t ss = lines.size();
diff --git a/Geo/discreteEdge.h b/Geo/discreteEdge.h
index 89e09929222aeedab73b7ce321859c1282bed14e..2a1ccd7213bfe0d234a5fbed1c1a9b3dface8c3e 100644
--- a/Geo/discreteEdge.h
+++ b/Geo/discreteEdge.h
@@ -18,6 +18,7 @@ private:
 public:
   discreteEdge(GModel *model, int num, GVertex *_v0, GVertex *_v1);
   discreteEdge(GModel *model, int num);
+  discreteEdge(GModel *model);
   virtual ~discreteEdge() {}
   virtual GeomType geomType() const { return DiscreteCurve; }
   virtual GPoint point(double p) const;
diff --git a/Geo/discreteFace.cpp b/Geo/discreteFace.cpp
index 1c040727c35b40f3fa533a31082a13eb86762700..abc1e7525fa8053375d0ca66453dc842775b1725 100644
--- a/Geo/discreteFace.cpp
+++ b/Geo/discreteFace.cpp
@@ -87,6 +87,12 @@ discreteFace::discreteFace(GModel *model, int num) : GFace(model, num)
   meshStatistics.status = GFace::DONE;
 }
 
+discreteFace::discreteFace(GModel *model) : GFace(model, 0)
+{
+  // used for temporary discrete faces, that should not lead to the creation of
+  // the corresponding entity in GEO internals
+}
+
 static void sort_edges(std::vector<GEdge *> &e, std::vector<int> &dir)
 {
   if(e.empty() || dir.empty()) return;
diff --git a/Geo/discreteFace.h b/Geo/discreteFace.h
index b4fbd0584a291b234ac44b4cd3ff94550538c10e..4eba8c1286cf7da6e90da5a4cc8a6d84e9eef6a9 100644
--- a/Geo/discreteFace.h
+++ b/Geo/discreteFace.h
@@ -35,6 +35,7 @@ private:
   void _createGeometryFromSTL();
 public:
   discreteFace(GModel *model, int num);
+  discreteFace(GModel *model);
   virtual ~discreteFace() {}
   using GFace::point;
   GPoint point(double par1, double par2) const;
diff --git a/Geo/discreteRegion.cpp b/Geo/discreteRegion.cpp
index fd475dbcf7c72d553b28c83a1aabf4d955c321f1..720f0352360b838bcedb16a8c0309b8105e111d5 100644
--- a/Geo/discreteRegion.cpp
+++ b/Geo/discreteRegion.cpp
@@ -21,6 +21,10 @@ discreteRegion::discreteRegion(GModel *model, int num) : GRegion(model, num)
   Tree_Add(model->getGEOInternals()->Volumes, &v);
 }
 
+discreteRegion::discreteRegion(GModel *model) : GRegion(model, 0)
+{
+}
+
 void discreteRegion::setBoundFaces(const std::set<int> &tagFaces)
 {
   for(std::set<int>::const_iterator it = tagFaces.begin(); it != tagFaces.end();
diff --git a/Geo/discreteRegion.h b/Geo/discreteRegion.h
index 4397a9579d05f3ab68acd8b5e242d2af89a1a334..d07638e91a1479e821426fc7672c3744b6bdd81a 100644
--- a/Geo/discreteRegion.h
+++ b/Geo/discreteRegion.h
@@ -13,6 +13,7 @@
 class discreteRegion : public GRegion {
 public:
   discreteRegion(GModel *model, int num);
+  discreteRegion(GModel *model);
   virtual ~discreteRegion() {}
   virtual GeomType geomType() const { return DiscreteVolume; }
   void setBoundFaces(const std::set<int> &tagFaces);
diff --git a/Geo/discreteVertex.cpp b/Geo/discreteVertex.cpp
index f4d142efc0d8ece4c845fa06b93725ada341bc5e..5891bd86bf1c9286224df21d7b13f44fe15518d8 100644
--- a/Geo/discreteVertex.cpp
+++ b/Geo/discreteVertex.cpp
@@ -18,6 +18,12 @@ discreteVertex::discreteVertex(GModel *m, int num, double x, double y, double z)
   Tree_Add(m->getGEOInternals()->Points, &_v);
 }
 
+discreteVertex::discreteVertex(GModel *m) : GVertex(m, 0)
+{
+  // used for temporary discrete vertices, that should not lead to the creation
+  // of the corresponding entity in GEO internals
+}
+
 discreteVertex::~discreteVertex()
 {
 }
diff --git a/Geo/discreteVertex.h b/Geo/discreteVertex.h
index 28de2ab13276f77ab86dd5d91e1faf9ec7b61669..facc7ee9ed5b3919544ab8b0d280a5d8dacab286 100644
--- a/Geo/discreteVertex.h
+++ b/Geo/discreteVertex.h
@@ -18,6 +18,7 @@ private:
 public:
   discreteVertex(GModel *m, int num, double x = 0., double y = 0.,
                  double z = 0.);
+  discreteVertex(GModel *m);
   virtual ~discreteVertex();
   virtual GPoint point() const;
   virtual double x() const;
diff --git a/Geo/partitionEdge.h b/Geo/partitionEdge.h
index ce684bb7dacab59d398b5fe2a54baa430b3df5d3..b2c233c95d21e0a8c7408394458a6e96008a9752 100644
--- a/Geo/partitionEdge.h
+++ b/Geo/partitionEdge.h
@@ -26,6 +26,10 @@ public:
     : discreteEdge(model, num), _partitions(partitions), _parentEntity(NULL)
   {
   }
+  partitionEdge(GModel *model, const std::vector<unsigned int> &partitions)
+    : discreteEdge(model), _partitions(partitions), _parentEntity(NULL)
+  {
+  }
   virtual ~partitionEdge() {}
   virtual GeomType geomType() const { return PartitionCurve; }
   virtual bool haveParametrization() { return false; }
diff --git a/Geo/partitionFace.h b/Geo/partitionFace.h
index 22da8e87d134b899cfba375580fb8d332ab1c2ee..a71fcdaee649cc0815973e5329bebade1256db98 100644
--- a/Geo/partitionFace.h
+++ b/Geo/partitionFace.h
@@ -24,6 +24,11 @@ public:
     : discreteFace(model, num), _partitions(), _parentEntity(NULL)
   {
   }
+  partitionFace(GModel *model,
+                const std::vector<unsigned int> &partitions)
+    : discreteFace(model), _partitions(partitions), _parentEntity(NULL)
+  {
+  }
   virtual ~partitionFace() {}
   virtual GeomType geomType() const { return PartitionSurface; }
   virtual bool haveParametrization() { return false; }
diff --git a/Geo/partitionRegion.h b/Geo/partitionRegion.h
index 9b3689afe8418c37cab7909d89b640c2ac8bbb75..fd5148b775990167151d83c50987cfb661e42d0e 100644
--- a/Geo/partitionRegion.h
+++ b/Geo/partitionRegion.h
@@ -24,6 +24,11 @@ public:
     : discreteRegion(model, num), _partitions(), _parentEntity(NULL)
   {
   }
+  partitionRegion(GModel *model,
+                  const std::vector<unsigned int> &partitions)
+    : discreteRegion(model), _partitions(partitions), _parentEntity(NULL)
+  {
+  }
   virtual ~partitionRegion() {}
   virtual GeomType geomType() const { return PartitionVolume; }
   virtual void setParentEntity(GEntity *r) { _parentEntity = r; }
diff --git a/Geo/partitionVertex.h b/Geo/partitionVertex.h
index c76d3ee19f2890d643c00d3a97d6f2cdb164659c..1008c6598fcae173f9f8902052858518a1a102a9 100644
--- a/Geo/partitionVertex.h
+++ b/Geo/partitionVertex.h
@@ -24,6 +24,11 @@ public:
     : discreteVertex(model, num), _partitions(), _parentEntity(NULL)
   {
   }
+  partitionVertex(GModel *model,
+                  const std::vector<unsigned int> &partitions)
+    : discreteVertex(model), _partitions(partitions), _parentEntity(NULL)
+  {
+  }
   virtual ~partitionVertex() {}
   virtual GeomType geomType() const { return PartitionPoint; }
   virtual void setParentEntity(GEntity *v) { _parentEntity = v; }
diff --git a/Mesh/meshPartition.cpp b/Mesh/meshPartition.cpp
index 630f55d0394b2a967c646e76a9499599ee0254c3..02161cf1f6af2d72d50eecc95209855a026d649f 100644
--- a/Mesh/meshPartition.cpp
+++ b/Mesh/meshPartition.cpp
@@ -1607,7 +1607,7 @@ static partitionFace *assignPartitionBoundary(
   hashmap<MElement *, GEntity *> &elementToEntity, int &numEntity)
 {
   partitionFace *newEntity = 0;
-  partitionFace pf(model, 1, partitions);
+  partitionFace pf(model, partitions);
   std::pair<
     std::multimap<partitionFace *, GEntity *, Less_partitionFace>::iterator,
     std::multimap<partitionFace *, GEntity *, Less_partitionFace>::iterator>
@@ -1675,7 +1675,7 @@ static partitionEdge *assignPartitionBoundary(
   hashmap<MElement *, GEntity *> &elementToEntity, int &numEntity)
 {
   partitionEdge *newEntity = 0;
-  partitionEdge pe(model, 1, 0, 0, partitions);
+  partitionEdge pe(model, partitions);
   std::pair<
     std::multimap<partitionEdge *, GEntity *, Less_partitionEdge>::iterator,
     std::multimap<partitionEdge *, GEntity *, Less_partitionEdge>::iterator>
@@ -1721,7 +1721,7 @@ static partitionVertex *assignPartitionBoundary(
   hashmap<MElement *, GEntity *> &elementToEntity, int &numEntity)
 {
   partitionVertex *newEntity = 0;
-  partitionVertex pv(model, 1, partitions);
+  partitionVertex pv(model, partitions);
   std::pair<
     std::multimap<partitionVertex *, GEntity *, Less_partitionVertex>::iterator,
     std::multimap<partitionVertex *, GEntity *, Less_partitionVertex>::iterator>