X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FMEDPartitioner%2FMEDPARTITIONER_MeshCollectionMedAsciiDriver.cxx;h=0fd977b0613bf181af280b46e1e9664795ba4d17;hb=b219559763498c4bd10c730cd3d2c62b1eed45db;hp=5607e637a797a08f6be5a3873c090e967df600cc;hpb=5da72d398d0eb1820c3ce6dd90b8579b6b14edf5;p=tools%2Fmedcoupling.git diff --git a/src/MEDPartitioner/MEDPARTITIONER_MeshCollectionMedAsciiDriver.cxx b/src/MEDPartitioner/MEDPARTITIONER_MeshCollectionMedAsciiDriver.cxx index 5607e637a..0fd977b06 100644 --- a/src/MEDPartitioner/MEDPARTITIONER_MeshCollectionMedAsciiDriver.cxx +++ b/src/MEDPartitioner/MEDPARTITIONER_MeshCollectionMedAsciiDriver.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2016 CEA/DEN, EDF R&D +// Copyright (C) 2007-2019 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 @@ -33,6 +33,7 @@ #include #include #include +#include #include #include @@ -57,14 +58,14 @@ int MeshCollectionMedAsciiDriver::read(MEDCoupling::MEDFileData* filedata) readMEDFileData(filedata); std::vector cz; // to fill from filedata - std::vector cellglobal; - std::vector nodeglobal; - std::vector faceglobal; - int size = (_collection->getMesh()).size(); + std::vector cellglobal; + std::vector nodeglobal; + std::vector faceglobal; + std::size_t size = _collection->getMesh().size(); cellglobal.resize(size); nodeglobal.resize(size); faceglobal.resize(size); - for ( int idomain = 0; idomain < size; ++idomain ) + for ( unsigned int idomain = 0; idomain < size; ++idomain ) { cellglobal[idomain]=0; faceglobal[idomain]=0; @@ -89,9 +90,9 @@ int MeshCollectionMedAsciiDriver::read(MEDCoupling::MEDFileData* filedata) int MeshCollectionMedAsciiDriver::read(const char* filename, ParaDomainSelector* domainSelector) { //distributed meshes - std::vector cellglobal; - std::vector nodeglobal; - std::vector faceglobal; + std::vector cellglobal; + std::vector nodeglobal; + std::vector faceglobal; int nbdomain; //reading ascii master file @@ -167,12 +168,12 @@ int MeshCollectionMedAsciiDriver::read(const char* filename, ParaDomainSelector* */ void MeshCollectionMedAsciiDriver::write(const char* filename, ParaDomainSelector* domainSelector) const { - int nbdomains=_collection->getMesh().size(); + std::size_t nbdomains=_collection->getMesh().size(); std::vector filenames; filenames.resize(nbdomains); //loop on the domains - for (int idomain=0; idomainisMyDomain( idomain ) ) { - if ( !_collection->getMesh()[idomain]->getNumberOfCells()==0 ) continue;//empty domain + // [ABN] spurious test in 8.2 - fixed as I think it should be: + if ( _collection->getMesh()[idomain]->getNumberOfCells() == 0 ) continue; WriteUMesh(distfilename.c_str(),(_collection->getMesh())[idomain],true); //writeSubdomain(idomain, nbdomains, distfilename.c_str(), domainSelector); } @@ -196,7 +198,7 @@ void MeshCollectionMedAsciiDriver::write(const char* filename, ParaDomainSelecto file << "#" << " " << std::endl; file << _collection->getMesh().size() << " " << std::endl; - for (int idomain=0; idomaingetName() <<" "<< idomain+1 << " " << (_collection->getMesh())[idomain]->getName() << " localhost " << filenames[idomain] << " "<< std::endl;