]> SALOME platform Git repositories - modules/med.git/blob - src/MEDMEM/test_MEDMEM_PolyhedronArray.cxx
Salome HOME
update after merging trhe branches CEA_V3_0_x, OCC_V3_1_0_a1_x, and the main
[modules/med.git] / src / MEDMEM / test_MEDMEM_PolyhedronArray.cxx
1 // This program test the implementation of the POLYHEDRONARRAY class. //
2
3 #include "MEDMEM_PolyhedronArray.hxx"
4
5 using namespace std;
6 using namespace MEDMEM;
7 using namespace MED_EN;
8
9 int main(void)
10 {
11   POLYHEDRONARRAY myPArray(2,11,40);
12   med_int polyhedronindex[2] = {1,7};
13   med_int facesindex[11] = {1,5,9,13,17,21,25,28,31,34,37};
14   med_int nodes[40] = {1,2,6,5,2,3,7,6,4,3,7,8,1,4,8,5,1,2,3,4,5,6,7,8,5,6,9,6,7,9,7,8,9,8,5,9,5,6,7,8};
15
16   myPArray.setPolyhedronIndex(polyhedronindex);
17   myPArray.setFacesIndex(facesindex);
18   myPArray.setNodes(nodes);
19
20   POLYHEDRONARRAY myPArray2(myPArray);
21
22   const med_int* __polyhedronindex = myPArray2.getPolyhedronIndex();
23   const med_int* __facesindex = myPArray2.getFacesIndex();
24   const med_int* __nodes = myPArray2.getNodes();
25
26   cout << "__polyhedronindex =" << endl;
27   for (int i=0; i<2; i++)
28     cout << __polyhedronindex[i] << endl;
29   cout << "__facesindex =" << endl;
30   for (int i=0; i<11; i++)
31     cout << __facesindex[i] << endl;
32   cout << "__nodes =" << endl;
33   for (int i=0; i<40; i++)
34     cout << __nodes[i] << endl;
35
36   return 0;
37 }