m->findCommonCells(compType,startCellId,commonCellsArr,commonCellsIArr);
}
-int MEDCoupling1GTUMesh::getNodalConnectivityLength() const
+std::size_t MEDCoupling1GTUMesh::getNodalConnectivityLength() const
{
const DataArrayInt *c1(getNodalConnectivity());
if(!c1)
}
}
-int MEDCoupling1SGTUMesh::getNumberOfCells() const
+std::size_t MEDCoupling1SGTUMesh::getNumberOfCells() const
{
- int nbOfTuples=getNodalConnectivityLength();
- int nbOfNodesPerCell=getNumberOfNodesPerCell();
+ std::size_t nbOfTuples(getNodalConnectivityLength());
+ int nbOfNodesPerCell(getNumberOfNodesPerCell());
if(nbOfTuples%nbOfNodesPerCell!=0)
{
std::ostringstream oss; oss << "MEDCoupling1SGTUMesh:getNumberOfCells: : the nb of tuples in conn is " << nbOfTuples << " and number of nodes per cell is " << nbOfNodesPerCell << ". But " << nbOfTuples << "%" << nbOfNodesPerCell << " !=0 !";
}
}
-int MEDCoupling1DGTUMesh::getNumberOfCells() const
+std::size_t MEDCoupling1DGTUMesh::getNumberOfCells() const
{
checkConsistencyOfConnectivity();//do not remove
return _conn_indx->getNumberOfTuples()-1;
MEDCOUPLING_EXPORT std::string getVTKFileExtension() const;
//
MEDCOUPLING_EXPORT std::size_t getHeapMemorySizeWithoutChildren() const;
- MEDCOUPLING_EXPORT int getNodalConnectivityLength() const;
+ MEDCOUPLING_EXPORT std::size_t getNodalConnectivityLength() const;
MEDCOUPLING_EXPORT bool isEqualIfNotWhy(const MEDCouplingMesh *other, double prec, std::string& reason) const;
MEDCOUPLING_EXPORT bool isEqualWithoutConsideringStr(const MEDCouplingMesh *other, double prec) const;
MEDCOUPLING_EXPORT void checkConsistencyLight() const;
MEDCOUPLING_EXPORT void checkFastEquivalWith(const MEDCouplingMesh *other, double prec) const;
MEDCOUPLING_EXPORT void checkConsistencyLight() const;
MEDCOUPLING_EXPORT void checkConsistency(double eps=1e-12) const;
- MEDCOUPLING_EXPORT int getNumberOfCells() const;
+ MEDCOUPLING_EXPORT std::size_t getNumberOfCells() const;
MEDCOUPLING_EXPORT DataArrayInt *computeNbOfNodesPerCell() const;
MEDCOUPLING_EXPORT DataArrayInt *computeNbOfFacesPerCell() const;
MEDCOUPLING_EXPORT DataArrayInt *computeEffectiveNbOfNodesPerCell() const;
MEDCOUPLING_EXPORT void checkFastEquivalWith(const MEDCouplingMesh *other, double prec) const;
MEDCOUPLING_EXPORT void checkConsistencyLight() const;
MEDCOUPLING_EXPORT void checkConsistency(double eps=1e-12) const;
- MEDCOUPLING_EXPORT int getNumberOfCells() const;
+ MEDCOUPLING_EXPORT std::size_t getNumberOfCells() const;
MEDCOUPLING_EXPORT DataArrayInt *computeNbOfNodesPerCell() const;
MEDCOUPLING_EXPORT DataArrayInt *computeNbOfFacesPerCell() const;
MEDCOUPLING_EXPORT DataArrayInt *computeEffectiveNbOfNodesPerCell() const;
checkConsistencyLight();
}
-int MEDCouplingCurveLinearMesh::getNumberOfCells() const
+std::size_t MEDCouplingCurveLinearMesh::getNumberOfCells() const
{
checkConsistencyLight();
return MEDCouplingStructuredMesh::getNumberOfCells();
DataArrayInt *&cellCor) const;
MEDCOUPLING_EXPORT void checkConsistencyLight() const;
MEDCOUPLING_EXPORT void checkConsistency(double eps=1e-12) const;
- MEDCOUPLING_EXPORT int getNumberOfCells() const;
+ MEDCOUPLING_EXPORT std::size_t getNumberOfCells() const;
MEDCOUPLING_EXPORT int getNumberOfNodes() const;
MEDCOUPLING_EXPORT int getSpaceDimension() const;
MEDCOUPLING_EXPORT void getCoordinatesOfNode(int nodeId, std::vector<double>& coo) const;
}
}
-int MEDCouplingMappedExtrudedMesh::getNumberOfCells() const
+std::size_t MEDCouplingMappedExtrudedMesh::getNumberOfCells() const
{
return _mesh2D->getNumberOfCells()*_mesh1D->getNumberOfCells();
}
MEDCOUPLING_EXPORT std::size_t getHeapMemorySizeWithoutChildren() const;
MEDCOUPLING_EXPORT std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const;
MEDCOUPLING_EXPORT void copyTinyStringsFrom(const MEDCouplingMesh *other);
- MEDCOUPLING_EXPORT int getNumberOfCells() const;
+ MEDCOUPLING_EXPORT std::size_t getNumberOfCells() const;
MEDCOUPLING_EXPORT int getNumberOfNodes() const;
MEDCOUPLING_EXPORT int getSpaceDimension() const;
MEDCOUPLING_EXPORT int getMeshDimension() const;
//
MEDCOUPLING_EXPORT virtual void checkConsistencyLight() const = 0;
MEDCOUPLING_EXPORT virtual void checkConsistency(double eps=1e-12) const = 0;
- MEDCOUPLING_EXPORT virtual int getNumberOfCells() const = 0;
+ MEDCOUPLING_EXPORT virtual std::size_t getNumberOfCells() const = 0;
MEDCOUPLING_EXPORT virtual int getNumberOfNodes() const = 0;
MEDCOUPLING_EXPORT virtual int getSpaceDimension() const = 0;
MEDCOUPLING_EXPORT virtual int getMeshDimension() const = 0;
}
-int MEDCouplingStructuredMesh::getNumberOfCells() const
+std::size_t MEDCouplingStructuredMesh::getNumberOfCells() const
{
std::vector<int> ngs(getNodeGridStructure());
- int ret(1);
+ std::size_t ret(1);
bool isCatched(false);
std::size_t ii(0);
for(std::vector<int>::const_iterator it=ngs.begin();it!=ngs.end();it++,ii++)
MEDCOUPLING_EXPORT MEDCoupling1SGTUMesh *build1SGTSubLevelMesh() const;
MEDCOUPLING_EXPORT int getCellIdFromPos(int i, int j, int k) const;
MEDCOUPLING_EXPORT int getNodeIdFromPos(int i, int j, int k) const;
- MEDCOUPLING_EXPORT int getNumberOfCells() const;
+ MEDCOUPLING_EXPORT std::size_t getNumberOfCells() const;
MEDCOUPLING_EXPORT int getNumberOfNodes() const;
MEDCOUPLING_EXPORT int getMeshDimension() const;
MEDCOUPLING_EXPORT int getNumberOfCellsOfSubLevelMesh() const;
* \return int - the number of cells in \a this mesh.
* \throw If the nodal connectivity of cells is not defined.
*/
-int MEDCouplingUMesh::getNumberOfCells() const
+std::size_t MEDCouplingUMesh::getNumberOfCells() const
{
if(_nodal_connec_index)
return _nodal_connec_index->getNumberOfTuples()-1;
MEDCOUPLING_EXPORT std::string reprConnectivityOfThis() const;
MEDCOUPLING_EXPORT MEDCouplingUMesh *buildSetInstanceFromThis(int spaceDim) const;
MEDCOUPLING_EXPORT int getNumberOfNodesInCell(int cellId) const;
- MEDCOUPLING_EXPORT int getNumberOfCells() const;
+ MEDCOUPLING_EXPORT std::size_t getNumberOfCells() const;
MEDCOUPLING_EXPORT int getMeshDimension() const;
MEDCOUPLING_EXPORT int getNodalConnectivityArrayLen() const;
MEDCOUPLING_EXPORT void computeTypes();
mesh->insertNextCell(INTERP_KERNEL::NORM_QUAD4,4,curConn);
mesh->finishInsertingCells();
CPPUNIT_ASSERT_EQUAL((std::size_t)30,mesh->getNodalConnectivity()->getNbOfElems());
- CPPUNIT_ASSERT_EQUAL(nbOfCells,mesh->getNumberOfCells());
+ CPPUNIT_ASSERT_EQUAL(nbOfCells,(int)mesh->getNumberOfCells());
//test 0 - no copy no ownership
DataArrayDouble *myCoords=DataArrayDouble::New();
myCoords->useArray(coords,false,CPP_DEALLOC,nbOfNodes,3);
mesh->setCoords(myCoords);
mesh->setCoords(myCoords);
myCoords->decrRef();
- CPPUNIT_ASSERT_EQUAL(nbOfCells,mesh->getNumberOfCells());
+ CPPUNIT_ASSERT_EQUAL(nbOfCells,(int)mesh->getNumberOfCells());
mesh->checkConsistencyLight();
//test 1 - no copy ownership C++
myCoords=DataArrayDouble::New();
myCoords->useArray(tmp,true,CPP_DEALLOC,nbOfNodes,3);
mesh->setCoords(myCoords);
myCoords->decrRef();
- CPPUNIT_ASSERT_EQUAL(nbOfCells,mesh->getNumberOfCells());
+ CPPUNIT_ASSERT_EQUAL(nbOfCells,(int)mesh->getNumberOfCells());
mesh->checkConsistencyLight();
//test 2 - no copy ownership C
myCoords=DataArrayDouble::New();
MEDCouplingUMesh *mesh2=mesh->clone(false);
CPPUNIT_ASSERT(mesh2!=mesh);
mesh2->checkConsistencyLight();
- CPPUNIT_ASSERT_EQUAL(nbOfCells,mesh2->getNumberOfCells());
+ CPPUNIT_ASSERT_EQUAL(nbOfCells,(int)mesh2->getNumberOfCells());
CPPUNIT_ASSERT_EQUAL(nbOfNodes,mesh2->getNumberOfNodes());
CPPUNIT_ASSERT_EQUAL(3,mesh2->getSpaceDimension());
CPPUNIT_ASSERT(mesh!=mesh2);
MEDCouplingUMesh *mesh3=mesh->clone(true);
CPPUNIT_ASSERT(mesh3!=mesh);
mesh3->checkConsistencyLight();
- CPPUNIT_ASSERT_EQUAL(nbOfCells,mesh3->getNumberOfCells());
+ CPPUNIT_ASSERT_EQUAL(nbOfCells,(int)mesh3->getNumberOfCells());
CPPUNIT_ASSERT_EQUAL(nbOfNodes,mesh3->getNumberOfNodes());
CPPUNIT_ASSERT_EQUAL(3,mesh3->getSpaceDimension());
CPPUNIT_ASSERT(mesh!=mesh3);
//
targetMesh->checkConsistencyLight();
CPPUNIT_ASSERT_EQUAL(3,targetMesh->getSpaceDimension());
- CPPUNIT_ASSERT_EQUAL(8,targetMesh->getNumberOfCells());
+ CPPUNIT_ASSERT_EQUAL(8,(int)targetMesh->getNumberOfCells());
CPPUNIT_ASSERT_EQUAL(9,targetMesh->getNumberOfNodes());
CPPUNIT_ASSERT_EQUAL(0,targetMesh->getMeshDimension());
//
meshM1D->setMeshDimension(-1);
meshM1D->checkConsistencyLight();
CPPUNIT_ASSERT_EQUAL(-1,meshM1D->getMeshDimension());
- CPPUNIT_ASSERT_EQUAL(1,meshM1D->getNumberOfCells());
+ CPPUNIT_ASSERT_EQUAL(1,(int)meshM1D->getNumberOfCells());
CPPUNIT_ASSERT_THROW(meshM1D->getNumberOfNodes(),INTERP_KERNEL::Exception);
CPPUNIT_ASSERT_THROW(meshM1D->getSpaceDimension(),INTERP_KERNEL::Exception);
MEDCouplingUMesh *cpy=meshM1D->clone(true);
std::vector<int> eltsV(elts,elts+2);
mesh->convertToPolyTypes(&eltsV[0],&eltsV[0]+eltsV.size());
mesh->checkConsistencyLight();
- CPPUNIT_ASSERT_EQUAL(5,mesh->getNumberOfCells());
+ CPPUNIT_ASSERT_EQUAL(5,(int)mesh->getNumberOfCells());
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};
mesh=build3DTargetMesh_1();
mesh->convertToPolyTypes(&eltsV[0],&eltsV[0]+eltsV.size());
mesh->checkConsistencyLight();
- CPPUNIT_ASSERT_EQUAL(8,mesh->getNumberOfCells());
+ CPPUNIT_ASSERT_EQUAL(8,(int)mesh->getNumberOfCells());
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(8,(int)mesh->getNumberOfCells());
CPPUNIT_ASSERT_EQUAL(114,(int)mesh->getNodalConnectivity()->getNumberOfTuples());
//
mesh->decrRef();
MEDCouplingUMesh *mesh2=mesh->buildDescendingConnectivity(desc,descIndx,revDesc,revDescIndx);
mesh2->checkConsistencyLight();
CPPUNIT_ASSERT_EQUAL(1,mesh2->getMeshDimension());
- CPPUNIT_ASSERT_EQUAL(13,mesh2->getNumberOfCells());
+ CPPUNIT_ASSERT_EQUAL(13,(int)mesh2->getNumberOfCells());
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());
mesh2=mesh->buildDescendingConnectivity(desc,descIndx,revDesc,revDescIndx);
mesh2->checkConsistencyLight();
CPPUNIT_ASSERT_EQUAL(1,mesh2->getMeshDimension());
- CPPUNIT_ASSERT_EQUAL(13,mesh2->getNumberOfCells());
+ CPPUNIT_ASSERT_EQUAL(13,(int)mesh2->getNumberOfCells());
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());
MEDCouplingUMesh *mesh2=mesh->buildDescendingConnectivity(desc,descIndx,revDesc,revDescIndx);
mesh2->checkConsistencyLight();
CPPUNIT_ASSERT_EQUAL(2,mesh2->getMeshDimension());
- CPPUNIT_ASSERT_EQUAL(36,mesh2->getNumberOfCells());
+ CPPUNIT_ASSERT_EQUAL(36,(int)mesh2->getNumberOfCells());
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());
mesh2=mesh->buildDescendingConnectivity(desc,descIndx,revDesc,revDescIndx);
mesh2->checkConsistencyLight();
CPPUNIT_ASSERT_EQUAL(2,mesh2->getMeshDimension());
- CPPUNIT_ASSERT_EQUAL(36,mesh2->getNumberOfCells());
+ CPPUNIT_ASSERT_EQUAL(36,(int)mesh2->getNumberOfCells());
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());
{
MEDCouplingUMesh *mesh=build3DTargetMesh_1();
MEDCouplingPointSet *mesh2=mesh->buildBoundaryMesh(false);
- CPPUNIT_ASSERT_EQUAL(24,mesh2->getNumberOfCells());
+ CPPUNIT_ASSERT_EQUAL(24,(int)mesh2->getNumberOfCells());
CPPUNIT_ASSERT_EQUAL(26,mesh2->getNumberOfNodes());
mesh2->decrRef();
mesh->decrRef();
CPPUNIT_ASSERT_EQUAL(INTERP_KERNEL::NORM_QUAD4,*subMesh->getAllGeoTypes().begin());
CPPUNIT_ASSERT(name=="Toto");
CPPUNIT_ASSERT(mesh->getCoords()==subMesh->getCoords());
- CPPUNIT_ASSERT_EQUAL(2,subMesh->getNumberOfCells());
+ CPPUNIT_ASSERT_EQUAL(2,(int)subMesh->getNumberOfCells());
const int subConn[10]={4,0,3,4,1,4,7,8,5,4};
const int subConnIndex[3]={0,5,10};
CPPUNIT_ASSERT_EQUAL((std::size_t)10,subMesh->getNodalConnectivity()->getNbOfElems());
CPPUNIT_ASSERT_EQUAL(INTERP_KERNEL::NORM_QUAD4,*(++(subMesh->getAllGeoTypes().begin())));
CPPUNIT_ASSERT(name=="Toto");
CPPUNIT_ASSERT(mesh->getCoords()==subMesh->getCoords());
- CPPUNIT_ASSERT_EQUAL(3,subMesh->getNumberOfCells());
+ CPPUNIT_ASSERT_EQUAL(3,(int)subMesh->getNumberOfCells());
const int subConn2[14]={4,0,3,4,1,3,4,5,2,4,6,7,4,3};
const int subConnIndex2[4]={0,5,9,14};
CPPUNIT_ASSERT_EQUAL((std::size_t)14,subMesh->getNodalConnectivity()->getNbOfElems());
CPPUNIT_ASSERT(subMesh);
CPPUNIT_ASSERT_EQUAL(1,(int)subMesh->getAllGeoTypes().size());
CPPUNIT_ASSERT_EQUAL(INTERP_KERNEL::NORM_QUAD4,*subMesh->getAllGeoTypes().begin());
- CPPUNIT_ASSERT_EQUAL(1,subMesh->getNumberOfCells());
+ CPPUNIT_ASSERT_EQUAL(1,(int)subMesh->getNumberOfCells());
CPPUNIT_ASSERT_EQUAL((std::size_t)5,subMesh->getNodalConnectivity()->getNbOfElems());
CPPUNIT_ASSERT_EQUAL((std::size_t)2,subMesh->getNodalConnectivityIndex()->getNbOfElems());
const int subConn[5]={4,7,8,5,4};
CPPUNIT_ASSERT_EQUAL(2,(int)subMesh->getAllGeoTypes().size());
CPPUNIT_ASSERT_EQUAL(INTERP_KERNEL::NORM_TRI3,*subMesh->getAllGeoTypes().begin());
CPPUNIT_ASSERT_EQUAL(INTERP_KERNEL::NORM_QUAD4,*(++subMesh->getAllGeoTypes().begin()));
- CPPUNIT_ASSERT_EQUAL(3,subMesh->getNumberOfCells());
+ CPPUNIT_ASSERT_EQUAL(3,(int)subMesh->getNumberOfCells());
CPPUNIT_ASSERT_EQUAL((std::size_t)14,subMesh->getNodalConnectivity()->getNbOfElems());
CPPUNIT_ASSERT_EQUAL((std::size_t)4,subMesh->getNodalConnectivityIndex()->getNbOfElems());
const int subConn2[14]={3,4,5,2,4,6,7,4,3,4,7,8,5,4};
CPPUNIT_ASSERT_EQUAL(2,(int)subMesh->getAllGeoTypes().size());
CPPUNIT_ASSERT_EQUAL(INTERP_KERNEL::NORM_TRI3,*subMesh->getAllGeoTypes().begin());
CPPUNIT_ASSERT_EQUAL(INTERP_KERNEL::NORM_QUAD4,*(++subMesh->getAllGeoTypes().begin()));
- CPPUNIT_ASSERT_EQUAL(3,subMesh->getNumberOfCells());
+ CPPUNIT_ASSERT_EQUAL(3,(int)subMesh->getNumberOfCells());
subMeshSimple->decrRef();
//
mesh->decrRef();
CPPUNIT_ASSERT_EQUAL(2,(int)mesh->getAllGeoTypes().size());
CPPUNIT_ASSERT_EQUAL(2,mesh->getSpaceDimension());
CPPUNIT_ASSERT_EQUAL(9,mesh->getNumberOfNodes());
- CPPUNIT_ASSERT_EQUAL(5,mesh->getNumberOfCells());
+ CPPUNIT_ASSERT_EQUAL(5,(int)mesh->getNumberOfCells());
std::vector<int> oldConn(mesh->getNodalConnectivity()->getNbOfElems());
std::vector<int> oldConnIndex(mesh->getNumberOfCells()+1);
std::copy(mesh->getNodalConnectivity()->getPointer(),mesh->getNodalConnectivity()->getPointer()+oldConn.size(),oldConn.begin());
CPPUNIT_ASSERT_EQUAL(2,(int)mesh->getAllGeoTypes().size());
CPPUNIT_ASSERT_EQUAL(2,mesh->getSpaceDimension());
CPPUNIT_ASSERT_EQUAL(9,mesh->getNumberOfNodes());
- CPPUNIT_ASSERT_EQUAL(5,mesh->getNumberOfCells());
+ CPPUNIT_ASSERT_EQUAL(5,(int)mesh->getNumberOfCells());
CPPUNIT_ASSERT(mesh->getCoords()!=oldCoords);
CPPUNIT_ASSERT(std::equal(mesh->getCoords()->getPointer(),mesh->getCoords()->getPointer()+2*9,oldCoords->getPointer()));
CPPUNIT_ASSERT(std::equal(oldConn.begin(),oldConn.end(),mesh->getNodalConnectivity()->getPointer()));
CPPUNIT_ASSERT(std::equal(expectedTraducer,expectedTraducer+9,traducer->getPointer()));
traducer->decrRef();
CPPUNIT_ASSERT_EQUAL(INTERP_KERNEL::NORM_QUAD4,*subMesh->getAllGeoTypes().begin());
- CPPUNIT_ASSERT_EQUAL(2,subMesh->getNumberOfCells());
+ CPPUNIT_ASSERT_EQUAL(2,(int)subMesh->getNumberOfCells());
const int subConn[10]={4,0,2,3,1,4,5,6,4,3};
const int subConnIndex[3]={0,5,10};
CPPUNIT_ASSERT_EQUAL(7,subMesh->getNumberOfNodes());
subMesh=dynamic_cast<MEDCouplingUMesh *>(subMeshPtSet);
CPPUNIT_ASSERT(subMesh);
CPPUNIT_ASSERT_EQUAL(INTERP_KERNEL::NORM_QUAD4,*subMesh->getAllGeoTypes().begin());
- CPPUNIT_ASSERT_EQUAL(2,subMesh->getNumberOfCells());
+ CPPUNIT_ASSERT_EQUAL(2,(int)subMesh->getNumberOfCells());
CPPUNIT_ASSERT_EQUAL(7,subMesh->getNumberOfNodes());
CPPUNIT_ASSERT_EQUAL((std::size_t)10,subMesh->getNodalConnectivity()->getNbOfElems());
CPPUNIT_ASSERT_EQUAL((std::size_t)3,subMesh->getNodalConnectivityIndex()->getNbOfElems());
//
bool areNodesMerged;
int newNbOfNodes;
- CPPUNIT_ASSERT_EQUAL(10,m6->getNumberOfCells());
+ CPPUNIT_ASSERT_EQUAL(10,(int)m6->getNumberOfCells());
CPPUNIT_ASSERT_EQUAL(22,m6->getNumberOfNodes());
DataArrayInt *arr=m6->mergeNodes(1e-13,areNodesMerged,newNbOfNodes);
arr->decrRef();
CPPUNIT_ASSERT(areNodesMerged);
- CPPUNIT_ASSERT_EQUAL(10,m6->getNumberOfCells());
+ CPPUNIT_ASSERT_EQUAL(10,(int)m6->getNumberOfCells());
CPPUNIT_ASSERT_EQUAL(9,m6->getNumberOfNodes());
CPPUNIT_ASSERT_EQUAL(9,newNbOfNodes);
//
arr=m6->zipConnectivityTraducer(0);
- CPPUNIT_ASSERT_EQUAL(7,m6->getNumberOfCells());
+ CPPUNIT_ASSERT_EQUAL(7,(int)m6->getNumberOfCells());
arr->decrRef();
MEDCouplingUMesh *m7=m6->clone(true);
arr=m6->zipConnectivityTraducer(0);
CPPUNIT_ASSERT(m7->isEqual(m6,1e-12));
- CPPUNIT_ASSERT_EQUAL(7,m6->getNumberOfCells());
+ CPPUNIT_ASSERT_EQUAL(7,(int)m6->getNumberOfCells());
arr->decrRef();
//
m7->decrRef();
const int elts[3]={1,2,4};
DataArrayInt *di;
MEDCouplingMesh *ret1=fieldCells->buildSubMeshData(elts,elts+3,di);
- CPPUNIT_ASSERT_EQUAL(3,ret1->getNumberOfCells());
+ CPPUNIT_ASSERT_EQUAL(3,(int)ret1->getNumberOfCells());
CPPUNIT_ASSERT_EQUAL(9,ret1->getNumberOfNodes());
CPPUNIT_ASSERT_EQUAL(3,(int)di->getNumberOfTuples());
CPPUNIT_ASSERT_EQUAL(1,(int)di->getNumberOfComponents());
MEDCouplingMesh *ret2=fieldNodes->buildSubMeshData(elts,elts+3,di);
MEDCouplingUMesh *ret2DC=dynamic_cast<MEDCouplingUMesh *>(ret2);
CPPUNIT_ASSERT(ret2DC);
- CPPUNIT_ASSERT_EQUAL(3,ret2->getNumberOfCells());
+ CPPUNIT_ASSERT_EQUAL(3,(int)ret2->getNumberOfCells());
CPPUNIT_ASSERT_EQUAL(6,ret2->getNumberOfNodes());
CPPUNIT_ASSERT_EQUAL(6,(int)di->getNumberOfTuples());
CPPUNIT_ASSERT_EQUAL(1,(int)di->getNumberOfComponents());
MEDCouplingUMesh *mesh2D=0;
MEDCouplingUMesh *mesh3D=build3DExtrudedUMesh_1(mesh2D);
MEDCouplingMappedExtrudedMesh *ext=MEDCouplingMappedExtrudedMesh::New(mesh3D,mesh2D,1);
- CPPUNIT_ASSERT_EQUAL(18,ext->getNumberOfCells());
+ CPPUNIT_ASSERT_EQUAL(18,(int)ext->getNumberOfCells());
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(std::equal(ids3DExpected,ids3DExpected+18,ids3D->getConstPointer()));
MEDCouplingUMesh *mesh1D=ext->getMesh1D();
CPPUNIT_ASSERT_EQUAL(4,mesh1D->getNumberOfNodes());
- CPPUNIT_ASSERT_EQUAL(3,mesh1D->getNumberOfCells());
+ CPPUNIT_ASSERT_EQUAL(3,(int)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,(int)mesh1DCoords->getNumberOfTuples());
CPPUNIT_ASSERT_EQUAL(43,(int)n.size());
MEDCouplingUMesh *mTT3dSurf=(MEDCouplingUMesh *)mTT->buildFacePartOfMySelfNode(&n[0],&n[0]+n.size(),true);
MEDCouplingMappedExtrudedMesh *meTT=MEDCouplingMappedExtrudedMesh::New(mTT,mTT3dSurf,0);
- CPPUNIT_ASSERT_EQUAL(200,meTT->getNumberOfCells());
- CPPUNIT_ASSERT_EQUAL(10,meTT->getMesh2D()->getNumberOfCells());
- CPPUNIT_ASSERT_EQUAL(20,meTT->getMesh1D()->getNumberOfCells());
+ CPPUNIT_ASSERT_EQUAL(200,(int)meTT->getNumberOfCells());
+ CPPUNIT_ASSERT_EQUAL(10,(int)meTT->getMesh2D()->getNumberOfCells());
+ CPPUNIT_ASSERT_EQUAL(20,(int)meTT->getMesh1D()->getNumberOfCells());
mTT3dSurf->decrRef();
//
b=false;
CPPUNIT_ASSERT_EQUAL(30,(int)n.size());
MEDCouplingUMesh *mN3dSurf=(MEDCouplingUMesh *)mN->buildFacePartOfMySelfNode(&n[0],&n[0]+n.size(),true);
MEDCouplingMappedExtrudedMesh *meN=MEDCouplingMappedExtrudedMesh::New(mN,mN3dSurf,0);
- CPPUNIT_ASSERT_EQUAL(40,meN->getNumberOfCells());
- CPPUNIT_ASSERT_EQUAL(20,meN->getMesh2D()->getNumberOfCells());
- CPPUNIT_ASSERT_EQUAL(2,meN->getMesh1D()->getNumberOfCells());
+ CPPUNIT_ASSERT_EQUAL(40,(int)meN->getNumberOfCells());
+ CPPUNIT_ASSERT_EQUAL(20,(int)meN->getMesh2D()->getNumberOfCells());
+ CPPUNIT_ASSERT_EQUAL(2,(int)meN->getMesh1D()->getNumberOfCells());
mN3dSurf->decrRef();
//
b=false;
CPPUNIT_ASSERT_EQUAL(27,(int)n.size());
MEDCouplingUMesh *mTF3dSurf=(MEDCouplingUMesh *)mTF->buildFacePartOfMySelfNode(&n[0],&n[0]+n.size(),true);
MEDCouplingMappedExtrudedMesh *meTF=MEDCouplingMappedExtrudedMesh::New(mTF,mTF3dSurf,0);
- CPPUNIT_ASSERT_EQUAL(340,meTF->getNumberOfCells());
- CPPUNIT_ASSERT_EQUAL(17,meTF->getMesh2D()->getNumberOfCells());
- CPPUNIT_ASSERT_EQUAL(20,meTF->getMesh1D()->getNumberOfCells());
+ CPPUNIT_ASSERT_EQUAL(340,(int)meTF->getNumberOfCells());
+ CPPUNIT_ASSERT_EQUAL(17,(int)meTF->getMesh2D()->getNumberOfCells());
+ CPPUNIT_ASSERT_EQUAL(20,(int)meTF->getMesh1D()->getNumberOfCells());
mTF3dSurf->decrRef();
//
meTT->decrRef();
MEDCouplingUMesh *m3=m1->buildExtrudedMesh(m2,0);
//
MEDCouplingMappedExtrudedMesh *m4=MEDCouplingMappedExtrudedMesh::New(m3,m1,0);
- CPPUNIT_ASSERT_EQUAL(15,m4->getNumberOfCells());
- CPPUNIT_ASSERT_EQUAL(5,m4->getMesh2D()->getNumberOfCells());
- CPPUNIT_ASSERT_EQUAL(3,m4->getMesh1D()->getNumberOfCells());
+ CPPUNIT_ASSERT_EQUAL(15,(int)m4->getNumberOfCells());
+ CPPUNIT_ASSERT_EQUAL(5,(int)m4->getMesh2D()->getNumberOfCells());
+ CPPUNIT_ASSERT_EQUAL(3,(int)m4->getMesh1D()->getNumberOfCells());
const int *m3DIds=m4->getMesh3DIds()->getConstPointer();
for(int i=0;i<15;i++)
CPPUNIT_ASSERT_EQUAL(i,m3DIds[i]);
const int expected1[15]={1,3,2,0,6,5,7,10,11,8,12,9,14,13,4};
m3->renumberCells(expected1,false);
m4=MEDCouplingMappedExtrudedMesh::New(m3,m1,0);
- CPPUNIT_ASSERT_EQUAL(15,m4->getNumberOfCells());
- CPPUNIT_ASSERT_EQUAL(5,m4->getMesh2D()->getNumberOfCells());
- CPPUNIT_ASSERT_EQUAL(3,m4->getMesh1D()->getNumberOfCells());
+ CPPUNIT_ASSERT_EQUAL(15,(int)m4->getNumberOfCells());
+ CPPUNIT_ASSERT_EQUAL(5,(int)m4->getMesh2D()->getNumberOfCells());
+ CPPUNIT_ASSERT_EQUAL(3,(int)m4->getMesh1D()->getNumberOfCells());
m3DIds=m4->getMesh3DIds()->getConstPointer();
for(int i=0;i<15;i++)
CPPUNIT_ASSERT_EQUAL(expected1[i],m3DIds[i]);
CPPUNIT_ASSERT_EQUAL((int)INTERP_KERNEL::NORM_HEXA8,(int)m3->getTypeOfCell(4));
m3->renumberCells(expected1,false);
m4=MEDCouplingMappedExtrudedMesh::New(m3,m1,0);
- CPPUNIT_ASSERT_EQUAL(15,m4->getNumberOfCells());
- CPPUNIT_ASSERT_EQUAL(5,m4->getMesh2D()->getNumberOfCells());
- CPPUNIT_ASSERT_EQUAL(3,m4->getMesh1D()->getNumberOfCells());
+ CPPUNIT_ASSERT_EQUAL(15,(int)m4->getNumberOfCells());
+ CPPUNIT_ASSERT_EQUAL(5,(int)m4->getMesh2D()->getNumberOfCells());
+ CPPUNIT_ASSERT_EQUAL(3,(int)m4->getMesh1D()->getNumberOfCells());
m3DIds=m4->getMesh3DIds()->getConstPointer();
for(int i=0;i<15;i++)
CPPUNIT_ASSERT_EQUAL(expected1[i],m3DIds[i]);
MEDCouplingUMesh *m4=MEDCouplingUMesh::MergeUMeshesOnSameCoords(meshes);
m4->checkConsistencyLight();
CPPUNIT_ASSERT(m4->getCoords()==m1->getCoords());
- CPPUNIT_ASSERT_EQUAL(15,m4->getNumberOfCells());
+ CPPUNIT_ASSERT_EQUAL(15,(int)m4->getNumberOfCells());
const int cells1[5]={0,1,2,3,4};
MEDCouplingPointSet *m1_1=m4->buildPartOfMySelf(cells1,cells1+5,true);
m1_1->setName(m1->getName().c_str());
//
std::vector<DataArrayInt *> corr;
MEDCouplingUMesh *m7=MEDCouplingUMesh::FuseUMeshesOnSameCoords(meshes,0,corr);
- CPPUNIT_ASSERT_EQUAL(4,m7->getNumberOfCells());
+ CPPUNIT_ASSERT_EQUAL(4,(int)m7->getNumberOfCells());
CPPUNIT_ASSERT_EQUAL(3,(int)corr.size());
const int expectedVals1[3]={3,3,2};
const int expectedVals2[3][3]={{0,1,2},{3,0,2},{3,0,111111}};
meshes.push_back(m4);
std::vector<DataArrayInt *> corr;
MEDCouplingUMesh *m5=MEDCouplingUMesh::FuseUMeshesOnSameCoords(meshes,0,corr);
- CPPUNIT_ASSERT_EQUAL(18,m5->getNumberOfCells());
+ CPPUNIT_ASSERT_EQUAL(18,(int)m5->getNumberOfCells());
std::vector<DataArrayInt *>::iterator it=corr.begin();
const int exp1[4]={18,5,5,4};
const int exp2[4][18]={
MEDCouplingUMesh *m3dSurf=(MEDCouplingUMesh *)mesh->buildFacePartOfMySelfNode(&n[0],&n[0]+n.size(),true);
MEDCouplingMappedExtrudedMesh *me=MEDCouplingMappedExtrudedMesh::New(mesh,m3dSurf,0);
const DataArrayInt *da=me->getMesh3DIds();
- CPPUNIT_ASSERT_EQUAL(8,me->getNumberOfCells());
+ CPPUNIT_ASSERT_EQUAL(8,(int)me->getNumberOfCells());
const int expected[8]={0,1,2,3,4,5,6,7};
const int *val=da->getConstPointer();
for(int i=0;i<8;i++)
m2->arePolyhedronsNotCorrectlyOriented(res1);
CPPUNIT_ASSERT(res1.empty());
m2->checkConsistencyLight();
- CPPUNIT_ASSERT_EQUAL(18,m2->getNumberOfCells());
+ CPPUNIT_ASSERT_EQUAL(18,(int)m2->getNumberOfCells());
int cellIds[3]={0,6,12};
std::vector<int> cellIds2(cellIds,cellIds+3);
m2->convertToPolyTypes(&cellIds2[0],&cellIds2[0]+cellIds2.size());
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);
- CPPUNIT_ASSERT_EQUAL(3,f2->getMesh()->getNumberOfCells());
- CPPUNIT_ASSERT_EQUAL(6,f2->getMesh()->getNumberOfNodes());
+ CPPUNIT_ASSERT_EQUAL(3,(int)f2->getMesh()->getNumberOfCells());
+ CPPUNIT_ASSERT_EQUAL(6,(int)f2->getMesh()->getNumberOfNodes());
CPPUNIT_ASSERT_EQUAL(2,f2->getMesh()->getSpaceDimension());
CPPUNIT_ASSERT_EQUAL(2,f2->getMesh()->getMeshDimension());
MEDCouplingUMesh *m2C=dynamic_cast<MEDCouplingUMesh *>(const_cast<MEDCouplingMesh *>(f2->getMesh()));
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);
- CPPUNIT_ASSERT_EQUAL(2,f2->getMesh()->getNumberOfCells());
+ CPPUNIT_ASSERT_EQUAL(2,(int)f2->getMesh()->getNumberOfCells());
CPPUNIT_ASSERT_EQUAL(4,f2->getMesh()->getNumberOfNodes());
CPPUNIT_ASSERT_EQUAL(2,f2->getMesh()->getSpaceDimension());
CPPUNIT_ASSERT_EQUAL(2,f2->getMesh()->getMeshDimension());
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());
+ CPPUNIT_ASSERT_EQUAL(2,(int)f2->getMesh()->getNumberOfCells());
CPPUNIT_ASSERT_EQUAL(4,f2->getMesh()->getNumberOfNodes());
CPPUNIT_ASSERT_EQUAL(2,f2->getMesh()->getSpaceDimension());
CPPUNIT_ASSERT_EQUAL(2,f2->getMesh()->getMeshDimension());
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);
- CPPUNIT_ASSERT_EQUAL(3,f2->getMesh()->getNumberOfCells());
+ CPPUNIT_ASSERT_EQUAL(3,(int)f2->getMesh()->getNumberOfCells());
CPPUNIT_ASSERT_EQUAL(6,f2->getMesh()->getNumberOfNodes());
CPPUNIT_ASSERT_EQUAL(2,f2->getMesh()->getSpaceDimension());
CPPUNIT_ASSERT_EQUAL(2,f2->getMesh()->getMeshDimension());
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(),(int)f1->getNumberOfTuples());
+ CPPUNIT_ASSERT_EQUAL((int)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.};
//
m1=build3DSurfTargetMesh_1();
f1=m1->getEdgeRatioField();
- CPPUNIT_ASSERT_EQUAL(m1->getNumberOfCells(),(int)f1->getNumberOfTuples());
+ CPPUNIT_ASSERT_EQUAL((int)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};
da->decrRef();
m->checkConsistencyLight();
CPPUNIT_ASSERT_EQUAL(4,m->getNumberOfNodes());
- CPPUNIT_ASSERT_EQUAL(3,m->getNumberOfCells());
+ CPPUNIT_ASSERT_EQUAL(3,(int)m->getNumberOfCells());
CPPUNIT_ASSERT_EQUAL(1,m->getSpaceDimension());
MEDCouplingFieldDouble *f=m->getMeasureField(true);
CPPUNIT_ASSERT_EQUAL(3,(int)f->getNumberOfTuples());
da->decrRef();
m->checkConsistencyLight();
CPPUNIT_ASSERT_EQUAL(12,m->getNumberOfNodes());
- CPPUNIT_ASSERT_EQUAL(6,m->getNumberOfCells());
+ CPPUNIT_ASSERT_EQUAL(6,(int)m->getNumberOfCells());
CPPUNIT_ASSERT_EQUAL(2,m->getSpaceDimension());
f=m->getMeasureField(true);
CPPUNIT_ASSERT_EQUAL(6,(int)f->getNumberOfTuples());
da->decrRef();
m->checkConsistencyLight();
CPPUNIT_ASSERT_EQUAL(60,m->getNumberOfNodes());
- CPPUNIT_ASSERT_EQUAL(24,m->getNumberOfCells());
+ CPPUNIT_ASSERT_EQUAL(24,(int)m->getNumberOfCells());
CPPUNIT_ASSERT_EQUAL(3,m->getSpaceDimension());
f=m->getMeasureField(true);
CPPUNIT_ASSERT_EQUAL(24,(int)f->getNumberOfTuples());
m4->decrRef();
m5->decrRef();
//
- CPPUNIT_ASSERT_EQUAL(10,m6->getNumberOfCells());
+ CPPUNIT_ASSERT_EQUAL(10,(int)m6->getNumberOfCells());
CPPUNIT_ASSERT_EQUAL(22,m6->getNumberOfNodes());
bool areNodesMerged;
int newNbOfNodes;
MEDCouplingUMesh *m1=0;
MEDCouplingUMesh *m2=build3DExtrudedUMesh_1(m1);
m1->decrRef();
- CPPUNIT_ASSERT_EQUAL(18,m2->getNumberOfCells());
+ CPPUNIT_ASSERT_EQUAL(18,(int)m2->getNumberOfCells());
const double arr1[18]={8.71,4.53,-12.41,8.71,-8.71,8.7099,4.55,8.71,5.55,6.77,-1e-200,4.55,8.7099,0.,1.23,0.,2.22,8.71};
MEDCouplingFieldDouble *f=MEDCouplingFieldDouble::New(ON_CELLS,NO_TIME);
DataArrayDouble *a=DataArrayDouble::New();
mesh->insertNextCell(INTERP_KERNEL::NORM_HEXA8,8,conn+24);
mesh->finishInsertingCells();
mesh->checkConsistencyLight();
- CPPUNIT_ASSERT_EQUAL(4,mesh->getNumberOfCells());
+ CPPUNIT_ASSERT_EQUAL(4,(int)mesh->getNumberOfCells());
CPPUNIT_ASSERT_EQUAL(INTERP_KERNEL::NORM_HEXA8,mesh->getTypeOfCell(0));
CPPUNIT_ASSERT_EQUAL(INTERP_KERNEL::NORM_HEXA8,mesh->getTypeOfCell(1));
CPPUNIT_ASSERT_EQUAL(INTERP_KERNEL::NORM_HEXA8,mesh->getTypeOfCell(2));
mesh->convertDegeneratedCells();
mesh->checkConsistencyLight();
MEDCouplingFieldDouble *f2=mesh->getMeasureField(true);
- CPPUNIT_ASSERT_EQUAL(4,mesh->getNumberOfCells());
+ CPPUNIT_ASSERT_EQUAL(4,(int)mesh->getNumberOfCells());
CPPUNIT_ASSERT_EQUAL(INTERP_KERNEL::NORM_PENTA6,mesh->getTypeOfCell(0));
CPPUNIT_ASSERT_EQUAL(INTERP_KERNEL::NORM_PYRA5,mesh->getTypeOfCell(1));
CPPUNIT_ASSERT_EQUAL(INTERP_KERNEL::NORM_TETRA4,mesh->getTypeOfCell(2));
tmp->decrRef();
i->convertDegeneratedCells();
i->checkConsistencyLight();
- CPPUNIT_ASSERT_EQUAL(36,i->getNumberOfCells());
+ CPPUNIT_ASSERT_EQUAL(36,(int)i->getNumberOfCells());
CPPUNIT_ASSERT_EQUAL(37,i->getNumberOfNodes());
CPPUNIT_ASSERT_EQUAL(12,i->getNumberOfCellsWithType(INTERP_KERNEL::NORM_TRI3));
CPPUNIT_ASSERT_EQUAL(24,i->getNumberOfCellsWithType(INTERP_KERNEL::NORM_QUAD4));
for(int i=0;i<7;i++)
CPPUNIT_ASSERT_EQUAL(expected2[i],da->getIJ(i,0));
m->checkConsistencyLight();
- CPPUNIT_ASSERT_EQUAL(7,m->getNumberOfCells());
+ CPPUNIT_ASSERT_EQUAL(7,(int)m->getNumberOfCells());
CPPUNIT_ASSERT_EQUAL(INTERP_KERNEL::NORM_TRI3,m->getTypeOfCell(0));
CPPUNIT_ASSERT_EQUAL(INTERP_KERNEL::NORM_TRI3,m->getTypeOfCell(1));
CPPUNIT_ASSERT_EQUAL(INTERP_KERNEL::NORM_TRI3,m->getTypeOfCell(2));
CPPUNIT_ASSERT_EQUAL(2,(int)types.size());
CPPUNIT_ASSERT_EQUAL(INTERP_KERNEL::NORM_TRI3,*(types.begin()));
CPPUNIT_ASSERT_EQUAL(INTERP_KERNEL::NORM_POLYGON,*(++(types.begin())));
- CPPUNIT_ASSERT_EQUAL(7,m->getNumberOfCells());
+ CPPUNIT_ASSERT_EQUAL(7,(int)m->getNumberOfCells());
CPPUNIT_ASSERT_EQUAL(INTERP_KERNEL::NORM_TRI3,m->getTypeOfCell(0));
CPPUNIT_ASSERT_EQUAL(INTERP_KERNEL::NORM_TRI3,m->getTypeOfCell(1));
CPPUNIT_ASSERT_EQUAL(INTERP_KERNEL::NORM_TRI3,m->getTypeOfCell(2));
std::vector<const MEDCouplingFieldDouble *> tmp(3);
tmp[0]=f1; tmp[1]=f2; tmp[2]=f3;
MEDCouplingFieldDouble *f4=MEDCouplingFieldDouble::MergeFields(tmp);
- CPPUNIT_ASSERT_EQUAL(15,f4->getMesh()->getNumberOfCells());
+ CPPUNIT_ASSERT_EQUAL(15,(int)f4->getMesh()->getNumberOfCells());
const double expected1[30]={2.,2.,2.,2.,2.,2.,2.,2.,2.,2., 5.,5.,5.,5.,5.,5.,5.,5.,5.,5., 7.,7.,7.,7.,7.,7.,7.,7.,7.,7.};
for(int i=0;i<30;i++)
CPPUNIT_ASSERT_DOUBLES_EQUAL(expected1[i],f4->getIJ(0,i),1.e-13);
const char myName[]="Vitoo";
MEDCouplingUMesh *m=build3DSurfTargetMesh_1();
MEDCouplingUMesh *m2=(MEDCouplingUMesh *)m->buildPartOfMySelf(0,0,true);
- CPPUNIT_ASSERT_EQUAL(0,m2->getNumberOfCells());
+ CPPUNIT_ASSERT_EQUAL(0,(int)m2->getNumberOfCells());
CPPUNIT_ASSERT_EQUAL(3,m2->getSpaceDimension());
CPPUNIT_ASSERT_EQUAL(2,m2->getMeshDimension());
m2->setName(myName);
//
MEDCouplingUMesh *m4=MEDCouplingUMesh::MergeUMeshes(ms);
m4->checkConsistencyLight();
- CPPUNIT_ASSERT_EQUAL(10,m4->getNumberOfCells());
+ CPPUNIT_ASSERT_EQUAL(10,(int)m4->getNumberOfCells());
CPPUNIT_ASSERT_EQUAL(20,m4->getNumberOfNodes());
CPPUNIT_ASSERT_EQUAL(45,m4->getNodalConnectivityArrayLen());
//
//
const int vec5[2]={8,9};
MEDCouplingUMesh *m4_3=(MEDCouplingUMesh *)m4->buildPartOfMySelf(vec5,vec5+2,false);
- CPPUNIT_ASSERT_EQUAL(2,m4_3->getNumberOfCells());
+ CPPUNIT_ASSERT_EQUAL(2,(int)m4_3->getNumberOfCells());
CPPUNIT_ASSERT_EQUAL(3,m4_3->getNumberOfNodes());
m3_2->zipCoords();
m4_3->setName(m3_2->getName().c_str());
MEDCouplingUMesh *m=MEDCouplingUMesh::Build0DMeshFromCoords(coo);
m->checkConsistencyLight();
CPPUNIT_ASSERT_EQUAL(4,m->getNumberOfNodes());
- CPPUNIT_ASSERT_EQUAL(4,m->getNumberOfCells());
+ CPPUNIT_ASSERT_EQUAL(4,(int)m->getNumberOfCells());
CPPUNIT_ASSERT_EQUAL(3,m->getSpaceDimension());
CPPUNIT_ASSERT_EQUAL(0,m->getMeshDimension());
std::set<INTERP_KERNEL::NormalizedCellType> types=m->getAllGeoTypes();
DataArrayInt *d3=DataArrayInt::New();
DataArrayInt *d4=DataArrayInt::New();
MEDCouplingUMesh *m2=mesh->buildDescendingConnectivity(d1,d2,d3,d4);
- CPPUNIT_ASSERT_EQUAL(8,m2->getNumberOfCells());
+ CPPUNIT_ASSERT_EQUAL(8,(int)m2->getNumberOfCells());
const int expected4[8][6]={{1,2,3,4,5,0},{7,6,11,10,9,8},{1,7,8,2},{2,8,9,3},{3,9,10,4},{4,10,11,5},{5,11,6,0},{0,6,7,1}};
const INTERP_KERNEL::NormalizedCellType expected2[8]={INTERP_KERNEL::NORM_POLYGON, INTERP_KERNEL::NORM_POLYGON, INTERP_KERNEL::NORM_QUAD4, INTERP_KERNEL::NORM_QUAD4, INTERP_KERNEL::NORM_QUAD4, INTERP_KERNEL::NORM_QUAD4, INTERP_KERNEL::NORM_QUAD4, INTERP_KERNEL::NORM_QUAD4};
const int expected3[8]={6,6,4,4,4,4,4,4};
DataArrayInt *da;
MEDCouplingMesh *m2=m->buildPartAndReduceNodes(arr,arr+2,da);
CPPUNIT_ASSERT_EQUAL(5,m2->getNumberOfNodes());
- CPPUNIT_ASSERT_EQUAL(2,m2->getNumberOfCells());
+ CPPUNIT_ASSERT_EQUAL(2,(int)m2->getNumberOfCells());
MEDCouplingFieldDouble *f=m2->getMeasureField(true);
CPPUNIT_ASSERT_DOUBLES_EQUAL(0.125,f->getArray()->getIJ(0,0),1e-12);
CPPUNIT_ASSERT_DOUBLES_EQUAL(0.25,f->getArray()->getIJ(1,0),1e-12);
m=MEDCouplingUMesh::New("toto",2);
m2=m->buildSetInstanceFromThis(3);
CPPUNIT_ASSERT_EQUAL(0,m2->getNumberOfNodes());
- CPPUNIT_ASSERT_EQUAL(0,m2->getNumberOfCells());
+ CPPUNIT_ASSERT_EQUAL(0,(int)m2->getNumberOfCells());
m->decrRef();
m2->decrRef();
}
MEDCouplingUMesh *mesh2=mesh->buildDescendingConnectivity2(desc,descIndx,revDesc,revDescIndx);
mesh2->checkConsistencyLight();
CPPUNIT_ASSERT_EQUAL(1,mesh2->getMeshDimension());
- CPPUNIT_ASSERT_EQUAL(13,mesh2->getNumberOfCells());
+ CPPUNIT_ASSERT_EQUAL(13,(int)mesh2->getNumberOfCells());
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());
const int expected2[8]={0,-1,0,1,-1,1,2,-1};
CPPUNIT_ASSERT_EQUAL(8,(int)d1->getNumberOfTuples());
CPPUNIT_ASSERT_EQUAL(8,(int)d2->getNumberOfTuples());
- CPPUNIT_ASSERT_EQUAL(8,m3->getNumberOfCells());
+ CPPUNIT_ASSERT_EQUAL(8,(int)m3->getNumberOfCells());
CPPUNIT_ASSERT_EQUAL(22,m3->getNumberOfNodes());
CPPUNIT_ASSERT_EQUAL(2,m3->getSpaceDimension());
CPPUNIT_ASSERT(std::equal(expected1,expected1+8,d1->getConstPointer()));
const int expected2[9]={0,2,1,3,1,3,2,3,3};
CPPUNIT_ASSERT_EQUAL(9,(int)d1->getNumberOfTuples());
CPPUNIT_ASSERT_EQUAL(9,(int)d2->getNumberOfTuples());
- CPPUNIT_ASSERT_EQUAL(9,m3->getNumberOfCells());
+ CPPUNIT_ASSERT_EQUAL(9,(int)m3->getNumberOfCells());
CPPUNIT_ASSERT_EQUAL(22,m3->getNumberOfNodes());
CPPUNIT_ASSERT_EQUAL(2,m3->getSpaceDimension());
CPPUNIT_ASSERT(std::equal(expected1,expected1+9,d1->getConstPointer()));
const int expected2[16]={0,0,1,-1,2,2,3,-1,4,4,5,-1,6,6,7,-1};
CPPUNIT_ASSERT_EQUAL(16,(int)d1->getNumberOfTuples());
CPPUNIT_ASSERT_EQUAL(16,(int)d2->getNumberOfTuples());
- CPPUNIT_ASSERT_EQUAL(16,m3->getNumberOfCells());
+ CPPUNIT_ASSERT_EQUAL(16,(int)m3->getNumberOfCells());
CPPUNIT_ASSERT_EQUAL(104,m3->getNumberOfNodes());
CPPUNIT_ASSERT_EQUAL(2,m3->getSpaceDimension());
CPPUNIT_ASSERT(std::equal(expected1,expected1+16,d1->getConstPointer()));
const int expected2[16]={0,1,1,-1,2,3,3,-1,4,5,5,-1,6,7,7,-1};
CPPUNIT_ASSERT_EQUAL(16,(int)d1->getNumberOfTuples());
CPPUNIT_ASSERT_EQUAL(16,(int)d2->getNumberOfTuples());
- CPPUNIT_ASSERT_EQUAL(16,m3->getNumberOfCells());
+ CPPUNIT_ASSERT_EQUAL(16,(int)m3->getNumberOfCells());
CPPUNIT_ASSERT_EQUAL(104,m3->getNumberOfNodes());
CPPUNIT_ASSERT_EQUAL(2,m3->getSpaceDimension());
CPPUNIT_ASSERT(std::equal(expected1,expected1+16,d1->getConstPointer()));
CPPUNIT_ASSERT_EQUAL(2,slice1->getMeshDimension());
CPPUNIT_ASSERT_EQUAL(3,slice1->getSpaceDimension());
CPPUNIT_ASSERT_EQUAL(57,slice1->getNumberOfNodes());
- CPPUNIT_ASSERT_EQUAL(9,slice1->getNumberOfCells());
+ CPPUNIT_ASSERT_EQUAL(9,(int)slice1->getNumberOfCells());
CPPUNIT_ASSERT_EQUAL(9,(int)ids->getNumberOfTuples());
CPPUNIT_ASSERT_EQUAL(47,(int)slice1->getNodalConnectivity()->getNumberOfTuples());
CPPUNIT_ASSERT_EQUAL(10,(int)slice1->getNodalConnectivityIndex()->getNumberOfTuples());
CPPUNIT_ASSERT_EQUAL(2,slice1->getMeshDimension());
CPPUNIT_ASSERT_EQUAL(3,slice1->getSpaceDimension());
CPPUNIT_ASSERT_EQUAL(60,slice1->getNumberOfNodes());
- CPPUNIT_ASSERT_EQUAL(9,slice1->getNumberOfCells());
+ CPPUNIT_ASSERT_EQUAL(9,(int)slice1->getNumberOfCells());
CPPUNIT_ASSERT_EQUAL(9,(int)ids->getNumberOfTuples());
CPPUNIT_ASSERT_EQUAL(49,(int)slice1->getNodalConnectivity()->getNumberOfTuples());
CPPUNIT_ASSERT_EQUAL(10,(int)slice1->getNodalConnectivityIndex()->getNumberOfTuples());
CPPUNIT_ASSERT_EQUAL(2,slice1->getMeshDimension());
CPPUNIT_ASSERT_EQUAL(3,slice1->getSpaceDimension());
CPPUNIT_ASSERT_EQUAL(45,slice1->getNumberOfNodes());
- CPPUNIT_ASSERT_EQUAL(12,slice1->getNumberOfCells());
+ CPPUNIT_ASSERT_EQUAL(12,(int)slice1->getNumberOfCells());
CPPUNIT_ASSERT_EQUAL(12,(int)ids->getNumberOfTuples());
CPPUNIT_ASSERT_EQUAL(68,(int)slice1->getNodalConnectivity()->getNumberOfTuples());
CPPUNIT_ASSERT_EQUAL(13,(int)slice1->getNodalConnectivityIndex()->getNumberOfTuples());
CPPUNIT_ASSERT_EQUAL(1,slice1->getMeshDimension());
CPPUNIT_ASSERT_EQUAL(3,slice1->getSpaceDimension());
CPPUNIT_ASSERT_EQUAL(57,slice1->getNumberOfNodes());
- CPPUNIT_ASSERT_EQUAL(25,slice1->getNumberOfCells());
+ CPPUNIT_ASSERT_EQUAL(25,(int)slice1->getNumberOfCells());
CPPUNIT_ASSERT_EQUAL(25,(int)ids->getNumberOfTuples());
CPPUNIT_ASSERT_EQUAL(75,(int)slice1->getNodalConnectivity()->getNumberOfTuples());
CPPUNIT_ASSERT_EQUAL(26,(int)slice1->getNodalConnectivityIndex()->getNumberOfTuples());
CPPUNIT_ASSERT_EQUAL(1,slice1->getMeshDimension());
CPPUNIT_ASSERT_EQUAL(3,slice1->getSpaceDimension());
CPPUNIT_ASSERT_EQUAL(45,slice1->getNumberOfNodes());
- CPPUNIT_ASSERT_EQUAL(68,slice1->getNumberOfCells());
+ CPPUNIT_ASSERT_EQUAL(68,(int)slice1->getNumberOfCells());
CPPUNIT_ASSERT_EQUAL(68,(int)ids->getNumberOfTuples());
CPPUNIT_ASSERT_EQUAL(204,(int)slice1->getNodalConnectivity()->getNumberOfTuples());
CPPUNIT_ASSERT_EQUAL(69,(int)slice1->getNodalConnectivityIndex()->getNumberOfTuples());
MEDCouplingUMesh *mesh2=mesh->buildDescendingConnectivity2(desc,descIndx,revDesc,revDescIndx);
mesh2->checkConsistencyLight();
CPPUNIT_ASSERT_EQUAL(2,mesh2->getMeshDimension());
- CPPUNIT_ASSERT_EQUAL(30,mesh2->getNumberOfCells());
+ CPPUNIT_ASSERT_EQUAL(30,(int)mesh2->getNumberOfCells());
CPPUNIT_ASSERT_EQUAL((std::size_t)31,revDescIndx->getNbOfElems()); CPPUNIT_ASSERT_EQUAL(31,(int)revDescIndx->getNumberOfTuples());
CPPUNIT_ASSERT_EQUAL((std::size_t)13,descIndx->getNbOfElems()); CPPUNIT_ASSERT_EQUAL(13,(int)descIndx->getNumberOfTuples());
CPPUNIT_ASSERT_EQUAL((std::size_t)48,desc->getNbOfElems()); CPPUNIT_ASSERT_EQUAL(48,(int)desc->getNumberOfTuples());
coordsZ->useArray(arrZ,false, CPP_DEALLOC,3,1);
// test in 1D
m1c->setCoordsAt(0,coordsX);
- CPPUNIT_ASSERT_EQUAL(4,m1c->getNumberOfCells());
+ CPPUNIT_ASSERT_EQUAL(4,(int)m1c->getNumberOfCells());
const int expected1[4][2]={{0,1},{1,2},{2,3},{3,4}};
for(int i=0;i<4;i++)
{
}
// test in 2D
m1c->setCoordsAt(1,coordsY);
- CPPUNIT_ASSERT_EQUAL(12,m1c->getNumberOfCells());
+ CPPUNIT_ASSERT_EQUAL(12,(int)m1c->getNumberOfCells());
const int expected2[12][4]={{0,1,6,5},{1,2,7,6},{2,3,8,7},{3,4,9,8},{4,5,11,10},{5,6,12,11},{6,7,13,12},{7,8,14,13},{8,9,16,15},{9,10,17,16},{10,11,18,17},{11,12,19,18}};
for(int i=0;i<12;i++)
{
}
// test in 3D
m1c->setCoordsAt(2,coordsZ);
- CPPUNIT_ASSERT_EQUAL(24,m1c->getNumberOfCells());
+ CPPUNIT_ASSERT_EQUAL(24,(int)m1c->getNumberOfCells());
const int expected3[24][8]={{0,1,6,5,20,21,26,25},{1,2,7,6,21,22,27,26},{2,3,8,7,22,23,28,27},{3,4,9,8,23,24,29,28},{4,5,11,10,24,25,31,30},{5,6,12,11,25,26,32,31},{6,7,13,12,26,27,33,32},{7,8,14,13,27,28,34,33},{8,9,16,15,28,29,36,35},{9,10,17,16,29,30,37,36},{10,11,18,17,30,31,38,37},{11,12,19,18,31,32,39,38},{20,21,26,25,40,41,46,45},{21,22,27,26,41,42,47,46},{22,23,28,27,42,43,48,47},{23,24,29,28,43,44,49,48},{24,25,31,30,44,45,51,50},{25,26,32,31,45,46,52,51},{26,27,33,32,46,47,53,52},{27,28,34,33,47,48,54,53},{28,29,36,35,48,49,56,55},{29,30,37,36,49,50,57,56},{30,31,38,37,50,51,58,57},{31,32,39,38,51,52,59,58}};
for(int i=0;i<12;i++)
{
v2[2]->decrRef();
//
MEDCouplingUMesh *m5=m4->buildSpreadZonesWithPoly();
- CPPUNIT_ASSERT_EQUAL(3,m5->getNumberOfCells());
+ CPPUNIT_ASSERT_EQUAL(3,(int)m5->getNumberOfCells());
CPPUNIT_ASSERT(m5->getCoords()==m4->getCoords());
const int expected3[23]={5,15,16,17,14,11,13,12,5,2,1,0,3,6,7,8,5,5,18,21,22,20,19};
const int expected4[4]={0,8,17,23};
cmesh->decrRef(); arrX->decrRef(); arrY->decrRef();
//
MEDCouplingUMesh *skin=umesh->computeSkin();
- CPPUNIT_ASSERT_EQUAL(18,skin->getNumberOfCells());
+ CPPUNIT_ASSERT_EQUAL(18,(int)skin->getNumberOfCells());
CPPUNIT_ASSERT_EQUAL(1,skin->getMeshDimension());
CPPUNIT_ASSERT(skin->getCoords()==umesh->getCoords());
const int expected1[19]={0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45,48,51,54};
ids2->decrRef();
CPPUNIT_ASSERT(!part->isEqual(skin,1e-12));
DataArrayInt *trad=part->zipConnectivityTraducer(0);
- CPPUNIT_ASSERT_EQUAL(9,part->getNumberOfCells());
+ CPPUNIT_ASSERT_EQUAL(9,(int)part->getNumberOfCells());
const int expected4[18]={0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8};
CPPUNIT_ASSERT(std::equal(expected4,expected4+18,trad->getConstPointer()));
CPPUNIT_ASSERT_EQUAL((std::size_t)18,trad->getNbOfElems());
vol->decrRef();
//
m->unPolyze();
- CPPUNIT_ASSERT_EQUAL(1,m->getNumberOfCells());
+ CPPUNIT_ASSERT_EQUAL(1,(int)m->getNumberOfCells());
std::set<INTERP_KERNEL::NormalizedCellType> s; s.insert(INTERP_KERNEL::NORM_PENTA6);
CPPUNIT_ASSERT(s==m->getAllGeoTypes());
//
//
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,(int)m3->getNumberOfCells());
CPPUNIT_ASSERT_EQUAL(105,(int)d1->getNumberOfTuples());
CPPUNIT_ASSERT_EQUAL(105,(int)d2->getNumberOfTuples());
CPPUNIT_ASSERT_EQUAL(704,m3->getNumberOfNodes());
//
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,(int)m3->getNumberOfCells());
CPPUNIT_ASSERT_EQUAL(4,(int)d1->getNumberOfTuples());
CPPUNIT_ASSERT_EQUAL(4,(int)d2->getNumberOfTuples());
CPPUNIT_ASSERT_EQUAL(43,m3->getNumberOfNodes());
(MEDCouplingUMesh*)mesh->buildPartOfMySelfNode( &nodes[0], &nodes[0]+nodes.size(), allNodes);
MCAuto<MEDCouplingUMesh> mesh2 =
(MEDCouplingUMesh*)mesh->buildPartOfMySelfNode( &nodes[0], &nodes[0]+nodes.size(),!allNodes);
- CPPUNIT_ASSERT_EQUAL( mesh1->getNumberOfCells(), 1 );
+ CPPUNIT_ASSERT_EQUAL( (int)mesh1->getNumberOfCells(), 1 );
CPPUNIT_ASSERT_EQUAL( mesh2->getNumberOfCells(), mesh->getNumberOfCells() );
//! [CppSnippet_MEDCouplingUMesh_buildPartOfMySelfNode_2]
}
DataArrayInt* cellIdsArr1 = mesh->getCellIdsLyingOnNodes( &nodes[0], &nodes[0]+nodes.size(), allNodes);
DataArrayInt* cellIdsArr2 = mesh->getCellIdsLyingOnNodes( &nodes[0], &nodes[0]+nodes.size(),!allNodes);
CPPUNIT_ASSERT_EQUAL( (int)cellIdsArr1->getNumberOfTuples(), 1 );
- CPPUNIT_ASSERT_EQUAL( (int)cellIdsArr2->getNumberOfTuples(), mesh->getNumberOfCells() );
+ CPPUNIT_ASSERT_EQUAL( (int)cellIdsArr2->getNumberOfTuples(), (int)mesh->getNumberOfCells() );
//! [CppSnippet_MEDCouplingUMesh_getCellIdsLyingOnNodes_2]
cellIdsArr1->decrRef();
cellIdsArr2->decrRef();
//! [CppSnippet_MEDCouplingUMesh_zipConnectivityTraducer_2]
const int oldNbCells = mesh->getNumberOfCells();
DataArrayInt *arr = mesh->zipConnectivityTraducer(0);
- CPPUNIT_ASSERT_EQUAL( oldNbCells-2, mesh->getNumberOfCells() );
+ CPPUNIT_ASSERT_EQUAL( oldNbCells-2, (int)mesh->getNumberOfCells() );
const int idsExpected[5] = {0, 1, 1, 0, 2};
CPPUNIT_ASSERT(std::equal(idsExpected,idsExpected+5,arr->getPointer()));
//! [CppSnippet_MEDCouplingUMesh_zipConnectivityTraducer_2]
MEDCoupling::MEDCouplingFieldDouble *f2=f1->buildSubPart(part1,part1+3);
//! [CppSnippetFieldDoubleBuildSubPart1_2]
f2->zipCoords();
- CPPUNIT_ASSERT_EQUAL(3,f2->getMesh()->getNumberOfCells());
+ CPPUNIT_ASSERT_EQUAL(3,(int)f2->getMesh()->getNumberOfCells());
CPPUNIT_ASSERT_EQUAL(6,f2->getMesh()->getNumberOfNodes());
CPPUNIT_ASSERT_EQUAL(2,f2->getMesh()->getSpaceDimension());
CPPUNIT_ASSERT_EQUAL(2,f2->getMesh()->getMeshDimension());
arrY->decrRef();
//! [CppSnippetCMeshStdBuild1_2]
//! [CppSnippetCMeshStdBuild1_3]
- CPPUNIT_ASSERT_EQUAL(8*6,mesh->getNumberOfCells());
+ CPPUNIT_ASSERT_EQUAL(8*6,(int)mesh->getNumberOfCells());
CPPUNIT_ASSERT_EQUAL(9*7,mesh->getNumberOfNodes());
CPPUNIT_ASSERT_EQUAL(2,mesh->getSpaceDimension());
CPPUNIT_ASSERT_EQUAL(2,mesh->getMeshDimension());
mesh->setCoordsAt(1,arrY);
arrY->decrRef();
//! [CppSnippetCMeshStdBuild1_2bis]
- CPPUNIT_ASSERT_EQUAL(8*6,mesh->getNumberOfCells());
+ CPPUNIT_ASSERT_EQUAL(8*6,(int)mesh->getNumberOfCells());
CPPUNIT_ASSERT_EQUAL(9*7,mesh->getNumberOfNodes());
CPPUNIT_ASSERT_EQUAL(2,mesh->getSpaceDimension());
CPPUNIT_ASSERT_EQUAL(2,mesh->getMeshDimension());
1000.,1000.,1020.,1030.,1040.,1000.,1000.,1070.,1080.,1090.,1000.,1000.,1120.,1130.,1140.,1000.,1000.,1170.,1180.,1190.,
2000.,2000.,2020.,2030.,2040.,2000.,2000.,2070.,2080.,2090.,2000.,2000.,2120.,2130.,2140.,2000.,2000.,2170.,2180.,2190.,
};
- CPPUNIT_ASSERT_EQUAL((int)(sizeof(vals1)/sizeof(double)),meshNE->getNumberOfCells());
+ CPPUNIT_ASSERT_EQUAL((int)(sizeof(vals1)/sizeof(double)),(int)meshNE->getNumberOfCells());
std::copy(vals1,vals1+meshNE->getNumberOfCells(),array->getPointer());
array->decrRef();
MEDCouplingFieldDouble *trgField=remapper.transferField(srcField,4.220173);
{
const char fileName[]="file17.med";
MEDCouplingUMesh *m=build3DMesh_2();
- CPPUNIT_ASSERT_EQUAL(20,m->getNumberOfCells());
+ CPPUNIT_ASSERT_EQUAL(20,(int)m->getNumberOfCells());
CPPUNIT_ASSERT_EQUAL(45,m->getNumberOfNodes());
const int polys[3]={1,4,6};
std::vector<int> poly2(polys,polys+3);
MEDCouplingUMesh *mesh=ReadUMeshFromFile(fileName.c_str(),meshNames[0].c_str(),0);
CPPUNIT_ASSERT_EQUAL(3,mesh->getSpaceDimension());
CPPUNIT_ASSERT_EQUAL(3,mesh->getMeshDimension());
- CPPUNIT_ASSERT_EQUAL(16,mesh->getNumberOfCells());
+ CPPUNIT_ASSERT_EQUAL(16,(int)mesh->getNumberOfCells());
CPPUNIT_ASSERT_EQUAL(19,mesh->getNumberOfNodes());
CPPUNIT_ASSERT_EQUAL(3,(int)mesh->getAllGeoTypes().size());
for(int i=0;i<12;i++)
mesh=ReadUMeshFromFamilies(fileName.c_str(),meshNames[0].c_str(),0,families2);
CPPUNIT_ASSERT_EQUAL(3,mesh->getSpaceDimension());
CPPUNIT_ASSERT_EQUAL(3,mesh->getMeshDimension());
- CPPUNIT_ASSERT_EQUAL(2,mesh->getNumberOfCells());
+ CPPUNIT_ASSERT_EQUAL(2,(int)mesh->getNumberOfCells());
CPPUNIT_ASSERT_EQUAL(19,mesh->getNumberOfNodes());
CPPUNIT_ASSERT_EQUAL(2,(int)mesh->getAllGeoTypes().size());
CPPUNIT_ASSERT_EQUAL(NORM_TETRA4,mesh->getTypeOfCell(0));
mesh=ReadUMeshFromGroups(fileName.c_str(),meshNames[0].c_str(),0,groups2);
CPPUNIT_ASSERT_EQUAL(3,mesh->getSpaceDimension());
CPPUNIT_ASSERT_EQUAL(3,mesh->getMeshDimension());
- CPPUNIT_ASSERT_EQUAL(7,mesh->getNumberOfCells());
+ CPPUNIT_ASSERT_EQUAL(7,(int)mesh->getNumberOfCells());
CPPUNIT_ASSERT_EQUAL(19,mesh->getNumberOfNodes());
CPPUNIT_ASSERT_EQUAL(2,(int)mesh->getAllGeoTypes().size());
for(int i=0;i<6;i++)
CPPUNIT_ASSERT(constMesh);
CPPUNIT_ASSERT_EQUAL(3,constMesh->getSpaceDimension());
CPPUNIT_ASSERT_EQUAL(3,constMesh->getMeshDimension());
- CPPUNIT_ASSERT_EQUAL(16,constMesh->getNumberOfCells());
+ CPPUNIT_ASSERT_EQUAL(16,(int)constMesh->getNumberOfCells());
CPPUNIT_ASSERT_EQUAL(19,constMesh->getNumberOfNodes());
CPPUNIT_ASSERT_EQUAL(3,(int)constMesh->getAllGeoTypes().size());
for(int i=0;i<12;i++)
CPPUNIT_ASSERT(constMesh);
CPPUNIT_ASSERT_EQUAL(3,constMesh->getSpaceDimension());
CPPUNIT_ASSERT_EQUAL(3,constMesh->getMeshDimension());
- CPPUNIT_ASSERT_EQUAL(16,constMesh->getNumberOfCells());
+ CPPUNIT_ASSERT_EQUAL(16,(int)constMesh->getNumberOfCells());
CPPUNIT_ASSERT_EQUAL(19,constMesh->getNumberOfNodes());
CPPUNIT_ASSERT_EQUAL(3,(int)constMesh->getAllGeoTypes().size());
for(int i=0;i<12;i++)
CPPUNIT_ASSERT(constMesh);
CPPUNIT_ASSERT_EQUAL(3,constMesh->getSpaceDimension());
CPPUNIT_ASSERT_EQUAL(3,constMesh->getMeshDimension());
- CPPUNIT_ASSERT_EQUAL(16,constMesh->getNumberOfCells());
+ CPPUNIT_ASSERT_EQUAL(16,(int)constMesh->getNumberOfCells());
CPPUNIT_ASSERT_EQUAL(19,constMesh->getNumberOfNodes());
CPPUNIT_ASSERT_EQUAL(3,(int)constMesh->getAllGeoTypes().size());
for(int i=0;i<12;i++)
CPPUNIT_ASSERT(constMesh);
CPPUNIT_ASSERT_EQUAL(3,constMesh->getSpaceDimension());
CPPUNIT_ASSERT_EQUAL(3,constMesh->getMeshDimension());
- CPPUNIT_ASSERT_EQUAL(16,constMesh->getNumberOfCells());
+ CPPUNIT_ASSERT_EQUAL(16,(int)constMesh->getNumberOfCells());
CPPUNIT_ASSERT_EQUAL(19,constMesh->getNumberOfNodes());
CPPUNIT_ASSERT_EQUAL(3,(int)constMesh->getAllGeoTypes().size());
for(int i=0;i<12;i++)
mesh->checkConsistencyLight();
CPPUNIT_ASSERT_EQUAL(3,mesh->getSpaceDimension());
CPPUNIT_ASSERT_EQUAL(2,mesh->getMeshDimension());
- CPPUNIT_ASSERT_EQUAL(538,mesh->getNumberOfCells());
+ CPPUNIT_ASSERT_EQUAL(538,(int)mesh->getNumberOfCells());
CPPUNIT_ASSERT_EQUAL(579,mesh->getNumberOfNodes());
CPPUNIT_ASSERT_EQUAL(2,(int)mesh->getAllGeoTypes().size());
for(int i=0;i<514;i++)
CPPUNIT_ASSERT(constMesh);
CPPUNIT_ASSERT_EQUAL(3,constMesh->getSpaceDimension());
CPPUNIT_ASSERT_EQUAL(2,constMesh->getMeshDimension());
- CPPUNIT_ASSERT_EQUAL(538,constMesh->getNumberOfCells());
+ CPPUNIT_ASSERT_EQUAL(538,(int)constMesh->getNumberOfCells());
CPPUNIT_ASSERT_EQUAL(579,constMesh->getNumberOfNodes());
CPPUNIT_ASSERT_EQUAL(2,(int)constMesh->getAllGeoTypes().size());
for(int i=0;i<514;i++)
mesh->checkConsistencyLight();
CPPUNIT_ASSERT_EQUAL(3,mesh->getSpaceDimension());
CPPUNIT_ASSERT_EQUAL(3,mesh->getMeshDimension());
- CPPUNIT_ASSERT_EQUAL(3,mesh->getNumberOfCells());
+ CPPUNIT_ASSERT_EQUAL(3,(int)mesh->getNumberOfCells());
CPPUNIT_ASSERT_EQUAL(19,mesh->getNumberOfNodes());
CPPUNIT_ASSERT_EQUAL(2,(int)mesh->getAllGeoTypes().size());
CPPUNIT_ASSERT_EQUAL(NORM_TETRA4,mesh->getTypeOfCell(0));
mesh->checkConsistencyLight();
CPPUNIT_ASSERT_EQUAL(3,mesh->getSpaceDimension());
CPPUNIT_ASSERT_EQUAL(2,mesh->getMeshDimension());
- CPPUNIT_ASSERT_EQUAL(17,mesh->getNumberOfCells());
+ CPPUNIT_ASSERT_EQUAL(17,(int)mesh->getNumberOfCells());
CPPUNIT_ASSERT_EQUAL(19,mesh->getNumberOfNodes());
CPPUNIT_ASSERT_EQUAL(3,(int)mesh->getAllGeoTypes().size());
CPPUNIT_ASSERT_EQUAL(NORM_POLYGON,mesh->getTypeOfCell(0));
mesh->checkConsistencyLight();
CPPUNIT_ASSERT_EQUAL(3,mesh->getSpaceDimension());
CPPUNIT_ASSERT_EQUAL(2,mesh->getMeshDimension());
- CPPUNIT_ASSERT_EQUAL(3,mesh->getNumberOfCells());
+ CPPUNIT_ASSERT_EQUAL(3,(int)mesh->getNumberOfCells());
CPPUNIT_ASSERT_EQUAL(19,mesh->getNumberOfNodes());
CPPUNIT_ASSERT_EQUAL(1,(int)mesh->getAllGeoTypes().size());
for(int i=0;i<3;i++)
//
mesh=ReadUMeshFromFamilies(fileName.c_str(),meshNames[0].c_str(),0,families2);
CPPUNIT_ASSERT_EQUAL(3,mesh->getSpaceDimension());
- CPPUNIT_ASSERT_EQUAL(0,mesh->getNumberOfCells());
+ CPPUNIT_ASSERT_EQUAL(0,(int)mesh->getNumberOfCells());
CPPUNIT_ASSERT_EQUAL(19,mesh->getNumberOfNodes());
CPPUNIT_ASSERT_EQUAL(3,mesh->getMeshDimension());
CPPUNIT_ASSERT_EQUAL(0,(int)mesh->getAllGeoTypes().size());