diff --git a/Geo/GModelIO_Mesh.cpp b/Geo/GModelIO_Mesh.cpp index e24524e8c33df2278d050cfb0719800ab873573c..7fb5b4b2809e0e01789505ff2e6e51e3cfabe73c 100644 --- a/Geo/GModelIO_Mesh.cpp +++ b/Geo/GModelIO_Mesh.cpp @@ -586,6 +586,12 @@ int GModel::writeMSH(const std::string &name, double version, bool binary, return 0; } + // binary format exists only in version 2 + if(version > 1 || binary) + version = 2.2; + else + version = 1.0; + // if there are no physicals we save all the elements if(noPhysicalGroups()) saveAll = true; @@ -593,15 +599,6 @@ int GModel::writeMSH(const std::string &name, double version, bool binary, // sequence int numVertices = indexMeshVertices(saveAll, saveSinglePartition); - // FIXME if saveSinglePartition, re-tag some nodes with '0' index - // and recompute numVertices - - // binary format exists only in version 2 - if(version > 1 || binary) - version = 2.2; - else - version = 1.0; - // get the number of elements we need to save int numElements = getNumElementsMSH(this, saveAll, saveSinglePartition); @@ -616,13 +613,6 @@ int GModel::writeMSH(const std::string &name, double version, bool binary, if((*it)->polyhedra[i]->ownsParent()) parents[1][(*it)->polyhedra[i]->getParent()] = (*it); - // get ghost cells - std::multimap<MElement*, int> ghostCells; - if(saveSinglePartition && getGhostCells().size()){ - // XXXX - numElements += ghostCells.size(); - } - if(version >= 2.0){ fprintf(fp, "$MeshFormat\n"); fprintf(fp, "%g %d %d\n", version, binary ? 1 : 0, (int)sizeof(double)); @@ -818,7 +808,7 @@ int GModel::writePartitionedMSH(const std::string &baseName, bool binary, index++; } -#if 1 +#if 0 if(_ghostCells.size()){ Msg::Info("Writing ghost cells in debug file 'ghosts.pos'"); FILE *fp = fopen("ghosts.pos", "w");