Salome HOME
OK thanks to INV !
[modules/med.git] / src / MEDCoupling / MEDCouplingExtrudedMesh.cxx
index 5677bbe7b3a68aaa6c421301d71585a1205e5119..2e2b03870ae2999acac04524caccfaf8198bb14f 100644 (file)
@@ -284,6 +284,20 @@ DataArrayInt *MEDCouplingExtrudedMesh::computeNbOfNodesPerCell() const throw(INT
   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 throw(INTERP_KERNEL::Exception)
+{
+  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());
 }