inline std::vector<double> reconstruct_polygon(const std::vector<double>& V)
{
- std::size_t taille=V.size();
+ int taille((int)V.size());
//VB : why 6 ?
COS[0]=1.0;
SIN[0]=0.0;
//angle[0]=0.0;
- for(std::size_t i=0; i<taille/2-1;i++)
+ for(int i=0; i<taille/2-1;i++)
{
std::vector<double> Trigo=calcul_cos_et_sin(&Bary[0],&V[0],&V[2*(i+1)]);
COS[i+1]=Trigo[0];
Pt_ordonne.reserve(taille);
// std::multimap<double,int> Ordre;
std::multimap<std::pair<double,double>,int, AngleLess> CosSin;
- for(std::size_t i=0;i<taille/2;i++)
+ for(int i=0;i<taille/2;i++)
{
// Ordre.insert(std::make_pair(angle[i],i));
CosSin.insert(std::make_pair(std::make_pair(SIN[i],COS[i]),i));
}
else
{
- int *connIndex=_nodal_connec_index->getPointer();
- int connIndexLgth=_nodal_connec_index->getNbOfElems();
- const int *connOld=_nodal_connec->getConstPointer();
- int connOldLgth=_nodal_connec->getNbOfElems();
+ int *connIndex(_nodal_connec_index->getPointer());
+ const int *connOld(_nodal_connec->getConstPointer());
MEDCouplingAutoRefCountObjectPtr<DataArrayInt> connNew(DataArrayInt::New()),connNewI(DataArrayInt::New()); connNew->alloc(0,1); connNewI->alloc(1,1); connNewI->setIJ(0,0,0);
std::vector<bool> toBeDone(nbOfCells,false);
for(const int *iter=cellIdsToConvertBg;iter!=cellIdsToConvertEnd;iter++)
DataArrayDouble *MEDCouplingUMesh::getBoundingBoxForBBTree2DQuadratic(double arcDetEps) const
{
checkFullyDefined();
- int spaceDim(getSpaceDimension()),mDim(getMeshDimension()),nbOfCells(getNumberOfCells()),nbOfNodes(getNumberOfNodes());
- if(spaceDim!=2 || spaceDim!=2)
+ int spaceDim(getSpaceDimension()),mDim(getMeshDimension()),nbOfCells(getNumberOfCells());
+ if(spaceDim!=2 || mDim!=2)
throw INTERP_KERNEL::Exception("MEDCouplingUMesh::getBoundingBoxForBBTree2DQuadratic : This method should be applied on mesh with mesh dimension equal to 2 and space dimension also equal to 2!");
MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> ret(DataArrayDouble::New()); ret->alloc(nbOfCells,2*spaceDim);
double *bbox(ret->getPointer());
DataArrayDouble *MEDCouplingUMesh::getBoundingBoxForBBTree1DQuadratic(double arcDetEps) const
{
checkFullyDefined();
- int spaceDim(getSpaceDimension()),mDim(getMeshDimension()),nbOfCells(getNumberOfCells()),nbOfNodes(getNumberOfNodes());
- if(spaceDim!=2 || spaceDim!=2)
+ int spaceDim(getSpaceDimension()),mDim(getMeshDimension()),nbOfCells(getNumberOfCells());
+ if(spaceDim!=2 || mDim!=1)
throw INTERP_KERNEL::Exception("MEDCouplingUMesh::getBoundingBoxForBBTree1DQuadratic : This method should be applied on mesh with mesh dimension equal to 1 and space dimension also equal to 2!");
MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> ret(DataArrayDouble::New()); ret->alloc(nbOfCells,2*spaceDim);
double *bbox(ret->getPointer());