From: ageay Date: Fri, 29 Nov 2013 15:00:06 +0000 (+0000) Subject: MEDCouplingUMesh::getAllTypes -> MEDCouplingUMesh::getAllGeoTypes X-Git-Tag: V7_3_0b1~18 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=b189e6e82091ea1e84704db73923b45f083df7d6;p=modules%2Fmed.git MEDCouplingUMesh::getAllTypes -> MEDCouplingUMesh::getAllGeoTypes --- diff --git a/src/MEDCoupling/MEDCouplingExtrudedMesh.cxx b/src/MEDCoupling/MEDCouplingExtrudedMesh.cxx index a76eea128..3658b43be 100644 --- a/src/MEDCoupling/MEDCouplingExtrudedMesh.cxx +++ b/src/MEDCoupling/MEDCouplingExtrudedMesh.cxx @@ -250,7 +250,7 @@ INTERP_KERNEL::NormalizedCellType MEDCouplingExtrudedMesh::getTypeOfCell(int cel std::set MEDCouplingExtrudedMesh::getAllGeoTypes() const { - const std::set& ret2D=_mesh2D->getAllTypes(); + std::set ret2D(_mesh2D->getAllGeoTypes()); std::set ret; for(std::set::const_iterator it=ret2D.begin();it!=ret2D.end();it++) ret.insert(INTERP_KERNEL::CellModel::GetCellModel(*it).getExtrudedType()); diff --git a/src/MEDCoupling/MEDCouplingUMesh.cxx b/src/MEDCoupling/MEDCouplingUMesh.cxx index 6afb8bf8f..f6f92895c 100644 --- a/src/MEDCoupling/MEDCouplingUMesh.cxx +++ b/src/MEDCoupling/MEDCouplingUMesh.cxx @@ -2910,7 +2910,7 @@ int MEDCouplingUMesh::getNumberOfNodesInCell(int cellId) const * describing the cell types. * \throw If the coordinates array is not set. * \throw If the nodal connectivity of cells is not defined. - * \sa getAllTypes() + * \sa getAllGeoTypes() */ std::set MEDCouplingUMesh::getTypesOfPart(const int *begin, const int *end) const { @@ -6281,7 +6281,7 @@ std::vector MEDCouplingUMesh::getDistributionOfTypes() const const int *connI=_nodal_connec_index->getConstPointer(); const int *work=connI; int nbOfCells=getNumberOfCells(); - std::size_t n=getAllTypes().size(); + std::size_t n=getAllGeoTypes().size(); std::vector ret(3*n,-1); //ret[3*k+2]==-1 because it has no sense here std::set types; for(std::size_t i=0;work!=connI+nbOfCells;i++) @@ -6952,7 +6952,7 @@ DataArrayInt *MEDCouplingUMesh::convertCellArrayPerGeoType(const DataArrayInt *d const int *conn=_nodal_connec->getConstPointer(); const int *connI=_nodal_connec_index->getConstPointer(); int nbOfCells=getNumberOfCells(); - std::set types=getAllTypes(); + std::set types(getAllGeoTypes()); int *tmp=new int[nbOfCells]; for(std::set::const_iterator iter=types.begin();iter!=types.end();iter++) { diff --git a/src/MEDCoupling/MEDCouplingUMesh.hxx b/src/MEDCoupling/MEDCouplingUMesh.hxx index d7c28f5b6..24e8583dc 100644 --- a/src/MEDCoupling/MEDCouplingUMesh.hxx +++ b/src/MEDCoupling/MEDCouplingUMesh.hxx @@ -61,7 +61,6 @@ namespace ParaMEDMEM MEDCOUPLING_EXPORT void finishInsertingCells(); MEDCOUPLING_EXPORT MEDCouplingUMeshCellIterator *cellIterator(); MEDCOUPLING_EXPORT MEDCouplingUMeshCellByTypeEntry *cellsByType(); - MEDCOUPLING_EXPORT const std::set& getAllTypes() const { return _types; } MEDCOUPLING_EXPORT std::set getAllGeoTypes() const; MEDCOUPLING_EXPORT std::set getTypesOfPart(const int *begin, const int *end) const; MEDCOUPLING_EXPORT void setConnectivity(DataArrayInt *conn, DataArrayInt *connIndex, bool isComputingTypes=true); diff --git a/src/MEDCoupling/Test/MEDCouplingBasicsTest1.cxx b/src/MEDCoupling/Test/MEDCouplingBasicsTest1.cxx index fc06ef5a3..9f05e9a11 100644 --- a/src/MEDCoupling/Test/MEDCouplingBasicsTest1.cxx +++ b/src/MEDCoupling/Test/MEDCouplingBasicsTest1.cxx @@ -591,11 +591,11 @@ void MEDCouplingBasicsTest1::testBuildPartOfMySelf() MEDCouplingUMesh *subMesh=dynamic_cast(subMeshSimple); CPPUNIT_ASSERT(subMesh); std::string name(subMesh->getName()); - CPPUNIT_ASSERT_EQUAL(2,(int)mesh->getAllTypes().size()); - CPPUNIT_ASSERT_EQUAL(INTERP_KERNEL::NORM_TRI3,*mesh->getAllTypes().begin()); - CPPUNIT_ASSERT_EQUAL(INTERP_KERNEL::NORM_QUAD4,*(++(mesh->getAllTypes().begin()))); - CPPUNIT_ASSERT_EQUAL(1,(int)subMesh->getAllTypes().size()); - CPPUNIT_ASSERT_EQUAL(INTERP_KERNEL::NORM_QUAD4,*subMesh->getAllTypes().begin()); + CPPUNIT_ASSERT_EQUAL(2,(int)mesh->getAllGeoTypes().size()); + CPPUNIT_ASSERT_EQUAL(INTERP_KERNEL::NORM_TRI3,*mesh->getAllGeoTypes().begin()); + CPPUNIT_ASSERT_EQUAL(INTERP_KERNEL::NORM_QUAD4,*(++(mesh->getAllGeoTypes().begin()))); + CPPUNIT_ASSERT_EQUAL(1,(int)subMesh->getAllGeoTypes().size()); + CPPUNIT_ASSERT_EQUAL(INTERP_KERNEL::NORM_QUAD4,*subMesh->getAllGeoTypes().begin()); CPPUNIT_ASSERT(name=="Toto"); CPPUNIT_ASSERT(mesh->getCoords()==subMesh->getCoords()); CPPUNIT_ASSERT_EQUAL(2,subMesh->getNumberOfCells()); @@ -611,9 +611,9 @@ void MEDCouplingBasicsTest1::testBuildPartOfMySelf() subMesh=dynamic_cast(subMeshSimple); CPPUNIT_ASSERT(subMesh); name=subMesh->getName(); - CPPUNIT_ASSERT_EQUAL(2,(int)subMesh->getAllTypes().size()); - CPPUNIT_ASSERT_EQUAL(INTERP_KERNEL::NORM_TRI3,*subMesh->getAllTypes().begin()); - CPPUNIT_ASSERT_EQUAL(INTERP_KERNEL::NORM_QUAD4,*(++(subMesh->getAllTypes().begin()))); + CPPUNIT_ASSERT_EQUAL(2,(int)subMesh->getAllGeoTypes().size()); + CPPUNIT_ASSERT_EQUAL(INTERP_KERNEL::NORM_TRI3,*subMesh->getAllGeoTypes().begin()); + CPPUNIT_ASSERT_EQUAL(INTERP_KERNEL::NORM_QUAD4,*(++(subMesh->getAllGeoTypes().begin()))); CPPUNIT_ASSERT(name=="Toto"); CPPUNIT_ASSERT(mesh->getCoords()==subMesh->getCoords()); CPPUNIT_ASSERT_EQUAL(3,subMesh->getNumberOfCells()); @@ -640,8 +640,8 @@ void MEDCouplingBasicsTest1::testBuildPartOfMySelfNode() MEDCouplingPointSet *subMeshSimple=mesh->buildPartOfMySelfNode(tab1,tab1+4,true); MEDCouplingUMesh *subMesh=dynamic_cast(subMeshSimple); CPPUNIT_ASSERT(subMesh); - CPPUNIT_ASSERT_EQUAL(1,(int)subMesh->getAllTypes().size()); - CPPUNIT_ASSERT_EQUAL(INTERP_KERNEL::NORM_QUAD4,*subMesh->getAllTypes().begin()); + CPPUNIT_ASSERT_EQUAL(1,(int)subMesh->getAllGeoTypes().size()); + CPPUNIT_ASSERT_EQUAL(INTERP_KERNEL::NORM_QUAD4,*subMesh->getAllGeoTypes().begin()); CPPUNIT_ASSERT_EQUAL(1,subMesh->getNumberOfCells()); CPPUNIT_ASSERT_EQUAL((std::size_t)5,subMesh->getNodalConnectivity()->getNbOfElems()); CPPUNIT_ASSERT_EQUAL((std::size_t)2,subMesh->getNodalConnectivityIndex()->getNbOfElems()); @@ -655,9 +655,9 @@ void MEDCouplingBasicsTest1::testBuildPartOfMySelfNode() subMeshSimple=mesh->buildPartOfMySelfNode(tab1,tab1+2,false); subMesh=dynamic_cast(subMeshSimple); CPPUNIT_ASSERT(subMesh); - CPPUNIT_ASSERT_EQUAL(2,(int)subMesh->getAllTypes().size()); - CPPUNIT_ASSERT_EQUAL(INTERP_KERNEL::NORM_TRI3,*subMesh->getAllTypes().begin()); - CPPUNIT_ASSERT_EQUAL(INTERP_KERNEL::NORM_QUAD4,*(++subMesh->getAllTypes().begin())); + CPPUNIT_ASSERT_EQUAL(2,(int)subMesh->getAllGeoTypes().size()); + CPPUNIT_ASSERT_EQUAL(INTERP_KERNEL::NORM_TRI3,*subMesh->getAllGeoTypes().begin()); + CPPUNIT_ASSERT_EQUAL(INTERP_KERNEL::NORM_QUAD4,*(++subMesh->getAllGeoTypes().begin())); CPPUNIT_ASSERT_EQUAL(3,subMesh->getNumberOfCells()); CPPUNIT_ASSERT_EQUAL((std::size_t)14,subMesh->getNodalConnectivity()->getNbOfElems()); CPPUNIT_ASSERT_EQUAL((std::size_t)4,subMesh->getNodalConnectivityIndex()->getNbOfElems()); @@ -672,9 +672,9 @@ void MEDCouplingBasicsTest1::testBuildPartOfMySelfNode() subMeshSimple=mesh->buildPartOfMySelfNode(tab2,tab2+7,true); subMesh=dynamic_cast(subMeshSimple); CPPUNIT_ASSERT(subMesh); - CPPUNIT_ASSERT_EQUAL(2,(int)subMesh->getAllTypes().size()); - CPPUNIT_ASSERT_EQUAL(INTERP_KERNEL::NORM_TRI3,*subMesh->getAllTypes().begin()); - CPPUNIT_ASSERT_EQUAL(INTERP_KERNEL::NORM_QUAD4,*(++subMesh->getAllTypes().begin())); + CPPUNIT_ASSERT_EQUAL(2,(int)subMesh->getAllGeoTypes().size()); + CPPUNIT_ASSERT_EQUAL(INTERP_KERNEL::NORM_TRI3,*subMesh->getAllGeoTypes().begin()); + CPPUNIT_ASSERT_EQUAL(INTERP_KERNEL::NORM_QUAD4,*(++subMesh->getAllGeoTypes().begin())); CPPUNIT_ASSERT_EQUAL(3,subMesh->getNumberOfCells()); subMeshSimple->decrRef(); // @@ -684,7 +684,7 @@ void MEDCouplingBasicsTest1::testBuildPartOfMySelfNode() void MEDCouplingBasicsTest1::testZipCoords() { MEDCouplingUMesh *mesh=build2DTargetMesh_1(); - CPPUNIT_ASSERT_EQUAL(2,(int)mesh->getAllTypes().size()); + CPPUNIT_ASSERT_EQUAL(2,(int)mesh->getAllGeoTypes().size()); CPPUNIT_ASSERT_EQUAL(2,mesh->getSpaceDimension()); CPPUNIT_ASSERT_EQUAL(9,mesh->getNumberOfNodes()); CPPUNIT_ASSERT_EQUAL(5,mesh->getNumberOfCells()); @@ -695,7 +695,7 @@ void MEDCouplingBasicsTest1::testZipCoords() DataArrayDouble *oldCoords=mesh->getCoords(); oldCoords->incrRef(); mesh->zipCoords(); - CPPUNIT_ASSERT_EQUAL(2,(int)mesh->getAllTypes().size()); + CPPUNIT_ASSERT_EQUAL(2,(int)mesh->getAllGeoTypes().size()); CPPUNIT_ASSERT_EQUAL(2,mesh->getSpaceDimension()); CPPUNIT_ASSERT_EQUAL(9,mesh->getNumberOfNodes()); CPPUNIT_ASSERT_EQUAL(5,mesh->getNumberOfCells()); @@ -713,7 +713,7 @@ void MEDCouplingBasicsTest1::testZipCoords() const int expectedTraducer[9]={0,1,-1,2,3,4,-1,5,6}; CPPUNIT_ASSERT(std::equal(expectedTraducer,expectedTraducer+9,traducer->getPointer())); traducer->decrRef(); - CPPUNIT_ASSERT_EQUAL(INTERP_KERNEL::NORM_QUAD4,*subMesh->getAllTypes().begin()); + CPPUNIT_ASSERT_EQUAL(INTERP_KERNEL::NORM_QUAD4,*subMesh->getAllGeoTypes().begin()); CPPUNIT_ASSERT_EQUAL(2,subMesh->getNumberOfCells()); const int subConn[10]={4,0,2,3,1,4,5,6,4,3}; const int subConnIndex[3]={0,5,10}; @@ -727,7 +727,7 @@ void MEDCouplingBasicsTest1::testZipCoords() subMeshPtSet=mesh->buildPartOfMySelf(tab1,tab1+2,false); subMesh=dynamic_cast(subMeshPtSet); CPPUNIT_ASSERT(subMesh); - CPPUNIT_ASSERT_EQUAL(INTERP_KERNEL::NORM_QUAD4,*subMesh->getAllTypes().begin()); + CPPUNIT_ASSERT_EQUAL(INTERP_KERNEL::NORM_QUAD4,*subMesh->getAllGeoTypes().begin()); CPPUNIT_ASSERT_EQUAL(2,subMesh->getNumberOfCells()); CPPUNIT_ASSERT_EQUAL(7,subMesh->getNumberOfNodes()); CPPUNIT_ASSERT_EQUAL((std::size_t)10,subMesh->getNodalConnectivity()->getNbOfElems()); diff --git a/src/MEDCoupling/Test/MEDCouplingBasicsTest2.cxx b/src/MEDCoupling/Test/MEDCouplingBasicsTest2.cxx index d1482a268..79b232f4a 100644 --- a/src/MEDCoupling/Test/MEDCouplingBasicsTest2.cxx +++ b/src/MEDCoupling/Test/MEDCouplingBasicsTest2.cxx @@ -747,7 +747,7 @@ void MEDCouplingBasicsTest2::testConvertQuadraticCellsToLinear() { MEDCouplingUMesh *mesh=build2DTargetMesh_3(); mesh->checkCoherency(); - const std::set& types=mesh->getAllTypes(); + std::set types=mesh->getAllGeoTypes(); CPPUNIT_ASSERT_EQUAL(5,(int)types.size()); INTERP_KERNEL::NormalizedCellType expected1[5]={INTERP_KERNEL::NORM_POLYGON, INTERP_KERNEL::NORM_TRI3, INTERP_KERNEL::NORM_QUAD4, INTERP_KERNEL::NORM_TRI6, INTERP_KERNEL::NORM_QUAD8}; std::set expected1Bis(expected1,expected1+5); @@ -763,8 +763,8 @@ void MEDCouplingBasicsTest2::testConvertQuadraticCellsToLinear() MEDCouplingFieldDouble *f2=mesh->getMeasureField(false); CPPUNIT_ASSERT(f1->getArray()->isEqual(*f2->getArray(),1e-12)); CPPUNIT_ASSERT_EQUAL(48,mesh->getMeshLength()); - const std::set& types2=mesh->getAllTypes(); - CPPUNIT_ASSERT_EQUAL(3,(int)types.size()); + std::set types2=mesh->getAllGeoTypes(); + CPPUNIT_ASSERT_EQUAL(3,(int)types2.size()); INTERP_KERNEL::NormalizedCellType expected2[3]={INTERP_KERNEL::NORM_POLYGON, INTERP_KERNEL::NORM_TRI3, INTERP_KERNEL::NORM_QUAD4}; std::set expected2Bis(expected2,expected2+3); CPPUNIT_ASSERT(expected2Bis==types2); diff --git a/src/MEDCoupling/Test/MEDCouplingBasicsTest3.cxx b/src/MEDCoupling/Test/MEDCouplingBasicsTest3.cxx index 762f4709c..a7db7454e 100644 --- a/src/MEDCoupling/Test/MEDCouplingBasicsTest3.cxx +++ b/src/MEDCoupling/Test/MEDCouplingBasicsTest3.cxx @@ -1573,7 +1573,7 @@ void MEDCouplingBasicsTest3::testSimplexize1() MEDCouplingFieldDouble *f=m->getMeasureField(false); for(int i=0;i<7;i++) CPPUNIT_ASSERT_DOUBLES_EQUAL(expected1[i]*sqrt(2.),f->getIJ(i,0),1e-10); - std::set types=m->getAllTypes(); + std::set types=m->getAllGeoTypes(); CPPUNIT_ASSERT_EQUAL(2,(int)types.size()); CPPUNIT_ASSERT_EQUAL(INTERP_KERNEL::NORM_TRI3,*(types.begin())); CPPUNIT_ASSERT_EQUAL(INTERP_KERNEL::NORM_POLYGON,*(++(types.begin()))); @@ -1590,7 +1590,7 @@ void MEDCouplingBasicsTest3::testSimplexize1() for(int i=0;i<7;i++) CPPUNIT_ASSERT_EQUAL(expected2[i],da->getIJ(i,0)); m->checkCoherency(); - types=m->getAllTypes(); + types=m->getAllGeoTypes(); CPPUNIT_ASSERT_EQUAL(2,(int)types.size()); CPPUNIT_ASSERT_EQUAL(INTERP_KERNEL::NORM_TRI3,*(types.begin())); CPPUNIT_ASSERT_EQUAL(INTERP_KERNEL::NORM_POLYGON,*(++(types.begin()))); @@ -2449,7 +2449,7 @@ void MEDCouplingBasicsTest3::testBuild0DMeshFromCoords1() CPPUNIT_ASSERT_EQUAL(4,m->getNumberOfCells()); CPPUNIT_ASSERT_EQUAL(3,m->getSpaceDimension()); CPPUNIT_ASSERT_EQUAL(0,m->getMeshDimension()); - const std::set& types=m->getAllTypes(); + std::set types=m->getAllGeoTypes(); CPPUNIT_ASSERT_EQUAL(1,(int)types.size()); CPPUNIT_ASSERT_EQUAL(INTERP_KERNEL::NORM_POINT1,*types.begin()); for(int i=0;i<4;i++) diff --git a/src/MEDCoupling/Test/MEDCouplingBasicsTest5.cxx b/src/MEDCoupling/Test/MEDCouplingBasicsTest5.cxx index 85da2ecce..fb039d015 100644 --- a/src/MEDCoupling/Test/MEDCouplingBasicsTest5.cxx +++ b/src/MEDCoupling/Test/MEDCouplingBasicsTest5.cxx @@ -1403,7 +1403,7 @@ void MEDCouplingBasicsTest5::testUMeshSetPartOfMySelf2() // resize with explicit ids list MEDCouplingUMesh *m=build2DTargetMesh_1(); std::set s; s.insert(INTERP_KERNEL::NORM_TRI3); s.insert(INTERP_KERNEL::NORM_QUAD4); - CPPUNIT_ASSERT(s==m->getAllTypes()); + CPPUNIT_ASSERT(s==m->getAllGeoTypes()); const int ids1[3]={0,3,4}; MEDCouplingUMesh *part=static_cast(m->buildPartOfMySelf(ids1,ids1+3,true)); part->simplexize(0)->decrRef(); @@ -1417,7 +1417,7 @@ void MEDCouplingBasicsTest5::testUMeshSetPartOfMySelf2() CPPUNIT_ASSERT(std::equal(expected2,expected2+6,m->getNodalConnectivityIndex()->getConstPointer())); CPPUNIT_ASSERT_EQUAL((std::size_t)6,m->getNodalConnectivityIndex()->getNbOfElems()); s.clear(); s.insert(INTERP_KERNEL::NORM_TRI3); - CPPUNIT_ASSERT(s==m->getAllTypes()); + CPPUNIT_ASSERT(s==m->getAllGeoTypes()); m->decrRef(); part->decrRef(); part2->decrRef(); // no resize with explicit ids list m=build2DTargetMesh_1(); @@ -1431,7 +1431,7 @@ void MEDCouplingBasicsTest5::testUMeshSetPartOfMySelf2() CPPUNIT_ASSERT(std::equal(expected4,expected4+6,m->getNodalConnectivityIndex()->getConstPointer())); CPPUNIT_ASSERT_EQUAL((std::size_t)6,m->getNodalConnectivityIndex()->getNbOfElems()); s.clear(); s.insert(INTERP_KERNEL::NORM_TRI3); s.insert(INTERP_KERNEL::NORM_QUAD4); s.insert(INTERP_KERNEL::NORM_POLYGON); - CPPUNIT_ASSERT(s==m->getAllTypes()); + CPPUNIT_ASSERT(s==m->getAllGeoTypes()); m->decrRef(); part->decrRef(); // resize with range ids m=build2DTargetMesh_1(); @@ -1444,7 +1444,7 @@ void MEDCouplingBasicsTest5::testUMeshSetPartOfMySelf2() CPPUNIT_ASSERT(std::equal(expected6,expected6+6,m->getNodalConnectivityIndex()->getConstPointer())); CPPUNIT_ASSERT_EQUAL((std::size_t)6,m->getNodalConnectivityIndex()->getNbOfElems()); s.clear(); s.insert(INTERP_KERNEL::NORM_QUAD4); - CPPUNIT_ASSERT(s==m->getAllTypes()); + CPPUNIT_ASSERT(s==m->getAllGeoTypes()); m->decrRef(); part->decrRef(); // no resize with range ids m=build2DTargetMesh_1(); @@ -1458,7 +1458,7 @@ void MEDCouplingBasicsTest5::testUMeshSetPartOfMySelf2() CPPUNIT_ASSERT(std::equal(expected8,expected8+6,m->getNodalConnectivityIndex()->getConstPointer())); CPPUNIT_ASSERT_EQUAL((std::size_t)6,m->getNodalConnectivityIndex()->getNbOfElems()); s.clear(); s.insert(INTERP_KERNEL::NORM_TRI3); s.insert(INTERP_KERNEL::NORM_QUAD4); s.insert(INTERP_KERNEL::NORM_POLYGON); - CPPUNIT_ASSERT(s==m->getAllTypes()); + CPPUNIT_ASSERT(s==m->getAllGeoTypes()); m->decrRef(); part->decrRef(); // no resize with range ids negative direction m=build2DTargetMesh_1(); @@ -1472,7 +1472,7 @@ s.clear(); s.insert(INTERP_KERNEL::NORM_TRI3); s.insert(INTERP_KERNEL::NORM_QUAD CPPUNIT_ASSERT(std::equal(expected10,expected10+6,m->getNodalConnectivityIndex()->getConstPointer())); CPPUNIT_ASSERT_EQUAL((std::size_t)6,m->getNodalConnectivityIndex()->getNbOfElems()); s.clear(); s.insert(INTERP_KERNEL::NORM_TRI3); s.insert(INTERP_KERNEL::NORM_QUAD4); s.insert(INTERP_KERNEL::NORM_POLYGON); - CPPUNIT_ASSERT(s==m->getAllTypes()); + CPPUNIT_ASSERT(s==m->getAllGeoTypes()); part->decrRef(); m->decrRef(); } @@ -1500,7 +1500,7 @@ void MEDCouplingBasicsTest5::testUnPolyze3() m->unPolyze(); CPPUNIT_ASSERT_EQUAL(1,m->getNumberOfCells()); std::set s; s.insert(INTERP_KERNEL::NORM_PENTA6); - CPPUNIT_ASSERT(s==m->getAllTypes()); + CPPUNIT_ASSERT(s==m->getAllGeoTypes()); // const int expected1[2]={0,7}; const int expected2[7]={16,0,2,1,3,5,4}; diff --git a/src/MEDCoupling_Swig/MEDCouplingBasicsTest.py b/src/MEDCoupling_Swig/MEDCouplingBasicsTest.py index 18ae38854..9d42c86b7 100644 --- a/src/MEDCoupling_Swig/MEDCouplingBasicsTest.py +++ b/src/MEDCoupling_Swig/MEDCouplingBasicsTest.py @@ -123,7 +123,7 @@ class MEDCouplingBasicsTest(unittest.TestCase): self.assertTrue(myCoords.getIJ(3,2)==-0.305) mesh.setCoords(myCoords); mesh.checkCoherency(); - self.assertTrue(mesh.getAllTypes()==[4]) + self.assertTrue(mesh.getAllGeoTypes()==[4]) myFalseConn=DataArrayInt.New() myFalseConn.setValues(tab4,6,4) self.assertTrue(myFalseConn.getIJ(1,1)==3) @@ -385,11 +385,11 @@ class MEDCouplingBasicsTest(unittest.TestCase): subMesh=mesh.buildPartOfMySelf(tab1,True); self.assertTrue(isinstance(subMesh,MEDCouplingUMesh)) name=subMesh.getName(); - self.assertEqual(2,len(mesh.getAllTypes())); - self.assertEqual(NORM_TRI3,mesh.getAllTypes()[0]); - self.assertEqual(NORM_QUAD4,mesh.getAllTypes()[1]); - self.assertEqual(1,len(subMesh.getAllTypes())); - self.assertEqual(NORM_QUAD4,subMesh.getAllTypes()[0]); + self.assertEqual(2,len(mesh.getAllGeoTypes())); + self.assertEqual(NORM_TRI3,mesh.getAllGeoTypes()[0]); + self.assertEqual(NORM_QUAD4,mesh.getAllGeoTypes()[1]); + self.assertEqual(1,len(subMesh.getAllGeoTypes())); + self.assertEqual(NORM_QUAD4,subMesh.getAllGeoTypes()[0]); self.assertEqual(name,"Toto"); self.assertEqual(2,subMesh.getNumberOfCells()); subConn=[4,0,3,4,1,4,7,8,5,4]; @@ -402,9 +402,9 @@ class MEDCouplingBasicsTest(unittest.TestCase): subMesh=mesh.buildPartOfMySelf(tab2[0:3],True); self.assertTrue(isinstance(subMesh,MEDCouplingUMesh)); name=subMesh.getName(); - self.assertEqual(2,len(subMesh.getAllTypes())); - self.assertEqual(NORM_TRI3,subMesh.getAllTypes()[0]); - self.assertEqual(NORM_QUAD4,subMesh.getAllTypes()[1]); + self.assertEqual(2,len(subMesh.getAllGeoTypes())); + self.assertEqual(NORM_TRI3,subMesh.getAllGeoTypes()[0]); + self.assertEqual(NORM_QUAD4,subMesh.getAllGeoTypes()[1]); self.assertEqual(name,"Toto"); self.assertEqual(3,subMesh.getNumberOfCells()); subConn2=[4,0,3,4,1,3,4,5,2,4,6,7,4,3] @@ -426,8 +426,8 @@ class MEDCouplingBasicsTest(unittest.TestCase): tab1=[5,7,8,4] subMesh=mesh.buildPartOfMySelfNode(tab1[0:4],True); self.assertTrue(isinstance(subMesh,MEDCouplingUMesh)) - self.assertEqual(1,len(subMesh.getAllTypes())); - self.assertEqual(NORM_QUAD4,subMesh.getAllTypes()[0]); + self.assertEqual(1,len(subMesh.getAllGeoTypes())); + self.assertEqual(NORM_QUAD4,subMesh.getAllGeoTypes()[0]); self.assertEqual(1,subMesh.getNumberOfCells()); self.assertEqual(5,subMesh.getNodalConnectivity().getNbOfElems()); self.assertEqual(2,subMesh.getNodalConnectivityIndex().getNbOfElems()); @@ -442,9 +442,9 @@ class MEDCouplingBasicsTest(unittest.TestCase): subMesh=mesh.buildPartOfMySelfNode(ddd,False); self.assertEqual("ddd",subMesh.getName()) self.assertTrue(isinstance(subMesh,MEDCouplingUMesh)) - self.assertEqual(2,len(subMesh.getAllTypes())); - self.assertEqual(NORM_TRI3,subMesh.getAllTypes()[0]); - self.assertEqual(NORM_QUAD4,subMesh.getAllTypes()[1]); + self.assertEqual(2,len(subMesh.getAllGeoTypes())); + self.assertEqual(NORM_TRI3,subMesh.getAllGeoTypes()[0]); + self.assertEqual(NORM_QUAD4,subMesh.getAllGeoTypes()[1]); self.assertEqual(3,subMesh.getNumberOfCells()); self.assertEqual(14,subMesh.getNodalConnectivity().getNbOfElems()); self.assertEqual(4,subMesh.getNodalConnectivityIndex().getNbOfElems()); @@ -456,15 +456,15 @@ class MEDCouplingBasicsTest(unittest.TestCase): tab2=[0,3,2,1,4,5,6] subMesh=mesh.buildPartOfMySelfNode(tab2[0:7],True); self.assertTrue(isinstance(subMesh,MEDCouplingUMesh)) - self.assertEqual(2,len(subMesh.getAllTypes())); - self.assertEqual(NORM_TRI3,subMesh.getAllTypes()[0]); - self.assertEqual(NORM_QUAD4,subMesh.getAllTypes()[1]); + self.assertEqual(2,len(subMesh.getAllGeoTypes())); + self.assertEqual(NORM_TRI3,subMesh.getAllGeoTypes()[0]); + self.assertEqual(NORM_QUAD4,subMesh.getAllGeoTypes()[1]); self.assertEqual(3,subMesh.getNumberOfCells()); pass def testZipCoords(self): mesh=MEDCouplingDataForTest.build2DTargetMesh_1(); - self.assertEqual(2,len(mesh.getAllTypes())); + self.assertEqual(2,len(mesh.getAllGeoTypes())); self.assertEqual(2,mesh.getSpaceDimension()); self.assertEqual(9,mesh.getNumberOfNodes()); self.assertEqual(5,mesh.getNumberOfCells()); @@ -472,7 +472,7 @@ class MEDCouplingBasicsTest(unittest.TestCase): oldConnIndex=mesh.getNodalConnectivityIndex().getValues()[0:mesh.getNumberOfCells()+1] oldCoords=mesh.getCoords(); mesh.zipCoords(); - self.assertEqual(2,len(mesh.getAllTypes())); + self.assertEqual(2,len(mesh.getAllGeoTypes())); self.assertEqual(2,mesh.getSpaceDimension()); self.assertEqual(9,mesh.getNumberOfNodes()); self.assertEqual(5,mesh.getNumberOfCells()); @@ -486,7 +486,7 @@ class MEDCouplingBasicsTest(unittest.TestCase): traducer=subMesh.zipCoordsTraducer(); expectedTraducer=[0, 1, -1, 2, 3, 4, -1, 5, 6] self.assertEqual(expectedTraducer,list(traducer.getValues())); - self.assertEqual(NORM_QUAD4,subMesh.getAllTypes()[0]); + self.assertEqual(NORM_QUAD4,subMesh.getAllGeoTypes()[0]); self.assertEqual(2,subMesh.getNumberOfCells()); subConn=[4,0,2,3,1,4,5,6,4,3] subConnIndex=[0,5,10] @@ -498,7 +498,7 @@ class MEDCouplingBasicsTest(unittest.TestCase): # subMesh=mesh.buildPartOfMySelf(tab1,False); self.assertTrue(isinstance(subMesh,MEDCouplingUMesh)) - self.assertEqual(NORM_QUAD4,subMesh.getAllTypes()[0]); + self.assertEqual(NORM_QUAD4,subMesh.getAllGeoTypes()[0]); self.assertEqual(2,subMesh.getNumberOfCells()); self.assertEqual(7,subMesh.getNumberOfNodes()); self.assertEqual(10,subMesh.getNodalConnectivity().getNbOfElems()); @@ -2619,7 +2619,7 @@ class MEDCouplingBasicsTest(unittest.TestCase): def testConvertQuadraticCellsToLinear(self): mesh=MEDCouplingDataForTest.build2DTargetMesh_3(); mesh.checkCoherency(); - types=mesh.getAllTypes(); + types=mesh.getAllGeoTypes(); types.sort() self.assertEqual(5,len(types)); expected1=[NORM_POLYGON, NORM_TRI3, NORM_QUAD4, NORM_TRI6, NORM_QUAD8] @@ -2636,7 +2636,7 @@ class MEDCouplingBasicsTest(unittest.TestCase): f2=mesh.getMeasureField(False); self.assertTrue(f1.getArray().isEqual(f2.getArray(),1e-12)); self.assertEqual(48,mesh.getMeshLength()); - types2=mesh.getAllTypes(); + types2=mesh.getAllGeoTypes(); types2.sort() self.assertEqual(3,len(types2)); expected2=[NORM_POLYGON, NORM_TRI3, NORM_QUAD4] @@ -5195,7 +5195,7 @@ class MEDCouplingBasicsTest(unittest.TestCase): for i in xrange(7): self.assertAlmostEqual(expected1[i]*sqrt(2.),f.getIJ(i,0),10); pass - types=m.getAllTypes(); + types=m.getAllGeoTypes(); self.assertEqual([NORM_TRI3,NORM_POLYGON],types); # m=MEDCouplingDataForTest.build3DSurfTargetMesh_1(); @@ -5207,7 +5207,7 @@ class MEDCouplingBasicsTest(unittest.TestCase): self.assertEqual(expected2[i],da.getIJ(i,0)); pass m.checkCoherency(); - types=m.getAllTypes(); + types=m.getAllGeoTypes(); self.assertEqual([NORM_TRI3,NORM_POLYGON],types); self.assertEqual(7,m.getNumberOfCells()); self.assertEqual(NORM_TRI3,m.getTypeOfCell(0)); @@ -6630,7 +6630,7 @@ class MEDCouplingBasicsTest(unittest.TestCase): self.assertEqual(4,m.getNumberOfCells()); self.assertEqual(3,m.getSpaceDimension()); self.assertEqual(0,m.getMeshDimension()); - types1=m.getAllTypes(); + types1=m.getAllGeoTypes(); self.assertEqual([NORM_POINT1],types1); for i in xrange(4): conn=m.getNodeIdsOfCell(i); @@ -10150,14 +10150,14 @@ class MEDCouplingBasicsTest(unittest.TestCase): def testUMeshSetPartOfMySelf2(self): # resize with explicit ids list m=MEDCouplingDataForTest.build2DTargetMesh_1() - self.assertEqual([3,4],m.getAllTypes()) + self.assertEqual([3,4],m.getAllGeoTypes()) part=m[[0,3,4]] part.simplexize(0) part2=part[[1,2,5]] m[[0,3,4]]=part2 self.assertEqual([3,0,4,1,3,1,4,2,3,4,5,2,3,6,7,4,3,7,5,4],m.getNodalConnectivity().getValues()) self.assertEqual([0,4,8,12,16,20],m.getNodalConnectivityIndex().getValues()) - self.assertEqual([3],m.getAllTypes()) + self.assertEqual([3],m.getAllGeoTypes()) # no resize with explicit ids list m=MEDCouplingDataForTest.build2DTargetMesh_1() part=m[[0,3]] @@ -10165,14 +10165,14 @@ class MEDCouplingBasicsTest(unittest.TestCase): m[[3,4]]=part self.assertEqual([4,0,3,4,1,3,1,4,2,3,4,5,2,5,0,3,4,1,5,6,7,4,3],m.getNodalConnectivity().getValues()) self.assertEqual([0,5,9,13,18,23],m.getNodalConnectivityIndex().getValues()) - self.assertEqual([3,4,5],m.getAllTypes()) + self.assertEqual([3,4,5],m.getAllGeoTypes()) # resize with range ids m=MEDCouplingDataForTest.build2DTargetMesh_1() part=m[3:] m[1:3]=part self.assertEqual([4,0,3,4,1,4,6,7,4,3,4,7,8,5,4,4,6,7,4,3,4,7,8,5,4],m.getNodalConnectivity().getValues()) self.assertEqual([0,5,10,15,20,25],m.getNodalConnectivityIndex().getValues()) - self.assertEqual([4],m.getAllTypes()) + self.assertEqual([4],m.getAllGeoTypes()) # no resize with range ids m=MEDCouplingDataForTest.build2DTargetMesh_1() part=m[0::3] @@ -10180,7 +10180,7 @@ class MEDCouplingBasicsTest(unittest.TestCase): m[3:]=part self.assertEqual([4,0,3,4,1,3,1,4,2,3,4,5,2,5,0,3,4,1,5,6,7,4,3],m.getNodalConnectivity().getValues()) self.assertEqual([0,5,9,13,18,23],m.getNodalConnectivityIndex().getValues()) - self.assertEqual([3,4,5],m.getAllTypes()) + self.assertEqual([3,4,5],m.getAllGeoTypes()) # no resize with range ids negative direction m=MEDCouplingDataForTest.build2DTargetMesh_1() part=m[3::-3] @@ -10188,7 +10188,7 @@ class MEDCouplingBasicsTest(unittest.TestCase): m[:-3:-1]=part self.assertEqual([4,0,3,4,1,3,1,4,2,3,4,5,2,5,0,3,4,1,5,6,7,4,3],m.getNodalConnectivity().getValues()) self.assertEqual([0,5,9,13,18,23],m.getNodalConnectivityIndex().getValues()) - self.assertEqual([3,4,5],m.getAllTypes()) + self.assertEqual([3,4,5],m.getAllGeoTypes()) pass def testUnPolyze3(self): @@ -10208,7 +10208,7 @@ class MEDCouplingBasicsTest(unittest.TestCase): # m.unPolyze(); # - self.assertEqual([NORM_PENTA6],m.getAllTypes()) + self.assertEqual([NORM_PENTA6],m.getAllGeoTypes()) self.assertTrue(DataArrayInt([0,7]).isEqual(m.getNodalConnectivityIndex())) self.assertTrue(DataArrayInt([16,0,2,1,3,5,4]).isEqual(m.getNodalConnectivity())) # @@ -11884,7 +11884,7 @@ class MEDCouplingBasicsTest(unittest.TestCase): m.getNodalConnectivity().setIJ(87,0,21)# put again 21 as at the beginning # self.assertTrue(m.unPolyze()) - self.assertEqual([NORM_HEXGP12],m.getAllTypes()) + self.assertEqual([NORM_HEXGP12],m.getAllGeoTypes()) self.assertTrue(m.computeIsoBarycenterOfNodesPerCell().isEqual(dReference,1e-12)) m.getNodalConnectivity().setIJ(25,0,24) self.assertRaises(InterpKernelException,m.computeIsoBarycenterOfNodesPerCell) @@ -13334,7 +13334,7 @@ class MEDCouplingBasicsTest(unittest.TestCase): self.assertTrue(isinstance(mcpy0,MEDCouplingUMesh)) self.assertTrue(mcpy0.getNodalConnectivity().isEqual(DataArrayInt([31,3,2,8,9,31,1,0,6,7,-1,7,6,1,31,2,1,7,8,-1,2,1,-1,8,-1,7,31,5,4,10,11,-1,11,10,-1,5,31,4,3,9,10,-1,5,3,9]))) self.assertTrue(mcpy0.getNodalConnectivityIndex().isEqual(DataArrayInt([0,5,14,26,36,45]))) - self.assertEqual(mcpy0.getAllTypes(),[NORM_POLYHED]) + self.assertEqual(mcpy0.getAllGeoTypes(),[NORM_POLYHED]) mcpy0.checkCoherency() mcpy0.checkCoherency2() mcpy1=mcpy0.convertIntoSingleGeoTypeMesh() diff --git a/src/MEDCoupling_Swig/MEDCouplingCommon.i b/src/MEDCoupling_Swig/MEDCouplingCommon.i index 4362b1c8a..94f2be6aa 100644 --- a/src/MEDCoupling_Swig/MEDCouplingCommon.i +++ b/src/MEDCoupling_Swig/MEDCouplingCommon.i @@ -1723,15 +1723,6 @@ namespace ParaMEDMEM ret->incrRef(); return ret; } - PyObject *getAllTypes() const throw(INTERP_KERNEL::Exception) - { - std::set result=self->getAllTypes(); - std::set::const_iterator iL=result.begin(); - PyObject *res = PyList_New(result.size()); - for (int i=0;iL!=result.end(); i++, iL++) - PyList_SetItem(res,i,PyInt_FromLong(*iL)); - return res; - } static PyObject *ComputeSpreadZoneGraduallyFromSeed(PyObject *seed, const DataArrayInt *arrIn, const DataArrayInt *arrIndxIn, int nbOfDepthPeeling=-1) throw(INTERP_KERNEL::Exception) { diff --git a/src/ParaMEDMEMTest/ParaMEDMEMTest_MEDLoader.cxx b/src/ParaMEDMEMTest/ParaMEDMEMTest_MEDLoader.cxx index a0a80a4a8..267586db2 100644 --- a/src/ParaMEDMEMTest/ParaMEDMEMTest_MEDLoader.cxx +++ b/src/ParaMEDMEMTest/ParaMEDMEMTest_MEDLoader.cxx @@ -43,7 +43,7 @@ void ParaMEDMEMTest::testMEDLoaderRead1() CPPUNIT_ASSERT_EQUAL(3,mesh->getMeshDimension()); CPPUNIT_ASSERT_EQUAL(16,mesh->getNumberOfCells()); CPPUNIT_ASSERT_EQUAL(19,mesh->getNumberOfNodes()); - CPPUNIT_ASSERT_EQUAL(3,(int)mesh->getAllTypes().size()); + CPPUNIT_ASSERT_EQUAL(3,(int)mesh->getAllGeoTypes().size()); for(int i=0;i<12;i++) CPPUNIT_ASSERT_EQUAL(NORM_TETRA4,mesh->getTypeOfCell(i)); CPPUNIT_ASSERT_EQUAL(NORM_PYRA5,mesh->getTypeOfCell(12)); @@ -67,7 +67,7 @@ void ParaMEDMEMTest::testMEDLoaderRead1() CPPUNIT_ASSERT_EQUAL(3,mesh->getMeshDimension()); CPPUNIT_ASSERT_EQUAL(2,mesh->getNumberOfCells()); CPPUNIT_ASSERT_EQUAL(19,mesh->getNumberOfNodes()); - CPPUNIT_ASSERT_EQUAL(2,(int)mesh->getAllTypes().size()); + CPPUNIT_ASSERT_EQUAL(2,(int)mesh->getAllGeoTypes().size()); CPPUNIT_ASSERT_EQUAL(NORM_TETRA4,mesh->getTypeOfCell(0)); CPPUNIT_ASSERT_EQUAL(NORM_PYRA5,mesh->getTypeOfCell(1)); CPPUNIT_ASSERT_EQUAL((std::size_t)11,mesh->getNodalConnectivity()->getNbOfElems()); @@ -90,7 +90,7 @@ void ParaMEDMEMTest::testMEDLoaderRead1() CPPUNIT_ASSERT_EQUAL(3,mesh->getMeshDimension()); CPPUNIT_ASSERT_EQUAL(7,mesh->getNumberOfCells()); CPPUNIT_ASSERT_EQUAL(19,mesh->getNumberOfNodes()); - CPPUNIT_ASSERT_EQUAL(2,(int)mesh->getAllTypes().size()); + CPPUNIT_ASSERT_EQUAL(2,(int)mesh->getAllGeoTypes().size()); for(int i=0;i<6;i++) CPPUNIT_ASSERT_EQUAL(NORM_TETRA4,mesh->getTypeOfCell(i)); CPPUNIT_ASSERT_EQUAL(NORM_PYRA5,mesh->getTypeOfCell(6)); @@ -129,7 +129,7 @@ void ParaMEDMEMTest::testMEDLoaderRead1() CPPUNIT_ASSERT_EQUAL(3,constMesh->getMeshDimension()); CPPUNIT_ASSERT_EQUAL(16,constMesh->getNumberOfCells()); CPPUNIT_ASSERT_EQUAL(19,constMesh->getNumberOfNodes()); - CPPUNIT_ASSERT_EQUAL(3,(int)constMesh->getAllTypes().size()); + CPPUNIT_ASSERT_EQUAL(3,(int)constMesh->getAllGeoTypes().size()); for(int i=0;i<12;i++) CPPUNIT_ASSERT_EQUAL(NORM_TETRA4,constMesh->getTypeOfCell(i)); CPPUNIT_ASSERT_EQUAL(NORM_PYRA5,constMesh->getTypeOfCell(12)); @@ -158,7 +158,7 @@ void ParaMEDMEMTest::testMEDLoaderRead1() CPPUNIT_ASSERT_EQUAL(3,constMesh->getMeshDimension()); CPPUNIT_ASSERT_EQUAL(16,constMesh->getNumberOfCells()); CPPUNIT_ASSERT_EQUAL(19,constMesh->getNumberOfNodes()); - CPPUNIT_ASSERT_EQUAL(3,(int)constMesh->getAllTypes().size()); + CPPUNIT_ASSERT_EQUAL(3,(int)constMesh->getAllGeoTypes().size()); for(int i=0;i<12;i++) CPPUNIT_ASSERT_EQUAL(NORM_TETRA4,constMesh->getTypeOfCell(i)); CPPUNIT_ASSERT_EQUAL(NORM_PYRA5,constMesh->getTypeOfCell(12)); @@ -212,7 +212,7 @@ void ParaMEDMEMTest::testMEDLoaderRead1() CPPUNIT_ASSERT_EQUAL(3,constMesh->getMeshDimension()); CPPUNIT_ASSERT_EQUAL(16,constMesh->getNumberOfCells()); CPPUNIT_ASSERT_EQUAL(19,constMesh->getNumberOfNodes()); - CPPUNIT_ASSERT_EQUAL(3,(int)constMesh->getAllTypes().size()); + CPPUNIT_ASSERT_EQUAL(3,(int)constMesh->getAllGeoTypes().size()); for(int i=0;i<12;i++) CPPUNIT_ASSERT_EQUAL(NORM_TETRA4,constMesh->getTypeOfCell(i)); CPPUNIT_ASSERT_EQUAL(NORM_PYRA5,constMesh->getTypeOfCell(12)); @@ -240,7 +240,7 @@ void ParaMEDMEMTest::testMEDLoaderRead1() CPPUNIT_ASSERT_EQUAL(3,constMesh->getMeshDimension()); CPPUNIT_ASSERT_EQUAL(16,constMesh->getNumberOfCells()); CPPUNIT_ASSERT_EQUAL(19,constMesh->getNumberOfNodes()); - CPPUNIT_ASSERT_EQUAL(3,(int)constMesh->getAllTypes().size()); + CPPUNIT_ASSERT_EQUAL(3,(int)constMesh->getAllGeoTypes().size()); for(int i=0;i<12;i++) CPPUNIT_ASSERT_EQUAL(NORM_TETRA4,constMesh->getTypeOfCell(i)); CPPUNIT_ASSERT_EQUAL(NORM_PYRA5,constMesh->getTypeOfCell(12)); @@ -266,7 +266,7 @@ void ParaMEDMEMTest::testMEDLoaderPolygonRead() CPPUNIT_ASSERT_EQUAL(2,mesh->getMeshDimension()); CPPUNIT_ASSERT_EQUAL(538,mesh->getNumberOfCells()); CPPUNIT_ASSERT_EQUAL(579,mesh->getNumberOfNodes()); - CPPUNIT_ASSERT_EQUAL(2,(int)mesh->getAllTypes().size()); + CPPUNIT_ASSERT_EQUAL(2,(int)mesh->getAllGeoTypes().size()); for(int i=0;i<514;i++) CPPUNIT_ASSERT_EQUAL(NORM_QUAD4,mesh->getTypeOfCell(i)); for(int i=514;i<538;i++) @@ -300,7 +300,7 @@ void ParaMEDMEMTest::testMEDLoaderPolygonRead() CPPUNIT_ASSERT_EQUAL(2,constMesh->getMeshDimension()); CPPUNIT_ASSERT_EQUAL(538,constMesh->getNumberOfCells()); CPPUNIT_ASSERT_EQUAL(579,constMesh->getNumberOfNodes()); - CPPUNIT_ASSERT_EQUAL(2,(int)constMesh->getAllTypes().size()); + CPPUNIT_ASSERT_EQUAL(2,(int)constMesh->getAllGeoTypes().size()); for(int i=0;i<514;i++) CPPUNIT_ASSERT_EQUAL(NORM_QUAD4,constMesh->getTypeOfCell(i)); for(int i=514;i<538;i++) @@ -329,7 +329,7 @@ void ParaMEDMEMTest::testMEDLoaderPolyhedronRead() CPPUNIT_ASSERT_EQUAL(3,mesh->getMeshDimension()); CPPUNIT_ASSERT_EQUAL(3,mesh->getNumberOfCells()); CPPUNIT_ASSERT_EQUAL(19,mesh->getNumberOfNodes()); - CPPUNIT_ASSERT_EQUAL(2,(int)mesh->getAllTypes().size()); + CPPUNIT_ASSERT_EQUAL(2,(int)mesh->getAllGeoTypes().size()); CPPUNIT_ASSERT_EQUAL(NORM_TETRA4,mesh->getTypeOfCell(0)); CPPUNIT_ASSERT_EQUAL(NORM_POLYHED,mesh->getTypeOfCell(1)); CPPUNIT_ASSERT_EQUAL(NORM_POLYHED,mesh->getTypeOfCell(2)); @@ -345,7 +345,7 @@ void ParaMEDMEMTest::testMEDLoaderPolyhedronRead() CPPUNIT_ASSERT_EQUAL(2,mesh->getMeshDimension()); CPPUNIT_ASSERT_EQUAL(17,mesh->getNumberOfCells()); CPPUNIT_ASSERT_EQUAL(19,mesh->getNumberOfNodes()); - CPPUNIT_ASSERT_EQUAL(3,(int)mesh->getAllTypes().size()); + CPPUNIT_ASSERT_EQUAL(3,(int)mesh->getAllGeoTypes().size()); CPPUNIT_ASSERT_EQUAL(NORM_POLYGON,mesh->getTypeOfCell(0)); CPPUNIT_ASSERT_EQUAL(NORM_QUAD4,mesh->getTypeOfCell(1)); CPPUNIT_ASSERT_EQUAL(NORM_QUAD4,mesh->getTypeOfCell(2)); @@ -382,7 +382,7 @@ void ParaMEDMEMTest::testMEDLoaderPolyhedronRead() CPPUNIT_ASSERT_EQUAL(2,mesh->getMeshDimension()); CPPUNIT_ASSERT_EQUAL(3,mesh->getNumberOfCells()); CPPUNIT_ASSERT_EQUAL(19,mesh->getNumberOfNodes()); - CPPUNIT_ASSERT_EQUAL(1,(int)mesh->getAllTypes().size()); + CPPUNIT_ASSERT_EQUAL(1,(int)mesh->getAllGeoTypes().size()); for(int i=0;i<3;i++) CPPUNIT_ASSERT_EQUAL(NORM_POLYGON,mesh->getTypeOfCell(i)); CPPUNIT_ASSERT_EQUAL((std::size_t)19,mesh->getNodalConnectivity()->getNbOfElems()); @@ -394,6 +394,6 @@ void ParaMEDMEMTest::testMEDLoaderPolyhedronRead() CPPUNIT_ASSERT_EQUAL(0,mesh->getNumberOfCells()); CPPUNIT_ASSERT_EQUAL(19,mesh->getNumberOfNodes()); CPPUNIT_ASSERT_EQUAL(3,mesh->getMeshDimension()); - CPPUNIT_ASSERT_EQUAL(0,(int)mesh->getAllTypes().size()); + CPPUNIT_ASSERT_EQUAL(0,(int)mesh->getAllGeoTypes().size()); mesh->decrRef(); }