]> SALOME platform Git repositories - modules/med.git/blob - src/MEDMEM/test_MEDMEM_PolyhedronArray.cxx
Salome HOME
remove a reference to the $MED_ROOT_DIR in the Makefile.in wich is useless
[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 #ifdef _DEBUG_
6 #include "LocalTraceCollector.hxx"
7 #endif /* ifdef _DEBUG_*/
8
9 using namespace std;
10 using namespace MEDMEM;
11 using namespace MED_EN;
12
13 int main(void)
14 {
15 #ifdef _DEBUG_
16   LocalTraceCollector::instance();
17 #endif /* ifdef _DEBUG_*/
18
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};
23
24   myPArray.setPolyhedronIndex(polyhedronindex);
25   myPArray.setFacesIndex(facesindex);
26   myPArray.setNodes(nodes);
27
28   POLYHEDRONARRAY myPArray2(myPArray);
29
30   const med_int* __polyhedronindex = myPArray2.getPolyhedronIndex();
31   const med_int* __facesindex = myPArray2.getFacesIndex();
32   const med_int* __nodes = myPArray2.getNodes();
33
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;
43
44   return 0;
45 }