X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FMEDCoupling%2FMEDCouplingExtrudedMesh.cxx;h=27c8d6df5b7907d5300eaa9791aadec78d7950a2;hb=e1769d9778b9b8ce1c884846d4c895a6d31be112;hp=42b6544660dd878a2429ea24a8fd84b956bff71d;hpb=f1a947b32a36d8dc8e3079b25305bb50e8cb59a0;p=tools%2Fmedcoupling.git diff --git a/src/MEDCoupling/MEDCouplingExtrudedMesh.cxx b/src/MEDCoupling/MEDCouplingExtrudedMesh.cxx index 42b654466..27c8d6df5 100644 --- a/src/MEDCoupling/MEDCouplingExtrudedMesh.cxx +++ b/src/MEDCoupling/MEDCouplingExtrudedMesh.cxx @@ -96,7 +96,7 @@ try:_mesh2D(const_cast(mesh2D)),_mesh1D(MEDCouplingUMesh::Ne if(_mesh2D!=0) _mesh2D->incrRef(); computeExtrusion(mesh3D); - setName(mesh3D->getName()); + setName(mesh3D->getName().c_str()); } catch(INTERP_KERNEL::Exception& e) { @@ -284,9 +284,28 @@ DataArrayInt *MEDCouplingExtrudedMesh::computeNbOfNodesPerCell() const throw(INT int *pt=ret3D->getPointer(); for(int i=0;ibegin(),ret2D->end(),pt); + ret3D->applyLin(2,0,0); return ret3D->renumberR(_mesh3D_ids->begin()); } +DataArrayInt *MEDCouplingExtrudedMesh::computeNbOfFacesPerCell() const throw(INTERP_KERNEL::Exception) +{ + MEDCouplingAutoRefCountObjectPtr ret2D=_mesh2D->computeNbOfNodesPerCell(); + int nbOfLevs=_mesh1D->getNumberOfCells(); + int nbOfCells2D=_mesh2D->getNumberOfCells(); + MEDCouplingAutoRefCountObjectPtr ret3D=DataArrayInt::New(); ret3D->alloc(nbOfLevs*nbOfCells2D,1); + int *pt=ret3D->getPointer(); + for(int i=0;ibegin(),ret2D->end(),pt); + ret3D->applyLin(2,2,0); + return ret3D->renumberR(_mesh3D_ids->begin()); +} + +DataArrayInt *MEDCouplingExtrudedMesh::computeEffectiveNbOfNodesPerCell() const throw(INTERP_KERNEL::Exception) +{ + return computeNbOfNodesPerCell(); +} + int MEDCouplingExtrudedMesh::getNumberOfCellsWithType(INTERP_KERNEL::NormalizedCellType type) const { int ret=0; @@ -424,7 +443,7 @@ MEDCouplingUMesh *MEDCouplingExtrudedMesh::build3DUnstructuredMesh() const MEDCouplingUMesh *ret=_mesh2D->buildExtrudedMesh(_mesh1D,0); const int *renum=_mesh3D_ids->getConstPointer(); ret->renumberCells(renum,false); - ret->setName(getName()); + ret->setName(getName().c_str()); return ret; } @@ -921,7 +940,7 @@ void MEDCouplingExtrudedMesh::writeVTKLL(std::ostream& ofs, const std::string& c void MEDCouplingExtrudedMesh::reprQuickOverview(std::ostream& stream) const throw(INTERP_KERNEL::Exception) { - stream << "MEDCouplingExtrudedMesh C++ instance at " << this << "."; + stream << "MEDCouplingExtrudedMesh C++ instance at " << this << ". Name : \"" << getName() << "\"."; } std::string MEDCouplingExtrudedMesh::getVTKDataSetType() const throw(INTERP_KERNEL::Exception)