Salome HOME
Merge from BR_V5_DEV 16Feb09
[modules/med.git] / src / MEDMEM / MEDMEM_MedMeshDriver.cxx
1 //  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
2 //
3 //  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 //  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
5 //
6 //  This library is free software; you can redistribute it and/or
7 //  modify it under the terms of the GNU Lesser General Public
8 //  License as published by the Free Software Foundation; either
9 //  version 2.1 of the License.
10 //
11 //  This library is distributed in the hope that it will be useful,
12 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
13 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14 //  Lesser General Public License for more details.
15 //
16 //  You should have received a copy of the GNU Lesser General Public
17 //  License along with this library; if not, write to the Free Software
18 //  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
19 //
20 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 //
22 #include "MEDMEM_MedMeshDriver.hxx"
23 #include "MEDMEM_MedMeshDriver21.hxx"
24 #include "MEDMEM_DriverFactory.hxx" 
25 #include "MEDMEM_DriversDef.hxx"
26
27 #include "MEDMEM_Family.hxx"
28 #include "MEDMEM_Group.hxx"
29 #include "MEDMEM_Coordinate.hxx"
30 #include "MEDMEM_Connectivity.hxx"
31 #include "MEDMEM_Mesh.hxx"
32 #include "MEDMEM_CellModel.hxx"
33 #include "MEDMEM_Grid.hxx"
34
35
36 using namespace std;
37 using namespace MEDMEM;
38 using namespace MED_EN;
39
40 // Every memory allocation made in the MedDriver members function are desallocated in the Mesh destructor 
41
42 MED_MESH_DRIVER::MED_MESH_DRIVER():
43   GENDRIVER(MED_DRIVER),
44   _ptrMesh(( MESH *)MED_NULL),
45   _meshName(""),
46   _meshNum(MED_INVALID)
47 {
48 }
49
50 MED_MESH_DRIVER::MED_MESH_DRIVER(const string & fileName,
51                                  MESH * ptrMesh,
52                                  MED_EN::med_mode_acces accessMode): 
53   GENDRIVER(fileName, accessMode, MED_DRIVER),
54   _ptrMesh(ptrMesh), 
55   _meshName(""),
56   _meshNum(MED_INVALID)
57 {
58 }
59   
60 MED_MESH_DRIVER::MED_MESH_DRIVER(const MED_MESH_DRIVER & driver): 
61   GENDRIVER(driver),
62   _ptrMesh(driver._ptrMesh),
63   _meshName(driver._meshName),
64   _meshNum(driver._meshNum)
65 {
66
67 }
68
69 MED_MESH_DRIVER::~MED_MESH_DRIVER()
70 {
71   MESSAGE_MED("MED_MESH_DRIVER::~MED_MESH_DRIVER()has been destroyed");
72
73 }
74
75 void MED_MESH_DRIVER::setMeshName(const string & meshName) 
76
77   _meshName = meshName; 
78 }
79
80 string  MED_MESH_DRIVER::getMeshName() const 
81
82   return _meshName; 
83 }
84
85 //---------------------------------- RDONLY PART -------------------------------------------------------------
86
87 IMED_MESH_RDONLY_DRIVER::IMED_MESH_RDONLY_DRIVER(): MED_MESH_DRIVER()
88 {
89 }
90   
91 IMED_MESH_RDONLY_DRIVER::IMED_MESH_RDONLY_DRIVER(const string & fileName,
92                                                  MESH * ptrMesh):
93   MED_MESH_DRIVER(fileName, ptrMesh, MED_EN::RDONLY)
94
95   MESSAGE_MED("IMED_MESH_RDONLY_DRIVER::IMED_MESH_RDONLY_DRIVER(const string & fileName, MESH * ptrMesh) has been created");
96 }
97   
98 IMED_MESH_RDONLY_DRIVER::IMED_MESH_RDONLY_DRIVER(const IMED_MESH_RDONLY_DRIVER & driver): 
99   MED_MESH_DRIVER(driver)
100 {
101 }
102
103 int IMED_MESH_RDONLY_DRIVER::getDescendingConnectivity(CONNECTIVITY * Connectivity) 
104 {
105   if (_status==MED_OPENED)
106     {
107       MESSAGE_MED("MED_MESH_RDONLY_DRIVER::getDescendingConnectivity : "<<"call on the object " << Connectivity);
108       MESSAGE_MED("MED_MESH_RDONLY_DRIVER::getDescendingConnectivity : "<<"Not yet implemented !");
109     }
110   return MED_ERROR;
111 }
112
113 void IMED_MESH_RDONLY_DRIVER::buildAllGroups(vector<GROUP*> & Groups, vector<FAMILY*> & Families) 
114 {
115   const char* LOC = "MED_MESH_RDONLY_DRIVER::buildAllGroups ";
116   BEGIN_OF_MED(LOC);
117
118   int numberOfFamilies = Families.size() ;
119   //SCRUTE_MED(numberOfFamilies);
120   map< string,list<FAMILY*> > groupsNames ;
121   for(int i=0; i<numberOfFamilies; i++) {
122     FAMILY * myFamily = Families[i] ;
123     int numberOfGroups_ = myFamily->getNumberOfGroups();
124     //SCRUTE_MED(i);
125     //SCRUTE_MED(numberOfGroups_);
126     for (int j=0; j<numberOfGroups_; j++) {
127       //SCRUTE_MED(j);
128       //SCRUTE_MED(myFamily->getGroupName(j+1));
129       groupsNames[myFamily->getGroupName(j+1)].push_back(myFamily);
130     }
131   }
132   int numberOfGroups = groupsNames.size() ;
133   SCRUTE_MED(numberOfGroups);
134   Groups.resize(numberOfGroups);
135   map< string,list<FAMILY*> >::const_iterator currentGroup ;
136   int it = 0 ;
137   for(currentGroup=groupsNames.begin();currentGroup!=groupsNames.end();currentGroup++) {
138     GROUP * myGroup = new GROUP(healName((*currentGroup).first),(*currentGroup).second) ;
139 //     GROUP * myGroup = new GROUP() ;
140 //     myGroup->setName((*currentGroup).first);
141 //     SCRUTE_MED(myGroup->getName());
142 //     //myGroup->setMesh(_ptrMesh);
143 //     myGroup->init((*currentGroup).second);
144     Groups[it]=myGroup;
145     //SCRUTE_MED(it);
146     it++;
147   }
148
149   END_OF_MED(LOC);
150 }
151
152 void IMED_MESH_RDONLY_DRIVER::updateFamily()
153 {
154   const char* LOC = "MED_MESH_RDONLY_DRIVER::updateFamily() ";
155   BEGIN_OF_MED(LOC);
156
157   // we need to update family on constituent if we have constituent, but no 
158   // descending connectivity, so, we must calculate all constituent and
159   // numbering correctly family !
160   _ptrMesh->_connectivity->updateFamily(_ptrMesh->_familyFace) ; // in 2d, do nothing
161   _ptrMesh->_connectivity->updateFamily(_ptrMesh->_familyEdge) ; // in 3d, do nothing
162
163   END_OF_MED(LOC);
164 }
165
166
167 void IMED_MESH_RDONLY_DRIVER::write( void ) const
168 {
169   throw MEDEXCEPTION("MED_MESH_RDONLY_DRIVER::write : Can't write with a RDONLY driver !");
170 }
171
172 /*--------------------- WRONLY PART -------------------------------*/
173
174 IMED_MESH_WRONLY_DRIVER::IMED_MESH_WRONLY_DRIVER():MED_MESH_DRIVER()
175 {
176 }
177   
178 IMED_MESH_WRONLY_DRIVER::IMED_MESH_WRONLY_DRIVER(const string & fileName,
179                                                                                                                                                                                                  MESH * ptrMesh,
180                                                                                                                                                                                                  MED_EN::med_mode_acces access):
181   MED_MESH_DRIVER(fileName,ptrMesh,access)
182 {
183   MESSAGE_MED("MED_MESH_WRONLY_DRIVER::MED_MESH_WRONLY_DRIVER(const string & fileName, MESH * ptrMesh) has been created");
184 }
185
186 IMED_MESH_WRONLY_DRIVER::IMED_MESH_WRONLY_DRIVER(const IMED_MESH_WRONLY_DRIVER & driver): 
187   MED_MESH_DRIVER(driver)
188 {
189 }
190
191 IMED_MESH_WRONLY_DRIVER::~IMED_MESH_WRONLY_DRIVER()
192 {
193   //MESSAGE_MED("MED_MESH_WRONLY_DRIVER::MED_MESH_WRONLY_DRIVER(const string & fileName, MESH * ptrMesh) has been destroyed");
194 }
195
196 void IMED_MESH_WRONLY_DRIVER::read (void)
197 {
198   throw MEDEXCEPTION("MED_MESH_WRONLY_DRIVER::read : Can't read with a WRONLY driver !");
199 }
200
201 /*--------------------- RDWR PART -------------------------------*/
202
203 IMED_MESH_RDWR_DRIVER::IMED_MESH_RDWR_DRIVER()
204 {
205 }
206
207 IMED_MESH_RDWR_DRIVER::IMED_MESH_RDWR_DRIVER(const string & fileName,
208                                            MESH * ptrMesh):
209    IMED_MESH_RDONLY_DRIVER(fileName,ptrMesh),IMED_MESH_WRONLY_DRIVER(fileName,ptrMesh),MED_MESH_DRIVER(fileName,ptrMesh,RDWR)
210 {
211   MESSAGE_MED("MED_MESH_RDWR_DRIVER::MED_MESH_RDWR_DRIVER(const string & fileName, MESH * ptrMesh) has been created");
212 }
213
214 IMED_MESH_RDWR_DRIVER::IMED_MESH_RDWR_DRIVER(const IMED_MESH_RDWR_DRIVER & driver): 
215   IMED_MESH_RDONLY_DRIVER(driver),IMED_MESH_WRONLY_DRIVER(driver),MED_MESH_DRIVER(driver)
216 {
217 }
218
219 IMED_MESH_RDWR_DRIVER::~IMED_MESH_RDWR_DRIVER() {
220   //MESSAGE_MED("MED_MESH_RDWR_DRIVER::MED_MESH_RDWR_DRIVER(const string & fileName, MESH * ptrMesh) has been destroyed");
221 }
222
223 /////////// Concrete MED_MESH_DRIVERS implementations
224
225 MED_MESH_RDONLY_DRIVER::MED_MESH_RDONLY_DRIVER()
226 {
227   MESSAGE_MED("You are using the default constructor of the Mesh read only Driver and it is 2.1 one");
228   _concreteMeshDrv = new MED_MESH_RDONLY_DRIVER21();
229 }
230
231 MED_MESH_RDONLY_DRIVER::MED_MESH_RDONLY_DRIVER(const string & fileName, MESH * ptrMesh):
232   IMED_MESH_RDONLY_DRIVER(fileName,ptrMesh),MED_MESH_DRIVER(fileName,ptrMesh,RDONLY)
233 {
234   _concreteMeshDrv = DRIVERFACTORY::buildMeshDriverFromFile(fileName,ptrMesh,RDONLY);
235 }
236
237 MED_MESH_RDONLY_DRIVER::MED_MESH_RDONLY_DRIVER(const MED_MESH_RDONLY_DRIVER & driver):MED_MESH_DRIVER(driver)
238 {
239   _concreteMeshDrv = driver._concreteMeshDrv->copy();
240 }
241
242 MED_MESH_RDONLY_DRIVER::~MED_MESH_RDONLY_DRIVER()
243 {
244   if (_concreteMeshDrv) delete _concreteMeshDrv;
245 }
246
247 void MED_MESH_RDONLY_DRIVER::write( void ) const
248 {
249   _concreteMeshDrv->write();
250 }
251
252 void MED_MESH_RDONLY_DRIVER::activateFacesComputation()
253 {
254   IMED_MESH_RDONLY_DRIVER *drvC=dynamic_cast<IMED_MESH_RDONLY_DRIVER *>(_concreteMeshDrv);
255   if(drvC)
256     drvC->activateFacesComputation();
257 }
258
259 void MED_MESH_RDONLY_DRIVER::desactivateFacesComputation()
260 {
261   IMED_MESH_RDONLY_DRIVER *drvC=dynamic_cast<IMED_MESH_RDONLY_DRIVER *>(_concreteMeshDrv);
262   if(drvC)
263     drvC->desactivateFacesComputation();
264 }
265
266 void MED_MESH_RDONLY_DRIVER::read ( void )
267 {
268   _concreteMeshDrv->read();
269 }
270
271 void MED_MESH_RDONLY_DRIVER::open()
272 {
273   _concreteMeshDrv->open();
274 }
275
276 void MED_MESH_RDONLY_DRIVER::close()
277 {
278   _concreteMeshDrv->close();
279 }
280
281 void MED_MESH_RDONLY_DRIVER::setMeshName(const string & meshName)
282 {
283   _concreteMeshDrv->setMeshName(meshName);
284 }
285
286 string MED_MESH_RDONLY_DRIVER::getMeshName() const
287 {
288   return _concreteMeshDrv->getMeshName();
289 }
290
291 GENDRIVER * MED_MESH_RDONLY_DRIVER::copy ( void ) const
292 {
293   return new MED_MESH_RDONLY_DRIVER(*this);
294 }
295
296 void MED_MESH_RDONLY_DRIVER::merge ( const GENDRIVER& driver )
297 {
298   const MED_MESH_RDONLY_DRIVER *other=dynamic_cast<const MED_MESH_RDONLY_DRIVER *>(&driver);
299   if(other)
300     _concreteMeshDrv->merge( *other->_concreteMeshDrv );
301   else
302     _concreteMeshDrv->merge( driver );
303 }
304 // int MED_MESH_RDONLY_DRIVER::getCOORDINATE()
305 // {
306 //   return _concreteMeshDrv->getCOORDINATE();
307 // }
308
309 // int MED_MESH_RDONLY_DRIVER::getCONNECTIVITY()
310 // {
311 //   return _concreteMeshDrv->getCONNECTIVITY();
312 // }
313
314 // int MED_MESH_RDONLY_DRIVER::getFAMILY()
315 // {
316 //   return _concreteMeshDrv->getFAMILY();
317 // }
318
319 // int MED_MESH_RDONLY_DRIVER::getNodalConnectivity(CONNECTIVITY * Connectivity)
320 // {
321 //   return _concreteMeshDrv->getNodalConnectivity(Connectivity);
322 // }
323
324 // int MED_MESH_RDONLY_DRIVER::getDescendingConnectivity(CONNECTIVITY * Connectivity)
325 // {
326 //   return _concreteMeshDrv->getDescendingConnectivity(Connectivity);
327 // }
328
329 // int MED_MESH_RDONLY_DRIVER::getNodesFamiliesNumber(int * MEDArrayNodeFamily)
330 // {
331 //   return _concreteMeshDrv->getNodesFamiliesNumber(MEDArrayNodeFamily);
332 // }
333
334 // int MED_MESH_RDONLY_DRIVER::getCellsFamiliesNumber(int** Arrays, CONNECTIVITY* Connectivity, MED_EN::medEntityMesh entity)
335 // {
336 //   return _concreteMeshDrv->getCellsFamiliesNumber(Arrays,Connectivity,entity);
337 // }
338
339 // void MED_MESH_RDONLY_DRIVER::getGRID()
340 // {
341 //   _concreteMeshDrv->getGRID();
342 // }
343
344 MED_MESH_WRONLY_DRIVER::MED_MESH_WRONLY_DRIVER()
345 {
346   MESSAGE_MED("You are using the default constructor of the Mesh write only Driver and it is 2.1 one");
347   _concreteMeshDrv = new MED_MESH_WRONLY_DRIVER21();
348 }
349
350 MED_MESH_WRONLY_DRIVER::MED_MESH_WRONLY_DRIVER(const string & fileName, MESH * ptrMesh, MED_EN::med_mode_acces access):
351   IMED_MESH_WRONLY_DRIVER(fileName,ptrMesh),MED_MESH_DRIVER(fileName,ptrMesh,access)
352 {
353   _concreteMeshDrv = DRIVERFACTORY::buildMeshDriverFromFile(fileName,ptrMesh,access);
354 }
355
356 MED_MESH_WRONLY_DRIVER::MED_MESH_WRONLY_DRIVER(const MED_MESH_WRONLY_DRIVER & driver):MED_MESH_DRIVER(driver)
357 {
358   _concreteMeshDrv = driver._concreteMeshDrv->copy();
359 }
360
361 MED_MESH_WRONLY_DRIVER::~MED_MESH_WRONLY_DRIVER()
362 {
363   if (_concreteMeshDrv) delete _concreteMeshDrv;
364 }
365
366 void MED_MESH_WRONLY_DRIVER::open()
367 {
368   _concreteMeshDrv->open();
369 }
370
371 void MED_MESH_WRONLY_DRIVER::close()
372 {
373   _concreteMeshDrv->close();
374 }
375
376 void MED_MESH_WRONLY_DRIVER::setMeshName(const string & meshName)
377 {
378   _concreteMeshDrv->setMeshName(meshName);
379 }
380
381 string MED_MESH_WRONLY_DRIVER::getMeshName() const
382 {
383   return _concreteMeshDrv->getMeshName();
384 }
385
386 GENDRIVER * MED_MESH_WRONLY_DRIVER::copy ( void ) const
387 {
388   return new MED_MESH_WRONLY_DRIVER(*this);
389 }
390
391 void MED_MESH_WRONLY_DRIVER::read ()
392 {
393   _concreteMeshDrv->read();
394 }
395
396 void MED_MESH_WRONLY_DRIVER::write( void ) const
397 {
398   _concreteMeshDrv->write();
399 }
400
401 void MED_MESH_WRONLY_DRIVER::merge ( const GENDRIVER& driver )
402 {
403   const MED_MESH_WRONLY_DRIVER *other=dynamic_cast<const MED_MESH_WRONLY_DRIVER *>(&driver);
404   if(other)
405     _concreteMeshDrv->merge( *other->_concreteMeshDrv );
406   else
407     _concreteMeshDrv->merge( driver );
408 }
409
410 // int MED_MESH_WRONLY_DRIVER::MED_MESH_WRONLY_DRIVER::writeCoordinates    ()                           const
411 // {
412 //   return _concreteMeshDrv->writeCoordinates();
413 // }
414
415 // int MED_MESH_WRONLY_DRIVER::MED_MESH_WRONLY_DRIVER::writeConnectivities (MED_EN::medEntityMesh entity)       const
416 // {
417 //   return _concreteMeshDrv->writeConnectivities(entity);
418 // }
419
420 // int MED_MESH_WRONLY_DRIVER::MED_MESH_WRONLY_DRIVER::writeFamilyNumbers  ()                           const
421 // {
422 //   return _concreteMeshDrv->writeFamilyNumbers();
423 // }
424
425 // int MED_MESH_WRONLY_DRIVER::MED_MESH_WRONLY_DRIVER::writeFamilies       (vector<FAMILY*> & families) const
426 // {
427 //   return _concreteMeshDrv->writeFamilies(families);
428 // }
429
430 // int MED_MESH_WRONLY_DRIVER::MED_MESH_WRONLY_DRIVER::writeGRID() const
431 // {
432 //   return _concreteMeshDrv->writeGRID();
433 // }
434
435 MED_MESH_RDWR_DRIVER::MED_MESH_RDWR_DRIVER()
436 {
437   _concreteMeshDrv=new MED_MESH_RDWR_DRIVER21();
438 }
439
440 MED_MESH_RDWR_DRIVER::MED_MESH_RDWR_DRIVER(const string & fileName, MESH * ptrMesh):
441   IMED_MESH_RDWR_DRIVER(fileName,ptrMesh),MED_MESH_DRIVER(fileName,ptrMesh,RDWR)
442 {
443   _concreteMeshDrv = DRIVERFACTORY::buildMeshDriverFromFile(fileName,ptrMesh,RDWR);
444 }
445
446 MED_MESH_RDWR_DRIVER::MED_MESH_RDWR_DRIVER(const MED_MESH_RDWR_DRIVER & driver): MED_MESH_DRIVER(driver)
447 {
448   _concreteMeshDrv = driver._concreteMeshDrv->copy();
449 }
450
451 MED_MESH_RDWR_DRIVER::~MED_MESH_RDWR_DRIVER()
452 {
453   if (_concreteMeshDrv) delete _concreteMeshDrv;
454 }
455
456 void MED_MESH_RDWR_DRIVER::read ( void )
457 {
458   _concreteMeshDrv->read();
459 }
460
461 void MED_MESH_RDWR_DRIVER::write( void ) const
462 {
463   _concreteMeshDrv->write();
464 }
465  
466 void MED_MESH_RDWR_DRIVER::activateFacesComputation()
467 {
468   IMED_MESH_RDONLY_DRIVER *drvC=dynamic_cast<IMED_MESH_RDONLY_DRIVER *>(_concreteMeshDrv);
469   if(drvC)
470     drvC->activateFacesComputation();
471 }
472
473 void MED_MESH_RDWR_DRIVER::desactivateFacesComputation()
474 {
475   IMED_MESH_RDONLY_DRIVER *drvC=dynamic_cast<IMED_MESH_RDONLY_DRIVER *>(_concreteMeshDrv);
476   if(drvC)
477     drvC->desactivateFacesComputation();
478 }
479
480 void MED_MESH_RDWR_DRIVER::open()
481 {
482   _concreteMeshDrv->open();
483 }
484
485 void MED_MESH_RDWR_DRIVER::close()
486 {
487   _concreteMeshDrv->close();
488 }
489
490 // int MED_MESH_RDWR_DRIVER::getCOORDINATE()
491 // {
492 //   return _concreteMeshDrv->getCOORDINATE();
493 // }
494
495 // int MED_MESH_RDWR_DRIVER::getCONNECTIVITY()
496 // {
497 //   return _concreteMeshDrv->getCONNECTIVITY();
498 // }
499
500 // int MED_MESH_RDWR_DRIVER::getFAMILY()
501 // {
502 //   return _concreteMeshDrv->getFAMILY();
503 // }
504
505 // int MED_MESH_RDWR_DRIVER::getNodalConnectivity(CONNECTIVITY * Connectivity)
506 // {
507 //   return _concreteMeshDrv->getNodalConnectivity(Connectivity);
508 // }
509
510 // int MED_MESH_RDWR_DRIVER::getDescendingConnectivity(CONNECTIVITY * Connectivity)
511 // {
512 //   return _concreteMeshDrv->getDescendingConnectivity(Connectivity);
513 // }
514  
515 // int MED_MESH_RDWR_DRIVER::getNodesFamiliesNumber(int * MEDArrayNodeFamily)
516 // {
517 //   return _concreteMeshDrv->getNodesFamiliesNumber(MEDArrayNodeFamily);
518 // }
519
520 // int MED_MESH_RDWR_DRIVER::getCellsFamiliesNumber(int** Arrays, CONNECTIVITY* Connectivity, MED_EN::medEntityMesh entity)
521 // {
522 //   return _concreteMeshDrv->getCellsFamiliesNumber(Arrays,Connectivity,entity);
523 // }
524
525 // void MED_MESH_RDWR_DRIVER::getGRID ()
526 // {
527 //   _concreteMeshDrv->getGRID();
528 // }
529
530 // int MED_MESH_RDWR_DRIVER::writeCoordinates    ()                           const
531 // {
532 //   _concreteMeshDrv->writeCoordinates();
533 // }
534
535 // int MED_MESH_RDWR_DRIVER::writeConnectivities (MED_EN::medEntityMesh entity)       const
536 // {
537 //   return _concreteMeshDrv->writeConnectivities (entity);
538 // }
539
540 // int MED_MESH_RDWR_DRIVER::writeFamilyNumbers  ()                           const
541 // {
542 //   return _concreteMeshDrv->writeFamilyNumbers();
543 // }
544
545 // int MED_MESH_RDWR_DRIVER::writeFamilies       (vector<FAMILY*> & families) const
546 // {
547 //   return _concreteMeshDrv->writeFamilies(families);
548 // }
549
550 // int MED_MESH_RDWR_DRIVER::writeGRID() const
551 // {
552 //   return _concreteMeshDrv->writeGRID();
553 // }
554
555 void MED_MESH_RDWR_DRIVER::setMeshName(const string & meshName)
556 {
557   _concreteMeshDrv->setMeshName(meshName);
558 }
559
560 string MED_MESH_RDWR_DRIVER::getMeshName() const
561 {
562   return _concreteMeshDrv->getMeshName();
563 }
564
565 GENDRIVER * MED_MESH_RDWR_DRIVER::copy ( void ) const
566 {
567   return new MED_MESH_RDWR_DRIVER(*this);
568 }
569
570 void MED_MESH_RDWR_DRIVER::merge ( const GENDRIVER& driver )
571 {
572   const MED_MESH_RDWR_DRIVER *other=dynamic_cast<const MED_MESH_RDWR_DRIVER *>(&driver);
573   if(other)
574     _concreteMeshDrv->merge( *other->_concreteMeshDrv );
575   else
576     _concreteMeshDrv->merge( driver );
577 }