Salome HOME
6th step : Remove the additional MEDLoader level from MEDLoader.
[tools/medcoupling.git] / src / ParaMEDMEM_Swig / test_StructuredCoincidentDEC.py
index 4dccdee64098ed3a1b021b2a8dbdbd151ba85b32..171c25fed1e750bd04b7edd050972c70728a1c7e 100755 (executable)
@@ -1,11 +1,11 @@
 #!/usr/bin/env python
 #  -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2012  CEA/DEN, EDF R&D
+# Copyright (C) 2007-2015  CEA/DEN, EDF R&D
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
 # License as published by the Free Software Foundation; either
-# version 2.1 of the License.
+# version 2.1 of the License, or (at your option) any later version.
 #
 # This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -47,23 +47,23 @@ class ParaMEDMEMBasicsTest2(unittest.TestCase):
         comptopo  = 0
         icocofield= 0
         #
-        data_dir = os.environ['MED_ROOT_DIR']
+        data_dir = os.environ['MEDCOUPLING_ROOT_DIR']
         tmp_dir  = os.environ['TMP']
         if tmp_dir == '':
             tmp_dir = "/tmp"
             pass
-        
-        filename_xml1    = data_dir + "/share/salome/resources/med/square1_split"
-        filename_2       = data_dir + "/share/salome/resources/med/square1.med"
+
+        filename_xml1    = data_dir + "/share/resources/med/square1_split"
+        filename_2       = data_dir + "/share/resources/med/square1.med"
         filename_seq_wr  = tmp_dir + "/"
         filename_seq_med = tmp_dir + "/myWrField_seq_pointe221.med"
-        
+
         dec = StructuredCoincidentDEC(source_group, target_group)
         MPI_Barrier(MPI_COMM_WORLD)
         if source_group.containsMyRank():
             filename = filename_xml1 + str(rank+1) + ".med"
             meshname = "Mesh_2_" + str(rank+1)
-            mesh=MEDLoader.ReadUMeshFromFile(filename,meshname,0)
+            mesh=ReadUMeshFromFile(filename,meshname,0)
             paramesh=ParaMESH(mesh,source_group,"source mesh")
             comptopo=ComponentTopology(6)
             parafield=ParaFIELD(ON_CELLS,NO_TIME,paramesh,comptopo)
@@ -78,15 +78,15 @@ class ParaMEDMEMBasicsTest2(unittest.TestCase):
                 pass
             parafield.getField().setValues(value)
             icocofield = ICoCoMEDField(mesh,parafield.getField())
-            dec.setMethod("P0")  
-            dec.attachLocalField(parafield)      
+            dec.setMethod("P0")
+            dec.attachLocalField(parafield)
             dec.synchronize()
             dec.sendData()
             pass
 
         if target_group.containsMyRank():
             meshname2 = "Mesh_2"
-            mesh=MEDLoader.ReadUMeshFromFile(filename_2, meshname2,0)
+            mesh=ReadUMeshFromFile(filename_2, meshname2,0)
             paramesh=ParaMESH(mesh, self_group, "target mesh")
             comptopo=ComponentTopology(6,target_group)
             parafield=ParaFIELD(ON_CELLS,NO_TIME,paramesh, comptopo)
@@ -124,5 +124,5 @@ class ParaMEDMEMBasicsTest2(unittest.TestCase):
         print "End of test StructuredCoincidentDEC"
         pass
 
-    
+
 unittest.main()