{
MEDCouplingUMesh *mesh=build2DTargetMesh_3();
mesh->checkCoherency();
- const std::set<INTERP_KERNEL::NormalizedCellType>& types=mesh->getAllTypes();
+ std::set<INTERP_KERNEL::NormalizedCellType> 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<INTERP_KERNEL::NormalizedCellType> expected1Bis(expected1,expected1+5);
MEDCouplingFieldDouble *f2=mesh->getMeasureField(false);
CPPUNIT_ASSERT(f1->getArray()->isEqual(*f2->getArray(),1e-12));
CPPUNIT_ASSERT_EQUAL(48,mesh->getMeshLength());
- const std::set<INTERP_KERNEL::NormalizedCellType>& types2=mesh->getAllTypes();
- CPPUNIT_ASSERT_EQUAL(3,(int)types.size());
+ std::set<INTERP_KERNEL::NormalizedCellType> 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<INTERP_KERNEL::NormalizedCellType> expected2Bis(expected2,expected2+3);
CPPUNIT_ASSERT(expected2Bis==types2);
CPPUNIT_ASSERT_DOUBLES_EQUAL(5.6,f2->getIJ(i,0),1e-13);
f2->decrRef();
//
+ DataArrayInt *d2I=0;
+ DataArrayDouble *d2=array->maxPerTupleWithCompoId(d2I);
+ CPPUNIT_ASSERT_EQUAL(1,d2->getNumberOfComponents());
+ CPPUNIT_ASSERT_EQUAL(5,d2->getNumberOfTuples());
+ const int expected2[5]={4,3,2,0,1};
+ for(int i=0;i<5;i++)
+ {
+ CPPUNIT_ASSERT_DOUBLES_EQUAL(5.6,d2->getIJ(i,0),1e-13);
+ CPPUNIT_ASSERT_EQUAL(expected2[i],d2I->getIJ(i,0));
+ }
+ d2->decrRef(); d2I->decrRef();
+ //
mesh1->decrRef();
f1->decrRef();
}