1 // Copyright (C) 2007-2015 CEA/DEN, EDF R&D
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License, or (at your option) any later version.
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 // Lesser General Public License for more details.
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
19 // Author : Anthony Geay (CEA/DEN)
21 #include "MEDFileMeshElt.hxx"
22 #include "MEDFileSafeCaller.txx"
23 #include "MEDFileMeshReadSelector.hxx"
25 #include "MEDCouplingUMesh.hxx"
27 #include "InterpKernelException.hxx"
28 #include "InterpKernelAutoPtr.hxx"
29 #include "CellModel.hxx"
33 extern med_geometry_type typmai3[34];
35 using namespace ParaMEDMEM;
37 MEDFileUMeshPerType *MEDFileUMeshPerType::New(med_idt fid, const char *mName, int dt, int it, int mdim, med_geometry_type geoElt, INTERP_KERNEL::NormalizedCellType geoElt2, MEDFileMeshReadSelector *mrs)
39 med_entity_type whichEntity;
40 if(!isExisting(fid,mName,dt,it,geoElt,whichEntity))
42 return new MEDFileUMeshPerType(fid,mName,dt,it,mdim,geoElt,geoElt2,whichEntity,mrs);
45 MEDFileUMeshPerType *MEDFileUMeshPerType::NewPart(med_idt fid, const char *mName, int dt, int it, int mdim, INTERP_KERNEL::NormalizedCellType geoElt2, int strt, int stp, int step, MEDFileMeshReadSelector *mrs)
47 int geoElt2i((int)geoElt2);
48 if(geoElt2i<0 || geoElt2i>=34)
49 throw INTERP_KERNEL::Exception("MEDFileUMeshPerType::NewPart : Not recognized MEDCoupling/MEDLoader geometric type !");
50 med_geometry_type geoElt(typmai3[geoElt2]);
51 med_entity_type whichEntity;
52 if(!isExisting(fid,mName,dt,it,geoElt,whichEntity))
53 throw INTERP_KERNEL::Exception("MEDFileUMeshPerType::NewPart : The specified geo type is not present in the specified mesh !");
54 MEDCouplingAutoRefCountObjectPtr<MEDFileUMeshPerType> ret(new MEDFileUMeshPerType);
55 ret->loadPart(fid,mName,dt,it,mdim,geoElt,geoElt2,whichEntity,strt,stp,step,mrs);
59 std::size_t MEDFileUMeshPerType::getHeapMemorySizeWithoutChildren() const
64 std::vector<const BigMemoryObject *> MEDFileUMeshPerType::getDirectChildrenWithNull() const
66 std::vector<const BigMemoryObject *> ret;
67 ret.push_back((const MEDCoupling1GTUMesh *)_m);
68 ret.push_back((const DataArrayInt *)_num);
69 ret.push_back((const DataArrayInt *)_fam);
70 ret.push_back((const DataArrayAsciiChar *)_names);
74 bool MEDFileUMeshPerType::isExisting(med_idt fid, const char *mName, int dt, int it, med_geometry_type geoElt, med_entity_type& whichEntity)
76 static const med_entity_type entities[3]={MED_CELL,MED_DESCENDING_FACE,MED_DESCENDING_EDGE};
80 med_bool changement,transformation;
81 int tmp(MEDmeshnEntity(fid,mName,dt,it,entities[i],geoElt,MED_CONNECTIVITY,MED_NODAL,&changement,&transformation));
85 whichEntity=entities[i];
87 std::cerr << "WARNING : MEDFile has been detected to be no compilant with MED 3 : Please change entity in MEDFile for geotype " << geoElt << std::endl;
93 int MEDFileUMeshPerType::getDim() const
95 return _m->getMeshDimension();
98 MEDFileUMeshPerType::MEDFileUMeshPerType()
102 MEDFileUMeshPerType::MEDFileUMeshPerType(med_idt fid, const char *mName, int dt, int it, int mdim, med_geometry_type geoElt, INTERP_KERNEL::NormalizedCellType type,
103 med_entity_type entity, MEDFileMeshReadSelector *mrs):_entity(entity)
105 med_bool changement,transformation;
106 int curNbOfElem(MEDmeshnEntity(fid,mName,dt,it,entity,geoElt,MED_CONNECTIVITY,MED_NODAL,&changement,&transformation));
107 const INTERP_KERNEL::CellModel& cm(INTERP_KERNEL::CellModel::GetCellModel(type));
110 loadFromStaticType(fid,mName,dt,it,mdim,curNbOfElem,geoElt,type,entity,mrs);
113 if(type==INTERP_KERNEL::NORM_POLYGON || type==INTERP_KERNEL::NORM_QPOLYG)
115 loadPolyg(fid,mName,dt,it,mdim,curNbOfElem,geoElt,entity,mrs);
118 //if(type==INTERP_KERNEL::NORM_POLYHED)
119 loadPolyh(fid,mName,dt,it,mdim,curNbOfElem,geoElt,entity,mrs);
122 void MEDFileUMeshPerType::loadPart(med_idt fid, const char *mName, int dt, int it, int mdim, med_geometry_type geoElt, INTERP_KERNEL::NormalizedCellType type,
123 med_entity_type entity, int strt, int end, int step, MEDFileMeshReadSelector *mrs)
125 med_bool changement,transformation;
126 int curNbOfElem(MEDmeshnEntity(fid,mName,dt,it,entity,geoElt,MED_CONNECTIVITY,MED_NODAL,&changement,&transformation));
127 const INTERP_KERNEL::CellModel& cm(INTERP_KERNEL::CellModel::GetCellModel(type));
128 _pd=PartDefinition::New(strt,end,step);
131 loadPartStaticType(fid,mName,dt,it,mdim,curNbOfElem,geoElt,type,entity,strt,end,step,mrs);
134 throw INTERP_KERNEL::Exception("MEDFileUMeshPerType::loadPart : not implemented yet for the dynamic type !");
137 void MEDFileUMeshPerType::loadFromStaticType(med_idt fid, const char *mName, int dt, int it, int mdim, int curNbOfElem, med_geometry_type geoElt, INTERP_KERNEL::NormalizedCellType type,
138 med_entity_type entity, MEDFileMeshReadSelector *mrs)
140 _m=MEDCoupling1SGTUMesh::New(mName,type);
141 MEDCoupling1SGTUMesh *mc(dynamic_cast<MEDCoupling1SGTUMesh *>((MEDCoupling1GTUMesh *)_m));
142 MEDCouplingAutoRefCountObjectPtr<DataArrayInt> conn(DataArrayInt::New());
143 int nbOfNodesPerCell(mc->getNumberOfNodesPerCell());
144 conn->alloc(nbOfNodesPerCell*curNbOfElem,1);
145 MEDFILESAFECALLERRD0(MEDmeshElementConnectivityRd,(fid,mName,dt,it,entity,geoElt,MED_NODAL,MED_FULL_INTERLACE,conn->getPointer()));
146 std::transform(conn->begin(),conn->end(),conn->getPointer(),std::bind2nd(std::plus<int>(),-1));
147 mc->setNodalConnectivity(conn);
148 loadCommonPart(fid,mName,dt,it,mdim,curNbOfElem,geoElt,entity,mrs);
151 void MEDFileUMeshPerType::loadPartStaticType(med_idt fid, const char *mName, int dt, int it, int mdim, int curNbOfElem, med_geometry_type geoElt, INTERP_KERNEL::NormalizedCellType type,
152 med_entity_type entity, int strt, int end, int step, MEDFileMeshReadSelector *mrs)
155 throw INTERP_KERNEL::Exception("MEDFileUMeshPerType::loadPartStaticType : start pos is negative !");
157 throw INTERP_KERNEL::Exception("MEDFileUMeshPerType::loadPartStaticType : end is after the authorized range !");
158 int nbOfEltsToLoad(DataArray::GetNumberOfItemGivenBES(strt,end,step,"MEDFileUMeshPerType::loadPartStaticType"));
159 _m=MEDCoupling1SGTUMesh::New(mName,type);
160 MEDCoupling1SGTUMesh *mc(dynamic_cast<MEDCoupling1SGTUMesh *>((MEDCoupling1GTUMesh *)_m));
161 MEDCouplingAutoRefCountObjectPtr<DataArrayInt> conn(DataArrayInt::New());
162 int nbOfNodesPerCell(mc->getNumberOfNodesPerCell());
163 conn->alloc(nbOfNodesPerCell*nbOfEltsToLoad,1);
164 med_filter filter=MED_FILTER_INIT;
165 MEDfilterBlockOfEntityCr(fid,/*nentity*/curNbOfElem,/*nvaluesperentity*/1,/*nconstituentpervalue*/nbOfNodesPerCell,
166 MED_ALL_CONSTITUENT,MED_FULL_INTERLACE,MED_COMPACT_STMODE,MED_NO_PROFILE,
167 /*start*/strt+1,/*stride*/step,/*count*/1,/*blocksize*/nbOfEltsToLoad,
168 /*lastblocksize=useless because count=1*/0,&filter);
169 MEDFILESAFECALLERRD0(MEDmeshElementConnectivityAdvancedRd,(fid,mName,dt,it,entity,geoElt,MED_NODAL,&filter,conn->getPointer()));
170 MEDfilterClose(&filter);
171 std::transform(conn->begin(),conn->end(),conn->getPointer(),std::bind2nd(std::plus<int>(),-1));
172 mc->setNodalConnectivity(conn);
173 loadPartOfCellCommonPart(fid,mName,strt,end,step,dt,it,mdim,curNbOfElem,geoElt,entity,mrs);
176 void MEDFileUMeshPerType::loadCommonPart(med_idt fid, const char *mName, int dt, int it, int mdim, int curNbOfElem, med_geometry_type geoElt,
177 med_entity_type entity, MEDFileMeshReadSelector *mrs)
179 med_bool changement,transformation;
181 if(MEDmeshnEntity(fid,mName,dt,it,entity,geoElt,MED_FAMILY_NUMBER,MED_NODAL,&changement,&transformation)>0)
183 if(!mrs || mrs->isCellFamilyFieldReading())
185 _fam=DataArrayInt::New();
186 _fam->alloc(curNbOfElem,1);
187 if(MEDmeshEntityFamilyNumberRd(fid,mName,dt,it,entity,geoElt,_fam->getPointer())!=0)
188 std::fill(_fam->getPointer(),_fam->getPointer()+curNbOfElem,0);
192 if(MEDmeshnEntity(fid,mName,dt,it,entity,geoElt,MED_NUMBER,MED_NODAL,&changement,&transformation)>0)
194 if(!mrs || mrs->isCellNumFieldReading())
196 _num=DataArrayInt::New();
197 _num->alloc(curNbOfElem,1);
198 if(MEDmeshEntityNumberRd(fid,mName,dt,it,entity,geoElt,_num->getPointer())!=0)
203 if(MEDmeshnEntity(fid,mName,dt,it,entity,geoElt,MED_NAME,MED_NODAL,&changement,&transformation)>0)
205 if(!mrs || mrs->isCellNameFieldReading())
207 _names=DataArrayAsciiChar::New();
208 _names->alloc(curNbOfElem+1,MED_SNAME_SIZE);//not a bug to avoid the memory corruption due to last \0 at the end
209 if(MEDmeshEntityNameRd(fid,mName,dt,it,entity,geoElt,_names->getPointer())!=0)
212 _names->reAlloc(curNbOfElem);//not a bug to avoid the memory corruption due to last \0 at the end
217 void MEDFileUMeshPerType::loadPartOfCellCommonPart(med_idt fid, const char *mName, int strt, int stp, int step, int dt, int it, int mdim, int curNbOfElem, med_geometry_type geoElt, med_entity_type entity, MEDFileMeshReadSelector *mrs)
219 med_bool changement,transformation;
221 int nbOfEltsToLoad(DataArray::GetNumberOfItemGivenBES(strt,stp,step,"MEDFileUMeshPerType::loadPartOfCellCommonPart"));
222 if(MEDmeshnEntity(fid,mName,dt,it,entity,geoElt,MED_FAMILY_NUMBER,MED_NODAL,&changement,&transformation)>0)
224 if(!mrs || mrs->isCellFamilyFieldReading())
226 _fam=DataArrayInt::New();
227 _fam->alloc(nbOfEltsToLoad,1);
228 med_filter filter=MED_FILTER_INIT;
229 MEDfilterBlockOfEntityCr(fid,/*nentity*/curNbOfElem,/*nvaluesperentity*/1,/*nconstituentpervalue*/1,
230 MED_ALL_CONSTITUENT,MED_FULL_INTERLACE,MED_COMPACT_STMODE,MED_NO_PROFILE,
231 /*start*/strt+1,/*stride*/step,/*count*/1,/*blocksize*/nbOfEltsToLoad,
232 /*lastblocksize=useless because count=1*/0,&filter);
233 if(MEDmeshEntityAttributeAdvancedRd(fid,mName,MED_FAMILY_NUMBER,dt,it,entity,geoElt,&filter,_fam->getPointer())!=0)
234 _fam->fillWithZero();
235 MEDfilterClose(&filter);
239 if(MEDmeshnEntity(fid,mName,dt,it,entity,geoElt,MED_NUMBER,MED_NODAL,&changement,&transformation)>0)
241 if(!mrs || mrs->isCellNumFieldReading())
243 _num=DataArrayInt::New();
244 _num->alloc(nbOfEltsToLoad,1);
245 med_filter filter=MED_FILTER_INIT;
246 MEDfilterBlockOfEntityCr(fid,/*nentity*/curNbOfElem,/*nvaluesperentity*/1,/*nconstituentpervalue*/1,
247 MED_ALL_CONSTITUENT,MED_FULL_INTERLACE,MED_COMPACT_STMODE,MED_NO_PROFILE,
248 /*start*/strt+1,/*stride*/step,/*count*/1,/*blocksize*/nbOfEltsToLoad,
249 /*lastblocksize=useless because count=1*/0,&filter);
250 if(MEDmeshEntityAttributeAdvancedRd(fid,mName,MED_NUMBER,dt,it,entity,geoElt,&filter,_num->getPointer())!=0)
251 _num->fillWithZero();
252 MEDfilterClose(&filter);
256 if(MEDmeshnEntity(fid,mName,dt,it,entity,geoElt,MED_NAME,MED_NODAL,&changement,&transformation)>0)
258 if(!mrs || mrs->isCellNameFieldReading())
260 _names=DataArrayAsciiChar::New();
261 _names->alloc(nbOfEltsToLoad+1,MED_SNAME_SIZE);//not a bug to avoid the memory corruption due to last \0 at the end
262 med_filter filter=MED_FILTER_INIT;
263 MEDfilterBlockOfEntityCr(fid,/*nentity*/curNbOfElem,/*nvaluesperentity*/1,/*nconstituentpervalue*/1,
264 MED_ALL_CONSTITUENT,MED_FULL_INTERLACE,MED_COMPACT_STMODE,MED_NO_PROFILE,
265 /*start*/strt+1,/*stride*/step,/*count*/1,/*blocksize*/nbOfEltsToLoad,
266 /*lastblocksize=useless because count=1*/0,&filter);
267 if(MEDmeshEntityAttributeAdvancedRd(fid,mName,MED_NAME,dt,it,entity,geoElt,&filter,_names->getPointer())!=0)
270 _names->reAlloc(nbOfEltsToLoad);//not a bug to avoid the memory corruption due to last \0 at the end
271 MEDfilterClose(&filter);
276 void MEDFileUMeshPerType::loadPolyg(med_idt fid, const char *mName, int dt, int it, int mdim, int arraySize, med_geometry_type geoElt,
277 med_entity_type entity, MEDFileMeshReadSelector *mrs)
279 med_bool changement,transformation;
280 med_int curNbOfElem(MEDmeshnEntity(fid,mName,dt,it,entity,geoElt,MED_INDEX_NODE,MED_NODAL,&changement,&transformation)-1);
281 _m=MEDCoupling1DGTUMesh::New(mName,geoElt==MED_POLYGON?INTERP_KERNEL::NORM_POLYGON:INTERP_KERNEL::NORM_QPOLYG);
282 MEDCouplingAutoRefCountObjectPtr<MEDCoupling1DGTUMesh> mc(DynamicCast<MEDCoupling1GTUMesh,MEDCoupling1DGTUMesh>(_m));
283 MEDCouplingAutoRefCountObjectPtr<DataArrayInt> conn(DataArrayInt::New()),connI(DataArrayInt::New());
284 conn->alloc(arraySize,1); connI->alloc(curNbOfElem+1,1);
285 MEDFILESAFECALLERRD0(MEDmeshPolygon2Rd,(fid,mName,dt,it,MED_CELL,geoElt,MED_NODAL,connI->getPointer(),conn->getPointer()));
286 std::transform(conn->begin(),conn->end(),conn->getPointer(),std::bind2nd(std::plus<int>(),-1));
287 std::transform(connI->begin(),connI->end(),connI->getPointer(),std::bind2nd(std::plus<int>(),-1));
288 mc->setNodalConnectivity(conn,connI);
289 loadCommonPart(fid,mName,dt,it,mdim,curNbOfElem,geoElt,entity,mrs);
292 void MEDFileUMeshPerType::loadPolyh(med_idt fid, const char *mName, int dt, int it, int mdim, int connFaceLgth, med_geometry_type geoElt,
293 med_entity_type entity, MEDFileMeshReadSelector *mrs)
295 med_bool changement,transformation;
296 med_int indexFaceLgth(MEDmeshnEntity(fid,mName,dt,it,MED_CELL,MED_POLYHEDRON,MED_INDEX_NODE,MED_NODAL,&changement,&transformation));
297 int curNbOfElem(MEDmeshnEntity(fid,mName,dt,it,MED_CELL,MED_POLYHEDRON,MED_INDEX_FACE,MED_NODAL,&changement,&transformation)-1);
298 _m=MEDCoupling1DGTUMesh::New(mName,INTERP_KERNEL::NORM_POLYHED);
299 MEDCouplingAutoRefCountObjectPtr<MEDCoupling1DGTUMesh> mc(DynamicCastSafe<MEDCoupling1GTUMesh,MEDCoupling1DGTUMesh>(_m));
300 INTERP_KERNEL::AutoPtr<int> index=new int[curNbOfElem+1];
301 INTERP_KERNEL::AutoPtr<int> indexFace=new int[indexFaceLgth];
302 INTERP_KERNEL::AutoPtr<int> locConn=new int[connFaceLgth];
303 MEDFILESAFECALLERRD0(MEDmeshPolyhedronRd,(fid,mName,dt,it,MED_CELL,MED_NODAL,index,indexFace,locConn));
304 MEDCouplingAutoRefCountObjectPtr<DataArrayInt> conn(DataArrayInt::New()),connI(DataArrayInt::New());
305 int arraySize=connFaceLgth;
306 for(int i=0;i<curNbOfElem;i++)
307 arraySize+=index[i+1]-index[i]-1;
308 conn=DataArrayInt::New();
309 conn->alloc(arraySize,1);
310 int *wFinalConn=conn->getPointer();
311 connI->alloc(curNbOfElem+1,1);
312 int *finalIndex(connI->getPointer());
314 for(int i=0;i<curNbOfElem;i++)
316 finalIndex[i+1]=finalIndex[i]+index[i+1]-index[i]-1+indexFace[index[i+1]-1]-indexFace[index[i]-1];
317 wFinalConn=std::transform(locConn+indexFace[index[i]-1]-1,locConn+indexFace[index[i]]-1,wFinalConn,std::bind2nd(std::plus<int>(),-1));
318 for(int j=index[i];j<index[i+1]-1;j++)
321 wFinalConn=std::transform(locConn+indexFace[j]-1,locConn+indexFace[j+1]-1,wFinalConn,std::bind2nd(std::plus<int>(),-1));
324 mc->setNodalConnectivity(conn,connI);
325 loadCommonPart(fid,mName,dt,it,mdim,curNbOfElem,MED_POLYHEDRON,entity,mrs);
328 void MEDFileUMeshPerType::Write(med_idt fid, const std::string& mname, int mdim, const MEDCoupling1GTUMesh *m, const DataArrayInt *fam, const DataArrayInt *num, const DataArrayAsciiChar *names)
330 int nbOfCells=m->getNumberOfCells();
334 double timm=m->getTime(dt,it);
335 INTERP_KERNEL::NormalizedCellType ikt=m->getTypeOfCell(0);
336 const INTERP_KERNEL::CellModel& cm=INTERP_KERNEL::CellModel::GetCellModel(ikt);
337 med_geometry_type curMedType=typmai3[(int)ikt];
340 const MEDCoupling1SGTUMesh *m0(dynamic_cast<const MEDCoupling1SGTUMesh *>(m));
342 throw INTERP_KERNEL::Exception("MEDFileUMeshPerType::Write : internal error #1 !");
343 MEDCouplingAutoRefCountObjectPtr<DataArrayInt> arr(m0->getNodalConnectivity()->deepCpy());
344 std::transform(arr->begin(),arr->end(),arr->getPointer(),std::bind2nd(std::plus<int>(),1));
345 MEDFILESAFECALLERWR0(MEDmeshElementConnectivityWr,(fid,mname.c_str(),dt,it,timm,MED_CELL,curMedType,MED_NODAL,MED_FULL_INTERLACE,nbOfCells,arr->begin()));
349 const MEDCoupling1DGTUMesh *m0(dynamic_cast<const MEDCoupling1DGTUMesh *>(m));
351 throw INTERP_KERNEL::Exception("MEDFileUMeshPerType::Write : internal error #2 !");
352 if(ikt==INTERP_KERNEL::NORM_POLYGON || ikt==INTERP_KERNEL::NORM_QPOLYG)
354 MEDCouplingAutoRefCountObjectPtr<DataArrayInt> arr(m0->getNodalConnectivity()->deepCpy()),arrI(m0->getNodalConnectivityIndex()->deepCpy());
355 std::transform(arr->begin(),arr->end(),arr->getPointer(),std::bind2nd(std::plus<int>(),1));
356 std::transform(arrI->begin(),arrI->end(),arrI->getPointer(),std::bind2nd(std::plus<int>(),1));
357 MEDFILESAFECALLERWR0(MEDmeshPolygon2Wr,(fid,mname.c_str(),dt,it,timm,MED_CELL,ikt==INTERP_KERNEL::NORM_POLYGON?MED_POLYGON:MED_POLYGON2,MED_NODAL,nbOfCells+1,arrI->begin(),arr->begin()));
361 const int *conn(m0->getNodalConnectivity()->begin()),*connI(m0->getNodalConnectivityIndex()->begin());
362 int meshLgth=m0->getNodalConnectivityLength();
363 int nbOfFaces=std::count(conn,conn+meshLgth,-1)+nbOfCells;
364 INTERP_KERNEL::AutoPtr<int> tab1=new int[nbOfCells+1];
366 INTERP_KERNEL::AutoPtr<int> tab2=new int[nbOfFaces+1];
368 INTERP_KERNEL::AutoPtr<int> bigtab=new int[meshLgth];
370 for(int i=0;i<nbOfCells;i++,w1++)
373 for(const int *w=conn+connI[i];w!=conn+connI[i+1];w2++)
375 const int *wend=std::find(w,conn+connI[i+1],-1);
376 bt=std::transform(w,wend,bt,std::bind2nd(std::plus<int>(),1));
377 int nbOfNode=std::distance(w,wend);
378 w2[1]=w2[0]+nbOfNode;
379 if(wend!=conn+connI[i+1])
385 w1[1]=w1[0]+nbOfFaces2;
387 MEDFILESAFECALLERWR0(MEDmeshPolyhedronWr,(fid,mname.c_str(),dt,it,timm,MED_CELL,MED_NODAL,nbOfCells+1,tab1,nbOfFaces+1,tab2,bigtab));
391 MEDFILESAFECALLERWR0(MEDmeshEntityFamilyNumberWr,(fid,mname.c_str(),dt,it,MED_CELL,curMedType,nbOfCells,fam->getConstPointer()));
393 MEDFILESAFECALLERWR0(MEDmeshEntityNumberWr,(fid,mname.c_str(),dt,it,MED_CELL,curMedType,nbOfCells,num->getConstPointer()));
396 if(names->getNumberOfComponents()!=MED_SNAME_SIZE)
398 std::ostringstream oss; oss << "MEDFileUMeshPerType::write : expected a name field on cells with number of components set to " << MED_SNAME_SIZE;
399 oss << " ! The array has " << names->getNumberOfComponents() << " components !";
400 throw INTERP_KERNEL::Exception(oss.str().c_str());
402 MEDFILESAFECALLERWR0(MEDmeshEntityNameWr,(fid,mname.c_str(),dt,it,MED_CELL,curMedType,nbOfCells,names->getConstPointer()));