Salome HOME
Merge branch 'master' into omu/pleiade8084 (cmake support)
[tools/yacsgen.git] / Examples / hxx1 / test_compohxx.py
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()