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()
"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)
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()