From: Anthony Geay Date: Tue, 27 Dec 2016 10:07:13 +0000 (+0100) Subject: number of tuples and components are now std::size_t no more int. X-Git-Tag: V8_3_0a2~45 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=1327e26c56f6f295388a4d742b08c3d4e1b894d4;p=tools%2Fmedcoupling.git number of tuples and components are now std::size_t no more int. --- diff --git a/src/MEDCoupling/MEDCouplingFieldDouble.cxx b/src/MEDCoupling/MEDCouplingFieldDouble.cxx index 0ca5c3476..0a7f2f8f7 100644 --- a/src/MEDCoupling/MEDCouplingFieldDouble.cxx +++ b/src/MEDCoupling/MEDCouplingFieldDouble.cxx @@ -1635,7 +1635,7 @@ void MEDCouplingFieldDouble::applyFuncFast64(const std::string& func) * \return int - the number of components in the data array. * \throw If the data array is not set. */ -int MEDCouplingFieldDouble::getNumberOfComponents() const +std::size_t MEDCouplingFieldDouble::getNumberOfComponents() const { if(getArray()==0) throw INTERP_KERNEL::Exception("MEDCouplingFieldDouble::getNumberOfComponents : No array specified !"); @@ -1666,7 +1666,7 @@ int MEDCouplingFieldDouble::getNumberOfComponents() const * \throw If the spatial discretization is not fully defined. * \sa MEDCouplingField::getNumberOfTuplesExpected */ -int MEDCouplingFieldDouble::getNumberOfTuples() const +std::size_t MEDCouplingFieldDouble::getNumberOfTuples() const { //std::cerr << " ******* MEDCouplingFieldDouble::getNumberOfTuples is deprecated : use MEDCouplingField::getNumberOfTuplesExpected instead ! ******" << std::endl; if(!_mesh) @@ -1683,7 +1683,7 @@ int MEDCouplingFieldDouble::getNumberOfTuples() const * data array. * \throw If the data array is not set. */ -int MEDCouplingFieldDouble::getNumberOfValues() const +std::size_t MEDCouplingFieldDouble::getNumberOfValues() const { if(getArray()==0) throw INTERP_KERNEL::Exception("MEDCouplingFieldDouble::getNumberOfValues : No array specified !"); diff --git a/src/MEDCoupling/MEDCouplingFieldDouble.hxx b/src/MEDCoupling/MEDCouplingFieldDouble.hxx index 4012646c4..6f37b2359 100644 --- a/src/MEDCoupling/MEDCouplingFieldDouble.hxx +++ b/src/MEDCoupling/MEDCouplingFieldDouble.hxx @@ -91,9 +91,9 @@ namespace MEDCoupling MEDCOUPLING_EXPORT void applyFunc(const std::string& func); MEDCOUPLING_EXPORT void applyFuncFast32(const std::string& func); MEDCOUPLING_EXPORT void applyFuncFast64(const std::string& func); - MEDCOUPLING_EXPORT int getNumberOfComponents() const; - MEDCOUPLING_EXPORT int getNumberOfTuples() const; - MEDCOUPLING_EXPORT int getNumberOfValues() const; + MEDCOUPLING_EXPORT std::size_t getNumberOfComponents() const; + MEDCOUPLING_EXPORT std::size_t getNumberOfTuples() const; + MEDCOUPLING_EXPORT std::size_t getNumberOfValues() const; MEDCOUPLING_EXPORT void updateTime() const; MEDCOUPLING_EXPORT std::size_t getHeapMemorySizeWithoutChildren() const; MEDCOUPLING_EXPORT std::vector getDirectChildrenWithNull() const; diff --git a/src/MEDCoupling/MEDCouplingMemArray.hxx b/src/MEDCoupling/MEDCouplingMemArray.hxx index 991673bf9..c7f22da9c 100644 --- a/src/MEDCoupling/MEDCouplingMemArray.hxx +++ b/src/MEDCoupling/MEDCouplingMemArray.hxx @@ -146,7 +146,7 @@ namespace MEDCoupling MEDCOUPLING_EXPORT std::string getVarOnComponent(int i) const; MEDCOUPLING_EXPORT std::string getUnitOnComponent(int i) const; MEDCOUPLING_EXPORT void setInfoOnComponent(int i, const std::string& info); - MEDCOUPLING_EXPORT int getNumberOfComponents() const { return (int)_info_on_compo.size(); } + MEDCOUPLING_EXPORT std::size_t getNumberOfComponents() const { return _info_on_compo.size(); } MEDCOUPLING_EXPORT void setPartOfValuesBase3(const DataArray *aBase, const int *bgTuples, const int *endTuples, int bgComp, int endComp, int stepComp, bool strictCompoCompare=true); MEDCOUPLING_EXPORT virtual DataArray *deepCopy() const = 0; MEDCOUPLING_EXPORT virtual DataArray *buildNewEmptyInstance() const = 0; @@ -156,8 +156,8 @@ namespace MEDCoupling MEDCOUPLING_EXPORT virtual int getNumberOfTuples() const = 0; MEDCOUPLING_EXPORT virtual std::size_t getNbOfElems() const = 0; MEDCOUPLING_EXPORT virtual std::size_t getNbOfElemAllocated() const = 0; - MEDCOUPLING_EXPORT virtual void alloc(int nbOfTuple, int nbOfCompo=1) = 0; - MEDCOUPLING_EXPORT virtual void reAlloc(int newNbOfTuple) = 0; + MEDCOUPLING_EXPORT virtual void alloc(std::size_t nbOfTuple, std::size_t nbOfCompo=1) = 0; + MEDCOUPLING_EXPORT virtual void reAlloc(std::size_t newNbOfTuple) = 0; MEDCOUPLING_EXPORT virtual void renumberInPlace(const int *old2New) = 0; MEDCOUPLING_EXPORT virtual void renumberInPlaceR(const int *new2Old) = 0; MEDCOUPLING_EXPORT virtual void setContigPartOfSelectedValues(int tupleIdStart, const DataArray *aBase, const DataArrayInt *tuplesSelec) = 0; @@ -218,7 +218,7 @@ namespace MEDCoupling MEDCOUPLING_EXPORT const T *getConstPointer() const { return _mem.getConstPointer(); } MEDCOUPLING_EXPORT const T *begin() const { return getConstPointer(); } MEDCOUPLING_EXPORT const T *end() const { return getConstPointer()+getNbOfElems(); } - void alloc(int nbOfTuple, int nbOfCompo=1); + void alloc(std::size_t nbOfTuple, std::size_t nbOfCompo=1); void useArray(const T *array, bool ownership, DeallocType type, int nbOfTuple, int nbOfCompo); void useExternalArrayWithRWAccess(const T *array, int nbOfTuple, int nbOfCompo); T getIJSafe(int tupleId, int compoId) const; @@ -243,7 +243,7 @@ namespace MEDCoupling void deepCopyFrom(const DataArrayTemplate& other); void reverse(); void fillWithValue(T val); - void reAlloc(int newNbOfTuple); + void reAlloc(std::size_t newNbOfTuple); void renumberInPlace(const int *old2New); void renumberInPlaceR(const int *new2Old); void sort(bool asc=true); diff --git a/src/MEDCoupling/MEDCouplingMemArray.txx b/src/MEDCoupling/MEDCouplingMemArray.txx index 9ea54b20e..16ba939e2 100644 --- a/src/MEDCoupling/MEDCouplingMemArray.txx +++ b/src/MEDCoupling/MEDCouplingMemArray.txx @@ -511,15 +511,10 @@ namespace MEDCoupling * \throw If \a nbOfTuple < 0 or \a nbOfCompo < 0. */ template - void DataArrayTemplate::alloc(int nbOfTuple, int nbOfCompo) + void DataArrayTemplate::alloc(std::size_t nbOfTuple, std::size_t nbOfCompo) { - if(nbOfTuple<0 || nbOfCompo<0) - { - std::ostringstream oss; oss << Traits::ArrayTypeName << "::alloc : request for negative length of data !"; - throw INTERP_KERNEL::Exception(oss.str().c_str()); - } _info_on_compo.resize(nbOfCompo); - _mem.alloc(nbOfCompo*(std::size_t)nbOfTuple); + _mem.alloc(nbOfCompo*nbOfTuple); declareAsNew(); } @@ -812,15 +807,10 @@ namespace MEDCoupling * \throw If \a nbOfTuples is negative. */ template - void DataArrayTemplate::reAlloc(int nbOfTuples) + void DataArrayTemplate::reAlloc(std::size_t nbOfTuples) { - if(nbOfTuples<0) - { - std::ostringstream oss; oss << Traits::ArrayTypeName << "::reAlloc : input new number of tuples should be >=0 !"; - throw INTERP_KERNEL::Exception(oss.str().c_str()); - } checkAllocated(); - _mem.reAlloc(getNumberOfComponents()*(std::size_t)nbOfTuples); + _mem.reAlloc(getNumberOfComponents()*nbOfTuples); declareAsNew(); } diff --git a/src/MEDCoupling/MEDCouplingStructuredMesh.cxx b/src/MEDCoupling/MEDCouplingStructuredMesh.cxx index de85a9df7..ab70da60d 100644 --- a/src/MEDCoupling/MEDCouplingStructuredMesh.cxx +++ b/src/MEDCoupling/MEDCouplingStructuredMesh.cxx @@ -411,10 +411,8 @@ MEDCouplingUMesh *MEDCouplingStructuredMesh::buildUnstructured() const */ MEDCouplingMesh *MEDCouplingStructuredMesh::buildPart(const int *start, const int *end) const { - MEDCouplingUMesh *um=buildUnstructured(); - MEDCouplingMesh *ret=um->buildPart(start,end); - um->decrRef(); - return ret; + MCAuto um(buildUnstructured()); + return um->buildPart(start,end); } MEDCouplingMesh *MEDCouplingStructuredMesh::buildPartAndReduceNodes(const int *start, const int *end, DataArrayInt*& arr) const @@ -437,10 +435,8 @@ MEDCouplingMesh *MEDCouplingStructuredMesh::buildPartAndReduceNodes(const int *s } else { - MEDCouplingUMesh *um=buildUnstructured(); - MEDCouplingMesh *ret=um->buildPartAndReduceNodes(start,end,arr); - um->decrRef(); - return ret; + MCAuto um(buildUnstructured()); + return um->buildPartAndReduceNodes(start,end,arr); } } @@ -461,17 +457,16 @@ MEDCouplingFieldDouble *MEDCouplingStructuredMesh::buildOrthogonalField() const { if(getMeshDimension()!=2) throw INTERP_KERNEL::Exception("Expected a MEDCouplingStructuredMesh with meshDim == 2 !"); - MEDCouplingFieldDouble *ret=MEDCouplingFieldDouble::New(ON_CELLS,NO_TIME); - DataArrayDouble *array=DataArrayDouble::New(); - int nbOfCells=getNumberOfCells(); + MCAuto ret(MEDCouplingFieldDouble::New(ON_CELLS,NO_TIME)); + MCAuto array(DataArrayDouble::New()); + int nbOfCells(getNumberOfCells()); array->alloc(nbOfCells,3); - double *vals=array->getPointer(); + double *vals(array->getPointer()); for(int i=0;isetArray(array); - array->decrRef(); ret->setMesh(this); - return ret; + return ret.retn(); } void MEDCouplingStructuredMesh::getReverseNodalConnectivity(DataArrayInt *revNodal, DataArrayInt *revNodalIndx) const @@ -970,11 +965,11 @@ std::vector< std::vector > MEDCouplingStructuredMesh::ComputeSignaturePerAx DataArrayInt *MEDCouplingStructuredMesh::Build1GTNodalConnectivity1D(const int *nodeStBg) { - int nbOfCells(*nodeStBg-1); + std::size_t nbOfCells(*nodeStBg-1); MCAuto conn(DataArrayInt::New()); conn->alloc(2*nbOfCells,1); int *cp=conn->getPointer(); - for(int i=0;i conn(DataArrayInt::New()); conn->alloc(4*n1*n2,1); - int *cp=conn->getPointer(); - int pos=0; + int *cp(conn->getPointer()); + std::size_t pos(0); for(int j=0;j conn(DataArrayInt::New()); conn->alloc(8*n1*n2*n3,1); - int *cp=conn->getPointer(); - int pos=0; + int *cp(conn->getPointer()); + std::size_t pos(0); for(int k=0;kgetPointer(); const int arr1Ref[14]={0,10,1,11,2,12,3,13,4,14,5,15,6,16}; std::copy(arr1Ref,arr1Ref+14,tmp); - CPPUNIT_ASSERT_EQUAL(7,arr1->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(2,arr1->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(7,(int)arr1->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(2,(int)arr1->getNumberOfComponents()); CPPUNIT_ASSERT(std::equal(arr1Ref,arr1Ref+14,arr1->getConstPointer())); DataArrayInt *arr2=arr1->subArray(3); - CPPUNIT_ASSERT_EQUAL(4,arr2->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(2,arr2->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(4,(int)arr2->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(2,(int)arr2->getNumberOfComponents()); CPPUNIT_ASSERT(std::equal(arr1Ref+6,arr1Ref+14,arr2->getConstPointer())); arr2->decrRef(); DataArrayInt *arr3=arr1->subArray(2,5); - CPPUNIT_ASSERT_EQUAL(3,arr3->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(2,arr3->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(3,(int)arr3->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(2,(int)arr3->getNumberOfComponents()); CPPUNIT_ASSERT(std::equal(arr1Ref+4,arr1Ref+10,arr3->getConstPointer())); arr1->decrRef(); arr3->decrRef(); @@ -108,17 +108,17 @@ void MEDCouplingBasicsTest1::testArray3() double *tmp2=arr4->getPointer(); const double arr4Ref[14]={0.8,10.8,1.9,11.9,2.1,12.1,3.2,13.2,4.3,14.3,5.4,15.4,6.5,16.5}; std::copy(arr4Ref,arr4Ref+14,tmp2); - CPPUNIT_ASSERT_EQUAL(7,arr4->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(2,arr4->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(7,(int)arr4->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(2,(int)arr4->getNumberOfComponents()); CPPUNIT_ASSERT(std::equal(arr4Ref,arr4Ref+14,arr4->getConstPointer())); DataArrayDouble *arr5=arr4->subArray(3); - CPPUNIT_ASSERT_EQUAL(4,arr5->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(2,arr5->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(4,(int)arr5->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(2,(int)arr5->getNumberOfComponents()); CPPUNIT_ASSERT(std::equal(arr4Ref+6,arr4Ref+14,arr5->getConstPointer())); arr5->decrRef(); DataArrayDouble *arr6=arr4->subArray(2,5); - CPPUNIT_ASSERT_EQUAL(3,arr6->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(2,arr6->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(3,(int)arr6->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(2,(int)arr6->getNumberOfComponents()); CPPUNIT_ASSERT(std::equal(arr4Ref+4,arr4Ref+10,arr6->getConstPointer())); arr4->decrRef(); arr6->decrRef(); @@ -250,8 +250,8 @@ void MEDCouplingBasicsTest1::testMesh() MEDCouplingFieldDouble *fieldOnCells2=fieldOnCells->clone(false); CPPUNIT_ASSERT(fieldOnCells2!=fieldOnCells); fieldOnCells2->checkConsistencyLight(); - CPPUNIT_ASSERT_EQUAL(nbOfCells,fieldOnCells2->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(9,fieldOnCells2->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(nbOfCells,(int)fieldOnCells2->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(9,(int)fieldOnCells2->getNumberOfComponents()); CPPUNIT_ASSERT(fieldOnCells2->getArray()==fieldOnCells->getArray()); CPPUNIT_ASSERT_DOUBLES_EQUAL(7.,fieldOnCells2->getArray()->getIJ(3,7),1e-14); CPPUNIT_ASSERT(fieldOnCells2->getMesh()==fieldOnCells->getMesh()); @@ -259,8 +259,8 @@ void MEDCouplingBasicsTest1::testMesh() MEDCouplingFieldDouble *fieldOnCells3=fieldOnCells->clone(true); CPPUNIT_ASSERT(fieldOnCells3!=fieldOnCells); fieldOnCells3->checkConsistencyLight(); - CPPUNIT_ASSERT_EQUAL(nbOfCells,fieldOnCells3->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(9,fieldOnCells3->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(nbOfCells,(int)fieldOnCells3->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(9,(int)fieldOnCells3->getNumberOfComponents()); CPPUNIT_ASSERT(fieldOnCells3->getArray()!=fieldOnCells->getArray()); CPPUNIT_ASSERT_DOUBLES_EQUAL(7.,fieldOnCells3->getArray()->getIJ(3,7),1e-14); CPPUNIT_ASSERT(fieldOnCells3->getMesh()==fieldOnCells->getMesh()); @@ -392,7 +392,7 @@ void MEDCouplingBasicsTest1::testConvertToPolyTypes() mesh->convertToPolyTypes(&eltsV[0],&eltsV[0]+eltsV.size()); mesh->checkConsistencyLight(); CPPUNIT_ASSERT_EQUAL(5,mesh->getNumberOfCells()); - CPPUNIT_ASSERT_EQUAL(23,mesh->getNodalConnectivity()->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(23,(int)mesh->getNodalConnectivity()->getNumberOfTuples()); const int *pt=mesh->getNodalConnectivity()->getConstPointer(); const int expected1[23]={4, 0, 3, 4, 1, 5, 1, 4, 2, 3, 4, 5, 2, 5, 6, 7, 4, 3, 4, 7, 8, 5, 4}; CPPUNIT_ASSERT(std::equal(expected1,expected1+23,pt)); @@ -403,11 +403,11 @@ void MEDCouplingBasicsTest1::testConvertToPolyTypes() mesh->convertToPolyTypes(&eltsV[0],&eltsV[0]+eltsV.size()); mesh->checkConsistencyLight(); CPPUNIT_ASSERT_EQUAL(8,mesh->getNumberOfCells()); - CPPUNIT_ASSERT_EQUAL(114,mesh->getNodalConnectivity()->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(114,(int)mesh->getNodalConnectivity()->getNumberOfTuples()); mesh->convertToPolyTypes(&eltsV[0],&eltsV[0]+eltsV.size()); mesh->checkConsistencyLight(); CPPUNIT_ASSERT_EQUAL(8,mesh->getNumberOfCells()); - CPPUNIT_ASSERT_EQUAL(114,mesh->getNodalConnectivity()->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(114,(int)mesh->getNodalConnectivity()->getNumberOfTuples()); // mesh->decrRef(); } @@ -424,10 +424,10 @@ void MEDCouplingBasicsTest1::testDescConn2D() mesh2->checkConsistencyLight(); CPPUNIT_ASSERT_EQUAL(1,mesh2->getMeshDimension()); CPPUNIT_ASSERT_EQUAL(13,mesh2->getNumberOfCells()); - CPPUNIT_ASSERT_EQUAL((std::size_t)14,revDescIndx->getNbOfElems()); CPPUNIT_ASSERT_EQUAL(14,revDescIndx->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL((std::size_t)6,descIndx->getNbOfElems()); CPPUNIT_ASSERT_EQUAL(6,descIndx->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL((std::size_t)18,desc->getNbOfElems()); CPPUNIT_ASSERT_EQUAL(18,desc->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL((std::size_t)18,revDesc->getNbOfElems()); CPPUNIT_ASSERT_EQUAL(18,revDesc->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL((std::size_t)14,revDescIndx->getNbOfElems()); CPPUNIT_ASSERT_EQUAL(14,(int)revDescIndx->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL((std::size_t)6,descIndx->getNbOfElems()); CPPUNIT_ASSERT_EQUAL(6,(int)descIndx->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL((std::size_t)18,desc->getNbOfElems()); CPPUNIT_ASSERT_EQUAL(18,(int)desc->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL((std::size_t)18,revDesc->getNbOfElems()); CPPUNIT_ASSERT_EQUAL(18,(int)revDesc->getNumberOfTuples()); const int expected1[18]={0,1,2,3, 2,4,5, 6,7,4, 8,9,1,10, 11,12,6,9}; CPPUNIT_ASSERT(std::equal(expected1,expected1+18,desc->getConstPointer())); const int expected2[6]={0,4,7,10,14,18}; @@ -463,10 +463,10 @@ void MEDCouplingBasicsTest1::testDescConn2D() mesh2->checkConsistencyLight(); CPPUNIT_ASSERT_EQUAL(1,mesh2->getMeshDimension()); CPPUNIT_ASSERT_EQUAL(13,mesh2->getNumberOfCells()); - CPPUNIT_ASSERT_EQUAL((std::size_t)14,revDescIndx->getNbOfElems()); CPPUNIT_ASSERT_EQUAL(14,revDescIndx->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL((std::size_t)6,descIndx->getNbOfElems()); CPPUNIT_ASSERT_EQUAL(6,descIndx->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL((std::size_t)18,desc->getNbOfElems()); CPPUNIT_ASSERT_EQUAL(18,desc->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL((std::size_t)18,revDesc->getNbOfElems()); CPPUNIT_ASSERT_EQUAL(18,revDesc->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL((std::size_t)14,revDescIndx->getNbOfElems()); CPPUNIT_ASSERT_EQUAL(14,(int)revDescIndx->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL((std::size_t)6,descIndx->getNbOfElems()); CPPUNIT_ASSERT_EQUAL(6,(int)descIndx->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL((std::size_t)18,desc->getNbOfElems()); CPPUNIT_ASSERT_EQUAL(18,(int)desc->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL((std::size_t)18,revDesc->getNbOfElems()); CPPUNIT_ASSERT_EQUAL(18,(int)revDesc->getNumberOfTuples()); CPPUNIT_ASSERT(std::equal(expected1,expected1+18,desc->getConstPointer())); CPPUNIT_ASSERT(std::equal(expected2,expected2+6,descIndx->getConstPointer())); CPPUNIT_ASSERT(std::equal(expected3,expected3+14,revDescIndx->getConstPointer())); @@ -496,10 +496,10 @@ void MEDCouplingBasicsTest1::testDescConn3D() mesh2->checkConsistencyLight(); CPPUNIT_ASSERT_EQUAL(2,mesh2->getMeshDimension()); CPPUNIT_ASSERT_EQUAL(36,mesh2->getNumberOfCells()); - CPPUNIT_ASSERT_EQUAL((std::size_t)37,revDescIndx->getNbOfElems()); CPPUNIT_ASSERT_EQUAL(37,revDescIndx->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL((std::size_t)9,descIndx->getNbOfElems()); CPPUNIT_ASSERT_EQUAL(9,descIndx->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL((std::size_t)48,desc->getNbOfElems()); CPPUNIT_ASSERT_EQUAL(48,desc->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL((std::size_t)48,revDesc->getNbOfElems()); CPPUNIT_ASSERT_EQUAL(48,revDesc->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL((std::size_t)37,revDescIndx->getNbOfElems()); CPPUNIT_ASSERT_EQUAL(37,(int)revDescIndx->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL((std::size_t)9,descIndx->getNbOfElems()); CPPUNIT_ASSERT_EQUAL(9,(int)descIndx->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL((std::size_t)48,desc->getNbOfElems()); CPPUNIT_ASSERT_EQUAL(48,(int)desc->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL((std::size_t)48,revDesc->getNbOfElems()); CPPUNIT_ASSERT_EQUAL(48,(int)revDesc->getNumberOfTuples()); const int expected1[9]={0, 6, 12, 18, 24, 30, 36, 42, 48}; const int expected2[48]={0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 3, 11, 12, 4, 13, 14, 15, 16, 17, 10, 18, 19, 13, 1, 20, 21, 22, 23, 24, 7, 25, 26, 27, 28, 22, 12, 29, 23, 30, 31, 32, 17, 33, 28, 34, 35, 30}; const int expected3[37]={0, 1, 3, 4, 6, 8, 9, 10, 12, 13, 14, 16, 17, 19, 21, 22, 23, 24, 26, 27, 28, 29, 30, 32, 34, 35, 36, 37, 38, 40, 41, 43, 44, 45, 46, 47, 48}; @@ -539,10 +539,10 @@ void MEDCouplingBasicsTest1::testDescConn3D() mesh2->checkConsistencyLight(); CPPUNIT_ASSERT_EQUAL(2,mesh2->getMeshDimension()); CPPUNIT_ASSERT_EQUAL(36,mesh2->getNumberOfCells()); - CPPUNIT_ASSERT_EQUAL((std::size_t)37,revDescIndx->getNbOfElems()); CPPUNIT_ASSERT_EQUAL(37,revDescIndx->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL((std::size_t)9,descIndx->getNbOfElems()); CPPUNIT_ASSERT_EQUAL(9,descIndx->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL((std::size_t)48,desc->getNbOfElems()); CPPUNIT_ASSERT_EQUAL(48,desc->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL((std::size_t)48,revDesc->getNbOfElems()); CPPUNIT_ASSERT_EQUAL(48,revDesc->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL((std::size_t)37,revDescIndx->getNbOfElems()); CPPUNIT_ASSERT_EQUAL(37,(int)revDescIndx->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL((std::size_t)9,descIndx->getNbOfElems()); CPPUNIT_ASSERT_EQUAL(9,(int)descIndx->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL((std::size_t)48,desc->getNbOfElems()); CPPUNIT_ASSERT_EQUAL(48,(int)desc->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL((std::size_t)48,revDesc->getNbOfElems()); CPPUNIT_ASSERT_EQUAL(48,(int)revDesc->getNumberOfTuples()); CPPUNIT_ASSERT(std::equal(expected1,expected1+9,descIndx->getConstPointer())); CPPUNIT_ASSERT(std::equal(expected2,expected2+48,desc->getConstPointer())); CPPUNIT_ASSERT(std::equal(expected3,expected3+37,revDescIndx->getConstPointer())); @@ -562,8 +562,8 @@ void MEDCouplingBasicsTest1::testFindBoundaryNodes() { MEDCouplingUMesh *mesh=build3DTargetMesh_1(); DataArrayInt *boundaryNodes=mesh->findBoundaryNodes(); - CPPUNIT_ASSERT_EQUAL(26,boundaryNodes->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,boundaryNodes->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(26,(int)boundaryNodes->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)boundaryNodes->getNumberOfComponents()); const int expected1[26]={0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26}; CPPUNIT_ASSERT(std::equal(expected1,expected1+26,boundaryNodes->begin())); boundaryNodes->decrRef(); @@ -950,8 +950,8 @@ void MEDCouplingBasicsTest1::testBuildSubMeshData() MEDCouplingMesh *ret1=fieldCells->buildSubMeshData(elts,elts+3,di); CPPUNIT_ASSERT_EQUAL(3,ret1->getNumberOfCells()); CPPUNIT_ASSERT_EQUAL(9,ret1->getNumberOfNodes()); - CPPUNIT_ASSERT_EQUAL(3,di->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,di->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(3,(int)di->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)di->getNumberOfComponents()); const int *toCheck=di->getConstPointer(); CPPUNIT_ASSERT(std::equal(elts,elts+3,toCheck)); MEDCouplingUMesh *ret1DC=dynamic_cast(ret1); @@ -967,8 +967,8 @@ void MEDCouplingBasicsTest1::testBuildSubMeshData() CPPUNIT_ASSERT(ret2DC); CPPUNIT_ASSERT_EQUAL(3,ret2->getNumberOfCells()); CPPUNIT_ASSERT_EQUAL(6,ret2->getNumberOfNodes()); - CPPUNIT_ASSERT_EQUAL(6,di->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,di->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(6,(int)di->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)di->getNumberOfComponents()); toCheck=di->getConstPointer(); const int expected[6]={1,2,4,5,7,8}; CPPUNIT_ASSERT(std::equal(expected,expected+6,toCheck)); @@ -987,20 +987,20 @@ void MEDCouplingBasicsTest1::testExtrudedMesh1() CPPUNIT_ASSERT_EQUAL(60,ext->getNumberOfNodes()); DataArrayInt *ids3D=ext->getMesh3DIds(); const int ids3DExpected[18]={5,4,3,2,1,0, 11,10,9,8,7,6, 17,16,15,14,13,12}; - CPPUNIT_ASSERT_EQUAL(18,ids3D->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,ids3D->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(18,(int)ids3D->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)ids3D->getNumberOfComponents()); CPPUNIT_ASSERT(std::equal(ids3DExpected,ids3DExpected+18,ids3D->getConstPointer())); MEDCouplingUMesh *mesh1D=ext->getMesh1D(); CPPUNIT_ASSERT_EQUAL(4,mesh1D->getNumberOfNodes()); CPPUNIT_ASSERT_EQUAL(3,mesh1D->getNumberOfCells()); const double mesh1DExpected[12]={0.66666666666666663, 1.4583333333333333, 0, 0.66666666666666663, 1.4583333333333333, 1, 0.66666666666666663, 1.4583333333333333, 2, 0.66666666666666663, 1.4583333333333333, 3}; DataArrayDouble *mesh1DCoords=mesh1D->getCoords(); - CPPUNIT_ASSERT_EQUAL(4,mesh1DCoords->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(3,mesh1DCoords->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(4,(int)mesh1DCoords->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(3,(int)mesh1DCoords->getNumberOfComponents()); CPPUNIT_ASSERT(std::equal(mesh1DExpected,mesh1DExpected+12,mesh1DCoords->getConstPointer())); DataArrayInt *conn1D=mesh1D->getNodalConnectivity(); - CPPUNIT_ASSERT_EQUAL(9,conn1D->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,conn1D->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(9,(int)conn1D->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)conn1D->getNumberOfComponents()); const int conn1DExpected[9]={1,0,1,1,1,2,1,2,3}; CPPUNIT_ASSERT(std::equal(conn1DExpected,conn1DExpected+9,conn1D->getConstPointer())); ext->decrRef(); @@ -1152,8 +1152,8 @@ void MEDCouplingBasicsTest1::testExtrudedMesh4() CPPUNIT_ASSERT_EQUAL(INTERP_KERNEL::NORM_PENTA6,m4->getTypeOfCell(7)); MEDCouplingFieldDouble *f=m4->getMeasureField(true); DataArrayDouble *arr=f->getArray(); - CPPUNIT_ASSERT_EQUAL(15,arr->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,arr->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(15,(int)arr->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)arr->getNumberOfComponents()); const double *arrPtr=arr->getConstPointer(); const double expected2[15]={0.075,0.0375,0.0375,0.075,0.075, 0.1125,0.05625,0.05625,0.1125,0.1125, 0.0625,0.03125,0.03125,0.0625,0.0625}; for(int i=0;i<15;i++) @@ -1382,8 +1382,8 @@ void MEDCouplingBasicsTest1::testMergeField1() CPPUNIT_ASSERT(name=="MeasureOfMesh_"); CPPUNIT_ASSERT(f3->getTypeOfField()==ON_CELLS); CPPUNIT_ASSERT(f3->getTimeDiscretization()==ONE_TIME); - CPPUNIT_ASSERT_EQUAL(1,f3->getNumberOfComponents()); - CPPUNIT_ASSERT_EQUAL(7,f3->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)f3->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(7,(int)f3->getNumberOfTuples()); double values[7]={0.25,0.125,0.125,0.25,0.25,0.5,0.5}; const double *tmp=f3->getArray()->getConstPointer(); std::transform(tmp,tmp+7,values,values,std::minus()); @@ -1436,8 +1436,8 @@ void MEDCouplingBasicsTest1::testFillFromAnalytic() f1->checkConsistencyLight(); CPPUNIT_ASSERT(f1->getTypeOfField()==ON_CELLS); CPPUNIT_ASSERT(f1->getTimeDiscretization()==ONE_TIME); - CPPUNIT_ASSERT_EQUAL(1,f1->getNumberOfComponents()); - CPPUNIT_ASSERT_EQUAL(5,f1->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)f1->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(5,(int)f1->getNumberOfTuples()); double values1[5]={-0.1,0.23333333333333336,0.56666666666666665,0.4,0.9}; const double *tmp=f1->getArray()->getConstPointer(); std::transform(tmp,tmp+5,values1,values1,std::minus()); @@ -1450,8 +1450,8 @@ void MEDCouplingBasicsTest1::testFillFromAnalytic() f1->checkConsistencyLight(); CPPUNIT_ASSERT(f1->getTypeOfField()==ON_NODES); CPPUNIT_ASSERT(f1->getTimeDiscretization()==ONE_TIME); - CPPUNIT_ASSERT_EQUAL(1,f1->getNumberOfComponents()); - CPPUNIT_ASSERT_EQUAL(9,f1->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)f1->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(9,(int)f1->getNumberOfTuples()); double values2[9]={-0.6,-0.1,0.4,-0.1,0.4,0.9,0.4,0.9,1.4}; tmp=f1->getArray()->getConstPointer(); std::transform(tmp,tmp+9,values2,values2,std::minus()); @@ -1464,8 +1464,8 @@ void MEDCouplingBasicsTest1::testFillFromAnalytic() f1->checkConsistencyLight(); CPPUNIT_ASSERT(f1->getTypeOfField()==ON_NODES); CPPUNIT_ASSERT(f1->getTimeDiscretization()==ONE_TIME); - CPPUNIT_ASSERT_EQUAL(2,f1->getNumberOfComponents()); - CPPUNIT_ASSERT_EQUAL(9,f1->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(2,(int)f1->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(9,(int)f1->getNumberOfTuples()); double values3[18]={-0.6,-1.2,-0.1,-0.2,0.4,0.8,-0.1,-0.2,0.4,0.8,0.9,1.8,0.4,0.8,0.9,1.8,1.4,2.8}; tmp=f1->getArray()->getConstPointer(); std::transform(tmp,tmp+18,values3,values3,std::minus()); @@ -1493,8 +1493,8 @@ void MEDCouplingBasicsTest1::testFillFromAnalytic2() f1->checkConsistencyLight(); CPPUNIT_ASSERT(f1->getTypeOfField()==ON_CELLS); CPPUNIT_ASSERT(f1->getTimeDiscretization()==ONE_TIME); - CPPUNIT_ASSERT_EQUAL(1,f1->getNumberOfComponents()); - CPPUNIT_ASSERT_EQUAL(5,f1->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)f1->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(5,(int)f1->getNumberOfTuples()); double values1[5]={-0.1,0.23333333333333336,0.56666666666666665,0.4,0.9}; const double *tmp=f1->getArray()->getConstPointer(); std::transform(tmp,tmp+5,values1,values1,std::minus()); @@ -1507,8 +1507,8 @@ void MEDCouplingBasicsTest1::testFillFromAnalytic2() f1->checkConsistencyLight(); CPPUNIT_ASSERT(f1->getTypeOfField()==ON_NODES); CPPUNIT_ASSERT(f1->getTimeDiscretization()==ONE_TIME); - CPPUNIT_ASSERT_EQUAL(1,f1->getNumberOfComponents()); - CPPUNIT_ASSERT_EQUAL(9,f1->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)f1->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(9,(int)f1->getNumberOfTuples()); double values2[9]={-0.9,0.1,1.1,-0.4,0.6,1.6,0.1,1.1,2.1}; tmp=f1->getArray()->getConstPointer(); std::transform(tmp,tmp+9,values2,values2,std::minus()); @@ -1520,8 +1520,8 @@ void MEDCouplingBasicsTest1::testFillFromAnalytic2() f1->checkConsistencyLight(); CPPUNIT_ASSERT(f1->getTypeOfField()==ON_NODES); CPPUNIT_ASSERT(f1->getTimeDiscretization()==ONE_TIME); - CPPUNIT_ASSERT_EQUAL(1,f1->getNumberOfComponents()); - CPPUNIT_ASSERT_EQUAL(9,f1->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)f1->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(9,(int)f1->getNumberOfTuples()); tmp=f1->getArray()->getConstPointer(); double values2Bis[9]={-0.9,0.1,1.1,-0.4,0.6,1.6,0.1,1.1,2.1}; std::transform(tmp,tmp+9,values2Bis,values2Bis,std::minus()); @@ -1534,8 +1534,8 @@ void MEDCouplingBasicsTest1::testFillFromAnalytic2() f1->checkConsistencyLight(); CPPUNIT_ASSERT(f1->getTypeOfField()==ON_NODES); CPPUNIT_ASSERT(f1->getTimeDiscretization()==ONE_TIME); - CPPUNIT_ASSERT_EQUAL(2,f1->getNumberOfComponents()); - CPPUNIT_ASSERT_EQUAL(9,f1->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(2,(int)f1->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(9,(int)f1->getNumberOfTuples()); double values3[18]={-0.6,-1.2,-0.1,-0.2,0.4,0.8,-0.1,-0.2,0.4,0.8,0.9,1.8,0.4,0.8,0.9,1.8,1.4,2.8}; tmp=f1->getArray()->getConstPointer(); std::transform(tmp,tmp+18,values3,values3,std::minus()); @@ -1563,13 +1563,13 @@ void MEDCouplingBasicsTest1::testApplyFunc() f1->checkConsistencyLight(); CPPUNIT_ASSERT(f1->getTypeOfField()==ON_NODES); CPPUNIT_ASSERT(f1->getTimeDiscretization()==ONE_TIME); - CPPUNIT_ASSERT_EQUAL(2,f1->getNumberOfComponents()); - CPPUNIT_ASSERT_EQUAL(9,f1->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(2,(int)f1->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(9,(int)f1->getNumberOfTuples()); f1->applyFunc(1,func1); CPPUNIT_ASSERT(f1->getTypeOfField()==ON_NODES); CPPUNIT_ASSERT(f1->getTimeDiscretization()==ONE_TIME); - CPPUNIT_ASSERT_EQUAL(1,f1->getNumberOfComponents()); - CPPUNIT_ASSERT_EQUAL(9,f1->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)f1->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(9,(int)f1->getNumberOfTuples()); double values1[9]={-1.8,-0.3,1.2,-0.3,1.2,2.7,1.2,2.7,4.2}; const double *tmp=f1->getArray()->getConstPointer(); std::transform(tmp,tmp+9,values1,values1,std::minus()); @@ -1587,8 +1587,8 @@ void MEDCouplingBasicsTest1::testApplyFunc2() f1->checkConsistencyLight(); CPPUNIT_ASSERT(f1->getTypeOfField()==ON_NODES); CPPUNIT_ASSERT(f1->getTimeDiscretization()==ONE_TIME); - CPPUNIT_ASSERT_EQUAL(2,f1->getNumberOfComponents()); - CPPUNIT_ASSERT_EQUAL(9,f1->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(2,(int)f1->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(9,(int)f1->getNumberOfTuples()); // MEDCouplingFieldDouble *f2=f1->clone(true); CPPUNIT_ASSERT_THROW(f2->applyFunc(1,"a+b+c+d"),INTERP_KERNEL::Exception); @@ -1597,8 +1597,8 @@ void MEDCouplingBasicsTest1::testApplyFunc2() f2->applyFunc("abs(u)^2.4+2*u"); CPPUNIT_ASSERT(f1->getTypeOfField()==ON_NODES); CPPUNIT_ASSERT(f1->getTimeDiscretization()==ONE_TIME); - CPPUNIT_ASSERT_EQUAL(2,f1->getNumberOfComponents()); - CPPUNIT_ASSERT_EQUAL(9,f1->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(2,(int)f1->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(9,(int)f1->getNumberOfTuples()); double values2[18]={-0.9065304805418678, -0.85105859001709905, -0.19601892829446504, -0.37898777756476987, 0.91090317490482353, 2.1853504664669781, -0.19601892829446504, -0.37898777756476987, 0.91090317490482353, 2.1853504664669781, 2.5765725275664879, 7.6987743736515295, @@ -1614,8 +1614,8 @@ void MEDCouplingBasicsTest1::testApplyFunc2() f1->applyFunc(1,"x+y"); CPPUNIT_ASSERT(f1->getTypeOfField()==ON_NODES); CPPUNIT_ASSERT(f1->getTimeDiscretization()==ONE_TIME); - CPPUNIT_ASSERT_EQUAL(1,f1->getNumberOfComponents()); - CPPUNIT_ASSERT_EQUAL(9,f1->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)f1->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(9,(int)f1->getNumberOfTuples()); double values1[9]={-1.8,-0.3,1.2,-0.3,1.2,2.7,1.2,2.7,4.2}; tmp=f1->getArray()->getConstPointer(); std::transform(tmp,tmp+9,values1,values1,std::minus()); @@ -1744,8 +1744,8 @@ void MEDCouplingBasicsTest1::testOperationsOnFields2() const double expected1[9]={-2.4999999999999991, 1.2162162162162162, 0.77868852459016391, 0.7407407407407407, 1.129032258064516, 0.81632653061224492, 0.86538461538461531, 1.0919540229885056, 0.84302325581395343}; - CPPUNIT_ASSERT_EQUAL(1,f3->getNumberOfComponents()); - CPPUNIT_ASSERT_EQUAL(9,f3->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)f3->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(9,(int)f3->getNumberOfTuples()); const double *val=f3->getArray()->getConstPointer(); for(int i=0;i<9;i++) CPPUNIT_ASSERT_DOUBLES_EQUAL(expected1[i],val[i],1.e-12); @@ -1789,8 +1789,8 @@ void MEDCouplingBasicsTest1::testOperationsOnFields3() const double expected1[9]={-2.4999999999999991, 1.2162162162162162, 0.77868852459016391, 0.7407407407407407, 1.129032258064516, 0.81632653061224492, 0.86538461538461531, 1.0919540229885056, 0.84302325581395343}; - CPPUNIT_ASSERT_EQUAL(1,f1->getNumberOfComponents()); - CPPUNIT_ASSERT_EQUAL(9,f1->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)f1->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(9,(int)f1->getNumberOfTuples()); const double *val=f1->getArray()->getConstPointer(); for(int i=0;i<9;i++) CPPUNIT_ASSERT_DOUBLES_EQUAL(expected1[i],val[i],1.e-12); @@ -1956,14 +1956,14 @@ void MEDCouplingBasicsTest1::testCheckConsecutiveCellTypes() CPPUNIT_ASSERT(!targetMesh->checkConsecutiveCellTypesAndOrder(order1,order1+2)); CPPUNIT_ASSERT(!targetMesh->checkConsecutiveCellTypesAndOrder(order2,order2+2)); DataArrayInt *da=targetMesh->getRenumArrForConsecutiveCellTypesSpec(order1,order1+2); - CPPUNIT_ASSERT_EQUAL(5,da->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,da->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(5,(int)da->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)da->getNumberOfComponents()); const int expected1[5]={2,0,1,3,4}; CPPUNIT_ASSERT(std::equal(expected1,expected1+5,da->getConstPointer())); da->decrRef(); da=targetMesh->getRenumArrForConsecutiveCellTypesSpec(order2,order2+2); - CPPUNIT_ASSERT_EQUAL(5,da->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,da->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(5,(int)da->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)da->getNumberOfComponents()); const int expected2[5]={0,3,4,1,2}; CPPUNIT_ASSERT(std::equal(expected2,expected2+5,da->getConstPointer())); da->decrRef(); @@ -1984,18 +1984,18 @@ void MEDCouplingBasicsTest1::testRearrange2ConsecutiveCellTypes() MEDCouplingUMesh *m1_2=build2DSourceMesh_1(); CPPUNIT_ASSERT(m1_2->isEqual(m1_1,1e-12)); const int expected1[2]={0,1}; - CPPUNIT_ASSERT_EQUAL(2,arr1->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,arr1->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(2,(int)arr1->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)arr1->getNumberOfComponents()); CPPUNIT_ASSERT(std::equal(expected1,expected1+2,arr1->getConstPointer())); arr1->decrRef(); const int expected2[5]={0,3,4,1,2}; arr1=m2_1->rearrange2ConsecutiveCellTypes(); CPPUNIT_ASSERT_EQUAL(5,arr1->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,arr1->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(1,(int)arr1->getNumberOfComponents()); CPPUNIT_ASSERT(std::equal(expected2,expected2+5,arr1->getConstPointer())); MEDCouplingUMesh *m2_2=build2DTargetMesh_1(); CPPUNIT_ASSERT_EQUAL(5,arr1->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,arr1->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(1,(int)arr1->getNumberOfComponents()); CPPUNIT_ASSERT(std::equal(expected2,expected2+5,arr1->getConstPointer())); CPPUNIT_ASSERT(!m2_2->isEqual(m2_1,1e-12)); m2_2->renumberCells(expected2,false); @@ -2052,7 +2052,7 @@ void MEDCouplingBasicsTest1::testFuseUMeshesOnSameCoords() for(int i=0;i<3;i++) { DataArrayInt *arr=corr[i]; - CPPUNIT_ASSERT_EQUAL(1,arr->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(1,(int)arr->getNumberOfComponents()); int nbOfVals=expectedVals1[i]; CPPUNIT_ASSERT_EQUAL(nbOfVals,arr->getNumberOfTuples()); const int *vals=arr->getConstPointer(); @@ -2065,7 +2065,7 @@ void MEDCouplingBasicsTest1::testFuseUMeshesOnSameCoords() const int fidExp[4]={5,1,3,4}; const int fidsGrp[3][3]={{1,3,5},{3,4,5},{4,5,23344}}; CPPUNIT_ASSERT_EQUAL(3,(int)fidsOfGroups.size()); - CPPUNIT_ASSERT_EQUAL(1,arr2->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(1,(int)arr2->getNumberOfComponents()); CPPUNIT_ASSERT_EQUAL(4,arr2->getNumberOfTuples()); CPPUNIT_ASSERT(std::equal(fidExp,fidExp+4,arr2->getConstPointer())); for(int i=0;i<3;i++) @@ -2129,8 +2129,8 @@ void MEDCouplingBasicsTest1::testBuildOrthogonalField() MEDCouplingUMesh *targetMesh=build3DSurfTargetMesh_1(); MEDCouplingFieldDouble *field=targetMesh->buildOrthogonalField(); double expected[3]={0.70710678118654746,0.,-0.70710678118654746}; - CPPUNIT_ASSERT_EQUAL(5,field->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(3,field->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(5,(int)field->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(3,(int)field->getNumberOfComponents()); const double *vals=field->getArray()->getConstPointer(); for(int i=0;i<15;i++) CPPUNIT_ASSERT_DOUBLES_EQUAL(expected[i%3],vals[i],1e-12); @@ -2150,8 +2150,8 @@ void MEDCouplingBasicsTest1::testBuildOrthogonalField() targetMesh->setCoords(myCoords); myCoords->decrRef(); field=targetMesh->buildOrthogonalField(); - CPPUNIT_ASSERT_EQUAL(1,field->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(3,field->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(1,(int)field->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(3,(int)field->getNumberOfComponents()); vals=field->getArray()->getConstPointer(); CPPUNIT_ASSERT_DOUBLES_EQUAL(-0.70710678118654746,vals[0],1e-12); CPPUNIT_ASSERT_DOUBLES_EQUAL(0.,vals[1],1e-12); @@ -2301,8 +2301,8 @@ void MEDCouplingBasicsTest1::testCMesh0() coordsZ->decrRef(); // MEDCouplingFieldDouble *fieldOnNodes=mesh->fillFromAnalytic(ON_NODES,1,"x+y/2.+z/3."); - CPPUNIT_ASSERT_EQUAL(1,fieldOnNodes->getNumberOfComponents()); - CPPUNIT_ASSERT_EQUAL(64,fieldOnNodes->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)fieldOnNodes->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(64,(int)fieldOnNodes->getNumberOfTuples()); const double expected1[64]={-3., -1., 0., 2., -1., 1., 2., 4., 0., 2., 3., 5., 2., 4., 5., 7., -1., 1., 2., 4., 1., 3., 4., 6., 2., 4., 5., 7., 4., 6., 7., 9., 0., 2., 3., 5., 2., 4., 5., 7., 3., 5., 6., 8., 5., 7., 8., 10., 2., 4., 5., @@ -2316,8 +2316,8 @@ void MEDCouplingBasicsTest1::testCMesh0() fieldOnNodes->decrRef(); // MEDCouplingFieldDouble *fieldOnCells=mesh->fillFromAnalytic(ON_CELLS,1,"x+y/2.+z/3."); - CPPUNIT_ASSERT_EQUAL(1,fieldOnCells->getNumberOfComponents()); - CPPUNIT_ASSERT_EQUAL(27,fieldOnCells->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)fieldOnCells->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(27,(int)fieldOnCells->getNumberOfTuples()); val=fieldOnCells->getArray()->getConstPointer(); const double expected2[27]={0, 1.5, 3, 1.5, 3, 4.5, 3, 4.5, 6, 1.5, 3, 4.5, 3, 4.5, 6, 4.5, 6, 7.5, 3, 4.5, 6, 4.5, 6, 7.5, 6, 7.5, 9}; diff --git a/src/MEDCoupling/Test/MEDCouplingBasicsTest2.cxx b/src/MEDCoupling/Test/MEDCouplingBasicsTest2.cxx index d39e566ac..e0abd7e1f 100644 --- a/src/MEDCoupling/Test/MEDCouplingBasicsTest2.cxx +++ b/src/MEDCoupling/Test/MEDCouplingBasicsTest2.cxx @@ -230,8 +230,8 @@ void MEDCouplingBasicsTest2::testCellOrientation2() m5->arePolyhedronsNotCorrectlyOriented(res1); CPPUNIT_ASSERT(res1.empty()); MEDCouplingFieldDouble *f3=m5->getMeasureField(false); - CPPUNIT_ASSERT_EQUAL(15,f3->getArray()->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,f3->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(15,(int)f3->getArray()->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)f3->getNumberOfComponents()); const double *f3Ptr=f3->getArray()->getConstPointer(); const double expected1[15]={ 0.075,0.0375,0.0375,0.075,0.075, @@ -242,8 +242,8 @@ void MEDCouplingBasicsTest2::testCellOrientation2() CPPUNIT_ASSERT_DOUBLES_EQUAL(std::abs(expected1[i]),f3Ptr[i],1e-12); f3->decrRef(); DataArrayDouble *f4=m5->computeCellCenterOfMass(); - CPPUNIT_ASSERT_EQUAL(15,f4->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(3,f4->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(15,(int)f4->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(3,(int)f4->getNumberOfComponents()); const double *f4Ptr=f4->getConstPointer(); const double expected2[45]={ -0.05,-0.05,0.15, 0.3666666666666667,-0.13333333333333333,0.15, 0.53333333333333333,0.033333333333333333,0.15, -0.05,0.45,0.15, 0.45,0.45,0.15, @@ -319,8 +319,8 @@ void MEDCouplingBasicsTest2::testPolyhedronBarycenter() CPPUNIT_ASSERT(res1.empty()); const double *ref,*daPtr; DataArrayDouble *da=meshN->computeCellCenterOfMass(); - CPPUNIT_ASSERT_EQUAL(1,da->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(3,da->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(1,(int)da->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(3,(int)da->getNumberOfComponents()); daPtr=da->getConstPointer(); ref=meshN->getCoords()->getConstPointer()+24; for(int i=0;i<3;i++) @@ -373,8 +373,8 @@ void MEDCouplingBasicsTest2::testNormL12Integ1D() // const double *ptr; DataArrayDouble *f3=m1->computeCellCenterOfMass(); - CPPUNIT_ASSERT_EQUAL(4,f3->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,f3->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(4,(int)f3->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)f3->getNumberOfComponents()); double expected9[4]={0.75,5.105,0.8,5.155}; ptr=f3->getConstPointer(); for(int i=0;i<4;i++) @@ -382,8 +382,8 @@ void MEDCouplingBasicsTest2::testNormL12Integ1D() f3->decrRef(); // MEDCouplingFieldDouble *f2=m1->getMeasureField(false); - CPPUNIT_ASSERT_EQUAL(4,f2->getArray()->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,f2->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(4,(int)f2->getArray()->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)f2->getNumberOfComponents()); double expected1[4]={0.5,0.21,-0.6,-0.31}; ptr=f2->getArray()->getConstPointer(); for(int i=0;i<4;i++) @@ -437,23 +437,23 @@ void MEDCouplingBasicsTest2::testNormL12Integ1D() // Testing with 2D Curve m1=build2DCurveTargetMesh_3(); f2=m1->getMeasureField(false); - CPPUNIT_ASSERT_EQUAL(4,f2->getArray()->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,f2->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(4,(int)f2->getArray()->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)f2->getNumberOfComponents()); ptr=f2->getArray()->getConstPointer(); for(int i=0;i<4;i++) CPPUNIT_ASSERT_DOUBLES_EQUAL(sqrt(2.)*expected2[i],ptr[i],1e-12); f2->decrRef(); f2=m1->getMeasureField(true); - CPPUNIT_ASSERT_EQUAL(4,f2->getArray()->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,f2->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(4,(int)f2->getArray()->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)f2->getNumberOfComponents()); ptr=f2->getArray()->getConstPointer(); for(int i=0;i<4;i++) CPPUNIT_ASSERT_DOUBLES_EQUAL(expected2[i]*sqrt(2.),ptr[i],1e-12); f2->decrRef(); //bary f3=m1->computeCellCenterOfMass(); - CPPUNIT_ASSERT_EQUAL(4,f3->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(2,f3->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(4,(int)f3->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(2,(int)f3->getNumberOfComponents()); double expected10[8]={0.75,0.75,5.105,5.105,0.8,0.8,5.155,5.155}; ptr=f3->getConstPointer(); for(int i=0;i<8;i++) @@ -488,8 +488,8 @@ void MEDCouplingBasicsTest2::testAreaBary2D() { MEDCouplingUMesh *m1=build2DTargetMesh_3(); MEDCouplingFieldDouble *f1=m1->getMeasureField(false); - CPPUNIT_ASSERT_EQUAL(10,f1->getArray()->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,f1->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(10,(int)f1->getArray()->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)f1->getNumberOfComponents()); double expected1[10]={-0.5,-1,-1.5,-0.5,-1, 0.5,1,1.5,0.5,1}; const double *ptr=f1->getArray()->getConstPointer(); for(int i=0;i<10;i++) @@ -501,8 +501,8 @@ void MEDCouplingBasicsTest2::testAreaBary2D() CPPUNIT_ASSERT_DOUBLES_EQUAL(std::abs(expected1[i]),ptr[i],1e-12); f1->decrRef(); DataArrayDouble *f2=m1->computeCellCenterOfMass(); - CPPUNIT_ASSERT_EQUAL(10,f2->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(2,f2->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(10,(int)f2->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(2,(int)f2->getNumberOfComponents()); double expected2[20]={ 0.5,0.3333333333333333,0.5,0.5,0.5,0.77777777777777777,0.5,0.3333333333333333,0.5,0.5, 0.5,0.3333333333333333,0.5,0.5,0.5,0.77777777777777777,0.5,0.3333333333333333,0.5,0.5, @@ -513,15 +513,15 @@ void MEDCouplingBasicsTest2::testAreaBary2D() f2->decrRef(); m1->changeSpaceDimension(3); f1=m1->getMeasureField(false); - CPPUNIT_ASSERT_EQUAL(10,f1->getArray()->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,f1->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(10,(int)f1->getArray()->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)f1->getNumberOfComponents()); ptr=f1->getArray()->getConstPointer(); for(int i=0;i<10;i++) CPPUNIT_ASSERT_DOUBLES_EQUAL(std::abs(expected1[i]),ptr[i],1e-12); f1->decrRef(); f2=m1->computeCellCenterOfMass(); - CPPUNIT_ASSERT_EQUAL(10,f2->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(3,f2->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(10,(int)f2->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(3,(int)f2->getNumberOfComponents()); ptr=f2->getConstPointer(); double expected3[30]={ 0.5,0.3333333333333333,0.,0.5,0.5,0.,0.5,0.77777777777777777,0.,0.5,0.3333333333333333,0.,0.5,0.5,0., @@ -620,8 +620,8 @@ void MEDCouplingBasicsTest2::testAreaBary3D() CPPUNIT_ASSERT(res1.empty()); // DataArrayDouble *da=meshN->computeCellCenterOfMass(); - CPPUNIT_ASSERT_EQUAL(4,da->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(3,da->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(4,(int)da->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(3,(int)da->getNumberOfComponents()); const double *daPtr=da->getConstPointer(); for(int i=0;i<12;i++) CPPUNIT_ASSERT_DOUBLES_EQUAL(barys[i],daPtr[i],1e-12); @@ -842,8 +842,8 @@ void MEDCouplingBasicsTest2::testCheckGeoEquivalWith() CPPUNIT_ASSERT(nodeCor==0); mesh1->checkGeoEquivalWith(mesh2,10,1e-12,cellCor,nodeCor);//deepEqual with geo permutations CPPUNIT_ASSERT(cellCor); - CPPUNIT_ASSERT_EQUAL(10,cellCor->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,cellCor->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(10,(int)cellCor->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)cellCor->getNumberOfComponents()); CPPUNIT_ASSERT(std::equal(renum,renum+10,cellCor->getConstPointer())); CPPUNIT_ASSERT(nodeCor==0); cellCor->decrRef(); @@ -863,12 +863,12 @@ void MEDCouplingBasicsTest2::testCheckGeoEquivalWith() CPPUNIT_ASSERT(nodeCor==0); mesh1->checkGeoEquivalWith(mesh2,10,1e-12,cellCor,nodeCor);//deepEqual with geo permutations CPPUNIT_ASSERT(cellCor); - CPPUNIT_ASSERT_EQUAL(10,cellCor->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,cellCor->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(10,(int)cellCor->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)cellCor->getNumberOfComponents()); CPPUNIT_ASSERT(std::equal(renum,renum+10,cellCor->getConstPointer())); CPPUNIT_ASSERT(nodeCor); - CPPUNIT_ASSERT_EQUAL(11,nodeCor->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,nodeCor->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(11,(int)nodeCor->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)nodeCor->getNumberOfComponents()); CPPUNIT_ASSERT(std::equal(renum2,renum2+11,nodeCor->getConstPointer())); cellCor->decrRef(); cellCor=0; @@ -895,12 +895,12 @@ void MEDCouplingBasicsTest2::testCheckGeoEquivalWith() CPPUNIT_ASSERT(nodeCor==0); mesh2->checkGeoEquivalWith(mesh1,10,1e-12,cellCor,nodeCor);//deepEqual with geo permutations CPPUNIT_ASSERT(cellCor); - CPPUNIT_ASSERT_EQUAL(10,cellCor->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,cellCor->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(10,(int)cellCor->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)cellCor->getNumberOfComponents()); CPPUNIT_ASSERT(std::equal(renum3,renum3+10,cellCor->getConstPointer())); CPPUNIT_ASSERT(nodeCor); - CPPUNIT_ASSERT_EQUAL(11,nodeCor->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,nodeCor->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(11,(int)nodeCor->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)nodeCor->getNumberOfComponents()); CPPUNIT_ASSERT(std::equal(renum2,renum2+11,nodeCor->getConstPointer())); cellCor->decrRef(); cellCor=0; @@ -1031,8 +1031,8 @@ void MEDCouplingBasicsTest2::testTryToShareSameCoordsPermute2() const double expected1[5]={0.25,0.125,0.125,0.25,0.25}; MEDCouplingFieldDouble *f1=m1->getMeasureField(false); MEDCouplingFieldDouble *f2=m2->getMeasureField(false); - CPPUNIT_ASSERT_EQUAL(5,f1->getArray()->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,f2->getArray()->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(5,(int)f1->getArray()->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)f2->getArray()->getNumberOfTuples()); for(int i=0;i<5;i++) CPPUNIT_ASSERT_DOUBLES_EQUAL(expected1[i],f1->getIJ(i,0),1e-12); CPPUNIT_ASSERT_DOUBLES_EQUAL(expected1[0],f2->getIJ(0,0),1e-12); @@ -1043,8 +1043,8 @@ void MEDCouplingBasicsTest2::testTryToShareSameCoordsPermute2() m2->tryToShareSameCoordsPermute(*m1,1e-12); f1=m1->getMeasureField(false); f2=m2->getMeasureField(false); - CPPUNIT_ASSERT_EQUAL(5,f1->getArray()->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,f2->getArray()->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(5,(int)f1->getArray()->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)f2->getArray()->getNumberOfTuples()); for(int i=0;i<5;i++) CPPUNIT_ASSERT_DOUBLES_EQUAL(expected1[i],f1->getIJ(i,0),1e-12); CPPUNIT_ASSERT_DOUBLES_EQUAL(expected1[0],f2->getIJ(0,0),1e-12); @@ -1153,9 +1153,9 @@ void MEDCouplingBasicsTest2::testSubstractInPlaceDM1() f1->setArray(array); array->decrRef(); // - CPPUNIT_ASSERT_EQUAL(10,f1->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(2,f1->getNumberOfComponents()); - CPPUNIT_ASSERT_EQUAL(20,f1->getNumberOfValues()); + CPPUNIT_ASSERT_EQUAL(10,(int)f1->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(2,(int)f1->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(20,(int)f1->getNumberOfValues()); // const int renum[]={0,2,3,1,4,5,6,8,7,9}; mesh2->renumberCells(renum,false); @@ -1339,8 +1339,8 @@ void MEDCouplingBasicsTest2::testBuildSubPart1() const int part1[3]={2,1,4}; MEDCouplingFieldDouble *f2=f1->buildSubPart(part1,part1+3); f2->zipCoords(); - CPPUNIT_ASSERT_EQUAL(3,f2->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(2,f2->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(3,(int)f2->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(2,(int)f2->getNumberOfComponents()); const double expected1[6]={5.,105.,4.,104.,7.,107.}; for(int i=0;i<6;i++) CPPUNIT_ASSERT_DOUBLES_EQUAL(f2->getIJ(0,i),expected1[i],1e-12); @@ -1371,8 +1371,8 @@ void MEDCouplingBasicsTest2::testBuildSubPart1() array->decrRef(); const int part2[2]={1,2}; f2=f1->buildSubPart(part2,part2+2); - CPPUNIT_ASSERT_EQUAL(4,f2->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(2,f2->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(4,(int)f2->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(2,(int)f2->getNumberOfComponents()); const double expected5[8]={4.,104.,5.,105.,7.,107.,8.,108.}; for(int i=0;i<8;i++) CPPUNIT_ASSERT_DOUBLES_EQUAL(f2->getIJ(0,i),expected5[i],1e-12); @@ -1395,8 +1395,8 @@ void MEDCouplingBasicsTest2::testBuildSubPart1() std::copy(part3,part3+2,arrr->getPointer()); f2=f1->buildSubPart(arrr); arrr->decrRef(); - CPPUNIT_ASSERT_EQUAL(4,f2->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(2,f2->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(4,(int)f2->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(2,(int)f2->getNumberOfComponents()); for(int i=0;i<8;i++) CPPUNIT_ASSERT_DOUBLES_EQUAL(f2->getIJ(0,i),expected5[i],1e-12); CPPUNIT_ASSERT_EQUAL(2,f2->getMesh()->getNumberOfCells()); @@ -1414,8 +1414,8 @@ void MEDCouplingBasicsTest2::testBuildSubPart1() // const int part4[3]={1,2,4}; f2=f1->buildSubPart(part4,part4+3); - CPPUNIT_ASSERT_EQUAL(6,f2->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(2,f2->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(6,(int)f2->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(2,(int)f2->getNumberOfComponents()); const double expected6[12]={4.,104.,5.,105.,7.,107.,8.,108.,10.,110.,11.,111.}; for(int i=0;i<12;i++) CPPUNIT_ASSERT_DOUBLES_EQUAL(f2->getIJ(0,i),expected6[i],1e-12); @@ -1452,8 +1452,8 @@ void MEDCouplingBasicsTest2::testDoublyContractedProduct1() // MEDCouplingFieldDouble *f2=f1->doublyContractedProduct(); f2->checkConsistencyLight(); - CPPUNIT_ASSERT_EQUAL(1,f2->getNumberOfComponents()); - CPPUNIT_ASSERT_EQUAL(5,f2->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)f2->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(5,(int)f2->getNumberOfTuples()); for(int i=0;i<5;i++) CPPUNIT_ASSERT_DOUBLES_EQUAL(3906.56,f2->getIJ(i,0),1e-9); f2->decrRef(); @@ -1480,8 +1480,8 @@ void MEDCouplingBasicsTest2::testDeterminant1() MEDCouplingFieldDouble *f2=f1->determinant(); f2->checkConsistencyLight(); CPPUNIT_ASSERT_EQUAL(CONST_ON_TIME_INTERVAL,f2->getTimeDiscretization()); - CPPUNIT_ASSERT_EQUAL(1,f2->getNumberOfComponents()); - CPPUNIT_ASSERT_EQUAL(5,f2->getNumberOfValues()); + CPPUNIT_ASSERT_EQUAL(1,(int)f2->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(5,(int)f2->getNumberOfValues()); for(int i=0;i<5;i++) CPPUNIT_ASSERT_DOUBLES_EQUAL(-2.42,f2->getIJ(i,0),1e-13); f2->decrRef(); @@ -1502,8 +1502,8 @@ void MEDCouplingBasicsTest2::testDeterminant1() // f2=f1->determinant(); CPPUNIT_ASSERT_EQUAL(LINEAR_TIME,f2->getTimeDiscretization()); - CPPUNIT_ASSERT_EQUAL(1,f2->getArray()->getNumberOfComponents()); - CPPUNIT_ASSERT_EQUAL(9,f2->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)f2->getArray()->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(9,(int)f2->getNumberOfTuples()); for(int i=0;i<9;i++) CPPUNIT_ASSERT_DOUBLES_EQUAL(137.335,f2->getIJ(i,0),1e-10); f2->decrRef(); @@ -1519,8 +1519,8 @@ void MEDCouplingBasicsTest2::testDeterminant1() f2=f1->determinant(); f2->checkConsistencyLight(); CPPUNIT_ASSERT_EQUAL(LINEAR_TIME,f2->getTimeDiscretization()); - CPPUNIT_ASSERT_EQUAL(1,f2->getNumberOfComponents()); - CPPUNIT_ASSERT_EQUAL(9,f2->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)f2->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(9,(int)f2->getNumberOfTuples()); int it,order; CPPUNIT_ASSERT_DOUBLES_EQUAL(2.3,f2->getTime(it,order),1e-12); CPPUNIT_ASSERT_EQUAL(5,it); CPPUNIT_ASSERT_EQUAL(6,order); @@ -1548,8 +1548,8 @@ void MEDCouplingBasicsTest2::testDeterminant1() f2=f1->determinant(); f2->checkConsistencyLight(); CPPUNIT_ASSERT_EQUAL(ONE_TIME,f2->getTimeDiscretization()); - CPPUNIT_ASSERT_EQUAL(1,f2->getNumberOfComponents()); - CPPUNIT_ASSERT_EQUAL(5,f2->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)f2->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(5,(int)f2->getNumberOfTuples()); CPPUNIT_ASSERT_DOUBLES_EQUAL(7.8,f2->getTime(it,order),1e-12); CPPUNIT_ASSERT_EQUAL(10,it); CPPUNIT_ASSERT_EQUAL(2,order); for(int i=0;i<5;i++) @@ -1575,8 +1575,8 @@ void MEDCouplingBasicsTest2::testEigenValues1() // MEDCouplingFieldDouble *f2=f1->eigenValues(); f2->checkConsistencyLight(); - CPPUNIT_ASSERT_EQUAL(3,f2->getNumberOfComponents()); - CPPUNIT_ASSERT_EQUAL(5,f2->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(3,(int)f2->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(5,(int)f2->getNumberOfTuples()); const double expected1[3]={13.638813677891717,-4.502313844635971,-2.2364998332557486}; for(int i=0;i<5;i++) { @@ -1605,8 +1605,8 @@ void MEDCouplingBasicsTest2::testEigenVectors1() // MEDCouplingFieldDouble *f2=f1->eigenVectors(); f2->checkConsistencyLight(); - CPPUNIT_ASSERT_EQUAL(9,f2->getNumberOfComponents()); - CPPUNIT_ASSERT_EQUAL(5,f2->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(9,(int)f2->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(5,(int)f2->getNumberOfTuples()); const double expected1[9]={ 0.5424262364180696, 0.5351201064614425, 0.6476266283176001,//eigenvect 0 0.7381111277307373, 0.06458838384003074, -0.6715804522117897,//eigenvect 1 @@ -1645,8 +1645,8 @@ void MEDCouplingBasicsTest2::testInverse1() // MEDCouplingFieldDouble *f2=f1->inverse(); f2->checkConsistencyLight(); - CPPUNIT_ASSERT_EQUAL(9,f2->getNumberOfComponents()); - CPPUNIT_ASSERT_EQUAL(5,f2->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(9,(int)f2->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(5,(int)f2->getNumberOfTuples()); const double expected1[9]={-2.6538108356290113, 2.855831037649208, -1.1111111111111067, 3.461891643709813, -4.775022956841121, 2.2222222222222143, -1.1111111111111054, 2.222222222222214, -1.1111111111111072}; for(int i=0;i<5;i++) { @@ -1672,8 +1672,8 @@ void MEDCouplingBasicsTest2::testInverse1() // f2=f1->inverse(); f2->checkConsistencyLight(); - CPPUNIT_ASSERT_EQUAL(6,f2->getNumberOfComponents()); - CPPUNIT_ASSERT_EQUAL(5,f2->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(6,(int)f2->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(5,(int)f2->getNumberOfTuples()); const double expected3[6]={-0.3617705098531818, -0.8678630828458127, -0.026843764174972983, 0.5539957431465833, 0.13133439560823013, -0.05301294502145887}; for(int i=0;i<5;i++) { @@ -1696,8 +1696,8 @@ void MEDCouplingBasicsTest2::testInverse1() // f2=f1->inverse(); f2->checkConsistencyLight(); - CPPUNIT_ASSERT_EQUAL(4,f2->getNumberOfComponents()); - CPPUNIT_ASSERT_EQUAL(5,f2->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(4,(int)f2->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(5,(int)f2->getNumberOfTuples()); const double expected2[4]={-1.8595041322314059, 0.9504132231404963, 1.404958677685951, -0.49586776859504156}; for(int i=0;i<5;i++) { @@ -1727,8 +1727,8 @@ void MEDCouplingBasicsTest2::testTrace1() // MEDCouplingFieldDouble *f2=f1->trace(); f2->checkConsistencyLight(); - CPPUNIT_ASSERT_EQUAL(1,f2->getNumberOfComponents()); - CPPUNIT_ASSERT_EQUAL(5,f2->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)f2->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(5,(int)f2->getNumberOfTuples()); for(int i=0;i<5;i++) CPPUNIT_ASSERT_DOUBLES_EQUAL(15.9,f2->getIJ(i,0),1e-13); f2->decrRef(); @@ -1743,8 +1743,8 @@ void MEDCouplingBasicsTest2::testTrace1() // f2=f1->trace(); f2->checkConsistencyLight(); - CPPUNIT_ASSERT_EQUAL(1,f2->getNumberOfComponents()); - CPPUNIT_ASSERT_EQUAL(5,f2->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)f2->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(5,(int)f2->getNumberOfTuples()); for(int i=0;i<5;i++) CPPUNIT_ASSERT_DOUBLES_EQUAL(25.8,f2->getIJ(i,0),1e-13); f2->decrRef(); @@ -1759,8 +1759,8 @@ void MEDCouplingBasicsTest2::testTrace1() // f2=f1->trace(); f2->checkConsistencyLight(); - CPPUNIT_ASSERT_EQUAL(1,f2->getNumberOfComponents()); - CPPUNIT_ASSERT_EQUAL(5,f2->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)f2->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(5,(int)f2->getNumberOfTuples()); for(int i=0;i<5;i++) CPPUNIT_ASSERT_DOUBLES_EQUAL(5.7,f2->getIJ(i,0),1e-13); f2->decrRef(); @@ -1784,8 +1784,8 @@ void MEDCouplingBasicsTest2::testDeviator1() // MEDCouplingFieldDouble *f2=f1->deviator(); f2->checkConsistencyLight(); - CPPUNIT_ASSERT_EQUAL(6,f2->getNumberOfComponents()); - CPPUNIT_ASSERT_EQUAL(5,f2->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(6,(int)f2->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(5,(int)f2->getNumberOfTuples()); const double expected1[6]={-1.1,0.,1.1,4.5,5.6,6.7}; for(int i=0;i<5;i++) { @@ -1817,8 +1817,8 @@ void MEDCouplingBasicsTest2::testMagnitude1() // MEDCouplingFieldDouble *f2=f1->magnitude(); f2->checkConsistencyLight(); - CPPUNIT_ASSERT_EQUAL(1,f2->getNumberOfComponents()); - CPPUNIT_ASSERT_EQUAL(5,f2->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)f2->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(5,(int)f2->getNumberOfTuples()); for(int i=0;i<5;i++) CPPUNIT_ASSERT_DOUBLES_EQUAL(8.3606219864313918,f2->getIJ(i,0),1e-13); f2->decrRef(); @@ -1842,16 +1842,16 @@ void MEDCouplingBasicsTest2::testMaxPerTuple1() // MEDCouplingFieldDouble *f2=f1->maxPerTuple(); f2->checkConsistencyLight(); - CPPUNIT_ASSERT_EQUAL(1,f2->getNumberOfComponents()); - CPPUNIT_ASSERT_EQUAL(5,f2->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)f2->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(5,(int)f2->getNumberOfTuples()); for(int i=0;i<5;i++) 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()); + CPPUNIT_ASSERT_EQUAL(1,(int)d2->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(5,(int)d2->getNumberOfTuples()); const int expected2[5]={4,3,2,0,1}; for(int i=0;i<5;i++) { @@ -1879,15 +1879,15 @@ void MEDCouplingBasicsTest2::testChangeNbOfComponents() // f1->changeNbOfComponents(3,7.77); f1->checkConsistencyLight(); - CPPUNIT_ASSERT_EQUAL(3,f1->getNumberOfComponents()); - CPPUNIT_ASSERT_EQUAL(5,f1->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(3,(int)f1->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(5,(int)f1->getNumberOfTuples()); const double expected1[15]={1.2,2.3,3.4, 1.2,3.4,4.5, 3.4,4.5,5.6, 5.6,1.2,2.3, 4.5,5.6,1.2}; for(int i=0;i<15;i++) CPPUNIT_ASSERT_DOUBLES_EQUAL(expected1[i],f1->getIJ(0,i),1e-13); f1->changeNbOfComponents(4,7.77); f1->checkConsistencyLight(); - CPPUNIT_ASSERT_EQUAL(4,f1->getNumberOfComponents()); - CPPUNIT_ASSERT_EQUAL(5,f1->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(4,(int)f1->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(5,(int)f1->getNumberOfTuples()); const double expected2[20]={1.2,2.3,3.4,7.77, 1.2,3.4,4.5,7.77, 3.4,4.5,5.6,7.77, 5.6,1.2,2.3,7.77, 4.5,5.6,1.2,7.77}; for(int i=0;i<20;i++) CPPUNIT_ASSERT_DOUBLES_EQUAL(expected2[i],f1->getIJ(0,i),1e-13); @@ -1911,8 +1911,8 @@ void MEDCouplingBasicsTest2::testSortPerTuple1() // f1->sortPerTuple(true); f1->checkConsistencyLight(); - CPPUNIT_ASSERT_EQUAL(5,f1->getNumberOfComponents()); - CPPUNIT_ASSERT_EQUAL(5,f1->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(5,(int)f1->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(5,(int)f1->getNumberOfTuples()); for(int i=0;i<5;i++) { CPPUNIT_ASSERT_DOUBLES_EQUAL(arr1[0],f1->getIJ(i,0),1e-13); @@ -1924,8 +1924,8 @@ void MEDCouplingBasicsTest2::testSortPerTuple1() // f1->sortPerTuple(false); f1->checkConsistencyLight(); - CPPUNIT_ASSERT_EQUAL(5,f1->getNumberOfComponents()); - CPPUNIT_ASSERT_EQUAL(5,f1->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(5,(int)f1->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(5,(int)f1->getNumberOfTuples()); for(int i=0;i<5;i++) { CPPUNIT_ASSERT_DOUBLES_EQUAL(arr1[4],f1->getIJ(i,0),1e-13); @@ -2040,9 +2040,9 @@ void MEDCouplingBasicsTest2::testGetEdgeRatioField1() CPPUNIT_ASSERT_DOUBLES_EQUAL(3.4,f1->getTime(a,b),1.e-14); CPPUNIT_ASSERT_EQUAL(5,a); CPPUNIT_ASSERT_EQUAL(6,b); CPPUNIT_ASSERT_EQUAL(std::string(f1->getTimeUnit()),std::string("us")); - CPPUNIT_ASSERT_EQUAL(m1->getNumberOfCells(),f1->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(5,f1->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,f1->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(m1->getNumberOfCells(),(int)f1->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(5,(int)f1->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)f1->getNumberOfComponents()); const double expected1[5]={1.,1.4142135623730951, 1.4142135623730951,1.,1.}; for(int i=0;i<5;i++) CPPUNIT_ASSERT_DOUBLES_EQUAL(expected1[i],f1->getIJ(i,0),1e-14); @@ -2051,9 +2051,9 @@ void MEDCouplingBasicsTest2::testGetEdgeRatioField1() // m1=build3DSurfTargetMesh_1(); f1=m1->getEdgeRatioField(); - CPPUNIT_ASSERT_EQUAL(m1->getNumberOfCells(),f1->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(5,f1->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,f1->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(m1->getNumberOfCells(),(int)f1->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(5,(int)f1->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)f1->getNumberOfComponents()); const double expected2[5]={1.4142135623730951, 1.7320508075688772, 1.7320508075688772, 1.4142135623730951, 1.4142135623730951}; for(int i=0;i<5;i++) CPPUNIT_ASSERT_DOUBLES_EQUAL(expected2[i],f1->getIJ(i,0),1e-14); @@ -2073,8 +2073,8 @@ void MEDCouplingBasicsTest2::testFillFromAnalytic3() CPPUNIT_ASSERT(std::string(f1->getName())=="myField"); CPPUNIT_ASSERT(f1->getTypeOfField()==ON_CELLS); CPPUNIT_ASSERT(f1->getTimeDiscretization()==ONE_TIME); - CPPUNIT_ASSERT_EQUAL(1,f1->getNumberOfComponents()); - CPPUNIT_ASSERT_EQUAL(5,f1->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)f1->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(5,(int)f1->getNumberOfTuples()); double values1[5]={-0.1,0.23333333333333336,0.56666666666666665,0.4,0.9}; const double *tmp=f1->getArray()->getConstPointer(); std::transform(tmp,tmp+5,values1,values1,std::minus()); @@ -2090,8 +2090,8 @@ void MEDCouplingBasicsTest2::testFillFromAnalytic3() f1->checkConsistencyLight(); CPPUNIT_ASSERT(f1->getTypeOfField()==ON_NODES); CPPUNIT_ASSERT(f1->getTimeDiscretization()==CONST_ON_TIME_INTERVAL); - CPPUNIT_ASSERT_EQUAL(1,f1->getNumberOfComponents()); - CPPUNIT_ASSERT_EQUAL(9,f1->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)f1->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(9,(int)f1->getNumberOfTuples()); double values2[9]={-0.9,0.1,1.1,-0.4,0.6,1.6,0.1,1.1,2.1}; tmp=f1->getArray()->getConstPointer(); std::transform(tmp,tmp+9,values2,values2,std::minus()); @@ -2106,8 +2106,8 @@ void MEDCouplingBasicsTest2::testFillFromAnalytic3() f1->checkConsistencyLight(); CPPUNIT_ASSERT(f1->getTypeOfField()==ON_NODES); CPPUNIT_ASSERT(f1->getTimeDiscretization()==LINEAR_TIME); - CPPUNIT_ASSERT_EQUAL(1,f1->getNumberOfComponents()); - CPPUNIT_ASSERT_EQUAL(9,f1->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)f1->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(9,(int)f1->getNumberOfTuples()); tmp=f1->getArray()->getConstPointer(); double values2Bis[9]={-0.9,0.1,1.1,-0.4,0.6,1.6,0.1,1.1,2.1}; double values2BisBis[9]; @@ -2128,8 +2128,8 @@ void MEDCouplingBasicsTest2::testFillFromAnalytic3() f1->checkConsistencyLight(); CPPUNIT_ASSERT(f1->getTypeOfField()==ON_NODES); CPPUNIT_ASSERT(f1->getTimeDiscretization()==NO_TIME); - CPPUNIT_ASSERT_EQUAL(2,f1->getNumberOfComponents()); - CPPUNIT_ASSERT_EQUAL(9,f1->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(2,(int)f1->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(9,(int)f1->getNumberOfTuples()); double values3[18]={-0.6,-1.2,-0.1,-0.2,0.4,0.8,-0.1,-0.2,0.4,0.8,0.9,1.8,0.4,0.8,0.9,1.8,1.4,2.8}; tmp=f1->getArray()->getConstPointer(); std::transform(tmp,tmp+18,values3,values3,std::minus()); @@ -2161,14 +2161,14 @@ void MEDCouplingBasicsTest2::testFieldDoubleOpEqual1() f1->setMesh(m); (*f1)=0.07; f1->checkConsistencyLight(); - CPPUNIT_ASSERT_EQUAL(1,f1->getNumberOfComponents()); - CPPUNIT_ASSERT_EQUAL(5,f1->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)f1->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(5,(int)f1->getNumberOfTuples()); for(int i=0;i<5;i++) CPPUNIT_ASSERT_DOUBLES_EQUAL(0.07,f1->getIJ(i,0),1e-16); (*f1)=0.09; f1->checkConsistencyLight(); - CPPUNIT_ASSERT_EQUAL(1,f1->getNumberOfComponents()); - CPPUNIT_ASSERT_EQUAL(5,f1->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)f1->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(5,(int)f1->getNumberOfTuples()); for(int i=0;i<5;i++) CPPUNIT_ASSERT_DOUBLES_EQUAL(0.09,f1->getIJ(i,0),1e-16); f1->decrRef(); @@ -2178,12 +2178,12 @@ void MEDCouplingBasicsTest2::testFieldDoubleOpEqual1() f1->setMesh(m); (*f1)=0.08; f1->checkConsistencyLight(); - CPPUNIT_ASSERT_EQUAL(1,f1->getNumberOfComponents()); - CPPUNIT_ASSERT_EQUAL(9,f1->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)f1->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(9,(int)f1->getNumberOfTuples()); for(int i=0;i<9;i++) CPPUNIT_ASSERT_DOUBLES_EQUAL(0.08,f1->getIJ(i,0),1e-16); - CPPUNIT_ASSERT_EQUAL(1,f1->getEndArray()->getNumberOfComponents()); - CPPUNIT_ASSERT_EQUAL(9,f1->getEndArray()->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)f1->getEndArray()->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(9,(int)f1->getEndArray()->getNumberOfTuples()); for(int i=0;i<9;i++) CPPUNIT_ASSERT_DOUBLES_EQUAL(0.08,f1->getEndArray()->getIJ(i,0),1e-16); f1->decrRef(); @@ -2253,15 +2253,15 @@ void MEDCouplingBasicsTest2::testAreaBary3D2() da->decrRef(); CPPUNIT_ASSERT_EQUAL(12,newNebOfNodes); MEDCouplingFieldDouble *vols=mesh->getMeasureField(true); - CPPUNIT_ASSERT_EQUAL(3,vols->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,vols->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(3,(int)vols->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)vols->getNumberOfComponents()); CPPUNIT_ASSERT_DOUBLES_EQUAL(volHexa8,vols->getIJ(0,0),1e-6); CPPUNIT_ASSERT_DOUBLES_EQUAL(volPenta6,vols->getIJ(1,0),1e-7); CPPUNIT_ASSERT_DOUBLES_EQUAL(volPyra5,vols->getIJ(2,0),1e-7); vols->decrRef(); DataArrayDouble *bary=mesh->computeCellCenterOfMass(); - CPPUNIT_ASSERT_EQUAL(3,bary->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(3,bary->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(3,(int)bary->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(3,(int)bary->getNumberOfComponents()); CPPUNIT_ASSERT_DOUBLES_EQUAL(baryHexa8[0],bary->getIJ(0,0),1e-11); CPPUNIT_ASSERT_DOUBLES_EQUAL(baryHexa8[1],bary->getIJ(0,1),1e-11); CPPUNIT_ASSERT_DOUBLES_EQUAL(baryHexa8[2],bary->getIJ(0,2),1e-11); diff --git a/src/MEDCoupling/Test/MEDCouplingBasicsTest3.cxx b/src/MEDCoupling/Test/MEDCouplingBasicsTest3.cxx index ca9a60932..a6e7075ca 100644 --- a/src/MEDCoupling/Test/MEDCouplingBasicsTest3.cxx +++ b/src/MEDCoupling/Test/MEDCouplingBasicsTest3.cxx @@ -48,21 +48,21 @@ void MEDCouplingBasicsTest3::testGetMeasureFieldCMesh1() CPPUNIT_ASSERT_EQUAL(3,m->getNumberOfCells()); CPPUNIT_ASSERT_EQUAL(1,m->getSpaceDimension()); MEDCouplingFieldDouble *f=m->getMeasureField(true); - CPPUNIT_ASSERT_EQUAL(3,f->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,f->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(3,(int)f->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)f->getNumberOfComponents()); const double expected1[3]={1.1,2.4,4.4}; for(int i=0;i<3;i++) CPPUNIT_ASSERT_DOUBLES_EQUAL(expected1[i],f->getIJ(i,0),1e-12); f->decrRef(); DataArrayDouble *coords=m->getCoordinatesAndOwner(); - CPPUNIT_ASSERT_EQUAL(4,coords->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,coords->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(4,(int)coords->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)coords->getNumberOfComponents()); for(int i=0;i<4;i++) CPPUNIT_ASSERT_DOUBLES_EQUAL(discX[i],coords->getIJ(i,0),1e-12); coords->decrRef(); coords=m->computeCellCenterOfMass(); - CPPUNIT_ASSERT_EQUAL(3,coords->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,coords->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(3,(int)coords->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)coords->getNumberOfComponents()); const double expected1_3[3]={2.85,4.6,8.}; for(int i=0;i<3;i++) CPPUNIT_ASSERT_DOUBLES_EQUAL(expected1_3[i],coords->getIJ(i,0),1e-12); @@ -78,22 +78,22 @@ void MEDCouplingBasicsTest3::testGetMeasureFieldCMesh1() CPPUNIT_ASSERT_EQUAL(6,m->getNumberOfCells()); CPPUNIT_ASSERT_EQUAL(2,m->getSpaceDimension()); f=m->getMeasureField(true); - CPPUNIT_ASSERT_EQUAL(6,f->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,f->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(6,(int)f->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)f->getNumberOfComponents()); const double expected2[6]={12.21,26.64,48.84,24.64,53.76,98.56}; for(int i=0;i<6;i++) CPPUNIT_ASSERT_DOUBLES_EQUAL(expected2[i],f->getIJ(i,0),1e-12); f->decrRef(); coords=m->getCoordinatesAndOwner(); - CPPUNIT_ASSERT_EQUAL(12,coords->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(2,coords->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(12,(int)coords->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(2,(int)coords->getNumberOfComponents()); const double expected2_2[24]={2.3,12.3,3.4,12.3,5.8,12.3,10.2,12.3, 2.3,23.4,3.4,23.4,5.8,23.4,10.2,23.4, 2.3,45.8,3.4,45.8,5.8,45.8,10.2,45.8}; for(int i=0;i<24;i++) CPPUNIT_ASSERT_DOUBLES_EQUAL(expected2_2[i],coords->getIJ(0,i),1e-12); coords->decrRef(); coords=m->computeCellCenterOfMass(); - CPPUNIT_ASSERT_EQUAL(6,coords->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(2,coords->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(6,(int)coords->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(2,(int)coords->getNumberOfComponents()); const double expected2_3[12]={2.85,17.85,4.6,17.85,8.,17.85, 2.85,34.6,4.6,34.6,8.,34.6}; for(int i=0;i<12;i++) CPPUNIT_ASSERT_DOUBLES_EQUAL(expected2_3[i],coords->getIJ(0,i),1e-12); @@ -109,15 +109,15 @@ void MEDCouplingBasicsTest3::testGetMeasureFieldCMesh1() CPPUNIT_ASSERT_EQUAL(24,m->getNumberOfCells()); CPPUNIT_ASSERT_EQUAL(3,m->getSpaceDimension()); f=m->getMeasureField(true); - CPPUNIT_ASSERT_EQUAL(24,f->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,f->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(24,(int)f->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)f->getNumberOfComponents()); const double expected3[24]={23.199, 50.616, 92.796, 46.816, 102.144, 187.264, 0.6105, 1.332, 2.442, 1.232, 2.688, 4.928, 10.7448, 23.4432, 42.9792, 21.6832, 47.3088, 86.7328, 6.5934, 14.3856, 26.3736, 13.3056, 29.0304, 53.2224}; for(int i=0;i<24;i++) CPPUNIT_ASSERT_DOUBLES_EQUAL(expected3[i],f->getIJ(i,0),1e-12); f->decrRef(); coords=m->getCoordinatesAndOwner(); - CPPUNIT_ASSERT_EQUAL(60,coords->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(3,coords->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(60,(int)coords->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(3,(int)coords->getNumberOfComponents()); const double expected3_2[180]={ 2.3,12.3,-0.7, 3.4,12.3,-0.7, 5.8,12.3,-0.7, 10.2,12.3,-0.7, 2.3,23.4,-0.7, 3.4,23.4,-0.7, 5.8,23.4,-0.7, 10.2,23.4,-0.7, 2.3,45.8,-0.7, 3.4,45.8,-0.7, 5.8,45.8,-0.7, 10.2,45.8,-0.7, 2.3,12.3,1.2, 3.4,12.3,1.2, 5.8,12.3,1.2, 10.2,12.3,1.2, 2.3,23.4,1.2, 3.4,23.4,1.2, 5.8,23.4,1.2, 10.2,23.4,1.2, 2.3,45.8,1.2, 3.4,45.8,1.2, 5.8,45.8,1.2, 10.2,45.8,1.2, @@ -129,8 +129,8 @@ void MEDCouplingBasicsTest3::testGetMeasureFieldCMesh1() CPPUNIT_ASSERT_DOUBLES_EQUAL(expected3_2[i],coords->getIJ(0,i),1e-12); coords->decrRef(); coords=m->computeCellCenterOfMass(); - CPPUNIT_ASSERT_EQUAL(24,coords->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(3,coords->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(24,(int)coords->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(3,(int)coords->getNumberOfComponents()); const double expected3_3[72]={ 2.85,17.85,0.25,4.6,17.85,0.25,8.,17.85,0.25, 2.85,34.6,0.25,4.6,34.6,0.25,8.,34.6,0.25, 2.85,17.85,1.225,4.6,17.85,1.225,8.,17.85,1.225, 2.85,34.6,1.225,4.6,34.6,1.225,8.,34.6,1.225, @@ -151,8 +151,8 @@ void MEDCouplingBasicsTest3::testFieldDoubleZipCoords1() f->getArray()->setInfoOnComponent(0,"titi"); f->getArray()->setInfoOnComponent(1,"tutu"); f->checkConsistencyLight(); - CPPUNIT_ASSERT_EQUAL(18,f->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(2,f->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(18,(int)f->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(2,(int)f->getNumberOfComponents()); const double expected1[36]={-0.6, -0.6, 0.4, 0.4, 1.4, 1.4, -0.6, -0.6, 0.4, 0.4, 0.4, 0.4, 0.4, 0.4, 0.4, 0.4, 1.4, 1.4, -0.6, -0.6, 0.4, 0.4, 1.4, 1.4, -0.6, -0.6, 1.4, 1.4, -0.6, -0.6, 0.4, 0.4, 1.4, 1.4, 0.4, 0.4}; for(int i=0;i<36;i++) CPPUNIT_ASSERT_DOUBLES_EQUAL(expected1[i],f->getIJ(0,i),1e-12); @@ -197,8 +197,8 @@ void MEDCouplingBasicsTest3::testFieldDoubleZipConnectivity1() arr->decrRef(); MEDCouplingFieldDouble *f=m6->fillFromAnalytic(ON_CELLS,2,"x"); MEDCouplingFieldDouble *f2=m6->fillFromAnalytic(ON_NODES,2,"x"); - CPPUNIT_ASSERT_EQUAL(10,f->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(2,f->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(10,(int)f->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(2,(int)f->getNumberOfComponents()); const double expected1[20]={-0.05, -0.05, 0.3666666666666667, 0.3666666666666667, 0.53333333333333321, 0.53333333333333321, -0.05, -0.05, 0.45, 0.45, 0.53333333333333321, 0.53333333333333321, -0.05, -0.05, 0.45, 0.45, 0.36666666666666659, 0.36666666666666659, 0.033333333333333326, 0.033333333333333326}; @@ -210,8 +210,8 @@ void MEDCouplingBasicsTest3::testFieldDoubleZipConnectivity1() CPPUNIT_ASSERT(f->zipConnectivity(0)); const double expected2[14]={-0.05, -0.05, 0.3666666666666667, 0.3666666666666667, 0.53333333333333321, 0.53333333333333321, -0.05, -0.05, 0.45, 0.45, 0.36666666666666659, 0.36666666666666659, 0.033333333333333326, 0.033333333333333326}; - CPPUNIT_ASSERT_EQUAL(7,f->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(2,f->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(7,(int)f->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(2,(int)f->getNumberOfComponents()); for(int i=0;i<14;i++) CPPUNIT_ASSERT_DOUBLES_EQUAL(expected2[i],f->getIJ(0,i),1e-12); CPPUNIT_ASSERT(std::string(f->getArray()->getInfoOnComponent(0))=="titi"); @@ -221,13 +221,13 @@ void MEDCouplingBasicsTest3::testFieldDoubleZipConnectivity1() // const double expected3[18]={-0.3, -0.3, 0.2, 0.2, 0.7, 0.7, -0.3, -0.3, 0.2, 0.2, 0.7, 0.7, -0.3, -0.3, 0.2, 0.2, 0.7, 0.7}; - CPPUNIT_ASSERT_EQUAL(9,f2->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(2,f2->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(9,(int)f2->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(2,(int)f2->getNumberOfComponents()); for(int i=0;i<18;i++) CPPUNIT_ASSERT_DOUBLES_EQUAL(expected3[i],f2->getIJ(0,i),1e-12); CPPUNIT_ASSERT(f2->zipConnectivity(0)); - CPPUNIT_ASSERT_EQUAL(9,f2->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(2,f2->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(9,(int)f2->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(2,(int)f2->getNumberOfComponents()); for(int i=0;i<18;i++) CPPUNIT_ASSERT_DOUBLES_EQUAL(expected3[i],f2->getIJ(0,i),1e-12); f2->decrRef(); @@ -246,8 +246,8 @@ void MEDCouplingBasicsTest3::testDaDoubleRenumber1() // const int arr2[7]={3,1,0,6,5,4,2}; DataArrayDouble *b=a->renumber(arr2); - CPPUNIT_ASSERT_EQUAL(7,b->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(2,b->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(7,(int)b->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(2,(int)b->getNumberOfComponents()); CPPUNIT_ASSERT(std::string(b->getInfoOnComponent(0))=="toto"); CPPUNIT_ASSERT(std::string(b->getInfoOnComponent(1))=="tata"); const double expected1[14]={3.1, 13.1, 2.1, 12.1, 7.1, 17.1, 1.1, 11.1, 6.1, 16.1, 5.1, 15.1, 4.1, 14.1}; @@ -263,8 +263,8 @@ void MEDCouplingBasicsTest3::testDaDoubleRenumber1() const int arr3[14]={1,11,2,12,3,13,4,14,5,15,6,16,7,17}; std::copy(arr3,arr3+14,c->getPointer()); DataArrayInt *d=c->renumber(arr2); - CPPUNIT_ASSERT_EQUAL(7,d->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(2,d->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(7,(int)d->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(2,(int)d->getNumberOfComponents()); CPPUNIT_ASSERT(std::string(d->getInfoOnComponent(0))=="toto"); CPPUNIT_ASSERT(std::string(d->getInfoOnComponent(1))=="tata"); const int expected2[14]={3, 13, 2, 12, 7, 17, 1, 11, 6, 16, 5, 15, 4, 14}; @@ -285,8 +285,8 @@ void MEDCouplingBasicsTest3::testDaDoubleRenumberAndReduce1() // const int arr2[7]={2,-1,1,-1,0,4,3}; DataArrayDouble *b=a->renumberAndReduce(arr2,5); - CPPUNIT_ASSERT_EQUAL(5,b->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(2,b->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(5,(int)b->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(2,(int)b->getNumberOfComponents()); CPPUNIT_ASSERT(std::string(b->getInfoOnComponent(0))=="toto"); CPPUNIT_ASSERT(std::string(b->getInfoOnComponent(1))=="tata"); const double expected1[10]={5.1,15.1,3.1,13.1,1.1,11.1,7.1,17.1,6.1,16.1}; @@ -302,8 +302,8 @@ void MEDCouplingBasicsTest3::testDaDoubleRenumberAndReduce1() const int arr3[14]={1,11,2,12,3,13,4,14,5,15,6,16,7,17}; std::copy(arr3,arr3+14,c->getPointer()); DataArrayInt *d=c->renumberAndReduce(arr2,5); - CPPUNIT_ASSERT_EQUAL(5,d->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(2,d->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(5,(int)d->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(2,(int)d->getNumberOfComponents()); CPPUNIT_ASSERT(std::string(d->getInfoOnComponent(0))=="toto"); CPPUNIT_ASSERT(std::string(d->getInfoOnComponent(1))=="tata"); const int expected2[10]={5,15,3,13,1,11,7,17,6,16}; @@ -322,8 +322,8 @@ void MEDCouplingBasicsTest3::testDaDoubleRenumberInPlace1() // const int arr2[7]={3,1,0,6,5,4,2}; a->renumberInPlace(arr2); - CPPUNIT_ASSERT_EQUAL(7,a->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(2,a->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(7,(int)a->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(2,(int)a->getNumberOfComponents()); const double expected1[14]={3.1, 13.1, 2.1, 12.1, 7.1, 17.1, 1.1, 11.1, 6.1, 16.1, 5.1, 15.1, 4.1, 14.1}; for(int i=0;i<14;i++) CPPUNIT_ASSERT_DOUBLES_EQUAL(expected1[i],a->getIJ(0,i),1e-14); @@ -334,8 +334,8 @@ void MEDCouplingBasicsTest3::testDaDoubleRenumberInPlace1() const int arr3[14]={1,11,2,12,3,13,4,14,5,15,6,16,7,17}; std::copy(arr3,arr3+14,c->getPointer()); c->renumberInPlace(arr2); - CPPUNIT_ASSERT_EQUAL(7,c->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(2,c->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(7,(int)c->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(2,(int)c->getNumberOfComponents()); const int expected2[14]={3, 13, 2, 12, 7, 17, 1, 11, 6, 16, 5, 15, 4, 14}; for(int i=0;i<14;i++) CPPUNIT_ASSERT_EQUAL(expected2[i],c->getIJ(0,i)); @@ -353,8 +353,8 @@ void MEDCouplingBasicsTest3::testDaDoubleRenumberR1() // const int arr2[7]={3,1,0,6,5,4,2}; DataArrayDouble *b=a->renumberR(arr2); - CPPUNIT_ASSERT_EQUAL(7,b->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(2,b->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(7,(int)b->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(2,(int)b->getNumberOfComponents()); CPPUNIT_ASSERT(std::string(b->getInfoOnComponent(0))=="toto"); CPPUNIT_ASSERT(std::string(b->getInfoOnComponent(1))=="tata"); const double expected1[14]={4.1, 14.1, 2.1, 12.1, 1.1, 11.1, 7.1, 17.1, 6.1, 16.1, 5.1, 15.1, 3.1, 13.1}; @@ -370,8 +370,8 @@ void MEDCouplingBasicsTest3::testDaDoubleRenumberR1() const int arr3[14]={1,11,2,12,3,13,4,14,5,15,6,16,7,17}; std::copy(arr3,arr3+14,c->getPointer()); DataArrayInt *d=c->renumberR(arr2); - CPPUNIT_ASSERT_EQUAL(7,d->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(2,d->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(7,(int)d->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(2,(int)d->getNumberOfComponents()); CPPUNIT_ASSERT(std::string(d->getInfoOnComponent(0))=="toto"); CPPUNIT_ASSERT(std::string(d->getInfoOnComponent(1))=="tata"); const int expected2[14]={4, 14, 2, 12, 1, 11, 7, 17, 6, 16, 5, 15, 3, 13}; @@ -390,8 +390,8 @@ void MEDCouplingBasicsTest3::testDaDoubleRenumberInPlaceR1() // const int arr2[7]={3,1,0,6,5,4,2}; a->renumberInPlaceR(arr2); - CPPUNIT_ASSERT_EQUAL(7,a->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(2,a->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(7,(int)a->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(2,(int)a->getNumberOfComponents()); const double expected1[14]={4.1, 14.1, 2.1, 12.1, 1.1, 11.1, 7.1, 17.1, 6.1, 16.1, 5.1, 15.1, 3.1, 13.1}; for(int i=0;i<14;i++) CPPUNIT_ASSERT_DOUBLES_EQUAL(expected1[i],a->getIJ(0,i),1e-14); @@ -402,8 +402,8 @@ void MEDCouplingBasicsTest3::testDaDoubleRenumberInPlaceR1() const int arr3[14]={1,11,2,12,3,13,4,14,5,15,6,16,7,17}; std::copy(arr3,arr3+14,c->getPointer()); c->renumberInPlaceR(arr2); - CPPUNIT_ASSERT_EQUAL(7,c->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(2,c->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(7,(int)c->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(2,(int)c->getNumberOfComponents()); const int expected2[14]={4, 14, 2, 12, 1, 11, 7, 17, 6, 16, 5, 15, 3, 13}; for(int i=0;i<14;i++) CPPUNIT_ASSERT_EQUAL(expected2[i],c->getIJ(0,i)); @@ -421,8 +421,8 @@ void MEDCouplingBasicsTest3::testDaDoubleSelectByTupleId1() // const int arr2[7]={4,2,0,6,5}; DataArrayDouble *b=a->selectByTupleId(arr2,arr2+5); - CPPUNIT_ASSERT_EQUAL(5,b->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(2,b->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(5,(int)b->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(2,(int)b->getNumberOfComponents()); CPPUNIT_ASSERT(std::string(b->getInfoOnComponent(0))=="toto"); CPPUNIT_ASSERT(std::string(b->getInfoOnComponent(1))=="tata"); const double expected1[10]={5.1,15.1,3.1,13.1,1.1,11.1,7.1,17.1,6.1,16.1}; @@ -438,8 +438,8 @@ void MEDCouplingBasicsTest3::testDaDoubleSelectByTupleId1() const int arr3[14]={1,11,2,12,3,13,4,14,5,15,6,16,7,17}; std::copy(arr3,arr3+14,c->getPointer()); DataArrayInt *d=c->selectByTupleId(arr2,arr2+5); - CPPUNIT_ASSERT_EQUAL(5,d->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(2,d->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(5,(int)d->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(2,(int)d->getNumberOfComponents()); CPPUNIT_ASSERT(std::string(d->getInfoOnComponent(0))=="toto"); CPPUNIT_ASSERT(std::string(d->getInfoOnComponent(1))=="tata"); const int expected2[10]={5,15,3,13,1,11,7,17,6,16}; @@ -462,8 +462,8 @@ void MEDCouplingBasicsTest3::testDaDoubleGetMinMaxValues1() DataArrayInt *ws; m=a->getMaxValue2(ws); CPPUNIT_ASSERT_DOUBLES_EQUAL(4.56,m,1e-12); - CPPUNIT_ASSERT_EQUAL(3,ws->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,ws->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(3,(int)ws->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)ws->getNumberOfComponents()); const int expected1[3]={1,4,8}; for(int i=0;i<3;i++) CPPUNIT_ASSERT_EQUAL(expected1[i],ws->getIJ(i,0)); @@ -479,8 +479,8 @@ void MEDCouplingBasicsTest3::testDaDoubleGetMinMaxValues1() CPPUNIT_ASSERT_DOUBLES_EQUAL(-4.56,m,1e-12); m=a->getMinValue2(ws); CPPUNIT_ASSERT_DOUBLES_EQUAL(-4.56,m,1e-12); - CPPUNIT_ASSERT_EQUAL(3,ws->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,ws->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(3,(int)ws->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)ws->getNumberOfComponents()); for(int i=0;i<3;i++) CPPUNIT_ASSERT_EQUAL(expected1[i],ws->getIJ(i,0)); ws->decrRef(); @@ -508,8 +508,8 @@ void MEDCouplingBasicsTest3::testFieldDoubleGetMinMaxValues2() DataArrayInt *ws; m=f->getMaxValue2(ws); CPPUNIT_ASSERT_DOUBLES_EQUAL(8.71,m,1e-12); - CPPUNIT_ASSERT_EQUAL(4,ws->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,ws->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(4,(int)ws->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)ws->getNumberOfComponents()); const int expected1[4]={0,3,7,17}; for(int i=0;i<4;i++) CPPUNIT_ASSERT_EQUAL(expected1[i],ws->getIJ(i,0)); @@ -522,8 +522,8 @@ void MEDCouplingBasicsTest3::testFieldDoubleGetMinMaxValues2() CPPUNIT_ASSERT_DOUBLES_EQUAL(-8.71,m,1e-12); m=f->getMinValue2(ws); CPPUNIT_ASSERT_DOUBLES_EQUAL(-8.71,m,1e-12); - CPPUNIT_ASSERT_EQUAL(4,ws->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,ws->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(4,(int)ws->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)ws->getNumberOfComponents()); for(int i=0;i<4;i++) CPPUNIT_ASSERT_EQUAL(expected1[i],ws->getIJ(i,0)); ws->decrRef(); @@ -559,8 +559,8 @@ void MEDCouplingBasicsTest3::testBuildUnstructuredCMesh1() m2->checkConsistencyLight(); MEDCouplingFieldDouble *f1=m->getMeasureField(false); MEDCouplingFieldDouble *f2=m2->getMeasureField(false); - CPPUNIT_ASSERT_EQUAL(f1->getNumberOfTuples(),3); - CPPUNIT_ASSERT_EQUAL(f2->getNumberOfTuples(),3); + CPPUNIT_ASSERT_EQUAL((int)f1->getNumberOfTuples(),3); + CPPUNIT_ASSERT_EQUAL((int)f2->getNumberOfTuples(),3); CPPUNIT_ASSERT_EQUAL(1,m2->getMeshDimension()); CPPUNIT_ASSERT_EQUAL(1,m2->getSpaceDimension()); for(int i=0;i<3;i++) @@ -578,8 +578,8 @@ void MEDCouplingBasicsTest3::testBuildUnstructuredCMesh1() m2->checkConsistencyLight(); f1=m->getMeasureField(false); f2=m2->getMeasureField(false); - CPPUNIT_ASSERT_EQUAL(f1->getNumberOfTuples(),6); - CPPUNIT_ASSERT_EQUAL(f2->getNumberOfTuples(),6); + CPPUNIT_ASSERT_EQUAL((int)f1->getNumberOfTuples(),6); + CPPUNIT_ASSERT_EQUAL((int)f2->getNumberOfTuples(),6); CPPUNIT_ASSERT_EQUAL(2,m2->getMeshDimension()); CPPUNIT_ASSERT_EQUAL(2,m2->getSpaceDimension()); for(int i=0;i<6;i++) @@ -597,8 +597,8 @@ void MEDCouplingBasicsTest3::testBuildUnstructuredCMesh1() m2->checkConsistencyLight(); f1=m->getMeasureField(false); f2=m2->getMeasureField(false); - CPPUNIT_ASSERT_EQUAL(f1->getNumberOfTuples(),24); - CPPUNIT_ASSERT_EQUAL(f2->getNumberOfTuples(),24); + CPPUNIT_ASSERT_EQUAL((int)f1->getNumberOfTuples(),24); + CPPUNIT_ASSERT_EQUAL((int)f2->getNumberOfTuples(),24); CPPUNIT_ASSERT_EQUAL(3,m2->getMeshDimension()); CPPUNIT_ASSERT_EQUAL(3,m2->getSpaceDimension()); for(int i=0;i<24;i++) @@ -627,8 +627,8 @@ void MEDCouplingBasicsTest3::testDataArrayIntInvertO2NNO21() da->alloc(6,1); std::copy(arr1,arr1+6,da->getPointer()); DataArrayInt *da2=da->invertArrayO2N2N2O(6); - CPPUNIT_ASSERT_EQUAL(6,da2->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,da2->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(6,(int)da2->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)da2->getNumberOfComponents()); const int expected1[6]={1,3,0,5,2,4}; for(int i=0;i<6;i++) CPPUNIT_ASSERT_EQUAL(expected1[i],da2->getIJ(i,0)); @@ -644,8 +644,8 @@ void MEDCouplingBasicsTest3::testDataArrayIntInvertO2NNO21() da->alloc(10,1); std::copy(arr2,arr2+10,da->getPointer()); da2=da->invertArrayO2N2N2O(6); - CPPUNIT_ASSERT_EQUAL(6,da2->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,da2->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(6,(int)da2->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)da2->getNumberOfComponents()); const int expected2[10]={5,7,8,0,3,2}; for(int i=0;i<6;i++) CPPUNIT_ASSERT_EQUAL(expected2[i],da2->getIJ(i,0)); @@ -670,8 +670,8 @@ void MEDCouplingBasicsTest3::testKeepSetSelectedComponent1() const int arr2[6]={1,2,1,2,0,0}; std::vector arr2V(arr2,arr2+6); DataArrayDouble *a2=static_cast(a1->keepSelectedComponents(arr2V)); - CPPUNIT_ASSERT_EQUAL(6,a2->getNumberOfComponents()); - CPPUNIT_ASSERT_EQUAL(5,a2->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(6,(int)a2->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(5,(int)a2->getNumberOfTuples()); CPPUNIT_ASSERT(std::string(a2->getInfoOnComponent(0))=="bbbb"); CPPUNIT_ASSERT(std::string(a2->getInfoOnComponent(1))=="cccc"); CPPUNIT_ASSERT(std::string(a2->getInfoOnComponent(2))=="bbbb"); @@ -683,8 +683,8 @@ void MEDCouplingBasicsTest3::testKeepSetSelectedComponent1() CPPUNIT_ASSERT_DOUBLES_EQUAL(expected1[i],a2->getIJ(0,i),1e-14); DataArrayInt *a3=a1->convertToIntArr(); DataArrayInt *a4=static_cast(a3->keepSelectedComponents(arr2V)); - CPPUNIT_ASSERT_EQUAL(6,a4->getNumberOfComponents()); - CPPUNIT_ASSERT_EQUAL(5,a4->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(6,(int)a4->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(5,(int)a4->getNumberOfTuples()); CPPUNIT_ASSERT(std::string(a4->getInfoOnComponent(0))=="bbbb"); CPPUNIT_ASSERT(std::string(a4->getInfoOnComponent(1))=="cccc"); CPPUNIT_ASSERT(std::string(a4->getInfoOnComponent(2))=="bbbb"); @@ -702,8 +702,8 @@ void MEDCouplingBasicsTest3::testKeepSetSelectedComponent1() const int arr4[2]={1,2}; std::vector arr4V(arr4,arr4+2); a2->setSelectedComponents(a5,arr4V); - CPPUNIT_ASSERT_EQUAL(6,a2->getNumberOfComponents()); - CPPUNIT_ASSERT_EQUAL(5,a2->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(6,(int)a2->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(5,(int)a2->getNumberOfTuples()); CPPUNIT_ASSERT(std::string(a2->getInfoOnComponent(0))=="bbbb"); CPPUNIT_ASSERT(std::string(a2->getInfoOnComponent(1))=="eeee"); CPPUNIT_ASSERT(std::string(a2->getInfoOnComponent(2))=="ffff"); @@ -717,8 +717,8 @@ void MEDCouplingBasicsTest3::testKeepSetSelectedComponent1() a6->setInfoOnComponent(0,"eeee"); a6->setInfoOnComponent(1,"ffff"); a4->setSelectedComponents(a6,arr4V); - CPPUNIT_ASSERT_EQUAL(6,a4->getNumberOfComponents()); - CPPUNIT_ASSERT_EQUAL(5,a4->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(6,(int)a4->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(5,(int)a4->getNumberOfTuples()); CPPUNIT_ASSERT(std::string(a4->getInfoOnComponent(0))=="bbbb"); CPPUNIT_ASSERT(std::string(a4->getInfoOnComponent(1))=="eeee"); CPPUNIT_ASSERT(std::string(a4->getInfoOnComponent(2))=="ffff"); @@ -776,8 +776,8 @@ void MEDCouplingBasicsTest3::testKeepSetSelectedComponent2() CPPUNIT_ASSERT_EQUAL(4,dt); CPPUNIT_ASSERT_EQUAL(5,it); f2->checkConsistencyLight(); - CPPUNIT_ASSERT_EQUAL(6,f2->getNumberOfComponents()); - CPPUNIT_ASSERT_EQUAL(5,f2->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(6,(int)f2->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(5,(int)f2->getNumberOfTuples()); CPPUNIT_ASSERT(std::string(f2->getArray()->getInfoOnComponent(0))=="bbbb"); CPPUNIT_ASSERT(std::string(f2->getArray()->getInfoOnComponent(1))=="cccc"); CPPUNIT_ASSERT(std::string(f2->getArray()->getInfoOnComponent(2))=="bbbb"); @@ -798,8 +798,8 @@ void MEDCouplingBasicsTest3::testKeepSetSelectedComponent2() const int arr4[2]={1,2}; std::vector arr4V(arr4,arr4+2); f2->setSelectedComponents(f5,arr4V); - CPPUNIT_ASSERT_EQUAL(6,f2->getNumberOfComponents()); - CPPUNIT_ASSERT_EQUAL(5,f2->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(6,(int)f2->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(5,(int)f2->getNumberOfTuples()); f2->checkConsistencyLight(); CPPUNIT_ASSERT_DOUBLES_EQUAL(2.3,f2->getTime(dt,it),1e-13); CPPUNIT_ASSERT_EQUAL(4,dt); @@ -1030,8 +1030,8 @@ void MEDCouplingBasicsTest3::testDAIGetIdsEqual1() da->alloc(7,1); std::copy(tab1,tab1+7,da->getPointer()); DataArrayInt *da2=da->findIdsEqual(-2); - CPPUNIT_ASSERT_EQUAL(3,da2->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,da2->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(3,(int)da2->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)da2->getNumberOfComponents()); const int expected1[3]={1,3,6}; CPPUNIT_ASSERT(std::equal(expected1,expected1+3,da2->getConstPointer())); da2->decrRef(); @@ -1047,8 +1047,8 @@ void MEDCouplingBasicsTest3::testDAIGetIdsEqualList1() const int tab2[3]={3,-2,0}; std::vector tab2V(tab2,tab2+3); DataArrayInt *da2=da->findIdsEqualList(&tab2V[0],&tab2V[0]+tab2V.size()); - CPPUNIT_ASSERT_EQUAL(4,da2->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,da2->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(4,(int)da2->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)da2->getNumberOfComponents()); const int expected1[4]={1,3,4,6}; CPPUNIT_ASSERT(std::equal(expected1,expected1+4,da2->getConstPointer())); da2->decrRef(); @@ -1063,13 +1063,13 @@ void MEDCouplingBasicsTest3::testDAFromNoInterlace1() std::copy(tab1,tab1+15,da->getPointer()); DataArrayInt *da2=da->fromNoInterlace(); const int expected1[15]={1,2,3,11,12,13,21,22,23,31,32,33,41,42,43}; - CPPUNIT_ASSERT_EQUAL(5,da2->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(3,da2->getNumberOfComponents());// it's not a bug. Avoid to have 1 million components ! + CPPUNIT_ASSERT_EQUAL(5,(int)da2->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(3,(int)da2->getNumberOfComponents());// it's not a bug. Avoid to have 1 million components ! CPPUNIT_ASSERT(std::equal(expected1,expected1+15,da2->getConstPointer())); DataArrayDouble *da3=da->convertToDblArr(); DataArrayDouble *da4=da3->fromNoInterlace(); - CPPUNIT_ASSERT_EQUAL(5,da4->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(3,da4->getNumberOfComponents());// it's not a bug. Avoid to have 1 million components ! + CPPUNIT_ASSERT_EQUAL(5,(int)da4->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(3,(int)da4->getNumberOfComponents());// it's not a bug. Avoid to have 1 million components ! for(int i=0;i<15;i++) CPPUNIT_ASSERT_DOUBLES_EQUAL((double)expected1[i],da4->getIJ(0,i),1e-14); da4->decrRef(); @@ -1086,13 +1086,13 @@ void MEDCouplingBasicsTest3::testDAToNoInterlace1() std::copy(tab1,tab1+15,da->getPointer()); DataArrayInt *da2=da->toNoInterlace(); const int expected1[15]={1,11,21,31,41,2,12,22,32,42,3,13,23,33,43}; - CPPUNIT_ASSERT_EQUAL(5,da2->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(3,da2->getNumberOfComponents());// it's not a bug. Avoid to have 1 million components ! + CPPUNIT_ASSERT_EQUAL(5,(int)da2->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(3,(int)da2->getNumberOfComponents());// it's not a bug. Avoid to have 1 million components ! CPPUNIT_ASSERT(std::equal(expected1,expected1+15,da2->getConstPointer())); DataArrayDouble *da3=da->convertToDblArr(); DataArrayDouble *da4=da3->toNoInterlace(); - CPPUNIT_ASSERT_EQUAL(5,da4->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(3,da4->getNumberOfComponents());// it's not a bug. Avoid to have 1 million components ! + CPPUNIT_ASSERT_EQUAL(5,(int)da4->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(3,(int)da4->getNumberOfComponents());// it's not a bug. Avoid to have 1 million components ! for(int i=0;i<15;i++) CPPUNIT_ASSERT_DOUBLES_EQUAL((double)expected1[i],da4->getIJ(0,i),1e-14); da4->decrRef(); @@ -1256,15 +1256,15 @@ void MEDCouplingBasicsTest3::testGetNodeIdsNearPoints1() tmp2->decrRef(); const double pts[6]={0.2,0.2,0.1,0.3,-0.3,0.7}; DataArrayInt *c=mesh->getNodeIdsNearPoint(pts,1e-7); - CPPUNIT_ASSERT_EQUAL(3,c->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(3,(int)c->getNumberOfTuples()); CPPUNIT_ASSERT_EQUAL(4,c->getIJ(0,0)); CPPUNIT_ASSERT_EQUAL(9,c->getIJ(1,0)); CPPUNIT_ASSERT_EQUAL(11,c->getIJ(2,0)); c->decrRef(); DataArrayInt *cI=0; mesh->getNodeIdsNearPoints(pts,3,1e-7,c,cI); - CPPUNIT_ASSERT_EQUAL(4,cI->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(4,c->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(4,(int)cI->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(4,(int)c->getNumberOfTuples()); CPPUNIT_ASSERT_EQUAL(4,c->getIJ(0,0)); CPPUNIT_ASSERT_EQUAL(9,c->getIJ(1,0)); CPPUNIT_ASSERT_EQUAL(11,c->getIJ(2,0)); @@ -1555,8 +1555,8 @@ void MEDCouplingBasicsTest3::testSimplexize1() v[0]=3; m->convertToPolyTypes(&v[0],&v[0]+v.size()); DataArrayInt *da=m->simplexize(0); - CPPUNIT_ASSERT_EQUAL(7,da->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,da->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(7,(int)da->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)da->getNumberOfComponents()); const int expected2[7]={0,0,1,2,3,4,4}; for(int i=0;i<7;i++) CPPUNIT_ASSERT_EQUAL(expected2[i],da->getIJ(i,0)); @@ -1585,8 +1585,8 @@ void MEDCouplingBasicsTest3::testSimplexize1() v[0]=3; m->convertToPolyTypes(&v[0],&v[0]+v.size()); da=m->simplexize(1); - CPPUNIT_ASSERT_EQUAL(7,da->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,da->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(7,(int)da->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)da->getNumberOfComponents()); for(int i=0;i<7;i++) CPPUNIT_ASSERT_EQUAL(expected2[i],da->getIJ(i,0)); m->checkConsistencyLight(); @@ -1658,8 +1658,8 @@ void MEDCouplingBasicsTest3::testDAMeld1() // DataArrayDouble *da1C=da1->deepCopy(); da1->meldWith(da3); - CPPUNIT_ASSERT_EQUAL(5,da1->getNumberOfComponents()); - CPPUNIT_ASSERT_EQUAL(7,da1->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(5,(int)da1->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(7,(int)da1->getNumberOfTuples()); CPPUNIT_ASSERT(da1->getInfoOnComponent(0)=="c0da1"); CPPUNIT_ASSERT(da1->getInfoOnComponent(1)=="c1da1"); CPPUNIT_ASSERT(da1->getInfoOnComponent(2)=="c0da3"); @@ -1673,8 +1673,8 @@ void MEDCouplingBasicsTest3::testDAMeld1() DataArrayInt *dai1=da1C->convertToIntArr(); DataArrayInt *dai3=da3->convertToIntArr(); dai1->meldWith(dai3); - CPPUNIT_ASSERT_EQUAL(5,dai1->getNumberOfComponents()); - CPPUNIT_ASSERT_EQUAL(7,dai1->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(5,(int)dai1->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(7,(int)dai1->getNumberOfTuples()); CPPUNIT_ASSERT(dai1->getInfoOnComponent(0)=="c0da1"); CPPUNIT_ASSERT(dai1->getInfoOnComponent(1)=="c1da1"); CPPUNIT_ASSERT(dai1->getInfoOnComponent(2)=="c0da3"); @@ -1684,8 +1684,8 @@ void MEDCouplingBasicsTest3::testDAMeld1() CPPUNIT_ASSERT_EQUAL((int)expected1[i],dai1->getIJ(0,i)); // test of static method DataArrayDouble::meld DataArrayDouble *da4=DataArrayDouble::Meld(da1C,da3); - CPPUNIT_ASSERT_EQUAL(5,da4->getNumberOfComponents()); - CPPUNIT_ASSERT_EQUAL(7,da4->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(5,(int)da4->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(7,(int)da4->getNumberOfTuples()); CPPUNIT_ASSERT(da4->getInfoOnComponent(0)=="c0da1"); CPPUNIT_ASSERT(da4->getInfoOnComponent(1)=="c1da1"); CPPUNIT_ASSERT(da4->getInfoOnComponent(2)=="c0da3"); @@ -1697,8 +1697,8 @@ void MEDCouplingBasicsTest3::testDAMeld1() dai1->decrRef(); dai1=da1C->convertToIntArr(); DataArrayInt *dai4=DataArrayInt::Meld(dai1,dai3); - CPPUNIT_ASSERT_EQUAL(5,dai4->getNumberOfComponents()); - CPPUNIT_ASSERT_EQUAL(7,dai4->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(5,(int)dai4->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(7,(int)dai4->getNumberOfTuples()); CPPUNIT_ASSERT(dai4->getInfoOnComponent(0)=="c0da1"); CPPUNIT_ASSERT(dai4->getInfoOnComponent(1)=="c1da1"); CPPUNIT_ASSERT(dai4->getInfoOnComponent(2)=="c0da3"); @@ -1742,8 +1742,8 @@ void MEDCouplingBasicsTest3::testFieldMeld1() // MEDCouplingFieldDouble *f3=MEDCouplingFieldDouble::MeldFields(f2,f1); f3->checkConsistencyLight(); - CPPUNIT_ASSERT_EQUAL(5,f3->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(3,f3->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(5,(int)f3->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(3,(int)f3->getNumberOfComponents()); CPPUNIT_ASSERT(f3->getArray()->getInfoOnComponent(0)=="bbb"); CPPUNIT_ASSERT(f3->getArray()->getInfoOnComponent(1)=="ccc"); CPPUNIT_ASSERT(f3->getArray()->getInfoOnComponent(2)=="aaa"); @@ -1760,8 +1760,8 @@ void MEDCouplingBasicsTest3::testFieldMeld1() MEDCouplingFieldDouble *f5=f1->buildNewTimeReprFromThis(NO_TIME,false); MEDCouplingFieldDouble *f6=MEDCouplingFieldDouble::MeldFields(f4,f5); f6->checkConsistencyLight(); - CPPUNIT_ASSERT_EQUAL(5,f6->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(3,f6->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(5,(int)f6->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(3,(int)f6->getNumberOfComponents()); CPPUNIT_ASSERT(f6->getArray()->getInfoOnComponent(0)=="bbb"); CPPUNIT_ASSERT(f6->getArray()->getInfoOnComponent(1)=="ccc"); CPPUNIT_ASSERT(f6->getArray()->getInfoOnComponent(2)=="aaa"); @@ -1850,8 +1850,8 @@ void MEDCouplingBasicsTest3::testDAIBuildComplement1() a->alloc(4,1); std::copy(tab,tab+4,a->getPointer()); DataArrayInt *b=a->buildComplement(12); - CPPUNIT_ASSERT_EQUAL(8,b->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,b->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(8,(int)b->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)b->getNumberOfComponents()); const int expected1[8]={0,2,4,5,6,9,10,11}; for(int i=0;i<8;i++) CPPUNIT_ASSERT_EQUAL(expected1[i],b->getIJ(0,i)); @@ -1870,8 +1870,8 @@ void MEDCouplingBasicsTest3::testDAIBuildUnion1() c->alloc(5,1); std::copy(tab2,tab2+5,c->getPointer()); DataArrayInt *b=a->buildUnion(c); - CPPUNIT_ASSERT_EQUAL(7,b->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,b->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(7,(int)b->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)b->getNumberOfComponents()); const int expected1[7]={0,1,3,5,7,8,18}; for(int i=0;i<7;i++) CPPUNIT_ASSERT_EQUAL(expected1[i],b->getIJ(0,i)); @@ -1891,8 +1891,8 @@ void MEDCouplingBasicsTest3::testDAIBuildIntersection1() c->alloc(5,1); std::copy(tab2,tab2+5,c->getPointer()); DataArrayInt *b=a->buildIntersection(c); - CPPUNIT_ASSERT_EQUAL(2,b->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,b->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(2,(int)b->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)b->getNumberOfComponents()); const int expected1[2]={3,8}; for(int i=0;i<2;i++) CPPUNIT_ASSERT_EQUAL(expected1[i],b->getIJ(0,i)); @@ -1908,8 +1908,8 @@ void MEDCouplingBasicsTest3::testDAIDeltaShiftIndex1() a->alloc(7,1); std::copy(tab,tab+7,a->getPointer()); DataArrayInt *b=a->deltaShiftIndex(); - CPPUNIT_ASSERT_EQUAL(6,b->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,b->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(6,(int)b->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)b->getNumberOfComponents()); const int expected1[6]={2,3,1,0,2,6}; for(int i=0;i<6;i++) CPPUNIT_ASSERT_EQUAL(expected1[i],b->getIJ(0,i)); @@ -1928,8 +1928,8 @@ void MEDCouplingBasicsTest3::testDaDoubleSelectByTupleIdSafe1() // const int arr2[7]={4,2,0,6,5}; DataArrayDouble *b=a->selectByTupleIdSafe(arr2,arr2+5); - CPPUNIT_ASSERT_EQUAL(5,b->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(2,b->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(5,(int)b->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(2,(int)b->getNumberOfComponents()); CPPUNIT_ASSERT(std::string(b->getInfoOnComponent(0))=="toto"); CPPUNIT_ASSERT(std::string(b->getInfoOnComponent(1))=="tata"); const double expected1[10]={5.1,15.1,3.1,13.1,1.1,11.1,7.1,17.1,6.1,16.1}; @@ -1949,8 +1949,8 @@ void MEDCouplingBasicsTest3::testDaDoubleSelectByTupleIdSafe1() const int arr3[14]={1,11,2,12,3,13,4,14,5,15,6,16,7,17}; std::copy(arr3,arr3+14,c->getPointer()); DataArrayInt *d=c->selectByTupleIdSafe(arr2,arr2+5); - CPPUNIT_ASSERT_EQUAL(5,d->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(2,d->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(5,(int)d->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(2,(int)d->getNumberOfComponents()); CPPUNIT_ASSERT(std::string(d->getInfoOnComponent(0))=="toto"); CPPUNIT_ASSERT(std::string(d->getInfoOnComponent(1))=="tata"); const int expected2[10]={5,15,3,13,1,11,7,17,6,16}; @@ -1969,8 +1969,8 @@ void MEDCouplingBasicsTest3::testAreCellsIncludedIn1() MEDCouplingUMesh *m2=(MEDCouplingUMesh *)m->buildPartOfMySelf(pt,pt+2,true); DataArrayInt *tmp; CPPUNIT_ASSERT(m->areCellsIncludedIn(m2,0,tmp)); - CPPUNIT_ASSERT_EQUAL(2,tmp->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,tmp->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(2,(int)tmp->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)tmp->getNumberOfComponents()); CPPUNIT_ASSERT_EQUAL(pt[0],tmp->getIJ(0,0)); CPPUNIT_ASSERT_EQUAL(pt[1],tmp->getIJ(0,1)); tmp->decrRef(); @@ -1992,8 +1992,8 @@ void MEDCouplingBasicsTest3::testDAIBuildSubstraction1() std::copy(bb,bb+5,b->getPointer()); // DataArrayInt *c=a->buildSubstraction(b); - CPPUNIT_ASSERT_EQUAL(3,c->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,c->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(3,(int)c->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)c->getNumberOfComponents()); const int expected1[3]={2,6,8}; CPPUNIT_ASSERT(std::equal(expected1,expected1+3,c->getConstPointer())); // @@ -2013,8 +2013,8 @@ void MEDCouplingBasicsTest3::testBuildOrthogonalField2() // MEDCouplingFieldDouble *f1=m1->buildOrthogonalField(); DataArrayDouble *da1=f1->getArray(); - CPPUNIT_ASSERT_EQUAL(2,da1->getNumberOfComponents()); - CPPUNIT_ASSERT_EQUAL(13,da1->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(2,(int)da1->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(13,(int)da1->getNumberOfTuples()); // const double expected1[26]={-1.,0.,0.,1.,1.,0.,0.,-1.,0.707106781186548,0.707106781186548,0.,-1.,0.,1.,1.,0.,0.,1.,1.,0.,-1.,0.,0.,1.,1.,0.}; for(int i=0;i<26;i++) @@ -2104,21 +2104,21 @@ void MEDCouplingBasicsTest3::testDARearrange1() const int *ptr=da1->getConstPointer(); // CPPUNIT_ASSERT_EQUAL((std::size_t)12,da1->getNbOfElems()); - CPPUNIT_ASSERT_EQUAL(1,da1->getNumberOfComponents()); - CPPUNIT_ASSERT_EQUAL(12,da1->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)da1->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(12,(int)da1->getNumberOfTuples()); da1->rearrange(4); CPPUNIT_ASSERT(ptr==da1->getConstPointer()); CPPUNIT_ASSERT_EQUAL((std::size_t)12,da1->getNbOfElems()); - CPPUNIT_ASSERT_EQUAL(4,da1->getNumberOfComponents()); - CPPUNIT_ASSERT_EQUAL(3,da1->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(4,(int)da1->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(3,(int)da1->getNumberOfTuples()); for(int i=0;i<12;i++) CPPUNIT_ASSERT_EQUAL(i,da1->getIJ(0,i)); // da1->rearrange(6); CPPUNIT_ASSERT(ptr==da1->getConstPointer()); CPPUNIT_ASSERT_EQUAL((std::size_t)12,da1->getNbOfElems()); - CPPUNIT_ASSERT_EQUAL(6,da1->getNumberOfComponents()); - CPPUNIT_ASSERT_EQUAL(2,da1->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(6,(int)da1->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(2,(int)da1->getNumberOfTuples()); for(int i=0;i<12;i++) CPPUNIT_ASSERT_EQUAL(i,da1->getIJ(0,i)); // @@ -2127,16 +2127,16 @@ void MEDCouplingBasicsTest3::testDARearrange1() da1->rearrange(12); CPPUNIT_ASSERT(ptr==da1->getConstPointer()); CPPUNIT_ASSERT_EQUAL((std::size_t)12,da1->getNbOfElems()); - CPPUNIT_ASSERT_EQUAL(12,da1->getNumberOfComponents()); - CPPUNIT_ASSERT_EQUAL(1,da1->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(12,(int)da1->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(1,(int)da1->getNumberOfTuples()); for(int i=0;i<12;i++) CPPUNIT_ASSERT_EQUAL(i,da1->getIJ(0,i)); // da1->rearrange(3); CPPUNIT_ASSERT(ptr==da1->getConstPointer()); CPPUNIT_ASSERT_EQUAL((std::size_t)12,da1->getNbOfElems()); - CPPUNIT_ASSERT_EQUAL(3,da1->getNumberOfComponents()); - CPPUNIT_ASSERT_EQUAL(4,da1->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(3,(int)da1->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(4,(int)da1->getNumberOfTuples()); for(int i=0;i<12;i++) CPPUNIT_ASSERT_EQUAL(i,da1->getIJ(0,i)); //double @@ -2145,21 +2145,21 @@ void MEDCouplingBasicsTest3::testDARearrange1() const double *ptr2=da2->getConstPointer(); // CPPUNIT_ASSERT_EQUAL((std::size_t)12,da2->getNbOfElems()); - CPPUNIT_ASSERT_EQUAL(3,da2->getNumberOfComponents()); - CPPUNIT_ASSERT_EQUAL(4,da2->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(3,(int)da2->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(4,(int)da2->getNumberOfTuples()); da2->rearrange(4); CPPUNIT_ASSERT(ptr2==da2->getConstPointer()); CPPUNIT_ASSERT_EQUAL((std::size_t)12,da2->getNbOfElems()); - CPPUNIT_ASSERT_EQUAL(4,da2->getNumberOfComponents()); - CPPUNIT_ASSERT_EQUAL(3,da2->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(4,(int)da2->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(3,(int)da2->getNumberOfTuples()); for(int i=0;i<12;i++) CPPUNIT_ASSERT_DOUBLES_EQUAL((double)i,da2->getIJ(0,i),1e-14); // da2->rearrange(6); CPPUNIT_ASSERT(ptr2==da2->getConstPointer()); CPPUNIT_ASSERT_EQUAL((std::size_t)12,da2->getNbOfElems()); - CPPUNIT_ASSERT_EQUAL(6,da2->getNumberOfComponents()); - CPPUNIT_ASSERT_EQUAL(2,da2->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(6,(int)da2->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(2,(int)da2->getNumberOfTuples()); for(int i=0;i<12;i++) CPPUNIT_ASSERT_DOUBLES_EQUAL((double)i,da2->getIJ(0,i),1e-14); // @@ -2168,16 +2168,16 @@ void MEDCouplingBasicsTest3::testDARearrange1() da2->rearrange(1); CPPUNIT_ASSERT(ptr2==da2->getConstPointer()); CPPUNIT_ASSERT_EQUAL((std::size_t)12,da2->getNbOfElems()); - CPPUNIT_ASSERT_EQUAL(1,da2->getNumberOfComponents()); - CPPUNIT_ASSERT_EQUAL(12,da2->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)da2->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(12,(int)da2->getNumberOfTuples()); for(int i=0;i<12;i++) CPPUNIT_ASSERT_DOUBLES_EQUAL((double)i,da2->getIJ(0,i),1e-14); // da2->rearrange(3); CPPUNIT_ASSERT(ptr2==da2->getConstPointer()); CPPUNIT_ASSERT_EQUAL((std::size_t)12,da2->getNbOfElems()); - CPPUNIT_ASSERT_EQUAL(3,da2->getNumberOfComponents()); - CPPUNIT_ASSERT_EQUAL(4,da2->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(3,(int)da2->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(4,(int)da2->getNumberOfTuples()); for(int i=0;i<12;i++) CPPUNIT_ASSERT_DOUBLES_EQUAL((double)i,da2->getIJ(0,i),1e-14); da2->decrRef(); @@ -2209,8 +2209,8 @@ void MEDCouplingBasicsTest3::testDAIBuildPermutationArr1() std::copy(valb,valb+5,b->getPointer()); DataArrayInt *c=a->buildPermutationArr(*b); const int expect1[5]={1,0,4,2,3}; - CPPUNIT_ASSERT_EQUAL(5,c->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,c->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(5,(int)c->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)c->getNumberOfComponents()); CPPUNIT_ASSERT(std::equal(expect1,expect1+5,c->getConstPointer())); CPPUNIT_ASSERT(a->isEqualWithoutConsideringStrAndOrder(*b)); b->setIJ(0,0,9); @@ -2229,8 +2229,8 @@ void MEDCouplingBasicsTest3::testDAIBuildPermutationArr1() const int expect3[5]={4,4,5,6,8}; CPPUNIT_ASSERT(std::equal(expect3,expect3+5,b->getConstPointer())); d->sort(); - CPPUNIT_ASSERT_EQUAL(5,d->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,d->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(5,(int)d->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)d->getNumberOfComponents()); for(int i=0;i<5;i++) CPPUNIT_ASSERT_DOUBLES_EQUAL(double(expect3[i]),d->getIJ(i,0),1e-14); // @@ -2252,8 +2252,8 @@ void MEDCouplingBasicsTest3::testAreCellsIncludedIn2() DataArrayInt *tmp; CPPUNIT_ASSERT(m->areCellsIncludedIn(m2,0,tmp)); CPPUNIT_ASSERT(std::string(myName)==tmp->getName()); - CPPUNIT_ASSERT_EQUAL(0,tmp->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,tmp->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(0,(int)tmp->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)tmp->getNumberOfComponents()); m->decrRef(); m2->decrRef(); tmp->decrRef(); @@ -2264,8 +2264,8 @@ void MEDCouplingBasicsTest3::testUMeshGetPartBarycenterAndOwner1() MEDCouplingUMesh *m1=build2DTargetMesh_1(); const int part[3]={1,0,4}; DataArrayDouble *b=m1->getPartBarycenterAndOwner(part,part+3); - CPPUNIT_ASSERT_EQUAL(2,b->getNumberOfComponents()); - CPPUNIT_ASSERT_EQUAL(3,b->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(2,(int)b->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(3,(int)b->getNumberOfTuples()); const double expected1[6]={0.36666666666666665,-0.13333333333333333,-0.05,-0.05,0.45,0.45}; for(int i=0;i<6;i++) CPPUNIT_ASSERT_DOUBLES_EQUAL(expected1[i],b->getIJ(0,i),1e-14); @@ -2278,8 +2278,8 @@ void MEDCouplingBasicsTest3::testUMeshGetPartMeasureField1() MEDCouplingUMesh *m1=build2DTargetMesh_1(); const int part[3]={1,0,4}; DataArrayDouble *b=m1->getPartMeasureField(true,part,part+3); - CPPUNIT_ASSERT_EQUAL(1,b->getNumberOfComponents()); - CPPUNIT_ASSERT_EQUAL(3,b->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)b->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(3,(int)b->getNumberOfTuples()); const double expected1[3]={0.125,0.25,0.25}; for(int i=0;i<3;i++) CPPUNIT_ASSERT_DOUBLES_EQUAL(expected1[i],b->getIJ(0,i),1e-14); @@ -2293,8 +2293,8 @@ void MEDCouplingBasicsTest3::testUMeshBuildPartOrthogonalField1() m1->changeSpaceDimension(3); const int part[3]={1,0,4}; MEDCouplingFieldDouble *b=m1->buildPartOrthogonalField(part,part+3); - CPPUNIT_ASSERT_EQUAL(3,b->getArray()->getNumberOfComponents()); - CPPUNIT_ASSERT_EQUAL(3,b->getArray()->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(3,(int)b->getArray()->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(3,(int)b->getArray()->getNumberOfTuples()); const double expected1[9]={0.,0.,-1.,0.,0.,-1.,0.,0.,-1.}; for(int i=0;i<9;i++) CPPUNIT_ASSERT_DOUBLES_EQUAL(expected1[i],b->getArray()->getIJ(0,i),1e-14); @@ -2327,21 +2327,21 @@ void MEDCouplingBasicsTest3::testUMeshKeepCellIdsByType1() MEDCouplingUMesh *m1=build2DTargetMesh_1(); const int part1[3]={0,3,4}; DataArrayInt *a=m1->keepCellIdsByType(INTERP_KERNEL::NORM_TRI3,part1,part1+3); - CPPUNIT_ASSERT_EQUAL(1,a->getNumberOfComponents()); - CPPUNIT_ASSERT_EQUAL(0,a->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)a->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(0,(int)a->getNumberOfTuples()); a->decrRef(); // const int part2[5]={3,2,0,2,4}; a=m1->keepCellIdsByType(INTERP_KERNEL::NORM_TRI3,part2,part2+5); - CPPUNIT_ASSERT_EQUAL(1,a->getNumberOfComponents()); - CPPUNIT_ASSERT_EQUAL(2,a->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)a->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(2,(int)a->getNumberOfTuples()); CPPUNIT_ASSERT_EQUAL(2,a->getIJ(0,0)); CPPUNIT_ASSERT_EQUAL(2,a->getIJ(1,0)); a->decrRef(); // a=m1->keepCellIdsByType(INTERP_KERNEL::NORM_QUAD4,part2,part2+5); - CPPUNIT_ASSERT_EQUAL(1,a->getNumberOfComponents()); - CPPUNIT_ASSERT_EQUAL(3,a->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)a->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(3,(int)a->getNumberOfTuples()); CPPUNIT_ASSERT_EQUAL(3,a->getIJ(0,0)); CPPUNIT_ASSERT_EQUAL(0,a->getIJ(1,0)); CPPUNIT_ASSERT_EQUAL(4,a->getIJ(2,0)); @@ -2366,8 +2366,8 @@ void MEDCouplingBasicsTest3::testDAIAggregateMulti1() std::vector v(2); v[0]=a; v[1]=b; DataArrayInt *c=DataArrayInt::Aggregate(v); - CPPUNIT_ASSERT_EQUAL(5,c->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(2,c->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(5,(int)c->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(2,(int)c->getNumberOfComponents()); CPPUNIT_ASSERT(c->getName()=="aa"); const int expect1[10]={0,1,2,3,0,1,2,3,4,5}; for(int i=0;i<10;i++) diff --git a/src/MEDCoupling/Test/MEDCouplingBasicsTest4.cxx b/src/MEDCoupling/Test/MEDCouplingBasicsTest4.cxx index a83e5e866..6ed02e3ed 100644 --- a/src/MEDCoupling/Test/MEDCouplingBasicsTest4.cxx +++ b/src/MEDCoupling/Test/MEDCouplingBasicsTest4.cxx @@ -167,8 +167,8 @@ void MEDCouplingBasicsTest4::testDAICheckAndPreparePermutation1() da->alloc(8,1); std::copy(vals1,vals1+8,da->getPointer()); DataArrayInt *da2=da->checkAndPreparePermutation(); - CPPUNIT_ASSERT_EQUAL(8,da2->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,da2->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(8,(int)da2->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)da2->getNumberOfComponents()); for(int i=0;i<8;i++) CPPUNIT_ASSERT_EQUAL(expect1[i],da2->getIJ(i,0)); da2->decrRef(); @@ -178,7 +178,7 @@ void MEDCouplingBasicsTest4::testDAICheckAndPreparePermutation1() da->alloc(8,1); da->iota(0); da2=da->checkAndPreparePermutation(); - CPPUNIT_ASSERT_EQUAL(1,da2->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(1,(int)da2->getNumberOfComponents()); CPPUNIT_ASSERT(da2->isIota(8)); da2->decrRef(); da->decrRef(); @@ -201,8 +201,8 @@ void MEDCouplingBasicsTest4::testDAIChangeSurjectiveFormat1() // DataArrayInt *da2,*da2I; da->changeSurjectiveFormat(4,da2,da2I); - CPPUNIT_ASSERT_EQUAL(5,da2I->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(8,da2->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(5,(int)da2I->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(8,(int)da2->getNumberOfTuples()); CPPUNIT_ASSERT(std::equal(expected1,expected1+5,da2I->getConstPointer())); CPPUNIT_ASSERT(std::equal(expected2,expected2+8,da2->getConstPointer())); da2->decrRef(); @@ -219,13 +219,13 @@ void MEDCouplingBasicsTest4::testUMeshGetCellIdsLyingOnNodes1() const int nodeIds1[5]={1,2,3,4,6}; const int nodeIds2[2]={6,7}; DataArrayInt *da=m->getCellIdsLyingOnNodes(nodeIds1,nodeIds1+5,true); - CPPUNIT_ASSERT_EQUAL(1,da->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,da->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(1,(int)da->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)da->getNumberOfComponents()); CPPUNIT_ASSERT_EQUAL(1,da->getIJ(0,0)); da->decrRef(); da=m->getCellIdsLyingOnNodes(nodeIds2,nodeIds2+2,false); - CPPUNIT_ASSERT_EQUAL(2,da->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,da->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(2,(int)da->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)da->getNumberOfComponents()); CPPUNIT_ASSERT_EQUAL(3,da->getIJ(0,0)); CPPUNIT_ASSERT_EQUAL(4,da->getIJ(1,0)); da->decrRef(); @@ -329,8 +329,8 @@ void MEDCouplingBasicsTest4::testApplyFuncTwo1() CPPUNIT_ASSERT_THROW(da->applyFuncCompo(1,"x/0"),INTERP_KERNEL::Exception); DataArrayDouble *da2=da->applyFuncCompo(1,"y+z"); - CPPUNIT_ASSERT_EQUAL(1,da2->getNumberOfComponents()); - CPPUNIT_ASSERT_EQUAL(5,da2->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)da2->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(5,(int)da2->getNumberOfTuples()); const double expected1[5]={32.,34.,36.,38.,40.}; for(int i=0;i<5;i++) CPPUNIT_ASSERT_DOUBLES_EQUAL(expected1[i],da2->getIJ(0,i),1e-12); @@ -341,11 +341,11 @@ void MEDCouplingBasicsTest4::testApplyFuncTwo1() CPPUNIT_ASSERT_DOUBLES_EQUAL(expected2[i],da2->getIJ(0,i),1e-12); da2->decrRef(); // - CPPUNIT_ASSERT_EQUAL(3,f1->getNumberOfComponents()); - CPPUNIT_ASSERT_EQUAL(5,f1->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(3,(int)f1->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(5,(int)f1->getNumberOfTuples()); f1->applyFuncCompo(1,"y+z"); - CPPUNIT_ASSERT_EQUAL(1,f1->getNumberOfComponents()); - CPPUNIT_ASSERT_EQUAL(5,f1->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)f1->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(5,(int)f1->getNumberOfTuples()); for(int i=0;i<5;i++) CPPUNIT_ASSERT_DOUBLES_EQUAL(expected1[i],f1->getArray()->getIJ(0,i),1e-12); // @@ -380,11 +380,11 @@ void MEDCouplingBasicsTest4::testApplyFuncThree1() std::vector vs2(4); vs2[0]="x"; vs2[1]="y"; vs2[2]="z"; vs2[3]="a"; CPPUNIT_ASSERT_THROW(da->applyFuncNamedCompo(1,vs2,"x+a"),INTERP_KERNEL::Exception); f1->setArray(da); - CPPUNIT_ASSERT_EQUAL(3,f1->getNumberOfComponents()); - CPPUNIT_ASSERT_EQUAL(5,f1->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(3,(int)f1->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(5,(int)f1->getNumberOfTuples()); f1->applyFuncNamedCompo(1,vs,"y+z"); - CPPUNIT_ASSERT_EQUAL(1,f1->getNumberOfComponents()); - CPPUNIT_ASSERT_EQUAL(5,f1->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)f1->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(5,(int)f1->getNumberOfTuples()); for(int i=0;i<5;i++) CPPUNIT_ASSERT_DOUBLES_EQUAL(expected1[i],f1->getArray()->getIJ(0,i),1e-12); // @@ -406,8 +406,8 @@ void MEDCouplingBasicsTest4::testFillFromAnalyticTwo1() CPPUNIT_ASSERT_DOUBLES_EQUAL(3.4,f1->getTime(a,b),1.e-14); CPPUNIT_ASSERT_EQUAL(5,a); CPPUNIT_ASSERT_EQUAL(6,b); CPPUNIT_ASSERT_EQUAL(std::string(f1->getTimeUnit()),std::string("us")); - CPPUNIT_ASSERT_EQUAL(1,f1->getNumberOfComponents()); - CPPUNIT_ASSERT_EQUAL(9,f1->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)f1->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(9,(int)f1->getNumberOfTuples()); const double expected1[9]={0.2, 0.7, 1.2, 0.7, 1.2, 1.7, 1.2, 1.7, 2.2}; for(int i=0;i<9;i++) CPPUNIT_ASSERT_DOUBLES_EQUAL(expected1[i],f1->getArray()->getIJ(0,i),1e-12); @@ -428,8 +428,8 @@ void MEDCouplingBasicsTest4::testFillFromAnalyticThree1() CPPUNIT_ASSERT_DOUBLES_EQUAL(3.4,f1->getTime(a,b),1.e-14); CPPUNIT_ASSERT_EQUAL(5,a); CPPUNIT_ASSERT_EQUAL(6,b); CPPUNIT_ASSERT_EQUAL(std::string(f1->getTimeUnit()),std::string("us")); - CPPUNIT_ASSERT_EQUAL(1,f1->getNumberOfComponents()); - CPPUNIT_ASSERT_EQUAL(9,f1->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)f1->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(9,(int)f1->getNumberOfTuples()); const double expected1[9]={0.2, 0.7, 1.2, 0.7, 1.2, 1.7, 1.2, 1.7, 2.2}; for(int i=0;i<9;i++) CPPUNIT_ASSERT_DOUBLES_EQUAL(expected1[i],f1->getArray()->getIJ(0,i),1e-12); @@ -519,8 +519,8 @@ void MEDCouplingBasicsTest4::testGaussCoordinates1() f->setGaussLocalizationOnType(INTERP_KERNEL::NORM_SEG3,refCoo2,gsCoo2,wg2); // DataArrayDouble *resToTest=f->getLocalizationOfDiscr(); - CPPUNIT_ASSERT_EQUAL(3,resToTest->getNumberOfComponents()); - CPPUNIT_ASSERT_EQUAL(2,resToTest->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(3,(int)resToTest->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(2,(int)resToTest->getNumberOfTuples()); const double expected1[6]={0.6,0.6,0.6, 0.6,0.6,0.6}; for(int i=0;i<6;i++) CPPUNIT_ASSERT_DOUBLES_EQUAL(expected1[i],resToTest->getIJ(0,i),1e-14); @@ -558,7 +558,7 @@ void MEDCouplingBasicsTest4::testGaussCoordinates1() f->setGaussLocalizationOnType(INTERP_KERNEL::NORM_QUAD8,refCoo6,gsCoo6,wg6); // resToTest=f->getLocalizationOfDiscr(); - CPPUNIT_ASSERT_EQUAL(3,resToTest->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(3,(int)resToTest->getNumberOfComponents()); CPPUNIT_ASSERT_EQUAL(13,resToTest->getNumberOfTuples());//2+3+4+4 gauss points for resp TRI3,TRI6,QUAD4,QUAD8 const double expected2[39]={5.1,1.55,0.0, 4.7,1.65,0.0, //TRI3 2.32,1.52,0.0, 1.6,1.32,0.0, 3.52,1.26,0.0,//TRI6 @@ -625,7 +625,7 @@ void MEDCouplingBasicsTest4::testGaussCoordinates1() f->setGaussLocalizationOnType(INTERP_KERNEL::NORM_HEXA20,refCoo14,gsCoo14,wg14); // resToTest=f->getLocalizationOfDiscr(); - CPPUNIT_ASSERT_EQUAL(3,resToTest->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(3,(int)resToTest->getNumberOfComponents()); CPPUNIT_ASSERT_EQUAL(8,resToTest->getNumberOfTuples());//2+3+4+4 gauss points for resp TRI3,TRI6,QUAD4,QUAD8 const double expected3[24]={1.312,3.15,1.02, 0.56,3.3,0.6, 2.18,1.1,0.2, 1.18,1.54,0.98, 1.56,0.3,3.6, 1.613,0.801,4.374, 2.6,2.4,2.3, 2.31232,2.3933985,1.553255}; for(int i=0;i<24;i++) @@ -743,8 +743,8 @@ void MEDCouplingBasicsTest4::testGetValueOn2() const double loc[10]={-0.05,-0.05, 0.55,-0.25, 0.55,0.15, -0.05,0.45, 0.45,0.45}; f->checkConsistencyLight(); DataArrayDouble *locs=f->getValueOnMulti(loc,5); - CPPUNIT_ASSERT_EQUAL(5,locs->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(3,locs->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(5,(int)locs->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(3,(int)locs->getNumberOfComponents()); for(int j=0;j<15;j++) CPPUNIT_ASSERT_DOUBLES_EQUAL(values1[j],locs->getIJ(0,j),1e-12); locs->decrRef(); @@ -763,8 +763,8 @@ void MEDCouplingBasicsTest4::testGetValueOn2() const double expected2[12]={9.0272, 109.0272, 10009.0272, 11.4124,111.4124,10011.4124, 9.0272, 109.0272, 10009.0272, 9.0272, 109.0272, 10009.0272}; f->checkConsistencyLight(); locs=f->getValueOnMulti(loc2,4); - CPPUNIT_ASSERT_EQUAL(4,locs->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(3,locs->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(4,(int)locs->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(3,(int)locs->getNumberOfComponents()); for(int i=0;i<12;i++) CPPUNIT_ASSERT_DOUBLES_EQUAL(expected2[i],locs->getIJ(0,i),1e-12); f->decrRef(); @@ -780,8 +780,8 @@ void MEDCouplingBasicsTest4::testDAIGetIdsNotEqual1() d->alloc(10,1); std::copy(vals1,vals1+10,d->getPointer()); DataArrayInt *d2=d->findIdsNotEqual(5); - CPPUNIT_ASSERT_EQUAL(7,d2->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,d2->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(7,(int)d2->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)d2->getNumberOfComponents()); const int expected1[7]={0,1,3,4,7,8,9}; for(int i=0;i<7;i++) CPPUNIT_ASSERT_EQUAL(expected1[i],d2->getIJ(0,i)); @@ -791,8 +791,8 @@ void MEDCouplingBasicsTest4::testDAIGetIdsNotEqual1() std::vector vals3(vals2,vals2+3); d->rearrange(1); DataArrayInt *d3=d->findIdsNotEqualList(&vals3[0],&vals3[0]+vals3.size()); - CPPUNIT_ASSERT_EQUAL(5,d3->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,d3->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(5,(int)d3->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)d3->getNumberOfComponents()); const int expected2[5]={0,1,4,8,9}; for(int i=0;i<5;i++) CPPUNIT_ASSERT_EQUAL(expected2[i],d3->getIJ(0,i)); @@ -809,8 +809,8 @@ void MEDCouplingBasicsTest4::testDAIComputeOffsets1() d->alloc(6,1); std::copy(vals1,vals1+6,d->getPointer()); d->computeOffsets(); - CPPUNIT_ASSERT_EQUAL(6,d->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,d->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(6,(int)d->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)d->getNumberOfComponents()); for(int i=0;i<6;i++) CPPUNIT_ASSERT_EQUAL(expected1[i],d->getIJ(0,i)); d->decrRef(); @@ -835,12 +835,12 @@ void MEDCouplingBasicsTest4::testUMeshHexagonPrism1() // mesh->checkConsistencyLight(); MEDCouplingFieldDouble *vols=mesh->getMeasureField(false); - CPPUNIT_ASSERT_EQUAL(1,vols->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,vols->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(1,(int)vols->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)vols->getNumberOfComponents()); CPPUNIT_ASSERT_DOUBLES_EQUAL(-5.196152422706632,vols->getIJ(0,0),1e-12); DataArrayDouble *bary=mesh->computeCellCenterOfMass(); - CPPUNIT_ASSERT_EQUAL(1,bary->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(3,bary->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(1,(int)bary->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(3,(int)bary->getNumberOfComponents()); const double expected1[3]={0.,0.,1.}; for(int i=0;i<3;i++) CPPUNIT_ASSERT_DOUBLES_EQUAL(expected1[i],bary->getIJ(0,i),1e-12); @@ -1029,8 +1029,8 @@ void MEDCouplingBasicsTest4::testDAITransformWithIndArr1() std::copy(tab2,tab2+12,d1->getPointer()); // d1->transformWithIndArr(d->getConstPointer(),d->getConstPointer()+d->getNbOfElems()); - CPPUNIT_ASSERT_EQUAL(12,d1->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,d1->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(12,(int)d1->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)d1->getNumberOfComponents()); for(int i=0;i<12;i++) CPPUNIT_ASSERT_EQUAL(expected[i],d1->getIJ(i,0)); // @@ -1046,8 +1046,8 @@ void MEDCouplingBasicsTest4::testDAIBuildPermArrPerLevel1() da->alloc(12,1); std::copy(arr,arr+12,da->getPointer()); DataArrayInt *da2=da->buildPermArrPerLevel(); - CPPUNIT_ASSERT_EQUAL(12,da2->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,da2->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(12,(int)da2->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)da2->getNumberOfComponents()); for(int i=0;i<12;i++) CPPUNIT_ASSERT_EQUAL(expected1[i],da2->getIJ(i,0)); da->decrRef(); @@ -1066,8 +1066,8 @@ void MEDCouplingBasicsTest4::testDAIOperations1() CPPUNIT_ASSERT_THROW(DataArrayInt::Add(da,da1),INTERP_KERNEL::Exception);//not same number of tuples/Components da1->rearrange(3); DataArrayInt *da2=DataArrayInt::Add(da,da1); - CPPUNIT_ASSERT_EQUAL(4,da2->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(3,da2->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(4,(int)da2->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(3,(int)da2->getNumberOfComponents()); const int expected1[12]={1,1,8,12,9,9,14,15,14,14,12,14}; for(int i=0;i<12;i++) CPPUNIT_ASSERT_EQUAL(expected1[i],da2->getIJ(0,i)); @@ -1082,40 +1082,40 @@ void MEDCouplingBasicsTest4::testDAIOperations1() CPPUNIT_ASSERT_EQUAL(expected1[i],da1->getIJ(0,i)); da1->rearrange(1); da1->iota(2); da1->rearrange(3); da2=DataArrayInt::Multiply(da,da1); - CPPUNIT_ASSERT_EQUAL(4,da2->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(3,da2->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(4,(int)da2->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(3,(int)da2->getNumberOfComponents()); const int expected3[12]={-2,-6,16,35,18,14,48,54,40,33,0,13}; for(int i=0;i<12;i++) CPPUNIT_ASSERT_EQUAL(expected3[i],da2->getIJ(0,i)); da2->decrRef(); da->divideEqual(da1); - CPPUNIT_ASSERT_EQUAL(4,da->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(3,da->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(4,(int)da->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(3,(int)da->getNumberOfComponents()); const int expected4[12]={0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0}; for(int i=0;i<12;i++) CPPUNIT_ASSERT_EQUAL(expected4[i],da->getIJ(0,i)); std::copy(arr1,arr1+12,da->getPointer()); da1->multiplyEqual(da); - CPPUNIT_ASSERT_EQUAL(4,da1->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(3,da1->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(4,(int)da1->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(3,(int)da1->getNumberOfComponents()); for(int i=0;i<12;i++) CPPUNIT_ASSERT_EQUAL(expected3[i],da1->getIJ(0,i)); da1->rearrange(1); da1->iota(2); da1->rearrange(3); da2=DataArrayInt::Divide(da,da1); - CPPUNIT_ASSERT_EQUAL(4,da2->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(3,da2->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(4,(int)da2->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(3,(int)da2->getNumberOfComponents()); for(int i=0;i<12;i++) CPPUNIT_ASSERT_EQUAL(expected4[i],da2->getIJ(0,i)); da2->decrRef(); da1->applyInv(321); - CPPUNIT_ASSERT_EQUAL(4,da1->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(3,da1->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(4,(int)da1->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(3,(int)da1->getNumberOfComponents()); const int expected5[12]={160,107,80,64,53,45,40,35,32,29,26,24}; for(int i=0;i<12;i++) CPPUNIT_ASSERT_EQUAL(expected5[i],da1->getIJ(0,i)); da1->applyDivideBy(2); - CPPUNIT_ASSERT_EQUAL(4,da1->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(3,da1->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(4,(int)da1->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(3,(int)da1->getNumberOfComponents()); const int expected6[12]={80,53,40,32,26,22,20,17,16,14,13,12}; for(int i=0;i<12;i++) CPPUNIT_ASSERT_EQUAL(expected6[i],da1->getIJ(0,i)); @@ -1146,33 +1146,33 @@ void MEDCouplingBasicsTest4::testEmulateMEDMEMBDC1() MEDCouplingUMesh *m2=m->emulateMEDMEMBDC(m1,da1,da2,da3,da4,da5,da0); const int expected0[47]={0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,36,37,32,33,34,35,38,39,40,41,42,43,44,45,46}; const int expected1[6]={1,32,29,23,41,36}; - CPPUNIT_ASSERT_EQUAL(47,da0->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,da0->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(47,(int)da0->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)da0->getNumberOfComponents()); for(int i=0;i<47;i++) CPPUNIT_ASSERT_EQUAL(expected0[i],da0->getIJ(0,i)); - CPPUNIT_ASSERT_EQUAL(6,da5->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,da5->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(6,(int)da5->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)da5->getNumberOfComponents()); for(int i=0;i<6;i++) CPPUNIT_ASSERT_EQUAL(expected1[i],da5->getIJ(0,i)); const int expected2[70]={0,1,2,3,4,0,5,6,7,4,8,9,1,7,10,11,12,13,14,5,15,16,17,8,18,19,20,10,21,22,23,2,13,24,25,21,16,26,27,12,19,28,29,15,22,30,31,18,36,26,28,30,24,37,32,33,34,35,38,36,39,40,41,42,37,38,43,44,45,46}; - CPPUNIT_ASSERT_EQUAL(70,da1->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,da1->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(70,(int)da1->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)da1->getNumberOfComponents()); for(int i=0;i<70;i++) CPPUNIT_ASSERT_EQUAL(expected2[i],da1->getIJ(0,i)); const int expected3[17]={0,4,8,12,16,20,24,28,32,36,40,44,48,53,58,64,70}; - CPPUNIT_ASSERT_EQUAL(17,da2->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,da2->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(17,(int)da2->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)da2->getNumberOfComponents()); for(int i=0;i<17;i++) CPPUNIT_ASSERT_EQUAL(expected3[i],da2->getIJ(0,i)); const int expected4[48]={0,2,4,6,7,9,11,12,14,16,17,19,20,22,24,25,27,29,30,32,34,35,37,39,40,42,43,45,46,48,49,51,52,53,54,55,56,58,60,62,63,64,65,66,67,68,69,70}; //const int expected4[48]={0,2,4,6,7,9,11,12,14,16,17,19,20,22,24,25,27,29,30,32,34,35,37,39,40,42,43,45,46,48,49,51,52,54,56,57,58,59,60,62,63,64,65,66,67,68,69,70}; - CPPUNIT_ASSERT_EQUAL(48,da4->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,da4->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(48,(int)da4->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)da4->getNumberOfComponents()); for(int i=0;i<48;i++) CPPUNIT_ASSERT_EQUAL(expected4[i],da4->getIJ(0,i)); const int expected5[70]={0,1,0,3,0,7,0,1,2,1,4,1,2,3,2,5,2,3,6,3,4,9,4,8,4,5,10,5,9,5,6,11,6,10,6,7,8,7,11,7,8,12,8,9,12,9,10,12,10,11,12,11,13,13,13,13,12,14,13,15,14,15,14,14,14,14,15,15,15,15}; - CPPUNIT_ASSERT_EQUAL(70,da3->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,da3->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(70,(int)da3->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)da3->getNumberOfComponents()); for(int i=0;i<70;i++) CPPUNIT_ASSERT_EQUAL(expected5[i],da3->getIJ(0,i)); // @@ -1204,19 +1204,19 @@ void MEDCouplingBasicsTest4::testGetLevArrPerCellTypes1() DataArrayInt *da0=m1->getLevArrPerCellTypes(order,order+2,da1); const int expected0[47]={0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,1,1,1,1,1,1,1,1,1}; const int expected1[47]={0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,36,37,32,33,34,35,38,39,40,41,42,43,44,45,46}; - CPPUNIT_ASSERT_EQUAL(47,da0->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,da0->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(47,(int)da0->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)da0->getNumberOfComponents()); for(int i=0;i<47;i++) CPPUNIT_ASSERT_EQUAL(expected0[i],da0->getIJ(0,i)); - CPPUNIT_ASSERT_EQUAL(2,da1->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,da1->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(2,(int)da1->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)da1->getNumberOfComponents()); CPPUNIT_ASSERT_EQUAL(36,da1->getIJ(0,0));//36 TRI3 CPPUNIT_ASSERT_EQUAL(11,da1->getIJ(1,0));//11 QUAD4 // DataArrayInt *da2=da0->buildPermArrPerLevel(); // - CPPUNIT_ASSERT_EQUAL(47,da2->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,da2->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(47,(int)da2->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)da2->getNumberOfComponents()); for(int i=0;i<47;i++) CPPUNIT_ASSERT_EQUAL(expected1[i],da2->getIJ(0,i)); da2->decrRef(); @@ -1280,8 +1280,8 @@ void MEDCouplingBasicsTest4::testDAITransformWithIndArrR1() std::copy(tab2,tab2+12,d1->getPointer()); // DataArrayInt *d3=d->transformWithIndArrR(d1->getConstPointer(),d1->getConstPointer()+d1->getNbOfElems()); - CPPUNIT_ASSERT_EQUAL(6,d3->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,d3->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(6,(int)d3->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)d3->getNumberOfComponents()); for(int i=0;i<6;i++) CPPUNIT_ASSERT_EQUAL(expected[i],d3->getIJ(i,0)); d3->decrRef(); @@ -1299,12 +1299,12 @@ void MEDCouplingBasicsTest4::testDAISplitByValueRange1() std::copy(val1,val1+9,d->getPointer()); DataArrayInt *ee=0,*f=0,*g=0; d->splitByValueRange(val2,val2+3,ee,f,g); - CPPUNIT_ASSERT_EQUAL(9,ee->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,ee->getNumberOfComponents()); - CPPUNIT_ASSERT_EQUAL(9,f->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,f->getNumberOfComponents()); - CPPUNIT_ASSERT_EQUAL(2,g->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,g->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(9,(int)ee->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)ee->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(9,(int)f->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)f->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(2,(int)g->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)g->getNumberOfComponents()); // const int expected1[9]={1,1,0,0,0,1,1,0,1}; const int expected2[9]={2,1,0,3,2,3,4,1,0}; @@ -1346,19 +1346,19 @@ void MEDCouplingBasicsTest4::testUMeshSplitProfilePerType1() const int expected1[6]={3,1,0, 4,2,1}; for(int i=0;i<6;i++) CPPUNIT_ASSERT_EQUAL(expected1[i],code[i]); - CPPUNIT_ASSERT_EQUAL(1,idsInPflPerType[0]->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)idsInPflPerType[0]->getNumberOfTuples()); CPPUNIT_ASSERT_EQUAL(0,idsInPflPerType[0]->getIJ(0,0)); - CPPUNIT_ASSERT_EQUAL(2,idsInPflPerType[1]->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(2,(int)idsInPflPerType[1]->getNumberOfTuples()); CPPUNIT_ASSERT_EQUAL(1,idsInPflPerType[1]->getIJ(0,0)); CPPUNIT_ASSERT_EQUAL(2,idsInPflPerType[1]->getIJ(1,0)); idsInPflPerType[0]->decrRef(); idsInPflPerType[1]->decrRef(); CPPUNIT_ASSERT_EQUAL(2,(int)pfls.size()); CPPUNIT_ASSERT(std::string("sup")==pfls[0]->getName()); - CPPUNIT_ASSERT_EQUAL(1,pfls[0]->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)pfls[0]->getNumberOfTuples()); CPPUNIT_ASSERT_EQUAL(0,pfls[0]->getIJ(0,0)); CPPUNIT_ASSERT(std::string("sup")==pfls[1]->getName()); - CPPUNIT_ASSERT_EQUAL(2,pfls[1]->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(2,(int)pfls[1]->getNumberOfTuples()); CPPUNIT_ASSERT_EQUAL(0,pfls[1]->getIJ(0,0)); CPPUNIT_ASSERT_EQUAL(1,pfls[1]->getIJ(1,0)); pfls[0]->decrRef(); @@ -1378,16 +1378,16 @@ void MEDCouplingBasicsTest4::testUMeshSplitProfilePerType1() const int expected2[6]={3,1,0, 4,3,-1}; for(int i=0;i<6;i++) CPPUNIT_ASSERT_EQUAL(expected2[i],code[i]); - CPPUNIT_ASSERT_EQUAL(1,idsInPflPerType[0]->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)idsInPflPerType[0]->getNumberOfTuples()); CPPUNIT_ASSERT_EQUAL(0,idsInPflPerType[0]->getIJ(0,0)); - CPPUNIT_ASSERT_EQUAL(3,idsInPflPerType[1]->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(3,(int)idsInPflPerType[1]->getNumberOfTuples()); CPPUNIT_ASSERT_EQUAL(1,idsInPflPerType[1]->getIJ(0,0)); CPPUNIT_ASSERT_EQUAL(2,idsInPflPerType[1]->getIJ(1,0)); CPPUNIT_ASSERT_EQUAL(3,idsInPflPerType[1]->getIJ(2,0)); idsInPflPerType[0]->decrRef(); idsInPflPerType[1]->decrRef(); CPPUNIT_ASSERT_EQUAL(1,(int)pfls.size()); - CPPUNIT_ASSERT_EQUAL(1,pfls[0]->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)pfls[0]->getNumberOfTuples()); CPPUNIT_ASSERT_EQUAL(0,pfls[0]->getIJ(0,0)); pfls[0]->decrRef(); d->decrRef(); @@ -1405,15 +1405,15 @@ void MEDCouplingBasicsTest4::testUMeshSplitProfilePerType1() const int expected3[6]={3,2,0, 4,1,1}; for(int i=0;i<6;i++) CPPUNIT_ASSERT_EQUAL(expected3[i],code[i]); - CPPUNIT_ASSERT_EQUAL(2,idsInPflPerType[0]->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(2,(int)idsInPflPerType[0]->getNumberOfTuples()); CPPUNIT_ASSERT_EQUAL(0,idsInPflPerType[0]->getIJ(0,0)); CPPUNIT_ASSERT_EQUAL(1,idsInPflPerType[0]->getIJ(1,0)); - CPPUNIT_ASSERT_EQUAL(1,idsInPflPerType[1]->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)idsInPflPerType[1]->getNumberOfTuples()); CPPUNIT_ASSERT_EQUAL(2,idsInPflPerType[1]->getIJ(0,0)); idsInPflPerType[0]->decrRef(); idsInPflPerType[1]->decrRef(); CPPUNIT_ASSERT_EQUAL(2,(int)pfls.size()); - CPPUNIT_ASSERT_EQUAL(2,pfls[0]->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(2,(int)pfls[0]->getNumberOfTuples()); CPPUNIT_ASSERT_EQUAL(1,pfls[0]->getIJ(0,0)); CPPUNIT_ASSERT_EQUAL(0,pfls[0]->getIJ(1,0)); CPPUNIT_ASSERT_EQUAL(0,pfls[1]->getIJ(0,0)); @@ -1434,12 +1434,12 @@ void MEDCouplingBasicsTest4::testUMeshSplitProfilePerType1() const int expected4[3]={4,2,0}; for(int i=0;i<3;i++) CPPUNIT_ASSERT_EQUAL(expected4[i],code[i]); - CPPUNIT_ASSERT_EQUAL(2,idsInPflPerType[0]->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(2,(int)idsInPflPerType[0]->getNumberOfTuples()); CPPUNIT_ASSERT_EQUAL(0,idsInPflPerType[0]->getIJ(0,0)); CPPUNIT_ASSERT_EQUAL(1,idsInPflPerType[0]->getIJ(1,0)); idsInPflPerType[0]->decrRef(); CPPUNIT_ASSERT_EQUAL(1,(int)pfls.size()); - CPPUNIT_ASSERT_EQUAL(2,pfls[0]->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(2,(int)pfls[0]->getNumberOfTuples()); CPPUNIT_ASSERT_EQUAL(1,pfls[0]->getIJ(0,0)); CPPUNIT_ASSERT_EQUAL(2,pfls[0]->getIJ(1,0)); pfls[0]->decrRef(); @@ -1463,8 +1463,8 @@ void MEDCouplingBasicsTest4::testDAIBuildExplicitArrByRanges1() std::copy(vals2,vals2+6,e->getPointer()); // DataArrayInt *f=d->buildExplicitArrByRanges(e); - CPPUNIT_ASSERT_EQUAL(11,f->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,f->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(11,(int)f->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)f->getNumberOfComponents()); const int expected1[11]={0,1,2,6,7,8,9,10,11,12,13}; for(int i=0;i<11;i++) CPPUNIT_ASSERT_EQUAL(expected1[i],f->getIJ(i,0)); @@ -1482,8 +1482,8 @@ void MEDCouplingBasicsTest4::testDAIComputeOffsets2() d->alloc(6,1); std::copy(vals1,vals1+6,d->getPointer()); d->computeOffsetsFull(); - CPPUNIT_ASSERT_EQUAL(7,d->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,d->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(7,(int)d->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)d->getNumberOfComponents()); for(int i=0;i<7;i++) CPPUNIT_ASSERT_EQUAL(expected1[i],d->getIJ(0,i)); d->decrRef(); @@ -1598,7 +1598,7 @@ void MEDCouplingBasicsTest4::testFindAndCorrectBadOriented3DExtrudedCells1() m->finishInsertingCells(); // DataArrayInt *v=m->findAndCorrectBadOriented3DExtrudedCells(); - CPPUNIT_ASSERT_EQUAL(4,v->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(4,(int)v->getNumberOfTuples()); CPPUNIT_ASSERT(std::equal(v->begin(),v->end(),invalidCells)); CPPUNIT_ASSERT(std::equal(connExp,connExp+64,m->getNodalConnectivity()->getConstPointer())); v->decrRef(); @@ -1902,7 +1902,7 @@ void MEDCouplingBasicsTest4::testDAIBuildOld2NewArrayFromSurjectiveFormat2() const int expected[10]={0,1,2,0,3,4,5,4,6,4}; CPPUNIT_ASSERT_EQUAL((std::size_t)10,ret->getNbOfElems()); CPPUNIT_ASSERT_EQUAL(7,newNbTuple); - CPPUNIT_ASSERT_EQUAL(1,ret->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(1,(int)ret->getNumberOfComponents()); CPPUNIT_ASSERT(std::equal(expected,expected+10,ret->getConstPointer())); CPPUNIT_ASSERT_THROW(DataArrayInt::ConvertIndexArrayToO2N(9,a->begin(),b->begin(),b->end(),newNbTuple),INTERP_KERNEL::Exception); ret->decrRef(); @@ -2029,8 +2029,8 @@ void MEDCouplingBasicsTest4::testIntersect2DMeshesTmp1() MEDCouplingUMesh *m3=MEDCouplingUMesh::Intersect2DMeshes(m1bis,m2,1e-10,d1,d2); const int expected1[8]={0,0,1,1,1,2,2,2}; const int expected2[8]={0,-1,0,1,-1,1,2,-1}; - CPPUNIT_ASSERT_EQUAL(8,d1->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(8,d2->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(8,(int)d1->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(8,(int)d2->getNumberOfTuples()); CPPUNIT_ASSERT_EQUAL(8,m3->getNumberOfCells()); CPPUNIT_ASSERT_EQUAL(22,m3->getNumberOfNodes()); CPPUNIT_ASSERT_EQUAL(2,m3->getSpaceDimension()); @@ -2115,8 +2115,8 @@ void MEDCouplingBasicsTest4::testIntersect2DMeshesTmp2() MEDCouplingUMesh *m3=MEDCouplingUMesh::Intersect2DMeshes(m1,m2,1e-10,d1,d2); const int expected1[9]={0,0,1,1,2,2,3,4,5}; const int expected2[9]={0,2,1,3,1,3,2,3,3}; - CPPUNIT_ASSERT_EQUAL(9,d1->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(9,d2->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(9,(int)d1->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(9,(int)d2->getNumberOfTuples()); CPPUNIT_ASSERT_EQUAL(9,m3->getNumberOfCells()); CPPUNIT_ASSERT_EQUAL(22,m3->getNumberOfNodes()); CPPUNIT_ASSERT_EQUAL(2,m3->getSpaceDimension()); @@ -2196,8 +2196,8 @@ void MEDCouplingBasicsTest4::testIntersect2DMeshesTmp3() m3->unPolyze(); const int expected1[16]={0,1,1,1,2,3,3,3,4,5,5,5,6,7,7,7}; const int expected2[16]={0,0,1,-1,2,2,3,-1,4,4,5,-1,6,6,7,-1}; - CPPUNIT_ASSERT_EQUAL(16,d1->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(16,d2->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(16,(int)d1->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(16,(int)d2->getNumberOfTuples()); CPPUNIT_ASSERT_EQUAL(16,m3->getNumberOfCells()); CPPUNIT_ASSERT_EQUAL(104,m3->getNumberOfNodes()); CPPUNIT_ASSERT_EQUAL(2,m3->getSpaceDimension()); diff --git a/src/MEDCoupling/Test/MEDCouplingBasicsTest5.cxx b/src/MEDCoupling/Test/MEDCouplingBasicsTest5.cxx index 8cfc57f96..3213b5728 100644 --- a/src/MEDCoupling/Test/MEDCouplingBasicsTest5.cxx +++ b/src/MEDCoupling/Test/MEDCouplingBasicsTest5.cxx @@ -152,8 +152,8 @@ void MEDCouplingBasicsTest5::testIntersect2DMeshesTmp4() m3->unPolyze(); const int expected1[16]={0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7}; const int expected2[16]={0,1,1,-1,2,3,3,-1,4,5,5,-1,6,7,7,-1}; - CPPUNIT_ASSERT_EQUAL(16,d1->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(16,d2->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(16,(int)d1->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(16,(int)d2->getNumberOfTuples()); CPPUNIT_ASSERT_EQUAL(16,m3->getNumberOfCells()); CPPUNIT_ASSERT_EQUAL(104,m3->getNumberOfNodes()); CPPUNIT_ASSERT_EQUAL(2,m3->getSpaceDimension()); @@ -183,13 +183,13 @@ void MEDCouplingBasicsTest5::testGetCellIdsCrossingPlane1() const double vec[3]={-0.07,1.,0.07}; const double origin[3]={1.524,1.4552,1.74768}; DataArrayInt *ids1=mesh3D->getCellIdsCrossingPlane(origin,vec,1e-10); - CPPUNIT_ASSERT_EQUAL(9,ids1->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(9,(int)ids1->getNumberOfTuples()); const int expected1[9]={1,3,4,7,9,10,13,15,16}; CPPUNIT_ASSERT(std::equal(expected1,expected1+9,ids1->getConstPointer())); const double vec2[3]={0.,0.,1.}; DataArrayInt *ids2=mesh3D->getCellIdsCrossingPlane(origin,vec2,1e-10); const int expected2[6]={6,7,8,9,10,11}; - CPPUNIT_ASSERT_EQUAL(6,ids2->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(6,(int)ids2->getNumberOfTuples()); CPPUNIT_ASSERT(std::equal(expected2,expected2+6,ids2->getConstPointer())); ids1->decrRef(); ids2->decrRef(); @@ -215,7 +215,7 @@ void MEDCouplingBasicsTest5::testBuildSlice3D1() CPPUNIT_ASSERT_EQUAL(3,slice1->getSpaceDimension()); CPPUNIT_ASSERT_EQUAL(57,slice1->getNumberOfNodes()); CPPUNIT_ASSERT_EQUAL(9,slice1->getNumberOfCells()); - CPPUNIT_ASSERT_EQUAL(9,ids->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(9,(int)ids->getNumberOfTuples()); CPPUNIT_ASSERT_EQUAL(47,slice1->getNodalConnectivity()->getNumberOfTuples()); CPPUNIT_ASSERT_EQUAL(10,slice1->getNodalConnectivityIndex()->getNumberOfTuples()); CPPUNIT_ASSERT(std::equal(expected1,expected1+9,ids->getConstPointer())); @@ -236,7 +236,7 @@ void MEDCouplingBasicsTest5::testBuildSlice3D1() CPPUNIT_ASSERT_EQUAL(3,slice1->getSpaceDimension()); CPPUNIT_ASSERT_EQUAL(60,slice1->getNumberOfNodes()); CPPUNIT_ASSERT_EQUAL(9,slice1->getNumberOfCells()); - CPPUNIT_ASSERT_EQUAL(9,ids->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(9,(int)ids->getNumberOfTuples()); CPPUNIT_ASSERT_EQUAL(49,slice1->getNodalConnectivity()->getNumberOfTuples()); CPPUNIT_ASSERT_EQUAL(10,slice1->getNodalConnectivityIndex()->getNumberOfTuples()); CPPUNIT_ASSERT(std::equal(expected1,expected1+9,ids->getConstPointer())); @@ -258,7 +258,7 @@ void MEDCouplingBasicsTest5::testBuildSlice3D1() CPPUNIT_ASSERT_EQUAL(3,slice1->getSpaceDimension()); CPPUNIT_ASSERT_EQUAL(45,slice1->getNumberOfNodes()); CPPUNIT_ASSERT_EQUAL(12,slice1->getNumberOfCells()); - CPPUNIT_ASSERT_EQUAL(12,ids->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(12,(int)ids->getNumberOfTuples()); CPPUNIT_ASSERT_EQUAL(68,slice1->getNodalConnectivity()->getNumberOfTuples()); CPPUNIT_ASSERT_EQUAL(13,slice1->getNodalConnectivityIndex()->getNumberOfTuples()); CPPUNIT_ASSERT(std::equal(expected8,expected8+12,ids->getConstPointer())); @@ -294,7 +294,7 @@ void MEDCouplingBasicsTest5::testBuildSlice3DSurf1() CPPUNIT_ASSERT_EQUAL(3,slice1->getSpaceDimension()); CPPUNIT_ASSERT_EQUAL(57,slice1->getNumberOfNodes()); CPPUNIT_ASSERT_EQUAL(25,slice1->getNumberOfCells()); - CPPUNIT_ASSERT_EQUAL(25,ids->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(25,(int)ids->getNumberOfTuples()); CPPUNIT_ASSERT_EQUAL(75,slice1->getNodalConnectivity()->getNumberOfTuples()); CPPUNIT_ASSERT_EQUAL(26,slice1->getNodalConnectivityIndex()->getNumberOfTuples()); CPPUNIT_ASSERT(std::equal(expected1,expected1+25,ids->getConstPointer())); @@ -316,7 +316,7 @@ void MEDCouplingBasicsTest5::testBuildSlice3DSurf1() CPPUNIT_ASSERT_EQUAL(3,slice1->getSpaceDimension()); CPPUNIT_ASSERT_EQUAL(45,slice1->getNumberOfNodes()); CPPUNIT_ASSERT_EQUAL(68,slice1->getNumberOfCells()); - CPPUNIT_ASSERT_EQUAL(68,ids->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(68,(int)ids->getNumberOfTuples()); CPPUNIT_ASSERT_EQUAL(204,slice1->getNodalConnectivity()->getNumberOfTuples()); CPPUNIT_ASSERT_EQUAL(69,slice1->getNodalConnectivityIndex()->getNumberOfTuples()); CPPUNIT_ASSERT(std::equal(expected5,expected5+68,ids->getConstPointer())); @@ -353,16 +353,16 @@ void MEDCouplingBasicsTest5::testDataArrayDoubleAdvSetting1() p[0].first=0; p[0].second=2; p[1].first=3; p[1].second=4; p[2].first=5; p[2].second=7; tmp=dynamic_cast(da->selectByTupleRanges(p)); const double expected1[10]={1.,11.,2.,12.,4.,14.,6.,16.,7.,17.}; - CPPUNIT_ASSERT_EQUAL(5,tmp->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(2,tmp->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(5,(int)tmp->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(2,(int)tmp->getNumberOfComponents()); for(int i=0;i<10;i++) CPPUNIT_ASSERT_DOUBLES_EQUAL(expected1[i],tmp->getIJ(0,i),1e-14); tmp->decrRef(); p[0].first=0; p[0].second=2; p[1].first=0; p[1].second=2; p[2].first=5; p[2].second=6; tmp=dynamic_cast(da->selectByTupleRanges(p)); const double expected2[10]={1.,11.,2.,12.,1.,11.,2.,12.,6.,16.}; - CPPUNIT_ASSERT_EQUAL(5,tmp->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(2,tmp->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(5,(int)tmp->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(2,(int)tmp->getNumberOfComponents()); for(int i=0;i<10;i++) CPPUNIT_ASSERT_DOUBLES_EQUAL(expected2[i],tmp->getIJ(0,i),1e-14); tmp->decrRef(); @@ -447,16 +447,16 @@ void MEDCouplingBasicsTest5::testDataArrayIntAdvSetting1() p[0].first=0; p[0].second=2; p[1].first=3; p[1].second=4; p[2].first=5; p[2].second=7; tmp=dynamic_cast(da->selectByTupleRanges(p)); const int expected1[10]={1,11,2,12,4,14,6,16,7,17}; - CPPUNIT_ASSERT_EQUAL(5,tmp->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(2,tmp->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(5,(int)tmp->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(2,(int)tmp->getNumberOfComponents()); for(int i=0;i<10;i++) CPPUNIT_ASSERT_EQUAL(expected1[i],tmp->getIJ(0,i)); tmp->decrRef(); p[0].first=0; p[0].second=2; p[1].first=0; p[1].second=2; p[2].first=5; p[2].second=6; tmp=dynamic_cast(da->selectByTupleRanges(p)); const int expected2[10]={1,11,2,12,1,11,2,12,6,16}; - CPPUNIT_ASSERT_EQUAL(5,tmp->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(2,tmp->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(5,(int)tmp->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(2,(int)tmp->getNumberOfComponents()); for(int i=0;i<10;i++) CPPUNIT_ASSERT_EQUAL(expected2[i],tmp->getIJ(0,i)); tmp->decrRef(); @@ -643,8 +643,8 @@ void MEDCouplingBasicsTest5::testGetValueOn3() f->setArray(array); array->decrRef(); DataArrayDouble *arr1=f->getValueOnMulti(v2,5); - CPPUNIT_ASSERT_EQUAL(5,arr1->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(3,arr1->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(5,(int)arr1->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(3,(int)arr1->getNumberOfComponents()); const double expected1[15]={5.7,57.,570.,6.5,65.,650.,5.,50.,500.,8.,80.,800.,7.,70.,700.}; for(int i=0;i<15;i++) CPPUNIT_ASSERT_DOUBLES_EQUAL(expected1[i],arr1->getIJ(0,i),1e-14); @@ -759,8 +759,8 @@ void MEDCouplingBasicsTest5::testRenumberNodesInConn1() DataArrayInt *da1,*da2; mesh3D->checkGeoEquivalWith(mesh3D_2,10,1e-12,da1,da2); CPPUNIT_ASSERT(da1==0); - CPPUNIT_ASSERT_EQUAL(8,da2->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,da2->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(8,(int)da2->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)da2->getNumberOfComponents()); const int expected1[8]={8,11,12,9,4,5,6,7}; for(int i=0;i<8;i++) CPPUNIT_ASSERT_EQUAL(expected1[i],da2->getIJ(i,0)); @@ -768,8 +768,8 @@ void MEDCouplingBasicsTest5::testRenumberNodesInConn1() // mesh2D->checkGeoEquivalWith(mesh2D_2,10,1e-12,da1,da2); CPPUNIT_ASSERT(da1==0); - CPPUNIT_ASSERT_EQUAL(9,da2->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,da2->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(9,(int)da2->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)da2->getNumberOfComponents()); for(int i=0;i<9;i++) CPPUNIT_ASSERT_EQUAL(8+i,da2->getIJ(i,0)); da2->decrRef(); @@ -834,8 +834,8 @@ void MEDCouplingBasicsTest5::testComputeNeighborsOfCells1() MEDCouplingUMesh *m=build2DTargetMesh_1(); DataArrayInt *d1=0,*d2=0; m->computeNeighborsOfCells(d1,d2); - CPPUNIT_ASSERT_EQUAL(6,d2->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(10,d1->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(6,(int)d2->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(10,(int)d1->getNumberOfTuples()); const int expected1[6]={0,2,4,6,8,10}; const int expected2[10]={3,1,0,2,4,1,4,0,2,3}; CPPUNIT_ASSERT(std::equal(expected1,expected1+6,d2->getConstPointer())); @@ -871,58 +871,58 @@ void MEDCouplingBasicsTest5::testDataArrayIntRange1() { DataArrayInt *d=DataArrayInt::Range(2,17,7); const int expected1[3]={2,9,16}; - CPPUNIT_ASSERT_EQUAL(3,d->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,d->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(3,(int)d->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)d->getNumberOfComponents()); CPPUNIT_ASSERT(std::equal(expected1,expected1+3,d->getConstPointer())); d->decrRef(); // d=DataArrayInt::Range(2,23,7); - CPPUNIT_ASSERT_EQUAL(3,d->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,d->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(3,(int)d->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)d->getNumberOfComponents()); CPPUNIT_ASSERT(std::equal(expected1,expected1+3,d->getConstPointer())); d->decrRef(); // d=DataArrayInt::Range(2,24,7); const int expected2[4]={2,9,16,23}; - CPPUNIT_ASSERT_EQUAL(4,d->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,d->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(4,(int)d->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)d->getNumberOfComponents()); CPPUNIT_ASSERT(std::equal(expected2,expected2+4,d->getConstPointer())); d->decrRef(); // d=DataArrayInt::Range(24,2,-7); const int expected3[4]={24,17,10,3}; - CPPUNIT_ASSERT_EQUAL(4,d->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,d->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(4,(int)d->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)d->getNumberOfComponents()); CPPUNIT_ASSERT(std::equal(expected3,expected3+4,d->getConstPointer())); d->decrRef(); // d=DataArrayInt::Range(23,2,-7); const int expected4[3]={23,16,9}; - CPPUNIT_ASSERT_EQUAL(3,d->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,d->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(3,(int)d->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)d->getNumberOfComponents()); CPPUNIT_ASSERT(std::equal(expected4,expected4+3,d->getConstPointer())); d->decrRef(); // d=DataArrayInt::Range(23,22,-7); - CPPUNIT_ASSERT_EQUAL(1,d->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,d->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(1,(int)d->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)d->getNumberOfComponents()); CPPUNIT_ASSERT_EQUAL(23,d->getIJ(0,0)); d->decrRef(); // d=DataArrayInt::Range(22,23,7); - CPPUNIT_ASSERT_EQUAL(1,d->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,d->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(1,(int)d->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)d->getNumberOfComponents()); CPPUNIT_ASSERT_EQUAL(22,d->getIJ(0,0)); d->decrRef(); // d=DataArrayInt::Range(22,22,7); - CPPUNIT_ASSERT_EQUAL(0,d->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,d->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(0,(int)d->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)d->getNumberOfComponents()); d->decrRef(); // d=DataArrayInt::Range(22,22,-7); - CPPUNIT_ASSERT_EQUAL(0,d->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,d->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(0,(int)d->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)d->getNumberOfComponents()); d->decrRef(); // CPPUNIT_ASSERT_THROW(DataArrayInt::Range(22,23,-7),INTERP_KERNEL::Exception); @@ -987,20 +987,20 @@ void MEDCouplingBasicsTest5::testZipConnectivityPol1() CPPUNIT_ASSERT(m2); // no permutation policy 0 CPPUNIT_ASSERT(m1->areCellsIncludedIn(m2,0,arr)); - CPPUNIT_ASSERT_EQUAL(3,arr->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,arr->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(3,(int)arr->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)arr->getNumberOfComponents()); CPPUNIT_ASSERT(std::equal(cells1,cells1+3,arr->getConstPointer())); arr->decrRef(); // no permutation policy 1 CPPUNIT_ASSERT(m1->areCellsIncludedIn(m2,1,arr)); - CPPUNIT_ASSERT_EQUAL(3,arr->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,arr->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(3,(int)arr->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)arr->getNumberOfComponents()); CPPUNIT_ASSERT(std::equal(cells1,cells1+3,arr->getConstPointer())); arr->decrRef(); // no permutation policy 2 CPPUNIT_ASSERT(m1->areCellsIncludedIn(m2,2,arr)); - CPPUNIT_ASSERT_EQUAL(3,arr->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,arr->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(3,(int)arr->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)arr->getNumberOfComponents()); CPPUNIT_ASSERT(std::equal(cells1,cells1+3,arr->getConstPointer())); arr->decrRef(); // some modification into m2 @@ -1009,20 +1009,20 @@ void MEDCouplingBasicsTest5::testZipConnectivityPol1() //policy 0 fails because cell0 in m2 has same orientation be not same connectivity const int expected1[3]={5,3,4}; CPPUNIT_ASSERT(!m1->areCellsIncludedIn(m2,0,arr)); - CPPUNIT_ASSERT_EQUAL(3,arr->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,arr->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(3,(int)arr->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)arr->getNumberOfComponents()); CPPUNIT_ASSERT(std::equal(expected1,expected1+3,arr->getConstPointer())); arr->decrRef(); //policy 1 succeeds because cell0 in m2 has not exactly the same conn CPPUNIT_ASSERT(m1->areCellsIncludedIn(m2,1,arr)); - CPPUNIT_ASSERT_EQUAL(3,arr->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,arr->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(3,(int)arr->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)arr->getNumberOfComponents()); CPPUNIT_ASSERT(std::equal(cells1,cells1+3,arr->getConstPointer())); arr->decrRef(); //policy 2 succeeds because cell0 in m2 has same nodes in connectivity CPPUNIT_ASSERT(m1->areCellsIncludedIn(m2,2,arr)); - CPPUNIT_ASSERT_EQUAL(3,arr->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,arr->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(3,(int)arr->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)arr->getNumberOfComponents()); CPPUNIT_ASSERT(std::equal(cells1,cells1+3,arr->getConstPointer())); arr->decrRef(); //some new modification into m2 @@ -1030,20 +1030,20 @@ void MEDCouplingBasicsTest5::testZipConnectivityPol1() std::copy(modif2,modif2+3,m2->getNodalConnectivity()->getPointer()+1); //policy 0 fails because cell0 in m2 has not exactly the same conn CPPUNIT_ASSERT(!m1->areCellsIncludedIn(m2,0,arr)); - CPPUNIT_ASSERT_EQUAL(3,arr->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,arr->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(3,(int)arr->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)arr->getNumberOfComponents()); CPPUNIT_ASSERT(std::equal(expected1,expected1+3,arr->getConstPointer())); arr->decrRef(); //policy 1 fails too because cell0 in m2 has not same orientation CPPUNIT_ASSERT(!m1->areCellsIncludedIn(m2,1,arr)); - CPPUNIT_ASSERT_EQUAL(3,arr->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,arr->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(3,(int)arr->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)arr->getNumberOfComponents()); CPPUNIT_ASSERT(std::equal(expected1,expected1+3,arr->getConstPointer())); arr->decrRef(); //policy 2 succeeds because cell0 in m2 has same nodes in connectivity CPPUNIT_ASSERT(m1->areCellsIncludedIn(m2,2,arr)); - CPPUNIT_ASSERT_EQUAL(3,arr->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,arr->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(3,(int)arr->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)arr->getNumberOfComponents()); CPPUNIT_ASSERT(std::equal(cells1,cells1+3,arr->getConstPointer())); arr->decrRef(); m1->decrRef(); @@ -1057,20 +1057,20 @@ void MEDCouplingBasicsTest5::testZipConnectivityPol1() arr=0; // no permutation policy 0 CPPUNIT_ASSERT(m1->areCellsIncludedIn(m2,0,arr)); - CPPUNIT_ASSERT_EQUAL(2,arr->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,arr->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(2,(int)arr->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)arr->getNumberOfComponents()); CPPUNIT_ASSERT(std::equal(cells2,cells2+2,arr->getConstPointer())); arr->decrRef(); // no permutation policy 1 CPPUNIT_ASSERT(m1->areCellsIncludedIn(m2,1,arr)); - CPPUNIT_ASSERT_EQUAL(2,arr->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,arr->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(2,(int)arr->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)arr->getNumberOfComponents()); CPPUNIT_ASSERT(std::equal(cells2,cells2+2,arr->getConstPointer())); arr->decrRef(); // no permutation policy 2 CPPUNIT_ASSERT(m1->areCellsIncludedIn(m2,2,arr)); - CPPUNIT_ASSERT_EQUAL(2,arr->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,arr->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(2,(int)arr->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)arr->getNumberOfComponents()); CPPUNIT_ASSERT(std::equal(cells2,cells2+2,arr->getConstPointer())); arr->decrRef(); // some modification into m2 @@ -1079,20 +1079,20 @@ void MEDCouplingBasicsTest5::testZipConnectivityPol1() //policy 0 fails because cell0 in m2 has not exactly the same conn const int expected2[2]={4,2}; CPPUNIT_ASSERT(!m1->areCellsIncludedIn(m2,0,arr)); - CPPUNIT_ASSERT_EQUAL(2,arr->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,arr->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(2,(int)arr->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)arr->getNumberOfComponents()); CPPUNIT_ASSERT(std::equal(expected2,expected2+2,arr->getConstPointer())); arr->decrRef(); //policy 1 fails too because cell0 in m2 has not same orientation CPPUNIT_ASSERT(!m1->areCellsIncludedIn(m2,1,arr)); - CPPUNIT_ASSERT_EQUAL(2,arr->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,arr->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(2,(int)arr->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)arr->getNumberOfComponents()); CPPUNIT_ASSERT(std::equal(expected2,expected2+2,arr->getConstPointer())); arr->decrRef(); //policy 2 succeeds because cell0 in m2 has same nodes in connectivity CPPUNIT_ASSERT(m1->areCellsIncludedIn(m2,2,arr)); - CPPUNIT_ASSERT_EQUAL(2,arr->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,arr->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(2,(int)arr->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)arr->getNumberOfComponents()); CPPUNIT_ASSERT(std::equal(cells2,cells2+2,arr->getConstPointer())); arr->decrRef(); m1->decrRef(); @@ -1161,13 +1161,13 @@ void MEDCouplingBasicsTest5::testDataArraySort1() DataArrayInt *arr2=arr->deepCopy(); arr1->sort(true); const int expected1[6]={1,2,4,5,6,7}; - CPPUNIT_ASSERT_EQUAL(6,arr1->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,arr1->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(6,(int)arr1->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)arr1->getNumberOfComponents()); CPPUNIT_ASSERT(std::equal(expected1,expected1+6,arr1->begin())); arr2->sort(false); const int expected2[6]={7,6,5,4,2,1}; - CPPUNIT_ASSERT_EQUAL(6,arr2->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,arr2->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(6,(int)arr2->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)arr2->getNumberOfComponents()); CPPUNIT_ASSERT(std::equal(expected2,expected2+6,arr2->begin())); arr1->decrRef(); arr2->decrRef(); @@ -1186,14 +1186,14 @@ void MEDCouplingBasicsTest5::testDataArraySort1() DataArrayDouble *ard2=ard->deepCopy(); ard1->sort(true); const double expected3[6]={1.,2.,4.,5.,6.,7.}; - CPPUNIT_ASSERT_EQUAL(6,ard1->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,ard1->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(6,(int)ard1->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)ard1->getNumberOfComponents()); for(int i=0;i<6;i++) CPPUNIT_ASSERT_DOUBLES_EQUAL(expected3[i],ard1->getIJ(i,0),1e-12); ard2->sort(false); const double expected4[6]={7.,6.,5.,4.,2.,1.}; - CPPUNIT_ASSERT_EQUAL(6,ard2->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,ard2->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(6,(int)ard2->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)ard2->getNumberOfComponents()); for(int i=0;i<6;i++) CPPUNIT_ASSERT_DOUBLES_EQUAL(expected4[i],ard2->getIJ(i,0),1e-12); ard1->decrRef(); @@ -1218,12 +1218,12 @@ void MEDCouplingBasicsTest5::testPartitionBySpreadZone1() const int expected0[3]={0,1,7}; const int expected1[5]={2,4,5,6,9}; const int expected2[2]={3,8}; - CPPUNIT_ASSERT_EQUAL(3,v2[0]->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,v2[0]->getNumberOfComponents()); - CPPUNIT_ASSERT_EQUAL(5,v2[1]->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,v2[1]->getNumberOfComponents()); - CPPUNIT_ASSERT_EQUAL(2,v2[2]->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,v2[2]->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(3,(int)v2[0]->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)v2[0]->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(5,(int)v2[1]->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)v2[1]->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(2,(int)v2[2]->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)v2[2]->getNumberOfComponents()); // CPPUNIT_ASSERT(std::equal(expected0,expected0+3,v2[0]->getConstPointer())); CPPUNIT_ASSERT(std::equal(expected1,expected1+5,v2[1]->getConstPointer())); @@ -1255,20 +1255,20 @@ void MEDCouplingBasicsTest5::testGiveCellsWithType1() const int expected1[3]={0,3,4}; MEDCouplingUMesh *m=build2DTargetMesh_1(); DataArrayInt *da=m->giveCellsWithType(INTERP_KERNEL::NORM_TRI3); - CPPUNIT_ASSERT_EQUAL(2,da->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,da->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(2,(int)da->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)da->getNumberOfComponents()); CPPUNIT_ASSERT(std::equal(expected0,expected0+2,da->getConstPointer())); da->decrRef(); // da=m->giveCellsWithType(INTERP_KERNEL::NORM_QUAD4); - CPPUNIT_ASSERT_EQUAL(3,da->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,da->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(3,(int)da->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)da->getNumberOfComponents()); CPPUNIT_ASSERT(std::equal(expected1,expected1+3,da->getConstPointer())); da->decrRef(); // da=m->giveCellsWithType(INTERP_KERNEL::NORM_TRI6); - CPPUNIT_ASSERT_EQUAL(0,da->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,da->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(0,(int)da->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)da->getNumberOfComponents()); da->decrRef(); // CPPUNIT_ASSERT_THROW(m->giveCellsWithType(INTERP_KERNEL::NORM_SEG2),INTERP_KERNEL::Exception); @@ -1544,8 +1544,8 @@ void MEDCouplingBasicsTest5::testKrSpatialDiscretization1() delete [] res0; // DataArrayDouble *valuesToTest=f->getValueOnMulti(targetPointCoordsX,40); - CPPUNIT_ASSERT_EQUAL(40,valuesToTest->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,valuesToTest->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(40,(int)valuesToTest->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)valuesToTest->getNumberOfComponents()); for(int i=0;i<40;i++) CPPUNIT_ASSERT_DOUBLES_EQUAL(targetFieldValsExpected[i],valuesToTest->getIJ(i,0),1e-10); valuesToTest->decrRef(); @@ -1620,8 +1620,8 @@ void MEDCouplingBasicsTest5::testIntersect2DMeshesTmp5() DataArrayInt *d1=0,*d2=0; MEDCouplingUMesh *m3=MEDCouplingUMesh::Intersect2DMeshes(m1,m2,1e-10,d1,d2); CPPUNIT_ASSERT_EQUAL(105,m3->getNumberOfCells()); - CPPUNIT_ASSERT_EQUAL(105,d1->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(105,d2->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(105,(int)d1->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(105,(int)d2->getNumberOfTuples()); CPPUNIT_ASSERT_EQUAL(704,m3->getNumberOfNodes()); // const double areaExpected[105]={-65.18804756198824,-65.18804756198824,-65.18804756198824,-65.18804756198824,-66.75884388878285,-66.75884388878285,-66.7588438887833,-66.75884388878308,-68.32964021557768,-68.32964021557768,-68.32964021557814,-68.32964021557791,-69.9004365423732,-69.9004365423732,-69.90043654237297,-69.90043654237297,-1.194568659706448,-1.0869994447159463,-142.2316939607081,-144.51326206513068,-144.5132620651309,-1.1945686597064424,-143.3186934054243,-5.002264310862817,-10.0261332846393,-3.9727823117092953,-7.290862524642649,-124.504404940456,-3.9727823117093237,-146.82366506060032,-150.79644737231024,-5.002264310862776,-145.79418306144626,-5.00208651738126,-10.054764051268958,-4.001067863263231,-8.027932154428669,-129.99378209314813,-4.001067863263216,-153.07856481622616,-157.0796326794898,-5.0020865173811915,-152.07754616210832,-5.001928880064381,-10.050590216368969,-4.00098721602491,-8.025810856794209,-136.28350081741684,-4.000987216024939,-159.36183077064402,-163.36281798667005,-5.0019288800643285,-158.36088910660442,-1.2991516319851801,-3.702636830195414,-3.7815130030068254,-6.265364371195623,-0.02516260900254963,-0.6553944641345026,-3.975752765070567,-7.368528340442765,-142.57249927881398,-0.02516260900254963,-3.9757527650706095,-165.64508791977525,-169.64600329384803,-1.299151631985167,-3.7026368301953885,-164.6442148316677,-10.00321285677458,-20.08414323176165,-8.001644468035863,-16.042954878437143,-304.0096070742277,-8.00164446803587,-350.1399180412005,-358.1415625092368,-10.003212856774468,-348.13834965246224,-3.794150313030109,-8.65049239704272,-0.02260276689354157,-0.5885167811200915,-370.2185414798688,-0.022602766893559393,-383.2517009710623,-383.2743037379555,-3.7941503130300576,-379.48015342492505,-408.40704496667513,-408.4070449666742,-408.4070449666742,-408.4070449666742,-433.53978619538975,-433.5397861953902,-433.5397861953911,-433.53978619539066,-458.67252742410983,-458.6725274241094,-458.67252742410983,-458.6725274241089,-608.6835766330232,-608.6835766330232,-608.6835766330232,-608.6835766330241}; @@ -1652,8 +1652,8 @@ void MEDCouplingBasicsTest5::testDAIBuildUnique1() const int expectedData[7]={1,2,3,4,5,7,19}; // DataArrayInt *e=d->buildUnique(); - CPPUNIT_ASSERT_EQUAL(7,e->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,e->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(7,(int)e->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)e->getNumberOfComponents()); for(int i=0;i<7;i++) CPPUNIT_ASSERT_EQUAL(expectedData[i],e->getIJ(i,0)); // @@ -1685,10 +1685,10 @@ void MEDCouplingBasicsTest5::testDAIPartitionByDifferentValues1() CPPUNIT_ASSERT_EQUAL((std::size_t)2,e[1]->getNbOfElems()); CPPUNIT_ASSERT_EQUAL((std::size_t)2,e[2]->getNbOfElems()); CPPUNIT_ASSERT_EQUAL((std::size_t)4,e[3]->getNbOfElems()); - CPPUNIT_ASSERT_EQUAL(1,e[0]->getNumberOfComponents()); - CPPUNIT_ASSERT_EQUAL(1,e[1]->getNumberOfComponents()); - CPPUNIT_ASSERT_EQUAL(1,e[2]->getNumberOfComponents()); - CPPUNIT_ASSERT_EQUAL(1,e[3]->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(1,(int)e[0]->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(1,(int)e[1]->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(1,(int)e[2]->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(1,(int)e[3]->getNumberOfComponents()); CPPUNIT_ASSERT(std::equal(expected2_0,expected2_0+1,e[0]->begin())); CPPUNIT_ASSERT(std::equal(expected2_1,expected2_1+2,e[1]->begin())); CPPUNIT_ASSERT(std::equal(expected2_2,expected2_2+2,e[2]->begin())); @@ -1773,8 +1773,8 @@ void MEDCouplingBasicsTest5::testIntersect2DMeshesTmp6() DataArrayInt *d1=0,*d2=0; MEDCouplingUMesh *m3=MEDCouplingUMesh::Intersect2DMeshes(m1,m2,1e-10,d1,d2); CPPUNIT_ASSERT_EQUAL(4,m3->getNumberOfCells()); - CPPUNIT_ASSERT_EQUAL(4,d1->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(4,d2->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(4,(int)d1->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(4,(int)d2->getNumberOfTuples()); CPPUNIT_ASSERT_EQUAL(43,m3->getNumberOfNodes()); bool areMerged=false; int newNbOfNodes=-1; @@ -1867,22 +1867,22 @@ void MEDCouplingBasicsTest5::testDAIBuildSubstractionOptimized1() // DataArrayInt *a=0; a=da1->buildSubstractionOptimized(da2); - CPPUNIT_ASSERT_EQUAL(4,a->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,a->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(4,(int)a->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)a->getNumberOfComponents()); const int expected1_0[4]={1,6,7,13}; CPPUNIT_ASSERT(std::equal(expected1_0,expected1_0+4,a->begin())); a->decrRef(); // a=da1->buildSubstractionOptimized(da3); - CPPUNIT_ASSERT_EQUAL(4,a->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,a->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(4,(int)a->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)a->getNumberOfComponents()); const int expected2_0[4]={6,7,9,13}; CPPUNIT_ASSERT(std::equal(expected2_0,expected2_0+4,a->begin())); a->decrRef(); // a=da1->buildSubstractionOptimized(da4); - CPPUNIT_ASSERT_EQUAL(0,a->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,a->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(0,(int)a->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)a->getNumberOfComponents()); a->decrRef(); // da1->decrRef(); @@ -2009,21 +2009,21 @@ void MEDCouplingBasicsTest5::testSimplexize3() m1->checkConsistency(); MEDCouplingFieldDouble *f1=m1->getMeasureField(ON_CELLS); const double vol1Expected[12]={1./6, 1./6, 1./6,1./6, 1./6, 1./3,1./6, 1./6, 1./6, 1./6, 1./3, 1./6}; - CPPUNIT_ASSERT_EQUAL(1,f1->getArray()->getNumberOfComponents()); - CPPUNIT_ASSERT_EQUAL(12,f1->getArray()->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)f1->getArray()->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(12,(int)f1->getArray()->getNumberOfTuples()); for(int i=0;i<12;i++) CPPUNIT_ASSERT_DOUBLES_EQUAL(vol1Expected[i],f1->getIJ(i,0),1e-12); const int connExpected1[60]={14,0,1,2,3,14,4,9,5,6,14,4,8,9,11,14,4,7,11,6,14,9,11,10,6,14,4,9,6,11,14,12,17,13,14,14,12,16,17,19,14,12,15,19,14,14,17,19,18,14,14,12,17,14,19,14,20,21,22,23}; const int connIExpected1[13]={0,5,10,15,20,25,30,35,40,45,50,55,60}; const int n2o1[12]={0,1,1,1,1,1,2,2,2,2,2,3}; - CPPUNIT_ASSERT_EQUAL(1,m1->getNodalConnectivity()->getNumberOfComponents()); - CPPUNIT_ASSERT_EQUAL(60,m1->getNodalConnectivity()->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,m1->getNodalConnectivityIndex()->getNumberOfComponents()); - CPPUNIT_ASSERT_EQUAL(13,m1->getNodalConnectivityIndex()->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)m1->getNodalConnectivity()->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(60,(int)m1->getNodalConnectivity()->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)m1->getNodalConnectivityIndex()->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(13,(int)m1->getNodalConnectivityIndex()->getNumberOfTuples()); CPPUNIT_ASSERT(std::equal(connExpected1,connExpected1+60,m1->getNodalConnectivity()->begin())); CPPUNIT_ASSERT(std::equal(connIExpected1,connIExpected1+13,m1->getNodalConnectivityIndex()->begin())); - CPPUNIT_ASSERT_EQUAL(1,d1->getNumberOfComponents()); - CPPUNIT_ASSERT_EQUAL(12,d1->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)d1->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(12,(int)d1->getNumberOfTuples()); CPPUNIT_ASSERT(std::equal(n2o1,n2o1+12,d1->begin())); f1->decrRef(); m1->decrRef(); @@ -2034,21 +2034,21 @@ void MEDCouplingBasicsTest5::testSimplexize3() m2->checkConsistency(); MEDCouplingFieldDouble *f2=m2->getMeasureField(ON_CELLS); const double vol2Expected[14]={1./6, 1./6, 1./6,1./6, 1./6, 1./6,1./6,1./6, 1./6, 1./6, 1./6, 1./6,1./6,1./6}; - CPPUNIT_ASSERT_EQUAL(1,f2->getArray()->getNumberOfComponents()); - CPPUNIT_ASSERT_EQUAL(14,f2->getArray()->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)f2->getArray()->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(14,(int)f2->getArray()->getNumberOfTuples()); for(int i=0;i<14;i++) CPPUNIT_ASSERT_DOUBLES_EQUAL(vol2Expected[i],f2->getIJ(i,0),1e-12); const int connExpected2[70]={14,0,1,2,3,14,4,9,5,10,14,4,5,6,10,14,4,8,9,10,14,4,11,8,10,14,4,6,7,10,14,4,7,11,10,14,12,17,13,18,14,12,13,14,18,14,12,16,17,18,14,12,19,16,18,14,12,14,15,18,14,12,15,19,18,14,20,21,22,23}; const int connIExpected2[15]={0,5,10,15,20,25,30,35,40,45,50,55,60,65,70}; const int n2o2[14]={0,1,1,1,1,1,1,2,2,2,2,2,2,3}; - CPPUNIT_ASSERT_EQUAL(1,m2->getNodalConnectivity()->getNumberOfComponents()); - CPPUNIT_ASSERT_EQUAL(70,m2->getNodalConnectivity()->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,m2->getNodalConnectivityIndex()->getNumberOfComponents()); - CPPUNIT_ASSERT_EQUAL(15,m2->getNodalConnectivityIndex()->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)m2->getNodalConnectivity()->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(70,(int)m2->getNodalConnectivity()->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)m2->getNodalConnectivityIndex()->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(15,(int)m2->getNodalConnectivityIndex()->getNumberOfTuples()); CPPUNIT_ASSERT(std::equal(connExpected2,connExpected2+70,m2->getNodalConnectivity()->begin())); CPPUNIT_ASSERT(std::equal(connIExpected2,connIExpected2+15,m2->getNodalConnectivityIndex()->begin())); - CPPUNIT_ASSERT_EQUAL(1,d2->getNumberOfComponents()); - CPPUNIT_ASSERT_EQUAL(14,d2->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)d2->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(14,(int)d2->getNumberOfTuples()); CPPUNIT_ASSERT(std::equal(n2o2,n2o2+14,d2->begin())); f2->decrRef(); m2->decrRef(); diff --git a/src/MEDCoupling/Test/MEDCouplingExamplesTest.cxx b/src/MEDCoupling/Test/MEDCouplingExamplesTest.cxx index 0d697d475..5deb14361 100644 --- a/src/MEDCoupling/Test/MEDCouplingExamplesTest.cxx +++ b/src/MEDCoupling/Test/MEDCouplingExamplesTest.cxx @@ -1947,8 +1947,8 @@ void CppExample_DataArrayInt_buildPermutationArr() DataArrayInt *c=a->buildPermutationArr(*b); //! [CppSnippet_DataArrayInt_buildPermutationArr_1] const int expect1[5]={1,0,4,2,3}; - CPPUNIT_ASSERT_EQUAL(5,c->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,c->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(5,(int)c->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)c->getNumberOfComponents()); CPPUNIT_ASSERT(std::equal(expect1,expect1+5,c->getConstPointer())); CPPUNIT_ASSERT(a->isEqualWithoutConsideringStrAndOrder(*b)); a->decrRef(); diff --git a/src/MEDCoupling/Test/MEDCouplingRemapperTest.cxx b/src/MEDCoupling/Test/MEDCouplingRemapperTest.cxx index e9f17655a..27a0b536c 100644 --- a/src/MEDCoupling/Test/MEDCouplingRemapperTest.cxx +++ b/src/MEDCoupling/Test/MEDCouplingRemapperTest.cxx @@ -56,8 +56,8 @@ void MEDCouplingRemapperTest::test2DInterpP0P0_1() MEDCouplingFieldDouble *trgfield=remapper.transferField(srcField,4.57); const double *values=trgfield->getArray()->getConstPointer(); const double valuesExpected[5]={7.5 ,7. ,7.,8.,7.5}; - CPPUNIT_ASSERT_EQUAL(5,trgfield->getArray()->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,trgfield->getArray()->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(5,(int)trgfield->getArray()->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)trgfield->getArray()->getNumberOfComponents()); for(int i0=0;i0<5;i0++) CPPUNIT_ASSERT_DOUBLES_EQUAL(valuesExpected[i0],values[i0],1e-12); trgfield->decrRef(); @@ -66,8 +66,8 @@ void MEDCouplingRemapperTest::test2DInterpP0P0_1() trgfield=remapper.transferField(srcField,4.57); values=trgfield->getArray()->getConstPointer(); const double valuesExpected2[5]={3.75 ,1.75 ,1.75,4.,3.75}; - CPPUNIT_ASSERT_EQUAL(5,trgfield->getArray()->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,trgfield->getArray()->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(5,(int)trgfield->getArray()->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)trgfield->getArray()->getNumberOfComponents()); for(int i0=0;i0<5;i0++) CPPUNIT_ASSERT_DOUBLES_EQUAL(valuesExpected2[i0],values[i0],1e-12); trgfield->decrRef(); @@ -75,8 +75,8 @@ void MEDCouplingRemapperTest::test2DInterpP0P0_1() srcField->setNature(IntensiveMaximum); trgfield=remapper.transferField(srcField,4.57); values=trgfield->getArray()->getConstPointer(); - CPPUNIT_ASSERT_EQUAL(5,trgfield->getArray()->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,trgfield->getArray()->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(5,(int)trgfield->getArray()->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)trgfield->getArray()->getNumberOfComponents()); for(int i0=0;i0<5;i0++) CPPUNIT_ASSERT_DOUBLES_EQUAL(valuesExpected[i0],values[i0],1e-12); trgfield->decrRef(); @@ -84,8 +84,8 @@ void MEDCouplingRemapperTest::test2DInterpP0P0_1() srcField->setNature(ExtensiveConservation); trgfield=remapper.transferField(srcField,4.57); values=trgfield->getArray()->getConstPointer(); - CPPUNIT_ASSERT_EQUAL(5,trgfield->getArray()->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,trgfield->getArray()->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(5,(int)trgfield->getArray()->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)trgfield->getArray()->getNumberOfComponents()); for(int i0=0;i0<5;i0++) CPPUNIT_ASSERT_DOUBLES_EQUAL(valuesExpected2[i0],values[i0],1e-12); trgfield->decrRef(); @@ -93,8 +93,8 @@ void MEDCouplingRemapperTest::test2DInterpP0P0_1() srcField->setNature(ExtensiveMaximum); trgfield=remapper.transferField(srcField,4.57); values=trgfield->getArray()->getConstPointer(); - CPPUNIT_ASSERT_EQUAL(5,trgfield->getArray()->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,trgfield->getArray()->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(5,(int)trgfield->getArray()->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)trgfield->getArray()->getNumberOfComponents()); for(int i0=0;i0<5;i0++) CPPUNIT_ASSERT_DOUBLES_EQUAL(valuesExpected2[i0],values[i0],1e-12); trgfield->decrRef(); @@ -102,8 +102,8 @@ void MEDCouplingRemapperTest::test2DInterpP0P0_1() srcField->setNature(IntensiveConservation); trgfield=remapper.transferField(srcField,4.57); values=trgfield->getArray()->getConstPointer(); - CPPUNIT_ASSERT_EQUAL(5,trgfield->getArray()->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,trgfield->getArray()->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(5,(int)trgfield->getArray()->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)trgfield->getArray()->getNumberOfComponents()); for(int i0=0;i0<5;i0++) CPPUNIT_ASSERT_DOUBLES_EQUAL(valuesExpected[i0],values[i0],1e-12); trgfield->decrRef(); @@ -138,8 +138,8 @@ void MEDCouplingRemapperTest::test2DInterpP0P0R_1() MEDCouplingFieldDouble *srcfield=remapper.reverseTransferField(targetField,4.57); const double *values=srcfield->getArray()->getConstPointer(); const double valuesExpected[2]={8.75 ,9.5}; - CPPUNIT_ASSERT_EQUAL(2,srcfield->getArray()->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,srcfield->getArray()->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(2,(int)srcfield->getArray()->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)srcfield->getArray()->getNumberOfComponents()); for(int i0=0;i0<2;i0++) CPPUNIT_ASSERT_DOUBLES_EQUAL(valuesExpected[i0],values[i0],1e-12); srcfield->decrRef(); @@ -148,8 +148,8 @@ void MEDCouplingRemapperTest::test2DInterpP0P0R_1() srcfield=remapper.reverseTransferField(targetField,4.57); values=srcfield->getArray()->getConstPointer(); const double valuesExpected2[2]={26., 19.}; - CPPUNIT_ASSERT_EQUAL(2,srcfield->getArray()->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,srcfield->getArray()->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(2,(int)srcfield->getArray()->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)srcfield->getArray()->getNumberOfComponents()); for(int i0=0;i0<2;i0++) CPPUNIT_ASSERT_DOUBLES_EQUAL(valuesExpected2[i0],values[i0],1e-12); srcfield->decrRef(); @@ -181,8 +181,8 @@ void MEDCouplingRemapperTest::test1DInterp_1() MEDCouplingFieldDouble *trgfield=remapper.transferField(srcField,4.57); const double *values=trgfield->getArray()->getConstPointer(); const double valuesExpected1[2]={9.0540540540540526,7.4}; - CPPUNIT_ASSERT_EQUAL(2,trgfield->getArray()->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,trgfield->getArray()->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(2,(int)trgfield->getArray()->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)trgfield->getArray()->getNumberOfComponents()); for(int i0=0;i0<2;i0++) CPPUNIT_ASSERT_DOUBLES_EQUAL(valuesExpected1[i0],values[i0],1e-12); trgfield->decrRef(); @@ -190,8 +190,8 @@ void MEDCouplingRemapperTest::test1DInterp_1() srcField->setNature(ExtensiveMaximum); trgfield=remapper.transferField(srcField,4.57); values=trgfield->getArray()->getConstPointer(); - CPPUNIT_ASSERT_EQUAL(2,trgfield->getArray()->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,trgfield->getArray()->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(2,(int)trgfield->getArray()->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)trgfield->getArray()->getNumberOfComponents()); for(int i0=0;i0<2;i0++) CPPUNIT_ASSERT_DOUBLES_EQUAL(valuesExpected2[i0],values[i0],1e-12); trgfield->decrRef(); @@ -200,8 +200,8 @@ void MEDCouplingRemapperTest::test1DInterp_1() srcField->setNature(ExtensiveConservation); trgfield=remapper.transferField(srcField,4.57); values=trgfield->getArray()->getConstPointer(); - CPPUNIT_ASSERT_EQUAL(2,trgfield->getArray()->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,trgfield->getArray()->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(2,(int)trgfield->getArray()->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)trgfield->getArray()->getNumberOfComponents()); for(int i0=0;i0<2;i0++) CPPUNIT_ASSERT_DOUBLES_EQUAL(valuesExpected3[i0],values[i0],1e-12); trgfield->decrRef(); @@ -210,8 +210,8 @@ void MEDCouplingRemapperTest::test1DInterp_1() srcField->setNature(IntensiveConservation); trgfield=remapper.transferField(srcField,4.57); values=trgfield->getArray()->getConstPointer(); - CPPUNIT_ASSERT_EQUAL(2,trgfield->getArray()->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,trgfield->getArray()->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(2,(int)trgfield->getArray()->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)trgfield->getArray()->getNumberOfComponents()); for(int i0=0;i0<2;i0++) CPPUNIT_ASSERT_DOUBLES_EQUAL(valuesExpected4[i0],values[i0],1e-12); trgfield->decrRef(); @@ -236,16 +236,16 @@ void MEDCouplingRemapperTest::test1DInterp_1() // trgfield=remapper.transferField(srcField,4.57); values=trgfield->getArray()->getConstPointer(); - CPPUNIT_ASSERT_EQUAL(2,trgfield->getArray()->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,trgfield->getArray()->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(2,(int)trgfield->getArray()->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)trgfield->getArray()->getNumberOfComponents()); for(int i0=0;i0<2;i0++) CPPUNIT_ASSERT_DOUBLES_EQUAL(valuesExpected1[i0],values[i0],1e-12); trgfield->decrRef(); srcField->setNature(ExtensiveMaximum); trgfield=remapper.transferField(srcField,4.57); values=trgfield->getArray()->getConstPointer(); - CPPUNIT_ASSERT_EQUAL(2,trgfield->getArray()->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,trgfield->getArray()->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(2,(int)trgfield->getArray()->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)trgfield->getArray()->getNumberOfComponents()); for(int i0=0;i0<2;i0++) CPPUNIT_ASSERT_DOUBLES_EQUAL(valuesExpected2[i0],values[i0],1e-12); trgfield->decrRef(); @@ -253,8 +253,8 @@ void MEDCouplingRemapperTest::test1DInterp_1() srcField->setNature(ExtensiveConservation); trgfield=remapper.transferField(srcField,4.57); values=trgfield->getArray()->getConstPointer(); - CPPUNIT_ASSERT_EQUAL(2,trgfield->getArray()->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,trgfield->getArray()->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(2,(int)trgfield->getArray()->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)trgfield->getArray()->getNumberOfComponents()); for(int i0=0;i0<2;i0++) CPPUNIT_ASSERT_DOUBLES_EQUAL(valuesExpected3[i0],values[i0],1e-12); trgfield->decrRef(); @@ -262,8 +262,8 @@ void MEDCouplingRemapperTest::test1DInterp_1() srcField->setNature(IntensiveConservation); trgfield=remapper.transferField(srcField,4.57); values=trgfield->getArray()->getConstPointer(); - CPPUNIT_ASSERT_EQUAL(2,trgfield->getArray()->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,trgfield->getArray()->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(2,(int)trgfield->getArray()->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)trgfield->getArray()->getNumberOfComponents()); for(int i0=0;i0<2;i0++) CPPUNIT_ASSERT_DOUBLES_EQUAL(valuesExpected4[i0],values[i0],1e-12); trgfield->decrRef(); @@ -296,8 +296,8 @@ void MEDCouplingRemapperTest::test2DInterpMultiMethods() MEDCouplingFieldDouble *trgfield=remapper.transferField(srcField,4.57); const double *values=trgfield->getArray()->getConstPointer(); const double valuesExpected[5]={7.5 ,7. ,7.,8.,7.5}; - CPPUNIT_ASSERT_EQUAL(5,trgfield->getArray()->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,trgfield->getArray()->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(5,(int)trgfield->getArray()->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)trgfield->getArray()->getNumberOfComponents()); for(int i0=0;i0<5;i0++) CPPUNIT_ASSERT_DOUBLES_EQUAL(valuesExpected[i0],values[i0],1e-12); trgfield->decrRef(); @@ -317,8 +317,8 @@ void MEDCouplingRemapperTest::test2DInterpMultiMethods() trgfield=remapper.transferField(srcField,4.57); values=trgfield->getArray()->getConstPointer(); const double valuesExpected2[5]={7.,7.666666666666667,8.6666666666666661,8.8333333333333339,10.}; - CPPUNIT_ASSERT_EQUAL(5,trgfield->getArray()->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,trgfield->getArray()->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(5,(int)trgfield->getArray()->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)trgfield->getArray()->getNumberOfComponents()); for(int i0=0;i0<5;i0++) CPPUNIT_ASSERT_DOUBLES_EQUAL(valuesExpected2[i0],values[i0],1e-12); trgfield->decrRef(); @@ -338,8 +338,8 @@ void MEDCouplingRemapperTest::test2DInterpMultiMethods() trgfield=remapper.transferField(srcField,4.57); values=trgfield->getArray()->getConstPointer(); const double valuesExpected3[4]={7.5,8.5,10.,10.625}; - CPPUNIT_ASSERT_EQUAL(4,trgfield->getArray()->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,trgfield->getArray()->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(4,(int)trgfield->getArray()->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)trgfield->getArray()->getNumberOfComponents()); for(int i0=0;i0<4;i0++) CPPUNIT_ASSERT_DOUBLES_EQUAL(valuesExpected3[i0],values[i0],1e-12); trgfield->decrRef(); @@ -365,8 +365,8 @@ void MEDCouplingRemapperTest::test2DInterpMultiMethods() values=trgfield->getArray()->getConstPointer(); const double valuesExpected4[9]={ 7.,7.35,8.,7.7,8.2857142857142865, 9.5333333333333332,9.,9.7666666666666657,10.}; - CPPUNIT_ASSERT_EQUAL(9,trgfield->getArray()->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,trgfield->getArray()->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(9,(int)trgfield->getArray()->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)trgfield->getArray()->getNumberOfComponents()); for(int i0=0;i0<9;i0++) CPPUNIT_ASSERT_DOUBLES_EQUAL(valuesExpected4[i0],values[i0],1e-12); trgfield->decrRef(); @@ -399,8 +399,8 @@ void MEDCouplingRemapperTest::testMultiDimCombi() MEDCouplingFieldDouble *trgField=remapper.transferField(srcField,4.57); const double *values=trgField->getArray()->getConstPointer(); const double valuesExpected[5]={7.5 ,7. ,7.,8.,7.5}; - CPPUNIT_ASSERT_EQUAL(5,trgField->getArray()->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,trgField->getArray()->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(5,(int)trgField->getArray()->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)trgField->getArray()->getNumberOfComponents()); for(int i0=0;i0<5;i0++) CPPUNIT_ASSERT_DOUBLES_EQUAL(valuesExpected[i0],values[i0],1e-12); trgField->decrRef(); @@ -422,8 +422,8 @@ void MEDCouplingRemapperTest::testMultiDimCombi() ptr[i]=(double)(i+8); array->decrRef(); trgField=remapper.transferField(srcField,4.57); - CPPUNIT_ASSERT_EQUAL(5,trgField->getArray()->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,trgField->getArray()->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(5,(int)trgField->getArray()->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)trgField->getArray()->getNumberOfComponents()); const double valuesExpected2[5]={8.5,8.,8.,9.,8.5}; values=trgField->getArray()->getConstPointer(); for(int i0=0;i0<5;i0++) @@ -447,8 +447,8 @@ void MEDCouplingRemapperTest::testMultiDimCombi() ptr[i]=(double)(i+7); array->decrRef(); trgField=remapper.transferField(srcField,4.57); - CPPUNIT_ASSERT_EQUAL(8,trgField->getArray()->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,trgField->getArray()->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(8,(int)trgField->getArray()->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)trgField->getArray()->getNumberOfComponents()); const double valuesExpected3[8]={13.166666666666668, 13.888888888888888, 10.722222222222223, 10.870370370370372, 14.555555555555555, 13.888888888888889, 14.444444444444443, 11.72222222222222}; values=trgField->getArray()->getConstPointer(); @@ -474,8 +474,8 @@ void MEDCouplingRemapperTest::testMultiDimCombi() ptr[i]=(double)(i+7); array->decrRef(); trgField=remapper.transferField(srcField,4.57); - CPPUNIT_ASSERT_EQUAL(8,trgField->getArray()->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,trgField->getArray()->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(8,(int)trgField->getArray()->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)trgField->getArray()->getNumberOfComponents()); const double valuesExpected4[8]={7.,11.,8.,12.,9.,13.,10.,14.}; values=trgField->getArray()->getConstPointer(); for(int i0=0;i0<8;i0++) @@ -500,8 +500,8 @@ void MEDCouplingRemapperTest::testMultiDimCombi() ptr[i]=(double)(i+7); array->decrRef(); trgField=remapper.transferField(srcField,4.57); - CPPUNIT_ASSERT_EQUAL(8,trgField->getArray()->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,trgField->getArray()->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(8,(int)trgField->getArray()->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)trgField->getArray()->getNumberOfComponents()); const double valuesExpected5[8]={7.,9.,11.,13.,8.,10.,12.,14.}; values=trgField->getArray()->getConstPointer(); for(int i0=0;i0<8;i0++) @@ -574,21 +574,21 @@ void MEDCouplingRemapperTest::testMultiDimCombi() CPPUNIT_ASSERT_EQUAL(1,remapper.prepare(sourceMesh,targetMesh,"P0P0")); trgField=remapper.transferField(srcField,4.57); values=trgField->getArray()->getConstPointer(); - CPPUNIT_ASSERT_EQUAL(1,trgField->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,trgField->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(1,(int)trgField->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)trgField->getNumberOfComponents()); CPPUNIT_ASSERT_DOUBLES_EQUAL(9.125,values[0],1e-14); srcField->decrRef(); srcField=remapper.reverseTransferField(trgField,4.220173); - CPPUNIT_ASSERT_EQUAL(5,srcField->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,srcField->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(5,(int)srcField->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)srcField->getNumberOfComponents()); values=srcField->getArray()->getConstPointer(); for(int i0=0;i0<5;i0++) CPPUNIT_ASSERT_DOUBLES_EQUAL(9.125,values[i0],1e-14); srcField->decrRef(); trgField->setNature(ExtensiveMaximum); srcField=remapper.reverseTransferField(trgField,4.220173); - CPPUNIT_ASSERT_EQUAL(5,srcField->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,srcField->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(5,(int)srcField->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)srcField->getNumberOfComponents()); values=srcField->getArray()->getConstPointer(); const double valuesExpected6[5]={2.28125,1.140625,1.140625,2.28125,2.28125}; for(int i0=0;i0<5;i0++) @@ -662,8 +662,8 @@ void MEDCouplingRemapperTest::testMultiDimCombi() srcField->setArray(array); array->decrRef(); trgField=remapper.transferField(srcField,4.57); const double valuesExpected10[3]={3.9674868868103834, 2.8, 3.6372633449255796}; - CPPUNIT_ASSERT_EQUAL(3,trgField->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,trgField->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(3,(int)trgField->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)trgField->getNumberOfComponents()); for(int i=0;i<3;i++) CPPUNIT_ASSERT_DOUBLES_EQUAL(valuesExpected10[i],trgField->getIJ(i,0),1e-13); srcField->decrRef(); @@ -680,8 +680,8 @@ void MEDCouplingRemapperTest::testMultiDimCombi() srcField->setArray(array); array->decrRef(); trgField=remapper.transferField(srcField,4.57); const double valuesExpected11[4]={3., 2.9264705882352944, 3.8518518518518516, 2.3170731707317076}; - CPPUNIT_ASSERT_EQUAL(4,trgField->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,trgField->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(4,(int)trgField->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)trgField->getNumberOfComponents()); for(int i=0;i<4;i++) CPPUNIT_ASSERT_DOUBLES_EQUAL(valuesExpected11[i],trgField->getIJ(i,0),1e-13); srcField->decrRef(); @@ -701,8 +701,8 @@ void MEDCouplingRemapperTest::testMultiDimCombi() srcField->setArray(array); array->decrRef(); trgField=remapper.transferField(srcField,4.57); const double valuesExpected12[3]={5.70909090909091, 6.08362715128042, 6.92857142857143}; - CPPUNIT_ASSERT_EQUAL(3,trgField->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,trgField->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(3,(int)trgField->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)trgField->getNumberOfComponents()); for(int i=0;i<3;i++) CPPUNIT_ASSERT_DOUBLES_EQUAL(valuesExpected12[i],trgField->getIJ(i,0),1e-13); srcField->decrRef(); @@ -717,8 +717,8 @@ void MEDCouplingRemapperTest::testMultiDimCombi() srcField->setArray(array); array->decrRef(); trgField=remapper.transferField(srcField,4.57); const double valuesExpected13[7]={3., 4., 2.5, 2.909090909090909, 2., 3.5, 3.3571428571428572}; - CPPUNIT_ASSERT_EQUAL(7,trgField->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,trgField->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(7,(int)trgField->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)trgField->getNumberOfComponents()); for(int i=0;i<7;i++) CPPUNIT_ASSERT_DOUBLES_EQUAL(valuesExpected13[i],trgField->getIJ(i,0),1e-13); srcField->decrRef(); @@ -749,8 +749,8 @@ void MEDCouplingRemapperTest::testNatureOfField() MEDCouplingFieldDouble *trgfield=remapper.transferField(srcField,4.220173); const double *values=trgfield->getArray()->getConstPointer(); const double valuesExpected[4]={7.75, 7.0625, 4.220173,8.0}; - CPPUNIT_ASSERT_EQUAL(4,trgfield->getArray()->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,trgfield->getArray()->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(4,(int)trgfield->getArray()->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)trgfield->getArray()->getNumberOfComponents()); for(int i0=0;i0<4;i0++) CPPUNIT_ASSERT_DOUBLES_EQUAL(valuesExpected[i0],values[i0],1e-12); trgfield->decrRef(); @@ -759,8 +759,8 @@ void MEDCouplingRemapperTest::testNatureOfField() trgfield=remapper.transferField(srcField,4.220173); values=trgfield->getArray()->getConstPointer(); const double valuesExpected2[4]={2.8374999999999999, 7.3624999999999998, 4.220173, 4.7999999999999998}; - CPPUNIT_ASSERT_EQUAL(4,trgfield->getArray()->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,trgfield->getArray()->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(4,(int)trgfield->getArray()->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)trgfield->getArray()->getNumberOfComponents()); for(int i0=0;i0<4;i0++) CPPUNIT_ASSERT_DOUBLES_EQUAL(valuesExpected2[i0],values[i0],1e-12); trgfield->decrRef(); @@ -769,8 +769,8 @@ void MEDCouplingRemapperTest::testNatureOfField() trgfield=remapper.transferField(srcField,4.220173); values=trgfield->getArray()->getConstPointer(); const double valuesExpected3[4]={1.24, 4.5199999999999996, 4.220173, 1.9199999999999999}; - CPPUNIT_ASSERT_EQUAL(4,trgfield->getArray()->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,trgfield->getArray()->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(4,(int)trgfield->getArray()->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)trgfield->getArray()->getNumberOfComponents()); for(int i0=0;i0<4;i0++) CPPUNIT_ASSERT_DOUBLES_EQUAL(valuesExpected3[i0],values[i0],1e-12); trgfield->decrRef(); @@ -779,8 +779,8 @@ void MEDCouplingRemapperTest::testNatureOfField() trgfield=remapper.transferField(srcField,4.220173); values=trgfield->getArray()->getConstPointer(); const double valuesExpected9[4]={2.48, 3.766666666666666, 4.220173, 1.9199999999999999}; - CPPUNIT_ASSERT_EQUAL(4,trgfield->getArray()->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,trgfield->getArray()->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(4,(int)trgfield->getArray()->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)trgfield->getArray()->getNumberOfComponents()); for(int i0=0;i0<4;i0++) CPPUNIT_ASSERT_DOUBLES_EQUAL(valuesExpected9[i0],values[i0],1e-12); trgfield->decrRef(); @@ -800,8 +800,8 @@ void MEDCouplingRemapperTest::testNatureOfField() srcField=remapper.reverseTransferField(trgfield,4.220173); values=srcField->getArray()->getConstPointer(); const double valuesExpected4[2]={7.9375, 8.9}; - CPPUNIT_ASSERT_EQUAL(2,srcField->getArray()->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,srcField->getArray()->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(2,(int)srcField->getArray()->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)srcField->getArray()->getNumberOfComponents()); for(int i0=0;i0<2;i0++) CPPUNIT_ASSERT_DOUBLES_EQUAL(valuesExpected4[i0],values[i0],1e-12); srcField->decrRef(); @@ -828,8 +828,8 @@ void MEDCouplingRemapperTest::testNatureOfField() trgfield=remapper.transferField(srcField,4.220173); values=trgfield->getArray()->getConstPointer(); const double valuesExpected5[2]={7.9375, 8.9}; - CPPUNIT_ASSERT_EQUAL(2,trgfield->getArray()->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,trgfield->getArray()->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(2,(int)trgfield->getArray()->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)trgfield->getArray()->getNumberOfComponents()); for(int i0=0;i0<2;i0++) CPPUNIT_ASSERT_DOUBLES_EQUAL(valuesExpected5[i0],values[i0],1e-12); trgfield->decrRef(); @@ -838,8 +838,8 @@ void MEDCouplingRemapperTest::testNatureOfField() trgfield=remapper.transferField(srcField,4.220173); values=trgfield->getArray()->getConstPointer(); const double valuesExpected6[4]={9.25, 15.75}; - CPPUNIT_ASSERT_EQUAL(2,trgfield->getArray()->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,trgfield->getArray()->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(2,(int)trgfield->getArray()->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)trgfield->getArray()->getNumberOfComponents()); for(int i0=0;i0<2;i0++) CPPUNIT_ASSERT_DOUBLES_EQUAL(valuesExpected6[i0],values[i0],1e-12); trgfield->decrRef(); @@ -848,8 +848,8 @@ void MEDCouplingRemapperTest::testNatureOfField() trgfield=remapper.transferField(srcField,4.220173); values=trgfield->getArray()->getConstPointer(); const double valuesExpected7[2]={4.56, 4.3466666666666667}; - CPPUNIT_ASSERT_EQUAL(2,trgfield->getArray()->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,trgfield->getArray()->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(2,(int)trgfield->getArray()->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)trgfield->getArray()->getNumberOfComponents()); for(int i0=0;i0<2;i0++) CPPUNIT_ASSERT_DOUBLES_EQUAL(valuesExpected7[i0],values[i0],1e-12); trgfield->decrRef(); @@ -858,8 +858,8 @@ void MEDCouplingRemapperTest::testNatureOfField() trgfield=remapper.transferField(srcField,4.220173); values=trgfield->getArray()->getConstPointer(); const double valuesExpected10[2]={5.08, 3.56}; - CPPUNIT_ASSERT_EQUAL(2,trgfield->getArray()->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,trgfield->getArray()->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(2,(int)trgfield->getArray()->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)trgfield->getArray()->getNumberOfComponents()); for(int i0=0;i0<2;i0++) CPPUNIT_ASSERT_DOUBLES_EQUAL(valuesExpected10[i0],values[i0],1e-12); trgfield->decrRef(); @@ -879,8 +879,8 @@ void MEDCouplingRemapperTest::testNatureOfField() srcField=remapper.reverseTransferField(trgfield,4.220173); values=srcField->getArray()->getConstPointer(); const double valuesExpected8[4]={7.75, 7.0625,4.220173, 8.0}; - CPPUNIT_ASSERT_EQUAL(4,srcField->getArray()->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,srcField->getArray()->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(4,(int)srcField->getArray()->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)srcField->getArray()->getNumberOfComponents()); for(int i0=0;i0<4;i0++) CPPUNIT_ASSERT_DOUBLES_EQUAL(valuesExpected8[i0],values[i0],1e-12); srcField->decrRef(); @@ -1109,8 +1109,8 @@ void MEDCouplingRemapperTest::testPrepareEx1() MEDCouplingFieldDouble *trgfield=remapper.transferField(srcField,4.220173); const double *values=trgfield->getArray()->getConstPointer(); const double valuesExpected[4]={7.75, 7.0625, 4.220173,8.0}; - CPPUNIT_ASSERT_EQUAL(4,trgfield->getArray()->getNumberOfTuples()); - CPPUNIT_ASSERT_EQUAL(1,trgfield->getArray()->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(4,(int)trgfield->getArray()->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)trgfield->getArray()->getNumberOfComponents()); for(int i0=0;i0<4;i0++) CPPUNIT_ASSERT_DOUBLES_EQUAL(valuesExpected[i0],values[i0],1e-12); trgfield->decrRef(); diff --git a/src/MEDLoader/Test/MEDLoaderTest.cxx b/src/MEDLoader/Test/MEDLoaderTest.cxx index 467768046..6d5d041b8 100644 --- a/src/MEDLoader/Test/MEDLoaderTest.cxx +++ b/src/MEDLoader/Test/MEDLoaderTest.cxx @@ -862,8 +862,8 @@ void MEDLoaderTest::testMEDLoaderRead1() MEDCouplingFieldDouble *field0=ReadFieldCell(fileName.c_str(),meshNames[0].c_str(),0,fieldsName[0].c_str(),its0[0].first,its0[0].second); field0->checkConsistencyLight(); CPPUNIT_ASSERT(field0->getName()==fieldsName[0]); - CPPUNIT_ASSERT_EQUAL(1,field0->getNumberOfComponents()); - CPPUNIT_ASSERT_EQUAL(16,field0->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)field0->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(16,(int)field0->getNumberOfTuples()); const double expectedValues[16]={1.,1.,1.,1.,1.,1.,1.,1.,1.,1.,1.,1.,2.,3.,3.,2.}; double diffValue[16]; std::transform(field0->getArray()->getPointer(),field0->getArray()->getPointer()+16,expectedValues,diffValue,std::minus()); @@ -891,8 +891,8 @@ void MEDLoaderTest::testMEDLoaderRead1() MEDCouplingFieldDouble *field1=ReadFieldCell(fileName.c_str(),meshNames[0].c_str(),0,fieldsName[1].c_str(),its1[0].first,its1[0].second); field1->checkConsistencyLight(); CPPUNIT_ASSERT(field1->getName()==fieldsName[1]); - CPPUNIT_ASSERT_EQUAL(3,field1->getNumberOfComponents()); - CPPUNIT_ASSERT_EQUAL(16,field1->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(3,(int)field1->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(16,(int)field1->getNumberOfTuples()); const double expectedValues2[48]={1.,0.,1.,1.,0.,1.,1.,0.,1.,2.,1.,0.,2.,1.,0.,2.,1.,0.,3.,0.,1.,3.,0.,1.,3.,0.,1.,4.,1.,0.,4.,1.,0.,4.,1.,0.,5.,0.,0.,6.,1.,1.,6.,0.,0.,5.,1.,1.}; double diffValue2[48]; std::transform(field1->getArray()->getPointer(),field1->getArray()->getPointer()+48,expectedValues2,diffValue2,std::minus()); @@ -932,8 +932,8 @@ void MEDLoaderTest::testMEDLoaderRead1() MEDCouplingFieldDouble *field0Nodes=ReadFieldNode(fileName.c_str(),meshNames[0].c_str(),0,fieldsNameNode[0].c_str(),its0Node[0].first,its0Node[0].second); field0Nodes->checkConsistencyLight(); CPPUNIT_ASSERT(field0Nodes->getName()==fieldsNameNode[0]); - CPPUNIT_ASSERT_EQUAL(1,field0Nodes->getNumberOfComponents()); - CPPUNIT_ASSERT_EQUAL(19,field0Nodes->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)field0Nodes->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(19,(int)field0Nodes->getNumberOfTuples()); const double expectedValues3[19]={1.,1.,1.,2.,2.,2.,3.,3.,3.,4.,4.,4.,5.,5.,5.,6.,6.,6.,7.}; double diffValue3[19]; std::transform(field0Nodes->getArray()->getPointer(),field0Nodes->getArray()->getPointer()+19,expectedValues3,diffValue3,std::minus()); @@ -946,8 +946,8 @@ void MEDLoaderTest::testMEDLoaderRead1() field0Nodes=ReadFieldNode(fileName.c_str(),meshNames[0].c_str(),0,fieldsNameNode[0].c_str(),its0Node[2].first,its0Node[2].second); field0Nodes->checkConsistencyLight(); CPPUNIT_ASSERT(field0Nodes->getName()==fieldsNameNode[0]); - CPPUNIT_ASSERT_EQUAL(1,field0Nodes->getNumberOfComponents()); - CPPUNIT_ASSERT_EQUAL(19,field0Nodes->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)field0Nodes->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(19,(int)field0Nodes->getNumberOfTuples()); const double expectedValues4[19]={1.,2.,2.,2.,3.,3.,3.,4.,4.,4.,5.,5.,5.,6.,6.,6.,7.,7.,7.}; std::transform(field0Nodes->getArray()->getPointer(),field0Nodes->getArray()->getPointer()+19,expectedValues4,diffValue3,std::minus()); CPPUNIT_ASSERT_DOUBLES_EQUAL(0.,*std::max_element(diffValue3,diffValue3+19),1e-12); @@ -974,8 +974,8 @@ void MEDLoaderTest::testMEDLoaderRead1() field0Nodes=ReadFieldNode(fileName.c_str(),meshNames[0].c_str(),0,fieldsNameNode[0].c_str(),its0Node[0].first,its0Node[0].second); field0Nodes->checkConsistencyLight(); CPPUNIT_ASSERT(field0Nodes->getName()==fieldsNameNode[0]); - CPPUNIT_ASSERT_EQUAL(1,field0Nodes->getNumberOfComponents()); - CPPUNIT_ASSERT_EQUAL(19,field0Nodes->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)field0Nodes->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(19,(int)field0Nodes->getNumberOfTuples()); const double expectedValues5[19]={1.,1.,1.,2.,2.,2.,3.,3.,3.,4.,4.,4.,5.,5.,5.,6.,6.,6.,7.}; std::transform(field0Nodes->getArray()->getPointer(),field0Nodes->getArray()->getPointer()+19,expectedValues5,diffValue3,std::minus()); CPPUNIT_ASSERT_DOUBLES_EQUAL(0.,*std::max_element(diffValue3,diffValue3+19),1e-12); @@ -1041,8 +1041,8 @@ void MEDLoaderTest::testMEDLoaderPolygonRead() MEDCouplingFieldDouble *field=ReadFieldCell(fileName.c_str(),meshNames[0].c_str(),0,fieldsName[0].c_str(),its0[0].first,its0[0].second); field->checkConsistencyLight(); CPPUNIT_ASSERT(field->getName()==fieldsName[0]); - CPPUNIT_ASSERT_EQUAL(1,field->getNumberOfComponents()); - CPPUNIT_ASSERT_EQUAL(538,field->getNumberOfTuples()); + CPPUNIT_ASSERT_EQUAL(1,(int)field->getNumberOfComponents()); + CPPUNIT_ASSERT_EQUAL(538,(int)field->getNumberOfTuples()); const MEDCouplingUMesh *constMesh=dynamic_cast(field->getMesh()); CPPUNIT_ASSERT(constMesh); CPPUNIT_ASSERT_EQUAL(3,constMesh->getSpaceDimension());