1 // This program test the implementation of the POLYHEDRONARRAY class. //
3 #include "MEDMEM_PolyhedronArray.hxx"
6 #include "LocalTraceCollector.hxx"
7 #endif /* ifdef _DEBUG_*/
10 using namespace MEDMEM;
11 using namespace MED_EN;
16 LocalTraceCollector::instance();
17 #endif /* ifdef _DEBUG_*/
19 POLYHEDRONARRAY myPArray(2,11,40);
20 med_int polyhedronindex[2] = {1,7};
21 med_int facesindex[11] = {1,5,9,13,17,21,25,28,31,34,37};
22 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};
24 myPArray.setPolyhedronIndex(polyhedronindex);
25 myPArray.setFacesIndex(facesindex);
26 myPArray.setNodes(nodes);
28 POLYHEDRONARRAY myPArray2(myPArray);
30 const med_int* __polyhedronindex = myPArray2.getPolyhedronIndex();
31 const med_int* __facesindex = myPArray2.getFacesIndex();
32 const med_int* __nodes = myPArray2.getNodes();
34 cout << "__polyhedronindex =" << endl;
35 for (int i=0; i<2; i++)
36 cout << __polyhedronindex[i] << endl;
37 cout << "__facesindex =" << endl;
38 for (int i=0; i<11; i++)
39 cout << __facesindex[i] << endl;
40 cout << "__nodes =" << endl;
41 for (int i=0; i<40; i++)
42 cout << __nodes[i] << endl;