2 #include "MEDMEM_SkyLineArray.hxx"
5 using namespace MEDMEM;
7 int main (int argc, char ** argv) {
9 int NumberOfCell = 3 ; // 1 triangle,1 quadrangle,1 triangle
10 int Size = 10 ; // 10 nodes
12 int * index = new int[NumberOfCell+1] ;
17 int * value = new int[Size] ;
30 MEDSKYLINEARRAY * myArray = new MEDSKYLINEARRAY(NumberOfCell,Size,index,value) ;
32 cout << "Show all 1 :" << endl ;
33 for (int i=1; i<NumberOfCell+1 ; i++) {
34 const int * cell = myArray->getI(i) ;
35 int numberof = myArray->getNumberOfI(i) ;
37 for (int j=0;j<numberof;j++)
38 cout << cell[j] << " " ;
41 cout << "Show all 2 :" << endl ;
42 for (int i=1; i<NumberOfCell+1 ; i++) {
44 int numberof = myArray->getNumberOfI(i) ;
45 for (int j=1;j<numberof+1;j++)
46 cout << myArray->getIJ(i,j) << " " ;
50 MEDSKYLINEARRAY * myArray2 = new MEDSKYLINEARRAY(*myArray) ;
53 cout << "Show all 3 :" << endl ;
54 const int * index2 = myArray2->getIndex() ;
55 for (int i=1; i<=NumberOfCell ; i++) {
57 for (int j=index2[i-1];j<index2[i];j++)
58 cout << myArray2->getIndexValue(j) << " " ;