-// Copyright (C) 2007-2013 CEA/DEN, EDF R&D
+// Copyright (C) 2007-2015 CEA/DEN, EDF R&D
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
//to know nb of cells on each proc to compute global cell ids from locally global
domainSelector->gatherNbOf(_collection->getMesh());
}
- _collection->setTopology(aPT);
+ _collection->setTopology(aPT, true);
_collection->setDomainNames(_collection->getName());
return 0;
}
int nbdomains= _collection->getMesh().size();
//loop on the domains
- std::string finalMeshName=ExtractFromDescription(MyGlobals::_General_Informations[0], "finalMeshName=");
+ std::string finalMeshName="";
+ if (MyGlobals::_General_Informations.size()!=0)
+ {
+ std::size_t found=MyGlobals::_General_Informations[0].find("finalMeshName=");
+ if ((found!=std::string::npos) && (found>0))
+ {
+ finalMeshName=ExtractFromDescription(MyGlobals::_General_Informations[0], "finalMeshName=");
+ }
+ }
+ if (finalMeshName.empty())
+ {
+ finalMeshName=_collection->getName();
+ }
for (int idomain=nbdomains-1; idomain>=0;idomain--)
{
std::string distfilename;
node = xmlNewChild(mesh_node,0, BAD_CAST "chunk",0);
xmlNewProp(node, BAD_CAST "subdomain", BAD_CAST buff);
xmlNewChild(node,0,BAD_CAST "name", BAD_CAST finalMeshName.c_str());
- //xmlNewChild(node,0,BAD_CAST "name", BAD_CAST (_collection->getMesh())[idomain]->getName());
+ //xmlNewChild(node,0,BAD_CAST "name", BAD_CAST ((_collection->getMesh())[idomain]->getName()).c_str());
}
}