X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FMEDLoader%2FMEDFileMeshSupport.cxx;h=120447d50e625fc63f5ecb1a4d78d5040665dafd;hb=66bc12813f1bc01afb950cbbc11fd94f8f2009ed;hp=9f8daa813b3370f9ea4f2e4554473c4124308b6f;hpb=8267af5b072991945544a0c78d1828b4bb4d864d;p=tools%2Fmedcoupling.git diff --git a/src/MEDLoader/MEDFileMeshSupport.cxx b/src/MEDLoader/MEDFileMeshSupport.cxx index 9f8daa813..120447d50 100644 --- a/src/MEDLoader/MEDFileMeshSupport.cxx +++ b/src/MEDLoader/MEDFileMeshSupport.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2017 CEA/DEN, EDF R&D +// Copyright (C) 2007-2020 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 @@ -45,16 +45,16 @@ MEDFileMeshSupports *MEDFileMeshSupports::New() MEDFileMeshSupports::MEDFileMeshSupports(med_idt fid) { - int nbSM(MEDnSupportMesh(fid)); + med_int nbSM(MEDnSupportMesh(fid)); _supports.resize(nbSM); for(int i=0;i msn(MEDLoaderBase::buildEmptyString(MED_NAME_SIZE)); INTERP_KERNEL::AutoPtr description(MEDLoaderBase::buildEmptyString(MED_COMMENT_SIZE)); med_axis_type axType; - int nAxis(MEDsupportMeshnAxis(fid,i+1)); + med_int nAxis(MEDsupportMeshnAxis(fid,i+1)); INTERP_KERNEL::AutoPtr axisName(new char[MED_SNAME_SIZE*nAxis+1]),axisUnit(new char[MED_SNAME_SIZE*nAxis+1]); - int spaceDim(0),meshDim(0); + med_int spaceDim(0),meshDim(0); MEDFILESAFECALLERRD0(MEDsupportMeshInfo,(fid,i+1,msn,&spaceDim,&meshDim,description,&axType,axisName,axisUnit)); std::string name(MEDLoaderBase::buildStringFromFortran(msn,MED_NAME_SIZE)); _supports[i]=MEDFileUMesh::New(fid,name); @@ -90,6 +90,15 @@ void MEDFileMeshSupports::writeLL(med_idt fid) const (*it)->writeLL(fid); } +std::vector MEDFileMeshSupports::getSupMeshNames() const +{ + std::vector ret; + for(std::vector< MCAuto >::const_iterator it=_supports.begin();it!=_supports.end();it++) + if((*it).isNotNull()) + ret.push_back((*it)->getName()); + return ret; +} + const MEDFileUMesh *MEDFileMeshSupports::getSupMeshWithName(const std::string& name) const { std::vector mns; @@ -105,13 +114,13 @@ const MEDFileUMesh *MEDFileMeshSupports::getSupMeshWithName(const std::string& n } } std::ostringstream oss; - oss << "MEDFileMeshSupports::getSupMeshWithName : no such name \"" << name << "\". Possibilitities are :"; + oss << "MEDFileMeshSupports::getSupMeshWithName : no such name \"" << name << "\". Possibilities are :"; std::copy(mns.begin(),mns.end(),std::ostream_iterator(oss,",")); oss << " !"; throw INTERP_KERNEL::Exception(oss.str()); } -int MEDFileMeshSupports::getNumberOfNodesInConnOf(TypeOfField entity, const std::string& name) const +mcIdType MEDFileMeshSupports::getNumberOfNodesInConnOf(TypeOfField entity, const std::string& name) const { const MEDFileUMesh *sup(getSupMeshWithName(name)); switch(entity)