From: ageay Date: Tue, 8 Mar 2011 17:11:32 +0000 (+0000) Subject: *** empty log message *** X-Git-Tag: FirstStepOK1~2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=9c455f08c84ba76e6cf367efe6f51763b626fd73;p=tools%2Fmedcoupling.git *** empty log message *** --- diff --git a/src/INTERP_KERNELTest/InterpolationOptionsTest.cxx b/src/INTERP_KERNELTest/InterpolationOptionsTest.cxx index 92281cdf3..8e03cac86 100644 --- a/src/INTERP_KERNELTest/InterpolationOptionsTest.cxx +++ b/src/INTERP_KERNELTest/InterpolationOptionsTest.cxx @@ -54,12 +54,12 @@ namespace INTERP_TEST const MEDMEM::SUPPORT *source_support=source_mesh->getSupportOnAll(MED_EN::MED_CELL); MEDMEM::FIELD *source_field=new FIELD(source_support,1); double* value=const_cast(source_field->getValue()); - for (int i=0; igetNumberOfElements(MED_EN::MED_ALL_ELEMENTS); i++) + for (int i=0; igetNumberOfElements(MED_EN::MEDMEM_ALL_ELEMENTS); i++) value[i]=1.0; const MEDMEM::SUPPORT *target_support=target_mesh->getSupportOnAll(MED_EN::MED_CELL); MEDMEM::FIELD *target_field=new FIELD(target_support,1); double* targetvalue=const_cast(target_field->getValue()); - for (int i=0; igetNumberOfElements(MED_EN::MED_ALL_ELEMENTS); i++) + for (int i=0; igetNumberOfElements(MED_EN::MEDMEM_ALL_ELEMENTS); i++) targetvalue[i]=0.0; // Ok at this point we have our mesh in MED-Memory format. // Go to wrap med_source_mesh and med_target_mesh. diff --git a/src/INTERP_KERNELTest/MEDMeshMaker.cxx b/src/INTERP_KERNELTest/MEDMeshMaker.cxx index c7eef5907..4f9df9e0a 100644 --- a/src/INTERP_KERNELTest/MEDMeshMaker.cxx +++ b/src/INTERP_KERNELTest/MEDMeshMaker.cxx @@ -17,27 +17,28 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // +#include "MEDMeshMaker.hxx" + #include "MEDMEM_Mesh.hxx" #include "MEDMEM_Meshing.hxx" MEDMEM::MESH* MEDMeshMaker(int dim, int nbedge, MED_EN::medGeometryElement type) { MEDMEM::MESHING* mesh=new MEDMEM::MESHING(); - mesh->setSpaceDimension(dim); int nbnodes; int nbelems; switch (dim) { case 2: nbnodes=(nbedge+1)*(nbedge+1); - if(type==MED_EN::MED_QUAD4) + if(type==MED_EN::MEDMEM_QUAD4) nbelems=(nbedge*nbedge); else throw MEDMEM::MEDEXCEPTION("MEDMeshMaker: type not impletmented"); break; case 3: nbnodes=(nbedge+1)*(nbedge+1)*(nbedge+1); - if (type==MED_EN::MED_HEXA8) + if (type==MED_EN::MEDMEM_HEXA8) nbelems= nbedge*nbedge*nbedge; else throw MEDMEM::MEDEXCEPTION("MEDMeshMaker: type not impletmented"); @@ -94,8 +95,7 @@ MEDMEM::MESH* MEDMeshMaker(int dim, int nbedge, MED_EN::medGeometryElement type) conn [ielem*8+7]=ix*(nbedge+1)*(nbedge+1)+(iy+1)*(nbedge+1)+iz+1+1; } } - mesh->setConnectivity(conn, MED_EN::MED_CELL,type); + mesh->setConnectivity(MED_EN::MED_CELL,type,conn); delete [] conn; - mesh->setMeshDimension(dim); return mesh; } diff --git a/src/INTERP_KERNELTest/MeshTestToolkit.txx b/src/INTERP_KERNELTest/MeshTestToolkit.txx index abbac662a..33523aa3a 100644 --- a/src/INTERP_KERNELTest/MeshTestToolkit.txx +++ b/src/INTERP_KERNELTest/MeshTestToolkit.txx @@ -119,7 +119,7 @@ namespace INTERP_TEST break; } const double *tabS = f->getValue(); - std::copy(tabS,tabS+mesh.getNumberOfElements(MED_CELL,MED_ALL_ELEMENTS),tab); + std::copy(tabS,tabS+mesh.getNumberOfElements(MED_CELL,MEDMEM_ALL_ELEMENTS),tab); f->removeReference(); } @@ -168,10 +168,10 @@ namespace INTERP_TEST bool ok = true; // source elements - double* sVol = new double[sMesh.getNumberOfElements(MED_CELL,MED_ALL_ELEMENTS)]; + double* sVol = new double[sMesh.getNumberOfElements(MED_CELL,MEDMEM_ALL_ELEMENTS)]; getVolumes(sMesh, sVol); - for(int i = 0; i < sMesh.getNumberOfElements(MED_CELL,MED_ALL_ELEMENTS); ++i) + for(int i = 0; i < sMesh.getNumberOfElements(MED_CELL,MEDMEM_ALL_ELEMENTS); ++i) { const double sum_row = sumRow(m, i+1); if(!epsilonEqualRelative(sum_row, fabs(sVol[i]), _precision)) @@ -183,9 +183,9 @@ namespace INTERP_TEST } // target elements - double* tVol = new double[tMesh.getNumberOfElements(MED_CELL,MED_ALL_ELEMENTS)]; + double* tVol = new double[tMesh.getNumberOfElements(MED_CELL,MEDMEM_ALL_ELEMENTS)]; getVolumes(tMesh, tVol); - for(int i = 0; i < tMesh.getNumberOfElements(MED_CELL,MED_ALL_ELEMENTS); ++i) + for(int i = 0; i < tMesh.getNumberOfElements(MED_CELL,MEDMEM_ALL_ELEMENTS); ++i) { const double sum_col = sumCol(m, i); if(!epsilonEqualRelative(sum_col,fabs(tVol[i]), _precision)) diff --git a/src/INTERP_KERNELTest/PointLocatorTest.cxx b/src/INTERP_KERNELTest/PointLocatorTest.cxx index 8cdc16274..c63f54d8c 100644 --- a/src/INTERP_KERNELTest/PointLocatorTest.cxx +++ b/src/INTERP_KERNELTest/PointLocatorTest.cxx @@ -47,7 +47,7 @@ namespace INTERP_TEST * a bbox overlapping the bboxes of the tree */ void PointLocatorTest::test_PointLocator() { - MEDMEM::MESH* mesh2D= MEDMeshMaker(2,2,MED_EN::MED_QUAD4); + MEDMEM::MESH* mesh2D= MEDMeshMaker(2,2,MED_EN::MEDMEM_QUAD4); MEDMEM::PointLocator pl(*mesh2D) ; double x[2]={0.0,0.0}; std::list elems = pl.locate(x); @@ -72,7 +72,7 @@ namespace INTERP_TEST elems.clear(); delete mesh2D; - MEDMEM::MESH* mesh3D= MEDMeshMaker(3,2,MED_EN::MED_HEXA8); + MEDMEM::MESH* mesh3D= MEDMeshMaker(3,2,MED_EN::MEDMEM_HEXA8); MEDMEM::PointLocator pl3(*mesh3D); double xx[3]={0.0,0.0,0.0}; elems = pl3.locate(xx); @@ -108,7 +108,7 @@ namespace INTERP_TEST */ void PointLocatorTest::test_PointLocatorInSimplex() { - MEDMEM::MESH* mesh2D= MEDMeshMaker(2,2,MED_EN::MED_QUAD4); + MEDMEM::MESH* mesh2D= MEDMeshMaker(2,2,MED_EN::MEDMEM_QUAD4); // mesh is a quadrangle (0.0-1.0 x 0.0-1.0 ) // 3 -- 6 -- 9 // | | | @@ -160,7 +160,7 @@ namespace INTERP_TEST CPPUNIT_ASSERT_EQUAL(0,(int)elems.size()); delete mesh2D; } - MEDMEM::MESH* mesh3D= MEDMeshMaker(3,2,MED_EN::MED_HEXA8); + MEDMEM::MESH* mesh3D= MEDMeshMaker(3,2,MED_EN::MEDMEM_HEXA8); // ^Z // | // 3 -- 6 -- 9