Back to index

salome-med  6.5.0
Functions | Variables
medEnsightMed_test Namespace Reference

Functions

def check_ens
def compatibilityPb

Variables

 ASCII = False
 Binary = True
list formats
tuple tmpDir = os.getenv("TMP")
tuple inDir = os.path.join(os.getenv("MED_ROOT_DIR"), "share","salome","resources","med")
tuple outDir = os.path.join( tmpDir,"Ensight_out")
 has_ens_checker = False
tuple tmpFile = os.path.join( outDir, "has_ens_checker" )
 dumpMesh = False
 dumpField = False
list medFiles
list badFiles
tuple medFile = os.path.join( inDir, medFile )
list fields = []
tuple med = MEDFILEBROWSER(medFile)
tuple m2m_nom = med.getMeshNames()
tuple mesh = GRID(MED_DRIVER,medFile,m2m_nom)
tuple dtit_list = med.getFieldIteration( f_name )
tuple field = FIELDDOUBLE(MED_DRIVER, medFile, f_name, dtit.dt, dtit.it, mesh )
tuple basename = os.path.join( outDir, basename )
string checkFile = "ens_checker"
string formatName = "ENSIGHT GOLD"
string formatSuffix = "g"
string ensFile = ".case"
tuple medEnsDriver = ENSIGHT_MED_WRONLY_DRIVER(ensFile, fields)
tuple medFromEns = ENSIGHT_MED_RDONLY_DRIVER(ensFile)
string wFile = ".med"
tuple fTyped = f.castToTypedField()

Function Documentation

def medEnsightMed_test.check_ens (   casefile,
  logfile 
)

Definition at line 76 of file medEnsightMed_test.py.

00076 
00077 def check_ens(casefile, logfile):
00078     cmd = "(cd %s; ens_checker %s > %s 2>&1)" % (outDir, casefile, logfile)
00079     err = os.system( cmd )
00080     if os.access(logfile, os.F_OK):
00081         log = open(logfile).read()
00082         if search("bummer", log):
00083             print log
00084             raise RuntimeError, "cd %s; ens_checker %s" % (outDir, casefile)
00085         if search("Warning:", log):
00086             print log
00087         pass
00088     pass

Definition at line 89 of file medEnsightMed_test.py.

00089 
00090 def compatibilityPb():
00091     "Print traceback and return true if exception is due to EnSight-MEDMEM incompatibility"
00092     isCompatibilityPb = ( sys.exc_value.__str__().find("compatibility problem") > 0 )
00093     if isCompatibilityPb:
00094         print '$$$$$$$$$$$$$$$$$$$$ COMPATIBILITY PROBLEM $$$$$$$$$$$$$$$$$$$$$$$$'
00095         print sys.exc_value, "\n"
00096     else:
00097         import traceback
00098         traceback.print_exc()
00099     return isCompatibilityPb


Variable Documentation

Definition at line 37 of file medEnsightMed_test.py.

Initial value:
00001 [ # files that can't be read by MEDMEM
00002     "Deff_fdt_5.8_castem_efmh_diff_conc_dom.med"
00003     ,"Deff_fdt_5.8_castem_vf_diff_conc_dom.med"
00004     ]

Definition at line 201 of file medEnsightMed_test.py.

tuple medEnsightMed_test.basename = os.path.join( outDir, basename )

Definition at line 247 of file medEnsightMed_test.py.

Definition at line 38 of file medEnsightMed_test.py.

string medEnsightMed_test.checkFile = "ens_checker"

Definition at line 248 of file medEnsightMed_test.py.

tuple medEnsightMed_test.dtit_list = med.getFieldIteration( f_name )

Definition at line 230 of file medEnsightMed_test.py.

Definition at line 73 of file medEnsightMed_test.py.

Definition at line 70 of file medEnsightMed_test.py.

string medEnsightMed_test.ensFile = ".case"

Definition at line 265 of file medEnsightMed_test.py.

tuple medEnsightMed_test.field = FIELDDOUBLE(MED_DRIVER, medFile, f_name, dtit.dt, dtit.it, mesh )

Definition at line 233 of file medEnsightMed_test.py.

Definition at line 217 of file medEnsightMed_test.py.

string medEnsightMed_test.formatName = "ENSIGHT GOLD"

Definition at line 252 of file medEnsightMed_test.py.

Initial value:
00001 [
00002     (ENSIGHT_GOLD,ASCII)
00003     ,(ENSIGHT_GOLD,Binary)
00004     ,(ENSIGHT_6,ASCII)
00005     ,(ENSIGHT_6,Binary)
00006     ]

Definition at line 39 of file medEnsightMed_test.py.

Definition at line 253 of file medEnsightMed_test.py.

tuple medEnsightMed_test.fTyped = f.castToTypedField()

Definition at line 329 of file medEnsightMed_test.py.

Definition at line 60 of file medEnsightMed_test.py.

tuple medEnsightMed_test.inDir = os.path.join(os.getenv("MED_ROOT_DIR"), "share","salome","resources","med")

Definition at line 50 of file medEnsightMed_test.py.

tuple medEnsightMed_test.m2m_nom = med.getMeshNames()

Definition at line 221 of file medEnsightMed_test.py.

Definition at line 219 of file medEnsightMed_test.py.

Definition at line 291 of file medEnsightMed_test.py.

tuple medEnsightMed_test.medFile = os.path.join( inDir, medFile )

Definition at line 215 of file medEnsightMed_test.py.

Definition at line 103 of file medEnsightMed_test.py.

Definition at line 306 of file medEnsightMed_test.py.

Definition at line 223 of file medEnsightMed_test.py.

tuple medEnsightMed_test.outDir = os.path.join( tmpDir,"Ensight_out")

Definition at line 54 of file medEnsightMed_test.py.

tuple medEnsightMed_test.tmpDir = os.getenv("TMP")

Definition at line 46 of file medEnsightMed_test.py.

tuple medEnsightMed_test.tmpFile = os.path.join( outDir, "has_ens_checker" )

Definition at line 61 of file medEnsightMed_test.py.

string medEnsightMed_test.wFile = ".med"

Definition at line 323 of file medEnsightMed_test.py.