Salome HOME
Remove in hxx1 test case all references to MEDMEM
authorCrouzet Nicolas <nicolas.crouzet@cea.fr>
Mon, 17 Feb 2014 12:50:49 +0000 (13:50 +0100)
committerCrouzet Nicolas <nicolas.crouzet@cea.fr>
Mon, 17 Feb 2014 12:50:49 +0000 (13:50 +0100)
Examples/hxx1/README
Examples/hxx1/component.py
Examples/hxx1/cpp_component.tgz
Examples/hxx1/test_compohxx.py
module_generator/salomemodules.py

index 2c5154f41d505a69b684d15843e7391461139d52..76fde495c25371127b989383ad1c8e44d3ec7560 100644 (file)
@@ -18,6 +18,6 @@ Generate the components with :
 
 Test them with 
 
-  appli/runAppli -u test_compohxx.py
+  appli/runAppli test_compohxx.py
 
 
index 34a812722244720c9b46384a5e8672fc7d70ac54..fd78503a15b5131909a51a1ba30d4821b2374ebc 100644 (file)
@@ -53,18 +53,12 @@ cpppath=os.path.join(cwd,"COMPONENTCPP_INSTALL")
 
 
 os.environ["CALCULCPP_ROOT_DIR"]=cpppath
-os.environ["MEDCALCCPP_ROOT_DIR"]=cpppath
-os.environ["TESTMEDCPP_ROOT_DIR"]=cpppath
 os.environ["ICOCOCPP_ROOT_DIR"]=cpppath
-os.environ["TESTMEMCPP_ROOT_DIR"]=cpppath
 c1=HXX2SALOMEComponent("CALCUL.hxx","libCALCULCXX.so" , cpppath )
-c2=HXX2SALOMEComponent("MEDCALC.hxx","libMEDCALCCXX.so" , cpppath )
-c3=HXX2SALOMEComponent("TESTMED.hxx","libTESTMEDCXX.so" , cpppath )
 c4=HXX2SALOMEComponent("ICOCO.hxx","libICOCOCXX.so" , cpppath )
-c5=HXX2SALOMEComponent("TESTMEM.hxx","libTESTMEMCXX.so" , cpppath )
 
 
-g=Generator(Module("hxxcompos",components=[c4,c1,c2,c3,c5],prefix="./install"),context)
+g=Generator(Module("hxxcompos",components=[c4,c1],prefix="./install"),context)
 g.generate()
 g.bootstrap()
 g.configure()
