-/*!
- * See MEDCouplingUMesh::getDistributionOfTypes for more information
- */
-std::vector<int> MEDCouplingCMesh::getDistributionOfTypes() const throw(INTERP_KERNEL::Exception)
-{
- //only one type of cell
- std::vector<int> ret(3);
- ret[0]=getTypeOfCell(0);
- ret[1]=getNumberOfCells();
- ret[2]=0; //ret[3*k+2]==0 because it has no sense here
- return ret;
-}
-
-/*!
- * See MEDCouplingUMesh::checkTypeConsistencyAndContig for more information
- */
-DataArrayInt *MEDCouplingCMesh::checkTypeConsistencyAndContig(const std::vector<int>& code, const std::vector<const DataArrayInt *>& idsPerType) const throw(INTERP_KERNEL::Exception)
-{
- if(code.empty())
- throw INTERP_KERNEL::Exception("MEDCouplingCMesh::checkTypeConsistencyAndContig : code is empty, should not !");
- std::size_t sz=code.size();
- if(sz!=3)
- throw INTERP_KERNEL::Exception("MEDCouplingCMesh::checkTypeConsistencyAndContig : code should be of size 3 exactly !");
-
- int nbCells=getNumberOfCellsWithType((INTERP_KERNEL::NormalizedCellType)code[0]);
- if(code[2]==-1)
- {
- if(code[1]==nbCells)
- return 0;
- else
- throw INTERP_KERNEL::Exception("MEDCouplingCMesh::checkTypeConsistencyAndContig : number of cells mismatch !");
- }
- else
- {
- if(code[2]<-1)
- throw INTERP_KERNEL::Exception("MEDCouplingCMesh::checkTypeConsistencyAndContig : code[2]<-1 mismatch !");
- if(code[2]>=(int)idsPerType.size())
- throw INTERP_KERNEL::Exception("MEDCouplingCMesh::checkTypeConsistencyAndContig : code[2]>size idsPerType !");
- return idsPerType[code[2]]->deepCpy();
- }
-}
-
-/*!
- * See MEDCouplingUMesh::splitProfilePerType for more information
- */
-void MEDCouplingCMesh::splitProfilePerType(const DataArrayInt *profile, std::vector<int>& code, std::vector<DataArrayInt *>& idsInPflPerType, std::vector<DataArrayInt *>& idsPerType) const throw(INTERP_KERNEL::Exception)
-{
- int nbCells=getNumberOfCells();
- code.resize(3);
- code[0]=(int)getTypeOfCell(0);
- code[1]=nbCells;
- code[2]=0;
- idsInPflPerType.push_back(profile->deepCpy());
- idsPerType.push_back(profile->deepCpy());
-}
-
-MEDCouplingUMesh *MEDCouplingCMesh::buildUnstructured() const throw(INTERP_KERNEL::Exception)
-{
- int spaceDim=getSpaceDimension();
- MEDCouplingUMesh *ret=MEDCouplingUMesh::New(getName(),spaceDim);
- DataArrayDouble *coords=getCoordinatesAndOwner();
- ret->setCoords(coords);
- coords->decrRef();
- switch(spaceDim)
- {
- case 1:
- fill1DUnstructuredMesh(ret);
- break;
- case 2:
- fill2DUnstructuredMesh(ret);
- break;
- case 3:
- fill3DUnstructuredMesh(ret);
- break;
- default:
- throw INTERP_KERNEL::Exception("MEDCouplingCMesh::buildUnstructured : big problem spacedim must be in 1,2 or 3 !");
- };
- return ret;
-}
-
-MEDCouplingMesh *MEDCouplingCMesh::buildPart(const int *start, const int *end) const
-{
- MEDCouplingUMesh *um=buildUnstructured();
- MEDCouplingMesh *ret=um->buildPart(start,end);
- um->decrRef();
- return ret;
-}
-
-MEDCouplingMesh *MEDCouplingCMesh::buildPartAndReduceNodes(const int *start, const int *end, DataArrayInt*& arr) const
-{
- MEDCouplingUMesh *um=buildUnstructured();
- MEDCouplingMesh *ret=um->buildPartAndReduceNodes(start,end,arr);
- um->decrRef();
- return ret;
-}
-
-DataArrayInt *MEDCouplingCMesh::simplexize(int policy) throw(INTERP_KERNEL::Exception)
-{
- throw INTERP_KERNEL::Exception("MEDCouplingCMesh::simplexize : not available for Cartesian mesh !");
-}
-