-// Copyright (C) 2017-2019 EDF R&D
+// Copyright (C) 2017-2022 CEA/DEN, EDF R&D
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
#include "vtkAdjacentVertexIterator.h"
#include "vtkIntArray.h"
+#include "vtkLongArray.h"
#include "vtkCellData.h"
#include "vtkPointData.h"
#include "vtkCylinder.h"
return 1;
}
-std::vector<int> UnWrapByDuplicatingNodes(vtkCellArray *ca, vtkIdType& offset, const MEDCoupling::DataArrayDouble *thetas)
+std::vector<mcIdType> UnWrapByDuplicatingNodes(vtkCellArray *ca, vtkIdType& offset, const MEDCoupling::DataArrayDouble *thetas)
{
- std::vector<int> ret;
+ std::vector<mcIdType> ret;
vtkIdType nbCells(ca->GetNumberOfCells());
vtkIdType *conn(ca->GetPointer());
const double *tptr(thetas->begin());
throw MZCException("Expecting unstructured one !");
MEDCoupling::MCAuto<MEDCoupling::MEDCouplingUMesh> m0(mmu->getMeshAtLevel(0));
{
- int v(0);
- MEDCoupling::MCAuto<MEDCoupling::DataArrayInt> c0s(m0->getCellIdsLyingOnNodes(&v,&v+1,false));
+ mcIdType v(0);
+ MEDCoupling::MCAuto<MEDCoupling::DataArrayIdType> c0s(m0->getCellIdsLyingOnNodes(&v,&v+1,false));
if(c0s->empty())
throw MZCException("Orphan node 0 !");
- std::vector<int> nodes0;
+ std::vector<mcIdType> nodes0;
m0->getNodeIdsOfCell(c0s->getIJ(0,0),nodes0);
MEDCoupling::MCAuto<MEDCoupling::DataArrayDouble> tmp0(c_cyl->selectByTupleIdSafe(nodes0.data(),nodes0.data()+nodes0.size()));
tmp0=tmp0->keepSelectedComponents({1});
{
MEDCoupling::MCAuto<MEDCoupling::DataArrayDouble> c_cyl_2(c_cyl->keepSelectedComponents({1}));
c_cyl_2->abs();
- MEDCoupling::MCAuto<MEDCoupling::DataArrayInt> poses(c_cyl_2->findIdsInRange(0.,eps));
+ MEDCoupling::MCAuto<MEDCoupling::DataArrayIdType> poses(c_cyl_2->findIdsInRange(0.,eps));
c_cyl->setPartOfValuesSimple3(0.,poses->begin(),poses->end(),1,2,1);
}
//
}
vtkCellArray *cb(outdata->GetPolys());
vtkIdType offset(nbNodes);
- std::vector<int> dupNodes(UnWrapByDuplicatingNodes(cb,offset,c_cyl_post));
+ std::vector<mcIdType> dupNodes(UnWrapByDuplicatingNodes(cb,offset,c_cyl_post));
//
MEDCoupling::MCAuto<MEDCoupling::DataArrayDouble> c_cyl_post2(c_cyl_post->selectByTupleId(dupNodes.data(),dupNodes.data()+dupNodes.size()));
c_cyl_post2->applyLin(1.,2*M_PI);