@@ -77,10 +71,7 @@ g.make_appli("appli",
                          "YACS":yacs_root_dir,
                          "GEOM":geom_root_dir})
 cppenv=""" export CALCULCPP_ROOT_DIR=%(cpppath)s
-export MEDCALCCPP_ROOT_DIR=%(cpppath)s
-export TESTMEDCPP_ROOT_DIR=%(cpppath)s
-export ICOCOCPP_ROOT_DIR=%(cpppath)s
-export TESTMEMCPP_ROOT_DIR=%(cpppath)s"""  % {"cpppath" : cpppath}
+export ICOCOCPP_ROOT_DIR=%(cpppath)s """  % {"cpppath" : cpppath}
 
 cppenvfile=open("appli/env.d/cppEnv.sh","w")
 cppenvfile.write(cppenv)
index 2298007af5f985649a04b0c7211d85b74d596ee4..92c7422f9f355e9d13389ffb664ce794bec0203f 100644 (file)
Binary files a/Examples/hxx1/cpp_component.tgz and b/Examples/hxx1/cpp_component.tgz differ
index 5403e6e2baaace19b100f8c7c465b542f57c0087..a67be5691010d6739b92dbe9e721d901ed1de55e 100644 (file)
@@ -35,74 +35,6 @@ assert ( myCalc.And(True,False)==False ) , 'Erreur dans la fonction And(True,Fal
 assert ( myCalc.Or(True,False)==True ) , 'Erreur dans la fonction Or(True,False)'
 print "Fin test hxx2salome/001/A1"
 #
-#
-myTestMed = salome.lcc.FindOrLoadComponent("FactoryServerTM", "TESTMED")
-myMedCalc = salome.lcc.FindOrLoadComponent("FactoryServerMC", "MEDCALC")
-#
-banner = myTestMed.getBanner()
-print "Banner = ",banner
-assert  banner == "Hello" , 'erreur dans la fonction getBanner() : mauvaise valeur'
-#
-print "Creation et tests des supports :"
-supportName=myTestMed.getSupportName(myTestMed.getSupport())
-print "Support name : ",supportName
-assert supportName == "SupportOnAll_MED_MAILLE"
-#
-from libMEDClient import FIELDDOUBLEClient
-f_loc=FIELDDOUBLEClient(myTestMed.getVolume(myTestMed.getSupport()))
-assert f_loc.getNumberOfValues() == 16 , 'created field has incorrect size'
-from math import fabs
-assert fabs(f_loc.norm2()-6.39444)<1.0e-5  , 'created field has incorrect norm 2'
-##
-# CNC bug Medclient  myTestMed.affiche_fieldT(myTestMed.getVolume(myTestMed.getSupport()))
-myTestMed.printSupportEntity(myTestMed.getSupport())
-myMedCalc.printSupport(myTestMed.getSupport())
-myMedCalc.printSupport(myTestMed.getPartialSupport())
-f_part=FIELDDOUBLEClient(myTestMed.getVolume(myTestMed.getPartialSupport()))
-assert f_part.getNumberOfValues() == 3, 'created field on partial support has incorrect size'
-assert fabs(f_part.norm2()-1.15470)<1.0e-5  , 'created field on partial support has incorrect norm 2'
-print "Fin test hxx2salome/003/A1"
-#
-banner = myTestMed.getBanner()
-print "Banner = ",banner
-assert  banner == "Hello" , 'erreur dans la fonction getBanner() : mauvaise valeur'
-#
-theMesh= myTestMed.getMesh()
-theField = myTestMed.getField()
-(theField1,theField2) = myTestMed.create2DoubleField()
-#CNC  bug Medclient  myTestMed.affiche_fieldT(theField1)
-mynorm=myTestMed.getNormMax(theField)
-from math import fabs
-assert fabs(mynorm-3.0)<1.0e-10  , 'created field has incorrect norm 1'
-print "Norm of the Field : " , mynorm
-
-field1 = myTestMed.getConstFieldDouble( 3.0 , "field1" )
-# CNC bug Medclient myTestMed.affiche_fieldT(field1)
-print "Creation tableau :"
-size=12
-myTab = myTestMed.createDoubleTab(size)
-myTabInt = myTestMed.createIntVector(size)
-myTestMed.printDoubleTab(myTab)
-print "Create a matrix"
-myTestMed.printMatrix(myTestMed.createMatrix(size,size))
-print "Fin test hxx2salome/002/A1"
-
-#
-# test of exception mechanism
-from SALOME_MED import SUPPORT, MED_NODE, FIELDDOUBLE
-test_exception=False
-f_cell = myTestMed.getField()
-f_node = myTestMed.getFieldOnNode()
-try:
-        f_wrong=myMedCalc.add(f_cell,f_node)
-except SALOME.SALOME_Exception, ex:
-        test_exception=True
-       print "wrong addition was correctly catched"
-       print "Exception is : ",ex
-
-assert test_exception, 'Error in the exception management  : the wrong MED addition was not correctly catched'
-print "Fin test hxx2salome/003/A2"
-
 myCoco = salome.lcc.FindOrLoadComponent("FactoryServerI", "ICOCO")
 #
 liste_champs = myCoco.getInputFieldsNames()
index 2acc3d9143b5f436d454e2fc11317ababee2abe2..aae6a8d259f61ecd77fd7710e1208431a9ab7537 100644 (file)
@@ -67,9 +67,9 @@ idldefs="""
 makefiledefs="""
 #module MED
 MED_IDL_INCLUDES = -I$(MED_ROOT_DIR)/idl/salome
-MED_INCLUDES= -I${MED2HOME}/include -I${MED_ROOT_DIR}/include/salome -DH5_USE_16_API -I${HDF5HOME}/include
+MED_INCLUDES= -I${MED3HOME}/include -I${MED_ROOT_DIR}/include/salome -DH5_USE_16_API -I${HDF5HOME}/include
 MED_IDL_LIBS= -L$(MED_ROOT_DIR)/lib/salome -lSalomeIDLMED
-MED_LIBS= -L${MED2HOME}/lib -lmed -L${HDF5HOME}/lib -lhdf5 -L${MED_ROOT_DIR}/lib/salome -lSalomeIDLMED -lmedcouplingcorba -lmedcouplingclient 
+MED_LIBS= -L${MED3HOME}/lib -lmed -L${HDF5HOME}/lib -lhdf5 -L${MED_ROOT_DIR}/lib/salome -lSalomeIDLMED -lmedcouplingcorba -lmedcouplingclient 
 SALOME_LIBS += ${MED_LIBS}
 SALOME_IDL_LIBS += ${MED_IDL_LIBS}
 SALOME_INCLUDES += ${MED_INCLUDES}