Salome HOME
All getName method return std::string now
authorageay <ageay>
Tue, 23 Jul 2013 12:58:32 +0000 (12:58 +0000)
committerageay <ageay>
Tue, 23 Jul 2013 12:58:32 +0000 (12:58 +0000)
12 files changed:
src/MEDCoupling/MEDCoupling1GTUMesh.cxx
src/MEDCoupling/MEDCouplingExtrudedMesh.cxx
src/MEDCoupling/MEDCouplingField.hxx
src/MEDCoupling/MEDCouplingFieldDouble.cxx
src/MEDCoupling/MEDCouplingMesh.hxx
src/MEDCoupling/MEDCouplingPointSet.cxx
src/MEDCoupling/MEDCouplingStructuredMesh.cxx
src/MEDCoupling/MEDCouplingUMesh.cxx
src/MEDCoupling/Test/MEDCouplingBasicsTest1.cxx
src/MEDCoupling/Test/MEDCouplingBasicsTest3.cxx
src/MEDCoupling/Test/MEDCouplingBasicsTest4.cxx
src/MEDCoupling/Test/MEDCouplingBasicsTest5.cxx

index 2fa8f049e9b07e298d4dda0e75d6f4dba3fecf30..3125889a6ab115fe632164444bdeb04625929994 100644 (file)
@@ -398,7 +398,7 @@ MEDCouplingUMesh *MEDCoupling1GTUMesh::AggregateOnSameCoordsToUMesh(const std::v
     throw INTERP_KERNEL::Exception("MEDCoupling1GTUMesh::AggregateOnSameCoordsToUMesh : the first instance in input parts is null !");
   const DataArrayDouble *coords(firstPart->getCoords());
   int meshDim(firstPart->getMeshDimension());
-  MEDCouplingAutoRefCountObjectPtr<MEDCouplingUMesh> ret(MEDCouplingUMesh::New(firstPart->getName(),meshDim)); ret->setDescription(firstPart->getDescription());
+  MEDCouplingAutoRefCountObjectPtr<MEDCouplingUMesh> ret(MEDCouplingUMesh::New(firstPart->getName().c_str(),meshDim)); ret->setDescription(firstPart->getDescription().c_str());
   ret->setCoords(coords);
   int nbOfCells(0),connSize(0);
   for(std::vector< const MEDCoupling1GTUMesh *>::const_iterator it=parts.begin();it!=parts.end();it++)
@@ -486,8 +486,8 @@ MEDCoupling1SGTUMesh *MEDCoupling1SGTUMesh::New(const MEDCouplingUMesh *m) throw
   if(gts.size()!=1)
     throw INTERP_KERNEL::Exception("MEDCoupling1SGTUMesh::New : input mesh must have exactly one geometric type !");
   int geoType((int)*gts.begin());
-  MEDCouplingAutoRefCountObjectPtr<MEDCoupling1SGTUMesh> ret(MEDCoupling1SGTUMesh::New(m->getName(),*gts.begin()));
-  ret->setCoords(m->getCoords()); ret->setDescription(m->getDescription());
+  MEDCouplingAutoRefCountObjectPtr<MEDCoupling1SGTUMesh> ret(MEDCoupling1SGTUMesh::New(m->getName().c_str(),*gts.begin()));
+  ret->setCoords(m->getCoords()); ret->setDescription(m->getDescription().c_str());
   int nbCells(m->getNumberOfCells());
   int nbOfNodesPerCell(ret->getNumberOfNodesPerCell());
   MEDCouplingAutoRefCountObjectPtr<DataArrayInt> conn(DataArrayInt::New()); conn->alloc(nbCells*nbOfNodesPerCell,1);
@@ -907,7 +907,7 @@ MEDCouplingMesh *MEDCoupling1SGTUMesh::mergeMyselfWith(const MEDCouplingMesh *ot
 
 MEDCouplingUMesh *MEDCoupling1SGTUMesh::buildUnstructured() const throw(INTERP_KERNEL::Exception)
 {
-  MEDCouplingAutoRefCountObjectPtr<MEDCouplingUMesh> ret=MEDCouplingUMesh::New(getName(),getMeshDimension());
+  MEDCouplingAutoRefCountObjectPtr<MEDCouplingUMesh> ret=MEDCouplingUMesh::New(getName().c_str(),getMeshDimension());
   ret->setCoords(getCoords());
   const int *nodalConn=_conn->begin();
   int nbCells=getNumberOfCells();
@@ -1127,7 +1127,7 @@ MEDCoupling1SGTUMesh *MEDCoupling1SGTUMesh::Merge1SGTUMeshesLL(std::vector<const
 MEDCouplingPointSet *MEDCoupling1SGTUMesh::buildPartOfMySelfKeepCoords(const int *begin, const int *end) const
 {
   int ncell=getNumberOfCells();
-  MEDCouplingAutoRefCountObjectPtr<MEDCoupling1SGTUMesh> ret(new MEDCoupling1SGTUMesh(getName(),*_cm));
+  MEDCouplingAutoRefCountObjectPtr<MEDCoupling1SGTUMesh> ret(new MEDCoupling1SGTUMesh(getName().c_str(),*_cm));
   ret->setCoords(_coords);
   std::size_t nbOfElemsRet=std::distance(begin,end);
   const int *inConn=_conn->getConstPointer();
@@ -1153,7 +1153,7 @@ MEDCouplingPointSet *MEDCoupling1SGTUMesh::buildPartOfMySelfKeepCoords2(int star
 {
   int ncell=getNumberOfCells();
   int nbOfElemsRet=DataArray::GetNumberOfItemGivenBESRelative(start,end,step,"MEDCoupling1SGTUMesh::buildPartOfMySelfKeepCoords2 : ");
-  MEDCouplingAutoRefCountObjectPtr<MEDCoupling1SGTUMesh> ret(new MEDCoupling1SGTUMesh(getName(),*_cm));
+  MEDCouplingAutoRefCountObjectPtr<MEDCoupling1SGTUMesh> ret(new MEDCoupling1SGTUMesh(getName().c_str(),*_cm));
   ret->setCoords(_coords);
   const int *inConn=_conn->getConstPointer();
   int sz=getNumberOfNodesPerCell();
@@ -1177,7 +1177,7 @@ MEDCouplingPointSet *MEDCoupling1SGTUMesh::buildPartOfMySelfKeepCoords2(int star
 
 MEDCoupling1SGTUMesh *MEDCoupling1SGTUMesh::buildSetInstanceFromThis(int spaceDim) const throw(INTERP_KERNEL::Exception)
 {
-  MEDCouplingAutoRefCountObjectPtr<MEDCoupling1SGTUMesh> ret(new MEDCoupling1SGTUMesh(getName(),*_cm));
+  MEDCouplingAutoRefCountObjectPtr<MEDCoupling1SGTUMesh> ret(new MEDCoupling1SGTUMesh(getName().c_str(),*_cm));
   MEDCouplingAutoRefCountObjectPtr<DataArrayInt> tmp1;
   const DataArrayInt *nodalConn(_conn);
   if(!nodalConn)
@@ -2018,7 +2018,7 @@ MEDCouplingMesh *MEDCoupling1DGTUMesh::mergeMyselfWith(const MEDCouplingMesh *ot
 
 MEDCouplingUMesh *MEDCoupling1DGTUMesh::buildUnstructured() const throw(INTERP_KERNEL::Exception)
 {
-  MEDCouplingAutoRefCountObjectPtr<MEDCouplingUMesh> ret=MEDCouplingUMesh::New(getName(),getMeshDimension());
+  MEDCouplingAutoRefCountObjectPtr<MEDCouplingUMesh> ret=MEDCouplingUMesh::New(getName().c_str(),getMeshDimension());
   ret->setCoords(getCoords());
   const int *nodalConn=_conn->begin(),*nodalConnI=_conn_indx->begin();
   int nbCells=getNumberOfCells();//checkCoherency
@@ -2104,7 +2104,7 @@ MEDCouplingPointSet *MEDCoupling1DGTUMesh::mergeMyselfWithOnSameCoords(const MED
 MEDCouplingPointSet *MEDCoupling1DGTUMesh::buildPartOfMySelfKeepCoords(const int *begin, const int *end) const
 {
   checkCoherency();
-  MEDCouplingAutoRefCountObjectPtr<MEDCoupling1DGTUMesh> ret(new MEDCoupling1DGTUMesh(getName(),*_cm));
+  MEDCouplingAutoRefCountObjectPtr<MEDCoupling1DGTUMesh> ret(new MEDCoupling1DGTUMesh(getName().c_str(),*_cm));
   ret->setCoords(_coords);
   DataArrayInt *c=0,*ci=0;
   MEDCouplingUMesh::ExtractFromIndexedArrays(begin,end,_conn,_conn_indx,c,ci);
@@ -2116,7 +2116,7 @@ MEDCouplingPointSet *MEDCoupling1DGTUMesh::buildPartOfMySelfKeepCoords(const int
 MEDCouplingPointSet *MEDCoupling1DGTUMesh::buildPartOfMySelfKeepCoords2(int start, int end, int step) const
 {
   checkCoherency();
-  MEDCouplingAutoRefCountObjectPtr<MEDCoupling1DGTUMesh> ret(new MEDCoupling1DGTUMesh(getName(),*_cm));
+  MEDCouplingAutoRefCountObjectPtr<MEDCoupling1DGTUMesh> ret(new MEDCoupling1DGTUMesh(getName().c_str(),*_cm));
   ret->setCoords(_coords);
   DataArrayInt *c=0,*ci=0;
   MEDCouplingUMesh::ExtractFromIndexedArrays2(start,end,step,_conn,_conn_indx,c,ci);
@@ -2403,7 +2403,7 @@ DataArrayInt *MEDCoupling1DGTUMesh::getNodalConnectivityIndex() const throw(INTE
  */
 MEDCoupling1DGTUMesh *MEDCoupling1DGTUMesh::copyWithNodalConnectivityPacked(bool& isShallowCpyOfNodalConnn) const throw(INTERP_KERNEL::Exception)
 {
-  MEDCouplingAutoRefCountObjectPtr<MEDCoupling1DGTUMesh> ret(new MEDCoupling1DGTUMesh(getName(),*_cm));
+  MEDCouplingAutoRefCountObjectPtr<MEDCoupling1DGTUMesh> ret(new MEDCoupling1DGTUMesh(getName().c_str(),*_cm));
   DataArrayInt *nc=0,*nci=0;
   isShallowCpyOfNodalConnn=retrievePackedNodalConnectivity(nc,nci);
   MEDCouplingAutoRefCountObjectPtr<DataArrayInt> ncs(nc),ncis(nci);
@@ -2586,7 +2586,7 @@ MEDCoupling1DGTUMesh *MEDCoupling1DGTUMesh::Merge1DGTUMeshesLL(std::vector<const
 
 MEDCoupling1DGTUMesh *MEDCoupling1DGTUMesh::buildSetInstanceFromThis(int spaceDim) const throw(INTERP_KERNEL::Exception)
 {
-  MEDCouplingAutoRefCountObjectPtr<MEDCoupling1DGTUMesh> ret(new MEDCoupling1DGTUMesh(getName(),*_cm));
+  MEDCouplingAutoRefCountObjectPtr<MEDCoupling1DGTUMesh> ret(new MEDCoupling1DGTUMesh(getName().c_str(),*_cm));
   MEDCouplingAutoRefCountObjectPtr<DataArrayInt> tmp1,tmp2;
   const DataArrayInt *nodalConn(_conn),*nodalConnI(_conn_indx);
   if(!nodalConn)
@@ -2673,8 +2673,8 @@ MEDCoupling1DGTUMesh *MEDCoupling1DGTUMesh::New(const MEDCouplingUMesh *m) throw
   if(gts.size()!=1)
     throw INTERP_KERNEL::Exception("MEDCoupling1DGTUMesh::New : input mesh must have exactly one geometric type !");
   int geoType((int)*gts.begin());
-  MEDCouplingAutoRefCountObjectPtr<MEDCoupling1DGTUMesh> ret(MEDCoupling1DGTUMesh::New(m->getName(),*gts.begin()));
-  ret->setCoords(m->getCoords()); ret->setDescription(m->getDescription());
+  MEDCouplingAutoRefCountObjectPtr<MEDCoupling1DGTUMesh> ret(MEDCoupling1DGTUMesh::New(m->getName().c_str(),*gts.begin()));
+  ret->setCoords(m->getCoords()); ret->setDescription(m->getDescription().c_str());
   int nbCells(m->getNumberOfCells());
   MEDCouplingAutoRefCountObjectPtr<DataArrayInt> conn(DataArrayInt::New()),connI(DataArrayInt::New());
   conn->alloc(m->getMeshLength()-nbCells,1); connI->alloc(nbCells+1,1);
index 2e2b03870ae2999acac04524caccfaf8198bb14f..8f22b05f4b4217da09b2f9939bd5bd9ad6f07fd0 100644 (file)
@@ -96,7 +96,7 @@ try:_mesh2D(const_cast<MEDCouplingUMesh *>(mesh2D)),_mesh1D(MEDCouplingUMesh::Ne
   if(_mesh2D!=0)
     _mesh2D->incrRef();
   computeExtrusion(mesh3D);
-  setName(mesh3D->getName());
+  setName(mesh3D->getName().c_str());
 }
 catch(INTERP_KERNEL::Exception& e)
   {
@@ -438,7 +438,7 @@ MEDCouplingUMesh *MEDCouplingExtrudedMesh::build3DUnstructuredMesh() const
   MEDCouplingUMesh *ret=_mesh2D->buildExtrudedMesh(_mesh1D,0);
   const int *renum=_mesh3D_ids->getConstPointer();
   ret->renumberCells(renum,false);
-  ret->setName(getName());
+  ret->setName(getName().c_str());
   return ret;
 }
 
index 52a2b92c020353dcf29d469e741be28333629933..284d04799ffb7bdf72acacd7f4a2a54ff6ed8cbd 100644 (file)
@@ -54,9 +54,9 @@ namespace ParaMEDMEM
     void setMesh(const ParaMEDMEM::MEDCouplingMesh *mesh);
     const ParaMEDMEM::MEDCouplingMesh *getMesh() const { return _mesh; }
     void setName(const char *name) { _name=name; }
-    const char *getDescription() const { return _desc.c_str(); }
+    std::string getDescription() const { return _desc; }
     void setDescription(const char *desc) { _desc=desc; }
-    const char *getName() const { return _name.c_str(); }
+    std::string getName() const { return _name; }
     TypeOfField getTypeOfField() const;
     NatureOfField getNature() const;
     virtual void setNature(NatureOfField nat) throw(INTERP_KERNEL::Exception);
index 1cdd440bfdd410a33d07844b2c33917906951a11..45488f602954059b328ae5797af49442edf6c957 100644 (file)
@@ -212,8 +212,8 @@ MEDCouplingFieldDouble *MEDCouplingFieldDouble::buildNewTimeReprFromThis(TypeOfT
     disc=_type->clone();
   MEDCouplingAutoRefCountObjectPtr<MEDCouplingFieldDouble> ret=new MEDCouplingFieldDouble(getNature(),tdo,disc.retn());
   ret->setMesh(getMesh());
-  ret->setName(getName());
-  ret->setDescription(getDescription());
+  ret->setName(getName().c_str());
+  ret->setDescription(getDescription().c_str());
   return ret.retn();
 }
 
@@ -2531,7 +2531,7 @@ MEDCouplingFieldDouble *MEDCouplingFieldDouble::keepSelectedComponents(const std
   MEDCouplingTimeDiscretization *td=_time_discr->keepSelectedComponents(compoIds);
   td->copyTinyAttrFrom(*_time_discr);
   MEDCouplingAutoRefCountObjectPtr<MEDCouplingFieldDouble> ret=new MEDCouplingFieldDouble(getNature(),td,_type->clone());
-  ret->setName(getName());
+  ret->setName(getName().c_str());
   ret->setMesh(getMesh());
   return ret.retn();
 }
@@ -2598,8 +2598,8 @@ MEDCouplingFieldDouble *MEDCouplingFieldDouble::MergeFields(const MEDCouplingFie
   td->copyTinyAttrFrom(*f1->_time_discr);
   MEDCouplingAutoRefCountObjectPtr<MEDCouplingFieldDouble> ret=new MEDCouplingFieldDouble(f1->getNature(),td,f1->_type->clone());
   ret->setMesh(m);
-  ret->setName(f1->getName());
-  ret->setDescription(f1->getDescription());
+  ret->setName(f1->getName().c_str());
+  ret->setDescription(f1->getDescription().c_str());
   return ret.retn();
 }
 
@@ -2644,13 +2644,13 @@ MEDCouplingFieldDouble *MEDCouplingFieldDouble::MergeFields(const std::vector<co
       tds[i]=a[i]->_time_discr;
     }
   MEDCouplingAutoRefCountObjectPtr<MEDCouplingUMesh> m=MEDCouplingUMesh::MergeUMeshes(ms2);
-  m->setName(ms2[0]->getName()); m->setDescription(ms2[0]->getDescription());
+  m->setName(ms2[0]->getName().c_str()); m->setDescription(ms2[0]->getDescription().c_str());
   MEDCouplingTimeDiscretization *td=tds[0]->aggregate(tds);
   td->copyTinyAttrFrom(*(a[0]->_time_discr));
   MEDCouplingAutoRefCountObjectPtr<MEDCouplingFieldDouble> ret=new MEDCouplingFieldDouble(a[0]->getNature(),td,a[0]->_type->clone());
   ret->setMesh(m);
-  ret->setName(a[0]->getName());
-  ret->setDescription(a[0]->getDescription());
+  ret->setName(a[0]->getName().c_str());
+  ret->setDescription(a[0]->getDescription().c_str());
   return ret.retn();
 }
 
@@ -3098,9 +3098,9 @@ void MEDCouplingFieldDouble::WriteVTK(const char *fileName, const std::vector<co
         }
       TypeOfField typ=cur->getTypeOfField();
       if(typ==ON_CELLS)
-        cur->getArray()->writeVTK(coss,8,cur->getName());
+        cur->getArray()->writeVTK(coss,8,cur->getName().c_str());
       else if(typ==ON_NODES)
-        cur->getArray()->writeVTK(noss,8,cur->getName());
+        cur->getArray()->writeVTK(noss,8,cur->getName().c_str());
     }
   m->writeVTKAdvanced(fileName,coss.str(),noss.str());
 }
index 52cbc72c5f4dadcf10ee1109ba928acf0204a5e2..cd460600b386957456639336069af50696c581d9 100644 (file)
@@ -53,9 +53,9 @@ namespace ParaMEDMEM
   public:
     std::size_t getHeapMemorySize() const;
     void setName(const char *name) { _name=name; }
-    const char *getName() const { return _name.c_str(); }
+    std::string getName() const { return _name; }
     void setDescription(const char *descr) { _description=descr; }
-    const char *getDescription() const { return _description.c_str(); }
+    std::string getDescription() const { return _description; }
     double getTime(int& iteration, int& order) const { iteration=_iteration; order=_order; return _time; }
     void setTime(double val, int iteration, int order) { _time=val; _iteration=iteration; _order=order; }
     void setTimeUnit(const char *unit) { _time_unit=unit; }
index f8c5f4183a8dd3b6425997117b6af3bc8cd5dab0..961fb248ae519aea59adff548a442cc6d5e52aba 100644 (file)
@@ -1496,7 +1496,7 @@ DataArrayInt *MEDCouplingPointSet::getCellIdsLyingOnNodes(const int *begin, cons
 {
   DataArrayInt *cellIdsKept=0;
   fillCellIdsToKeepFromNodeIds(begin,end,fullyIn,cellIdsKept);
-  cellIdsKept->setName(getName());
+  cellIdsKept->setName(getName().c_str());
   return cellIdsKept;
 }
 
index 6127b68c6d20109a633794fd9ead08c810ad6183..ae715ec5d5438bc6da69de22f428902045c52da4 100644 (file)
@@ -270,7 +270,7 @@ MEDCouplingUMesh *MEDCouplingStructuredMesh::buildUnstructured() const throw(INT
   int ns[3];
   getNodeGridStructure(ns);
   MEDCouplingAutoRefCountObjectPtr<DataArrayInt> conn(Build1GTNodalConnectivity(ns,ns+meshDim));
-  MEDCouplingAutoRefCountObjectPtr<MEDCoupling1SGTUMesh> ret(MEDCoupling1SGTUMesh::New(getName(),GetGeoTypeGivenMeshDimension(meshDim)));
+  MEDCouplingAutoRefCountObjectPtr<MEDCoupling1SGTUMesh> ret(MEDCoupling1SGTUMesh::New(getName().c_str(),GetGeoTypeGivenMeshDimension(meshDim)));
   ret->setNodalConnectivity(conn); ret->setCoords(coords);
   return ret->buildUnstructured();
 }
index f90c9c49a0d31701708e23d5046d742c427eabe9..ea3d4f8fac4809fe38582ce1456cbd260fc42e31 100644 (file)
@@ -1785,7 +1785,7 @@ bool MEDCouplingUMesh::areCellsIncludedIn(const MEDCouplingUMesh *other, int com
     }
   MEDCouplingAutoRefCountObjectPtr<DataArrayInt> o2n=mesh->zipConnectivityTraducer(compType,nbOfCells);
   arr=o2n->substr(nbOfCells);
-  arr->setName(other->getName());
+  arr->setName(other->getName().c_str());
   int tmp;
   if(other->getNumberOfCells()==0)
     return true;
@@ -1829,7 +1829,7 @@ bool MEDCouplingUMesh::areCellsIncludedIn2(const MEDCouplingUMesh *other, DataAr
             }
         }
     }
-  arr2->setName(other->getName());
+  arr2->setName(other->getName().c_str());
   if(arr2->presenceOfValue(0))
     return false;
   arr=arr2.retn();
@@ -2799,7 +2799,7 @@ MEDCouplingUMesh *MEDCouplingUMesh::buildSetInstanceFromThis(int spaceDim) const
   int mdim=getMeshDimension();
   if(mdim<0)
     throw INTERP_KERNEL::Exception("MEDCouplingUMesh::buildSetInstanceFromThis : invalid mesh dimension ! Should be >= 0 !");
-  MEDCouplingAutoRefCountObjectPtr<MEDCouplingUMesh> ret=MEDCouplingUMesh::New(getName(),mdim);
+  MEDCouplingAutoRefCountObjectPtr<MEDCouplingUMesh> ret=MEDCouplingUMesh::New(getName().c_str(),mdim);
   MEDCouplingAutoRefCountObjectPtr<DataArrayInt> tmp1,tmp2;
   bool needToCpyCT=true;
   if(!_nodal_connec)
@@ -6709,7 +6709,7 @@ MEDCoupling1GTUMesh *MEDCouplingUMesh::convertIntoSingleGeoTypeMesh() const thro
     if(_types.size()!=1)
     throw INTERP_KERNEL::Exception("MEDCouplingUMesh::convertIntoSingleGeoTypeMesh : current mesh does not contain exactly one geometric type !");
   INTERP_KERNEL::NormalizedCellType typ=*_types.begin();
-  MEDCouplingAutoRefCountObjectPtr<MEDCoupling1GTUMesh> ret=MEDCoupling1GTUMesh::New(getName(),typ);
+  MEDCouplingAutoRefCountObjectPtr<MEDCoupling1GTUMesh> ret=MEDCoupling1GTUMesh::New(getName().c_str(),typ);
   ret->setCoords(getCoords());
   MEDCoupling1SGTUMesh *retC=dynamic_cast<MEDCoupling1SGTUMesh *>((MEDCoupling1GTUMesh*)ret);
   if(retC)
@@ -7408,7 +7408,7 @@ MEDCouplingUMesh *MEDCouplingUMesh::FuseUMeshesOnSameCoords(const std::vector<co
       tmp->alloc(curNbOfCells,1);
       std::copy(o2nPtr+offset,o2nPtr+offset+curNbOfCells,tmp->getPointer());
       offset+=curNbOfCells;
-      tmp->setName(meshes[i]->getName());
+      tmp->setName(meshes[i]->getName().c_str());
       corr[i]=tmp;
     }
   return ret.retn();
@@ -9175,7 +9175,7 @@ MEDCouplingUMesh *MEDCouplingUMesh::buildSpreadZonesWithPoly() const throw(INTER
   std::vector<DataArrayInt *> partition=partitionBySpreadZone();
   std::vector< MEDCouplingAutoRefCountObjectPtr<DataArrayInt> > partitionAuto; partitionAuto.reserve(partition.size());
   std::copy(partition.begin(),partition.end(),std::back_insert_iterator<std::vector< MEDCouplingAutoRefCountObjectPtr<DataArrayInt> > >(partitionAuto));
-  MEDCouplingAutoRefCountObjectPtr<MEDCouplingUMesh> ret=MEDCouplingUMesh::New(getName(),mdim);
+  MEDCouplingAutoRefCountObjectPtr<MEDCouplingUMesh> ret=MEDCouplingUMesh::New(getName().c_str(),mdim);
   ret->setCoords(getCoords());
   ret->allocateCells((int)partition.size());
   //
index 6fa8ba4cd7ae872811aac33a8a284bd5f56ed59b..c89197389f8c81a336d02cc4ded1bea513d53ed1 100644 (file)
@@ -1346,15 +1346,15 @@ void MEDCouplingBasicsTest1::testMergeMeshOnSameCoords1()
   CPPUNIT_ASSERT_EQUAL(15,m4->getNumberOfCells());
   const int cells1[5]={0,1,2,3,4};
   MEDCouplingPointSet *m1_1=m4->buildPartOfMySelf(cells1,cells1+5,true);
-  m1_1->setName(m1->getName());
+  m1_1->setName(m1->getName().c_str());
   CPPUNIT_ASSERT(m1->isEqual(m1_1,1e-12));
   const int cells2[5]={5,6,7,8,9};
   MEDCouplingPointSet *m2_1=m4->buildPartOfMySelf(cells2,cells2+5,true);
-  m2_1->setName(m2->getName());
+  m2_1->setName(m2->getName().c_str());
   CPPUNIT_ASSERT(m2->isEqual(m2_1,1e-12));
   const int cells3[5]={10,11,12,13,14};
   MEDCouplingPointSet *m3_1=m4->buildPartOfMySelf(cells3,cells3+5,true);
-  m3_1->setName(m3->getName());
+  m3_1->setName(m3->getName().c_str());
   CPPUNIT_ASSERT(m3->isEqual(m3_1,1e-12));
   m1_1->decrRef(); m2_1->decrRef(); m3_1->decrRef();
   //
@@ -2012,7 +2012,7 @@ void MEDCouplingBasicsTest1::testSplitByType()
   CPPUNIT_ASSERT_EQUAL(3,(int)v.size());
   std::vector<const MEDCouplingUMesh *> v2(v.begin(),v.end());
   MEDCouplingUMesh *m2=MEDCouplingUMesh::MergeUMeshesOnSameCoords(v2);
-  m2->setName(m1->getName());
+  m2->setName(m1->getName().c_str());
   CPPUNIT_ASSERT(m1->isEqual(m2,1.e-12));
   for(std::vector<MEDCouplingUMesh *>::const_iterator iter=v.begin();iter!=v.end();iter++)
     (*iter)->decrRef();
@@ -2504,8 +2504,8 @@ void MEDCouplingBasicsTest1::testCMesh2()
   
   int cells2[2]={25,26};
   DataArrayInt* arr1;
-  MEDCouplingUMesh *partMesh2=
-    dynamic_cast<MEDCouplingUMesh *>(mesh1->buildPartAndReduceNodes(cells2,cells2+2,arr1));
+  MEDCouplingCMesh *partMesh2=
+    dynamic_cast<MEDCouplingCMesh *>(mesh1->buildPartAndReduceNodes(cells2,cells2+2,arr1));
   CPPUNIT_ASSERT(partMesh2);
   CPPUNIT_ASSERT_EQUAL(2,partMesh2->getNumberOfCellsWithType(INTERP_KERNEL::NORM_HEXA8));
   CPPUNIT_ASSERT_EQUAL(12,partMesh2->getNumberOfNodes());
@@ -2666,7 +2666,7 @@ void MEDCouplingBasicsTest1::testChangeSpaceDimension()
   CPPUNIT_ASSERT_EQUAL(3,m1->getSpaceDimension());
   m1->changeSpaceDimension(2);
   CPPUNIT_ASSERT_EQUAL(2,m1->getSpaceDimension());
-  m1->setName(m2->getName());
+  m1->setName(m2->getName().c_str());
   CPPUNIT_ASSERT(m1->isEqual(m2,1e-12));
   m1->changeSpaceDimension(3);
   CPPUNIT_ASSERT_EQUAL(3,m1->getSpaceDimension());
index bda6db201259952b5e2bcc20cca7c7bfefa0f571..65fb32382417d80774893a57d0862219102f92e2 100644 (file)
@@ -2406,7 +2406,7 @@ void MEDCouplingBasicsTest3::testMergeUMeshes2()
   //
   const int vec3[5]={0,1,2,3,4};
   MEDCouplingUMesh *m4_1=(MEDCouplingUMesh *)m4->buildPartOfMySelf(vec3,vec3+5,false);
-  m4_1->setName(m1->getName());
+  m4_1->setName(m1->getName().c_str());
   CPPUNIT_ASSERT(m4_1->isEqual(m1,1e-12));
   m4_1->decrRef();
   //
@@ -2424,7 +2424,7 @@ void MEDCouplingBasicsTest3::testMergeUMeshes2()
   CPPUNIT_ASSERT_EQUAL(2,m4_3->getNumberOfCells());
   CPPUNIT_ASSERT_EQUAL(3,m4_3->getNumberOfNodes());
   m3_2->zipCoords();
-  m4_3->setName(m3_2->getName());
+  m4_3->setName(m3_2->getName().c_str());
   CPPUNIT_ASSERT(m4_3->isEqual(m3_2,1e-12));
   m4_3->decrRef();
   //
index 9e88f8e275a1ef9dae42c98e9fe5a27998399a47..8170b70853f8991e257ca0ef80508a0b814dd4c3 100644 (file)
@@ -1714,7 +1714,7 @@ void MEDCouplingBasicsTest4::testUMeshMergeMeshesCVW1()
   MEDCouplingUMesh *m=build3DSurfTargetMesh_1();
   MEDCouplingUMesh *m2=MEDCouplingUMesh::New("toto",2);
   MEDCouplingUMesh *m3=MEDCouplingUMesh::MergeUMeshes(m,m2);
-  m3->setName(m->getName());
+  m3->setName(m->getName().c_str());
   CPPUNIT_ASSERT(m->isEqual(m3,1e-12));
   m3->decrRef();
   m->decrRef();
index a4d9b168b764970ce6416ba73ea1017ccebae68b..09854dfc7ef718a5a20dcf26b3e0fb78a88f9a76 100644 (file)
@@ -1353,7 +1353,7 @@ void MEDCouplingBasicsTest5::testComputeSkin1()
   CPPUNIT_ASSERT_EQUAL((std::size_t)18,ids->getNbOfElems());
   CPPUNIT_ASSERT(std::equal(expected3,expected3+18,ids->getConstPointer()));
   MEDCouplingUMesh *part=dynamic_cast<MEDCouplingUMesh *>(umesh->buildFacePartOfMySelfNode(ids->begin(),ids->end(),true));
-  part->setName(skin->getName());
+  part->setName(skin->getName().c_str());
   CPPUNIT_ASSERT(part->isEqual(skin,1e-12));
   MEDCouplingUMesh *part2=dynamic_cast<MEDCouplingUMesh *>(part->buildPartOfMySelf2(1,18,2,true));
   DataArrayInt *ids2=DataArrayInt::Range(0,18,2);