diff --git a/Geo/ChainComplex.cpp b/Geo/ChainComplex.cpp
index 1d86167fb6fb57a5e36ee1e3265f33dc4284726c..1e32afa678dbc63d20f597e47baec5458b030eb3 100644
--- a/Geo/ChainComplex.cpp
+++ b/Geo/ChainComplex.cpp
@@ -885,10 +885,24 @@ void Chain::createPView(){
     data.insert(std::make_pair(e->getNum(), coeffs));
   }
   
-  std::map<int, std::vector<MElement*> > map;
-  map.insert(std::make_pair(0, elements));
-  _model->storeElementsInEntities(map);
-
+  int max[4];
+  for(int i = 0; i < 4; i++) max[i] = _model->getMaxElementaryNumber(i);
+  int entityNum = *std::max_element(max,max+4) + 1;
+  for(int i = 0; i < 4; i++) max[i] = _model->getMaxPhysicalNumber(i);
+  int physicalNum = *std::max_element(max,max+4) + 1;
+  
+  std::map<int, std::vector<MElement*> > entityMap;
+  //int entityNum = _model->getMaxElementaryNumber(getDim())+1;
+  entityMap[entityNum] = elements;
+  std::map<int, std::map<int, std::string> > physicalMap;
+  std::map<int, std::string> physicalInfo;
+  //int physicalNum = _model->getMaxPhysicalNumber(getDim())+1; 
+  physicalInfo[physicalNum]=getName();
+  physicalMap[entityNum] = physicalInfo;
+  
+  _model->storeChain(getDim(), entityMap, physicalMap);
+  _model->setPhysicalName(getName(), getDim(), physicalNum);
+  
   if(!data.empty()) PView *chain = new PView(getName(), "ElementData", getGModel(), data, 0, 1);
   
   return;
diff --git a/Geo/GModel.h b/Geo/GModel.h
index 1ab199100315779e3de863b366430c76546f3c4c..2346ff5c4c8a502f2f6b498d2d48a2bc8cb91be5 100644
--- a/Geo/GModel.h
+++ b/Geo/GModel.h
@@ -443,8 +443,11 @@ class GModel
 
   static void registerBindings(binding *b);
 
-  void storeElementsInEntities(std::map<int, std::vector<MElement*> > &map){
-    _storeElementsInEntities(map);
+  // Store mesh elements of a chain in a new elementary and physical entity
+  void storeChain(int dim, std::map<int, std::vector<MElement*> > &entityMap, 
+                 std::map<int, std::map<int, std::string> > &physicalMap){
+    _storeElementsInEntities(entityMap);
+    _storePhysicalTagsInEntities(dim, physicalMap);
   }
 };
 
diff --git a/Geo/Homology.h b/Geo/Homology.h
index 3dd6e2b7e6066f0fc4936eb93fcce7a7449b283b..57786ec3b21c07c599e3be15253edf47f54521c4 100644
--- a/Geo/Homology.h
+++ b/Geo/Homology.h
@@ -108,7 +108,7 @@ class Homology
    
    // write the generators to a file
    bool writeGeneratorsMSH(std::string fileName, bool binary=false){
-     if(!_model->writeMSH(fileName, 2.0, binary, true, false, 1.0, false)) return false;
+     if(!_model->writeMSH(fileName, 2.0, binary, false, false, 1.0, false)) return false;
      for(int i = 0; i < 4; i++){
        for(int j = 0; j < _generators[i].size(); j++){
          Chain* chain = _generators[i].at(j);
diff --git a/Post/PViewDataGModelIO.cpp b/Post/PViewDataGModelIO.cpp
index 0cad126200fab4f2c63636077d35377d09a7a6dc..48304312c737da114c7c157846c2fec737b19589 100644
--- a/Post/PViewDataGModelIO.cpp
+++ b/Post/PViewDataGModelIO.cpp
@@ -117,7 +117,7 @@ bool PViewDataGModel::writeMSH(std::string fileName, bool binary)
 
   GModel *model = _steps[0]->getModel();
 
-  if(!model->writeMSH(fileName, 2.0, binary, true, false, 1.0, false)) return false;
+  if(!model->writeMSH(fileName, 2.0, binary, false, false, 1.0, false)) return false;
 
   // append data
   FILE *fp = fopen(fileName.c_str(), binary ? "ab" : "a");