myElementConnectivity);
\end{verbatim}
-%%%%%%%%%%% WITH POLY METHODS %%%%%%%%%%%%
-
-\item The listed above methods do not take into account information about
- \verb+polygonal+ and \verb+polyhedral+ cells contained in a MESH object. To get
- full information about cell types, use the same methods with
- \verb+WithPoly+ postfix:
-\begin{itemize}
-\item use \method{getNumberOfTypesWithPoly} to get the number of
- geometric types for a mesh entity;
-\item use \method{getTypesWithPoly} to get all geometric types for a mesh entity;
-\item use \method{getNumberOfElementsWithPoly} to get the number of cells;
-\item use \method{getElementTypeWithPoly} to get the geometric type of
- one element.
-\end{itemize}
-There are separate methods to get number of polygons and polyhedrons:
-\method{getNumberOfPolygons} and \method{getNumberOfPolyhedron}
-
-To get connectivity of polygonal elements, use \method{getPolygonsConnectivity} along with
-\method{getPolygonsConnectivityIndex} (see example \myref{MESHconnectivities.cxx}).
-
-To get nodal connectivity of polyhedral elements, it is necessary use together
-3 methods: \method{getPolyhedronConnectivity}, \method{getPolyhedronFacesIndex}
-and \method{getPolyhedronIndex} (see example \myref{MESHconnectivities.cxx}).
-
\end{enumerate}
Here is a small C++ example program which the Python version may be found in
\item \method{setNumberOfElements} to set the number of elements for
each geometric type. This method allocates connectivities array ;
\item \method{setConnectivity} to set the connectivity in MED\_FULL\_INTERLACE
-mode for each geometric type (use \method{setPolygonsConnectivity} and
-\method{setPolyhedraConnectivity} for poly elements);
+mode for each geometric type;
\end{itemize}
\textbf{C++ Example~:}
void changeConnectivity(MESH& mesh, const medGeometryElement& Type, const int& nb_cell, const vector<int>& iperm)
{
-// if(Type==MED_POLYHEDRA)
-// {
-// int *conn_face_index_init=(int*)mesh.getPolyhedronFacesIndex();
-// int *conn_index_init=(int*)mesh.getPolyhedronIndex(MED_FULL_INTERLACE);
-// int *conn_init=(int*)mesh.getPolyhedronConnectivity(MED_FULL_INTERLACE);
-
-// int *conn_index_renum=new int[nb_cell+1];
-// int *conn_face_index_renum=new int[conn_index_init[nb_cell]];
-// int *conn_renum=new int[conn_face_index_init[conn_index_init[nb_cell]-1]-1];
-
-// int i_cell,i_face,i_conn;
-// int iter_face=0;
-// int iter_conn=0;
-// int i2;
-// conn_index_renum[0]=1;
-// conn_face_index_renum[0]=1;
-// for(i_cell=0;i_cell<nb_cell;++i_cell)
-// {
-// i2=iperm[i_cell]-1;
-// for(i_face=conn_index_init[i2]-1;i_face<conn_index_init[i2+1]-1;++i_face)
-// {
-// for(i_conn=conn_face_index_init[i_face]-1;i_conn<conn_face_index_init[i_face+1]-1;++i_conn)
-// {
-// conn_renum[iter_conn]=conn_init[i_conn];
-// ++iter_conn;
-// }
-// conn_face_index_renum[iter_face+1]=iter_conn+1;
-// ++iter_face;
-// }
-// conn_index_renum[i_cell+1]=iter_face+1;
-// }
-// memcpy(conn_face_index_init,conn_face_index_renum,sizeof(int)*conn_index_init[nb_cell]);
-// memcpy(conn_index_init,conn_index_renum,sizeof(int)*(nb_cell+1));
-// memcpy(conn_init,conn_renum, sizeof(int)*(conn_face_index_init[conn_index_init[nb_cell]-1]-1));
-
-// delete[] conn_index_renum;
-// delete[] conn_face_index_renum;
-// delete[] conn_renum;
-// }
-// else if (Type==MED_POLYGON)
-// {
-// int *conn_init=(int*)mesh.getPolygonsConnectivity(MED_FULL_INTERLACE,MED_CELL);
-// int *conn_index_init=(int*)mesh.getPolygonsConnectivityIndex(MED_FULL_INTERLACE,MED_CELL);
-// int *conn_index_renum=new int[nb_cell+1];
-// int *conn_renum=new int[conn_index_init[nb_cell]-1];
-
-// int iter=0;
-// int i2;
-// conn_index_renum[0]=1;
-// for(int i=0;i<nb_cell;++i)
-// {
-// i2=iperm[i]-1;
-// for(int k=conn_index_init[i2];k<conn_index_init[i2+1];++k)
-// {
-// conn_renum[iter]=conn_init[k-1];
-// ++iter;
-// }
-// conn_index_renum[i+1]=iter+1;
-// }
-// memcpy(conn_index_init,conn_index_renum,sizeof(int)*(nb_cell+1));
-// memcpy(conn_init,conn_renum, sizeof(int)*(conn_index_init[nb_cell]-1));
-
-// delete[] conn_renum;
-// delete[] conn_index_renum;
-// }
-// else
{
const int *conn_init=mesh.getConnectivity(MED_NODAL,MED_CELL,Type);
const int *conn_index_init=mesh.getConnectivityIndex(MED_NODAL,MED_CELL);