From 01131c0668a959755c2f41e128ca713bc488b4f9 Mon Sep 17 00:00:00 2001 From: eap Date: Fri, 21 Jan 2011 13:53:42 +0000 Subject: [PATCH] 0021100: [CEA 438] Porting of MEDMEM on MEDfile3 alpha2 --- doc/MEDMEM/FIELDcreate.cxx | 2 +- doc/MEDMEM/FIELDcreate.py | 2 +- doc/MEDMEM/FIELDgeneral.cxx | 2 +- doc/MEDMEM/FIELDgeneral.py | 2 +- doc/MEDMEM/MEDMEM_Content.tex.in | 54 +++++++++---------- doc/MEDMEM/MEDMEM_UsersGuide.lyx | 8 +-- doc/MEDMEM/MESHINGexample.cxx | 26 ++++----- doc/MEDMEM/MESHINGexample.py | 26 ++++----- doc/MEDMEM/MESHconnectivities.cxx | 8 +-- doc/MEDMEM/MESHconnectivities.py | 8 +-- doc/doxygen/medmem.dox | 38 ++++++------- doc/doxygen/mesh.dox | 8 +-- doc/doxygen/meshing.dox | 2 +- doc/doxygen/polygon.dox | 6 +-- src/INTERP_KERNELTest/Interpolation3DTest.cxx | 10 ++-- .../InterpolationOptionsTest.cxx | 4 +- src/INTERP_KERNELTest/MEDMeshMaker.cxx | 4 +- src/INTERP_KERNELTest/MeshTestToolkit.txx | 10 ++-- src/INTERP_KERNELTest/PointLocatorTest.cxx | 4 +- src/INTERP_KERNELTest/RemapperTest.cxx | 4 +- src/INTERP_KERNELTest/TestingUtils.hxx | 4 +- src/ParaMEDMEM/NonCoincidentDEC.cxx | 24 ++++----- .../ParaMEDMEMTest_NonCoincidentDEC.cxx | 4 +- src/ParaMEDMEM_Swig/test_NonCoincidentDEC.py | 4 +- src/RENUMBER/renumbering.cxx | 4 +- src/RENUMBER/testRenumbering.py | 24 ++++----- 26 files changed, 146 insertions(+), 146 deletions(-) diff --git a/doc/MEDMEM/FIELDcreate.cxx b/doc/MEDMEM/FIELDcreate.cxx index 30451bab7..a579b80a7 100644 --- a/doc/MEDMEM/FIELDcreate.cxx +++ b/doc/MEDMEM/FIELDcreate.cxx @@ -74,7 +74,7 @@ int main (int argc, char ** argv) { myField.setTime(Time) ; // Value : - int NumberOfValue = mySupport->getNumberOfElements(MED_ALL_ELEMENTS); + int NumberOfValue = mySupport->getNumberOfElements(MEDMEM_ALL_ELEMENTS); for(int i=1; i<=NumberOfValue; i++) // i^th element for (int j=1; j<=NumberOfCompoennts; j++) { // j^th component double myValue = (i+j) * 0.1 ; diff --git a/doc/MEDMEM/FIELDcreate.py b/doc/MEDMEM/FIELDcreate.py index 0eb5801d7..c2dc59c37 100644 --- a/doc/MEDMEM/FIELDcreate.py +++ b/doc/MEDMEM/FIELDcreate.py @@ -66,7 +66,7 @@ myField.setOrderNumber(orderNumber) time = 3.435678 myField.setTime(time) -numberOfValue = mySupport.getNumberOfElements(MED_ALL_ELEMENTS) +numberOfValue = mySupport.getNumberOfElements(MEDMEM_ALL_ELEMENTS) for i in range(numberOfValue): ip1 = i+1 diff --git a/doc/MEDMEM/FIELDgeneral.cxx b/doc/MEDMEM/FIELDgeneral.cxx index 06bf41a89..0b9178de4 100644 --- a/doc/MEDMEM/FIELDgeneral.cxx +++ b/doc/MEDMEM/FIELDgeneral.cxx @@ -68,7 +68,7 @@ int main (int argc, char ** argv) { " (and order number " << OrderNumber << ")" << endl ; // How many Value : - int NumberOfValue = mySupport->getNumberOfElements(MED_ALL_ELEMENTS); + int NumberOfValue = mySupport->getNumberOfElements(MEDMEM_ALL_ELEMENTS); // Value const double * Value = myField.getValue(); for(int i=0; isetNumberOfTypes(NumberOfTypes,MED_CELL); @@ -99,7 +99,7 @@ int main (int argc, char ** argv) { 2,10,6,9 }; - myMeshing->setConnectivity(MED_CELL,MED_TETRA4,ConnectivityTetra); + myMeshing->setConnectivity(MED_CELL,MEDMEM_TETRA4,ConnectivityTetra); int ConnectivityPyra[2*5]= { @@ -107,7 +107,7 @@ int main (int argc, char ** argv) { 15,18,17,16,19 }; - myMeshing->setConnectivity(MED_CELL,MED_PYRA5,ConnectivityPyra); + myMeshing->setConnectivity(MED_CELL,MEDMEM_PYRA5,ConnectivityPyra); int ConnectivityHexa[2*8]= { @@ -115,12 +115,12 @@ int main (int argc, char ** argv) { 15,16,17,18,11,12,13,14 }; - myMeshing->setConnectivity(MED_CELL,MED_HEXA8,ConnectivityHexa); + myMeshing->setConnectivity(MED_CELL,MEDMEM_HEXA8,ConnectivityHexa); // face part const int NumberOfFacesTypes = 2 ; - medGeometryElement FacesTypes[NumberOfFacesTypes] = {MED_TRIA3,MED_QUAD4} ; + medGeometryElement FacesTypes[NumberOfFacesTypes] = {MEDMEM_TRIA3,MEDMEM_QUAD4} ; const int NumberOfFacesElements[NumberOfFacesTypes] = {4,4} ; myMeshing->setNumberOfTypes(NumberOfFacesTypes,MED_FACE); @@ -136,7 +136,7 @@ int main (int argc, char ** argv) { 1,3,6 }; - myMeshing->setConnectivity(MED_FACE,MED_TRIA3,ConnectivityTria); + myMeshing->setConnectivity(MED_FACE,MEDMEM_TRIA3,ConnectivityTria); int ConnectivityQua[4*4]= { @@ -146,7 +146,7 @@ int main (int argc, char ** argv) { 12,8,9,13 }; - myMeshing->setConnectivity(MED_FACE,MED_QUAD4,ConnectivityQua); + myMeshing->setConnectivity(MED_FACE,MEDMEM_QUAD4,ConnectivityQua); // edge part @@ -161,7 +161,7 @@ int main (int argc, char ** argv) { myGroup->setMesh(myMeshing); myGroup->setEntity(MED_NODE); myGroup->setNumberOfGeometricType(1); - medGeometryElement myTypes[1] = {MED_NONE}; + medGeometryElement myTypes[1] = {MEDMEM_NONE}; myGroup->setGeometricType(myTypes); const int myNumberOfElements[1] = {4} ; myGroup->setNumberOfElements(myNumberOfElements); @@ -178,7 +178,7 @@ int main (int argc, char ** argv) { myGroup->setMesh(myMeshing); myGroup->setEntity(MED_NODE); myGroup->setNumberOfGeometricType(1); - medGeometryElement myTypes[1] = {MED_NONE}; + medGeometryElement myTypes[1] = {MEDMEM_NONE}; myGroup->setGeometricType(myTypes); const int myNumberOfElements[1] = {3} ; myGroup->setNumberOfElements(myNumberOfElements); @@ -197,7 +197,7 @@ int main (int argc, char ** argv) { myGroup->setMesh(myMeshing); myGroup->setEntity(MED_CELL); myGroup->setNumberOfGeometricType(3); - medGeometryElement myTypes[3] = {MED_TETRA4,MED_PYRA5,MED_HEXA8}; + medGeometryElement myTypes[3] = {MEDMEM_TETRA4,MEDMEM_PYRA5,MEDMEM_HEXA8}; myGroup->setGeometricType(myTypes); const int myNumberOfElements[3] = {4,1,2} ; myGroup->setNumberOfElements(myNumberOfElements); @@ -219,7 +219,7 @@ int main (int argc, char ** argv) { myGroup->setMesh(myMeshing); myGroup->setEntity(MED_CELL); myGroup->setNumberOfGeometricType(2); - medGeometryElement myTypes[] = {MED_TETRA4,MED_PYRA5}; + medGeometryElement myTypes[] = {MEDMEM_TETRA4,MEDMEM_PYRA5}; myGroup->setGeometricType(myTypes); const int myNumberOfElements[] = {4,1} ; myGroup->setNumberOfElements(myNumberOfElements); @@ -242,7 +242,7 @@ int main (int argc, char ** argv) { myGroup->setMesh(myMeshing); myGroup->setEntity(MED_FACE); myGroup->setNumberOfGeometricType(2); - medGeometryElement myTypes[2] = {MED_TRIA3,MED_QUAD4}; + medGeometryElement myTypes[2] = {MEDMEM_TRIA3,MEDMEM_QUAD4}; myGroup->setGeometricType(myTypes); const int myNumberOfElements[2] = {2,3} ; myGroup->setNumberOfElements(myNumberOfElements); @@ -263,7 +263,7 @@ int main (int argc, char ** argv) { myGroup->setMesh(myMeshing); myGroup->setEntity(MED_FACE); myGroup->setNumberOfGeometricType(1); - medGeometryElement myTypes[1] = {MED_TRIA3}; + medGeometryElement myTypes[1] = {MEDMEM_TRIA3}; myGroup->setGeometricType(myTypes); const int myNumberOfElements[1] = {2} ; myGroup->setNumberOfElements(myNumberOfElements); diff --git a/doc/MEDMEM/MESHINGexample.py b/doc/MEDMEM/MESHINGexample.py index dd18d2ff9..a05a00319 100644 --- a/doc/MEDMEM/MESHINGexample.py +++ b/doc/MEDMEM/MESHINGexample.py @@ -93,13 +93,13 @@ entity = MED_CELL types = [] numberOfElements = [] -types.append(MED_TETRA4) +types.append(MEDMEM_TETRA4) numberOfElements.append(12) -types.append(MED_PYRA5) +types.append(MEDMEM_PYRA5) numberOfElements.append(2) -types.append(MED_HEXA8) +types.append(MEDMEM_HEXA8) numberOfElements.append(2) myMeshing.setNumberOfTypes(numberOfTypes,entity) @@ -142,10 +142,10 @@ entity = MED_FACE types = [] numberOfElements = [] -types.append(MED_TRIA3) +types.append(MEDMEM_TRIA3) numberOfElements.append(4) -types.append(MED_QUAD4) +types.append(MEDMEM_QUAD4) numberOfElements.append(4) myMeshing.setNumberOfTypes(numberOfTypes,entity) @@ -179,7 +179,7 @@ myGroup.setMesh(myMeshing) myGroup.setEntity(MED_NODE) myGroup.setNumberOfGeometricType(1) -myTypes = [MED_NONE] +myTypes = [MEDMEM_NONE] myGroup.setGeometricType(myTypes) myNumberOfElements = [4] @@ -197,7 +197,7 @@ myGroup.setMesh(myMeshing) myGroup.setEntity(MED_NODE) myGroup.setNumberOfGeometricType(1) -myTypes = [MED_NONE] +myTypes = [MEDMEM_NONE] myGroup.setGeometricType(myTypes) myNumberOfElements = [3] @@ -217,7 +217,7 @@ myGroup.setMesh(myMeshing) myGroup.setEntity(MED_CELL) myGroup.setNumberOfGeometricType(3) -myTypes = [MED_TETRA4,MED_PYRA5,MED_HEXA8] +myTypes = [MEDMEM_TETRA4,MEDMEM_PYRA5,MEDMEM_HEXA8] myGroup.setGeometricType(myTypes) myNumberOfElements = [4,1,2] @@ -239,7 +239,7 @@ myGroup.setMesh(myMeshing) myGroup.setEntity(MED_CELL) myGroup.setNumberOfGeometricType(2) -myTypes = [MED_TETRA4,MED_PYRA5] +myTypes = [MEDMEM_TETRA4,MEDMEM_PYRA5] myGroup.setGeometricType(myTypes) myNumberOfElements = [4,1] @@ -262,7 +262,7 @@ myGroup.setMesh(myMeshing) myGroup.setEntity(MED_FACE) myGroup.setNumberOfGeometricType(2) -myTypes = [MED_TRIA3,MED_QUAD4] +myTypes = [MEDMEM_TRIA3,MEDMEM_QUAD4] myGroup.setGeometricType(myTypes) myNumberOfElements = [2,3] @@ -283,7 +283,7 @@ myGroup.setMesh(myMeshing) myGroup.setEntity(MED_FACE) myGroup.setNumberOfGeometricType(1) -myTypes = [MED_TRIA3] +myTypes = [MEDMEM_TRIA3] myGroup.setGeometricType(myTypes) myNumberOfElements = [2] @@ -308,10 +308,10 @@ myMeshing.write(VTK_DRIVER,vtkFileName) # 1 scalar (vector) supportOnNodes = SUPPORT(myMeshing,"On_All_Nodes",MED_NODE) -numberOfNodes = supportOnNodes.getNumberOfElements(MED_ALL_ELEMENTS) +numberOfNodes = supportOnNodes.getNumberOfElements(MEDMEM_ALL_ELEMENTS) supportOnCells = SUPPORT(myMeshing,"On_All_Cells",MED_CELL) -numberOfCells = supportOnCells.getNumberOfElements(MED_ALL_ELEMENTS) +numberOfCells = supportOnCells.getNumberOfElements(MEDMEM_ALL_ELEMENTS) fieldDoubleScalarOnNodes = FIELDDOUBLE(supportOnNodes,1) fieldDoubleScalarOnNodes.setName("fieldScalarDoubleNode") diff --git a/doc/MEDMEM/MESHconnectivities.cxx b/doc/MEDMEM/MESHconnectivities.cxx index 5e34bccf4..8edffe2a2 100644 --- a/doc/MEDMEM/MESHconnectivities.cxx +++ b/doc/MEDMEM/MESHconnectivities.cxx @@ -75,9 +75,9 @@ int main (int argc, char ** argv) cout << "Show Connectivity (Descending) :" << endl ; // this example use global access with index array - int NumberOfElements = myMesh.getNumberOfElements(MED_CELL,MED_ALL_ELEMENTS); + int NumberOfElements = myMesh.getNumberOfElements(MED_CELL,MEDMEM_ALL_ELEMENTS); const int * DescendingConnectivity = - myMesh.getConnectivity(MED_DESCENDING,MED_CELL,MED_ALL_ELEMENTS); + myMesh.getConnectivity(MED_DESCENDING,MED_CELL,MEDMEM_ALL_ELEMENTS); const int * DescendingConnectivityIndex = myMesh.getConnectivityIndex(MED_DESCENDING,MED_CELL); for (int i=0; i* f=mesh.getVolume(sup); 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) delete sup; } @@ -107,10 +107,10 @@ bool Interpolation3DTest::testVolumes(const IntersectionMatrix& m, MESH& sMesh, 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, sVol[i], VOL_PREC)) @@ -122,9 +122,9 @@ bool Interpolation3DTest::testVolumes(const IntersectionMatrix& m, MESH& sMesh, } // 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, tVol[i], VOL_PREC)) diff --git a/src/INTERP_KERNELTest/InterpolationOptionsTest.cxx b/src/INTERP_KERNELTest/InterpolationOptionsTest.cxx index 4db3c7b2f..5314228d0 100644 --- a/src/INTERP_KERNELTest/InterpolationOptionsTest.cxx +++ b/src/INTERP_KERNELTest/InterpolationOptionsTest.cxx @@ -55,13 +55,13 @@ namespace INTERP_TEST MEDMEM::SUPPORT *source_support=new SUPPORT(source_mesh,"on All support"); 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; source_support->removeReference(); MEDMEM::SUPPORT *target_support=new MEDMEM::SUPPORT(target_mesh,"on All support"); 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; target_support->removeReference(); // Ok at this point we have our mesh in MED-Memory format. diff --git a/src/INTERP_KERNELTest/MEDMeshMaker.cxx b/src/INTERP_KERNELTest/MEDMeshMaker.cxx index df0926bdb..4f9df9e0a 100644 --- a/src/INTERP_KERNELTest/MEDMeshMaker.cxx +++ b/src/INTERP_KERNELTest/MEDMeshMaker.cxx @@ -31,14 +31,14 @@ MEDMEM::MESH* MEDMeshMaker(int dim, int nbedge, MED_EN::medGeometryElement type) { 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"); diff --git a/src/INTERP_KERNELTest/MeshTestToolkit.txx b/src/INTERP_KERNELTest/MeshTestToolkit.txx index 3c7e2c997..267ce5935 100644 --- a/src/INTERP_KERNELTest/MeshTestToolkit.txx +++ b/src/INTERP_KERNELTest/MeshTestToolkit.txx @@ -122,7 +122,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); sup->removeReference(); f->removeReference(); } @@ -173,10 +173,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)) @@ -188,9 +188,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 7262908c3..d2bf2243a 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); diff --git a/src/INTERP_KERNELTest/RemapperTest.cxx b/src/INTERP_KERNELTest/RemapperTest.cxx index d2876d9a6..eba2c35ef 100644 --- a/src/INTERP_KERNELTest/RemapperTest.cxx +++ b/src/INTERP_KERNELTest/RemapperTest.cxx @@ -55,13 +55,13 @@ namespace INTERP_TEST MEDMEM::SUPPORT source_support(&source_mesh,"on All support"); MEDMEM::FIELD source_field(&source_support,1); double* value=const_cast(source_field.getValue()); - for (int i=0; i target_field(&target_support,1); double* targetvalue=const_cast(target_field.getValue()); - for (int i=0; igetNumberOfElements(MED_EN::MED_CELL,MED_EN::MED_ALL_ELEMENTS); + int nbcells = mesh->getNumberOfElements(MED_EN::MED_CELL,MED_EN::MEDMEM_ALL_ELEMENTS); const MEDMEM::SUPPORT* support=_local_field->getField()->getSupport(); MEDMEM::FIELD* barycenter_coords = mesh->getBarycenter(support); const double* coords = barycenter_coords->getValue(); @@ -346,7 +346,7 @@ namespace ParaMEDMEM */ void NonCoincidentDEC::recvData() { - int nbelems = _local_field->getField()->getSupport()->getMesh()->getNumberOfElements(MED_EN::MED_CELL, MED_EN::MED_ALL_ELEMENTS); + int nbelems = _local_field->getField()->getSupport()->getMesh()->getNumberOfElements(MED_EN::MED_CELL, MED_EN::MEDMEM_ALL_ELEMENTS); int nbcomp = _local_field->getField()->getNumberOfComponents(); double* values = new double [nbelems*nbcomp]; fvm_locator_exchange_point_var(_locator, diff --git a/src/ParaMEDMEMTest/ParaMEDMEMTest_NonCoincidentDEC.cxx b/src/ParaMEDMEMTest/ParaMEDMEMTest_NonCoincidentDEC.cxx index 8911fba39..fd1226747 100644 --- a/src/ParaMEDMEMTest/ParaMEDMEMTest_NonCoincidentDEC.cxx +++ b/src/ParaMEDMEMTest/ParaMEDMEMTest_NonCoincidentDEC.cxx @@ -162,7 +162,7 @@ void ParaMEDMEMTest::testNonCoincidentDEC(const string& filename1, parafield = new ParaFIELD(parasupport, comptopo); - int nb_local=support->getNumberOfElements(MED_EN::MED_ALL_ELEMENTS); + int nb_local=support->getNumberOfElements(MED_EN::MEDMEM_ALL_ELEMENTS); double * value= new double[nb_local]; for(int ielem=0; ielemgetNumberOfElements(MED_EN::MED_ALL_ELEMENTS); + int nb_local=support->getNumberOfElements(MED_EN::MEDMEM_ALL_ELEMENTS); double * value= new double[nb_local]; for(int ielem=0; ielemcalculateFullDescendingConnectivity(MED_CELL); const int* rev_conn=mesh->getReverseConnectivity(MED_EN::MED_DESCENDING, MED_EN::MED_CELL); const int* rev_conn_index=mesh->getReverseConnectivityIndex(MED_EN::MED_DESCENDING, MED_EN::MED_CELL); - int nb_face= mesh->getNumberOfElements(MED_FACE,MED_ALL_ELEMENTS); - int nb_edge = mesh->getNumberOfElements(MED_EDGE,MED_ALL_ELEMENTS); + int nb_face= mesh->getNumberOfElements(MED_FACE,MEDMEM_ALL_ELEMENTS); + int nb_edge = mesh->getNumberOfElements(MED_EDGE,MEDMEM_ALL_ELEMENTS); nb_cell= mesh->getNumberOfElements(MED_CELL,Type); int nb_constituent; diff --git a/src/RENUMBER/testRenumbering.py b/src/RENUMBER/testRenumbering.py index f075ce826..ce5da1128 100755 --- a/src/RENUMBER/testRenumbering.py +++ b/src/RENUMBER/testRenumbering.py @@ -61,10 +61,10 @@ for i in range(9): field=field&(f.getValueIJ(i+1,2)==field_ini[i*2+1]) f.rmDriver(id) -nbcell2dboost=m.getNumberOfElementsWithPoly(MED_CELL,MED_ALL_ELEMENTS) +nbcell2dboost=m.getNumberOfElementsWithPoly(MED_CELL,MEDMEM_ALL_ELEMENTS) connectivite=[2,6,13,11,11,13,14,12,6,5,15,13,12,14,10,4,13,15,16,14,5,1,7,15,14,16,9,10,15,7,8,16,16,8,3,9] connectivite_index=[1,5,9,13,17,21,25,29,33,37] -conn=m.getConnectivity(MED_NODAL,MED_CELL,MED_QUAD4) +conn=m.getConnectivity(MED_NODAL,MED_CELL,MEDMEM_QUAD4) conn_index=m.getConnectivityIndex(MED_NODAL,MED_CELL); conn2dboost=(len(conn)==len(connectivite)) if conn2dboost: @@ -83,10 +83,10 @@ method="METIS" string_to_execute="'"+dir_renumber+" "+dir_mesh+"/"+filename+" "+meshname+" "+method+" "+dir_mesh+"/out_"+filename+"'" eval("os.system("+string_to_execute+")") m = MESH(MED_DRIVER,dir_mesh+"/out_"+filename,meshname) -nbcell2dmetis=m.getNumberOfElementsWithPoly(MED_CELL,MED_ALL_ELEMENTS) +nbcell2dmetis=m.getNumberOfElementsWithPoly(MED_CELL,MEDMEM_ALL_ELEMENTS) connectivite=[12,14,10,4,2,6,13,11,11,13,14,12,16,8,3,9,5,1,7,15,15,7,8,16,14,16,9,10,6,5,15,13,13,15,16,14] connectivite_index=[1,5,9,13,17,21,25,29,33,37] -conn=m.getConnectivity(MED_NODAL,MED_CELL,MED_QUAD4) +conn=m.getConnectivity(MED_NODAL,MED_CELL,MEDMEM_QUAD4) conn_index=m.getConnectivityIndex(MED_NODAL,MED_CELL); conn2dmetis=(len(conn)==len(connectivite)) if conn2dmetis: @@ -110,7 +110,7 @@ method="BOOST" string_to_execute="'"+dir_renumber+" "+dir_mesh+"/"+filename+" "+meshname+" "+method+" "+dir_mesh+"/out_"+filename+"'" eval("os.system("+string_to_execute+")") m = MESH(MED_DRIVER,dir_mesh+"/out_"+filename,meshname) -nbcell2dpolyboost=m.getNumberOfElementsWithPoly(MED_CELL,MED_ALL_ELEMENTS) +nbcell2dpolyboost=m.getNumberOfElementsWithPoly(MED_CELL,MEDMEM_ALL_ELEMENTS) connectivite=[2,5,9,10,11,10,9,12,5,6,8,9,4,11,12,16,12,9,8,13,6,1,7,8,16,12,13,15,13,8,7,14,15,13,14,3] connectivite_index=[1,5,9,13,17,21,25,29,33,37] conn=m.getPolygonsConnectivity(MED_CELL) @@ -131,7 +131,7 @@ method="METIS" string_to_execute="'"+dir_renumber+" "+dir_mesh+"/"+filename+" "+meshname+" "+method+" "+dir_mesh+"/out_"+filename+"'" eval("os.system("+string_to_execute+")") m = MESH(MED_DRIVER,dir_mesh+"/out_"+filename,meshname) -nbcell2dpolymetis=m.getNumberOfElementsWithPoly(MED_CELL,MED_ALL_ELEMENTS) +nbcell2dpolymetis=m.getNumberOfElementsWithPoly(MED_CELL,MEDMEM_ALL_ELEMENTS) connectivite=[6,1,7,8,2,5,9,10,5,6,8,9,15,13,14,3,4,11,12,16,16,12,13,15,11,10,9,12,12,9,8,13,13,8,7,14] connectivite_index=[1,5,9,13,17,21,25,29,33,37] conn=m.getPolygonsConnectivity(MED_CELL) @@ -162,10 +162,10 @@ method="BOOST" string_to_execute="'"+dir_renumber+" "+dir_mesh+"/"+filename+" "+meshname+" "+method+" "+dir_mesh+"/out_"+filename+"'" eval("os.system("+string_to_execute+")") m = MESH(MED_DRIVER,dir_mesh+"/out_"+filename,meshname) -nbcell3dboost=m.getNumberOfElementsWithPoly(MED_CELL,MED_ALL_ELEMENTS) +nbcell3dboost=m.getNumberOfElementsWithPoly(MED_CELL,MEDMEM_ALL_ELEMENTS) connectivite=[23,13,5,18,27,22,14,26,17,6,13,23,25,16,22,27,27,22,14,26,24,15,7,20,9,23,18,1,21,27,26,10,25,16,22,27,19,8,15,24,2,17,23,9,12,25,27,21,21,27,26,10,11,24,20,3,12,25,27,21,4,19,24,11] connectivite_index=[1,9,17,25,33,41,49,57,65] -conn=m.getConnectivity(MED_NODAL,MED_CELL,MED_HEXA8) +conn=m.getConnectivity(MED_NODAL,MED_CELL,MEDMEM_HEXA8) conn_index=m.getConnectivityIndex(MED_NODAL,MED_CELL); conn3dboost=(len(conn)==len(connectivite)) if conn3dboost: @@ -184,10 +184,10 @@ method="METIS" string_to_execute="'"+dir_renumber+" "+dir_mesh+"/"+filename+" "+meshname+" "+method+" "+dir_mesh+"/out_"+filename+"'" eval("os.system("+string_to_execute+")") m = MESH(MED_DRIVER,dir_mesh+"/out_"+filename,meshname) -nbcell3dmetis=m.getNumberOfElementsWithPoly(MED_CELL,MED_ALL_ELEMENTS) +nbcell3dmetis=m.getNumberOfElementsWithPoly(MED_CELL,MEDMEM_ALL_ELEMENTS) connectivite=[12,25,27,21,4,19,24,11,27,22,14,26,24,15,7,20,17,6,13,23,25,16,22,27,9,23,18,1,21,27,26,10,23,13,5,18,27,22,14,26,25,16,22,27,19,8,15,24,2,17,23,9,12,25,27,21,21,27,26,10,11,24,20,3] connectivite_index=[1,9,17,25,33,41,49,57,65] -conn=m.getConnectivity(MED_NODAL,MED_CELL,MED_HEXA8) +conn=m.getConnectivity(MED_NODAL,MED_CELL,MEDMEM_HEXA8) conn_index=m.getConnectivityIndex(MED_NODAL,MED_CELL); conn3dmetis=(len(conn)==len(connectivite)) if conn3dmetis: @@ -222,7 +222,7 @@ method="BOOST" string_to_execute="'"+dir_renumber+" "+dir_mesh+"/"+filename+" "+meshname+" "+method+" "+dir_mesh+"/out_"+filename+"'" eval("os.system("+string_to_execute+")") m = MESH(MED_DRIVER,dir_mesh+"/out_"+filename,meshname) -nbcell3dpolyboost=m.getNumberOfElementsWithPoly(MED_CELL,MED_ALL_ELEMENTS) +nbcell3dpolyboost=m.getNumberOfElementsWithPoly(MED_CELL,MEDMEM_ALL_ELEMENTS) connectivite=[23,13,5,18,27,26,14,22,23,27,22,13,13,22,14,5,5,14,26,18,18,26,27,23,17,6,13,23,25,27,22,16,17,25,16,6,6,16,22,13,13,22,27,23,23,27,25,17,27,22,14,26,24,20,7,15,27,24,15,22,22,15,7,14,14,7,20,26,26,20,24,27,9,23,18,1,21,10,26,27,9,21,27,23,23,27,26,18,18,26,10,1,1,10,21,9,25,16,22,27,19,24,15,8,25,19,8,16,16,8,15,22,22,15,24,27,27,24,19,25,2,17,23,9,12,21,27,25,2,12,25,17,17,25,27,23,23,27,21,9,9,21,12,2,21,27,26,10,11,3,20,24,21,11,24,27,27,24,20,26,26,20,3,10,10,3,11,21,12,25,27,21,4,11,24,19,12,4,19,25,25,19,24,27,27,24,11,21,21,11,4,12] connectivite_face_index=[1,5,9,13,17,21,25,29,33,37,41,45,49,53,57,61,65,69,73,77,81,85,89,93,97,101,105,109,113,117,121,125,129,133,137,141,145,149,153,157,161,165,169,173,177,181,185,189,193] connectivite_index=[1,7,13,19,25,31,37,43,49] @@ -250,7 +250,7 @@ method="METIS" string_to_execute="'"+dir_renumber+" "+dir_mesh+"/"+filename+" "+meshname+" "+method+" "+dir_mesh+"/out_"+filename+"'" eval("os.system("+string_to_execute+")") m = MESH(MED_DRIVER,dir_mesh+"/out_"+filename,meshname) -nbcell3dpolymetis=m.getNumberOfElementsWithPoly(MED_CELL,MED_ALL_ELEMENTS) +nbcell3dpolymetis=m.getNumberOfElementsWithPoly(MED_CELL,MEDMEM_ALL_ELEMENTS) connectivite=[12,25,27,21,4,11,24,19,12,4,19,25,25,19,24,27,27,24,11,21,21,11,4,12,27,22,14,26,24,20,7,15,27,24,15,22,22,15,7,14,14,7,20,26,26,20,24,27,17,6,13,23,25,27,22,16,17,25,16,6,6,16,22,13,13,22,27,23,23,27,25,17,9,23,18,1,21,10,26,27,9,21,27,23,23,27,26,18,18,26,10,1,1,10,21,9,23,13,5,18,27,26,14,22,23,27,22,13,13,22,14,5,5,14,26,18,18,26,27,23,25,16,22,27,19,24,15,8,25,19,8,16,16,8,15,22,22,15,24,27,27,24,19,25,2,17,23,9,12,21,27,25,2,12,25,17,17,25,27,23,23,27,21,9,9,21,12,2,21,27,26,10,11,3,20,24,21,11,24,27,27,24,20,26,26,20,3,10,10,3,11,21] connectivite_face_index=[1,5,9,13,17,21,25,29,33,37,41,45,49,53,57,61,65,69,73,77,81,85,89,93,97,101,105,109,113,117,121,125,129,133,137,141,145,149,153,157,161,165,169,173,177,181,185,189,193] connectivite_index=[1,7,13,19,25,31,37,43,49] -- 2.39.2