+DataArrayInt *MEDCouplingExtrudedMesh::giveCellsWithType(INTERP_KERNEL::NormalizedCellType type) const
+{
+ const INTERP_KERNEL::CellModel& cm=INTERP_KERNEL::CellModel::GetCellModel(type);
+ INTERP_KERNEL::NormalizedCellType revExtTyp=cm.getReverseExtrudedType();
+ MEDCouplingAutoRefCountObjectPtr<DataArrayInt> ret=DataArrayInt::New();
+ if(revExtTyp==INTERP_KERNEL::NORM_ERROR)
+ {
+ ret->alloc(0,1);
+ return ret.retn();
+ }
+ MEDCouplingAutoRefCountObjectPtr<DataArrayInt> tmp=_mesh2D->giveCellsWithType(revExtTyp);
+ int nbOfLevs=_mesh1D->getNumberOfCells();
+ int nbOfCells2D=_mesh2D->getNumberOfCells();
+ int nbOfTuples=tmp->getNumberOfTuples();
+ ret->alloc(nbOfLevs*nbOfTuples,1);
+ int *pt=ret->getPointer();
+ for(int i=0;i<nbOfLevs;i++,pt+=nbOfTuples)
+ std::transform(tmp->begin(),tmp->end(),pt,std::bind2nd(std::plus<int>(),i*nbOfCells2D));
+ MEDCouplingAutoRefCountObjectPtr<DataArrayInt> ret2=ret->renumberR(_mesh3D_ids->begin());
+ ret2->sort();
+ return ret2.retn();
+}
+
+DataArrayInt *MEDCouplingExtrudedMesh::computeNbOfNodesPerCell() const
+{
+ MEDCouplingAutoRefCountObjectPtr<DataArrayInt> ret2D=_mesh2D->computeNbOfNodesPerCell();
+ int nbOfLevs=_mesh1D->getNumberOfCells();
+ int nbOfCells2D=_mesh2D->getNumberOfCells();
+ MEDCouplingAutoRefCountObjectPtr<DataArrayInt> ret3D=DataArrayInt::New(); ret3D->alloc(nbOfLevs*nbOfCells2D,1);
+ int *pt=ret3D->getPointer();
+ for(int i=0;i<nbOfLevs;i++,pt+=nbOfCells2D)
+ std::copy(ret2D->begin(),ret2D->end(),pt);
+ ret3D->applyLin(2,0,0);
+ return ret3D->renumberR(_mesh3D_ids->begin());
+}
+
+DataArrayInt *MEDCouplingExtrudedMesh::computeNbOfFacesPerCell() const
+{
+ MEDCouplingAutoRefCountObjectPtr<DataArrayInt> ret2D=_mesh2D->computeNbOfNodesPerCell();
+ int nbOfLevs=_mesh1D->getNumberOfCells();
+ int nbOfCells2D=_mesh2D->getNumberOfCells();
+ MEDCouplingAutoRefCountObjectPtr<DataArrayInt> ret3D=DataArrayInt::New(); ret3D->alloc(nbOfLevs*nbOfCells2D,1);
+ int *pt=ret3D->getPointer();
+ for(int i=0;i<nbOfLevs;i++,pt+=nbOfCells2D)
+ std::copy(ret2D->begin(),ret2D->end(),pt);
+ ret3D->applyLin(2,2,0);
+ return ret3D->renumberR(_mesh3D_ids->begin());
+}
+
+DataArrayInt *MEDCouplingExtrudedMesh::computeEffectiveNbOfNodesPerCell() const
+{
+ return computeNbOfNodesPerCell();
+}
+