Back to index

salome-med  6.5.0
Functions | Variables
ensightMedEnsight_test Namespace Reference

Functions

def check_ens
def compatibilityPb

Variables

 ASCII = False
 Binary = True
list formats
tuple dataDir = os.getenv("DATA_DIR")
tuple tmpDir = os.getenv("TMP")
tuple inDir = os.path.join( dataDir, "EnSight")
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 inFiles
tuple ensFile = os.path.join( inDir, inFile )
 incompatible = False
list meshes = []
list fields = []
tuple medFromEns = ENSIGHT_MED_RDONLY_DRIVER(ensFile)
tuple mesh = MESH(ENSIGHT_DRIVER,ensFile,"")
list meshNames = []
tuple medFile = os.path.join( outDir, basename + ".med" )
tuple fTyped = f.castToTypedField()
string formatName = "ENSIGHT GOLD"
tuple medEnsDriver = ENSIGHT_MED_WRONLY_DRIVER(ensFile, fields)
tuple mesh2EnsDriver = ENSIGHT_MESH_WRONLY_DRIVER( ensFile, mesh )
tuple checkFile = os.path.join( outDir, basename + ".ens_checker" )

Function Documentation

def ensightMedEnsight_test.check_ens (   casefile,
  logfile 
)

Definition at line 81 of file ensightMedEnsight_test.py.

00081 
00082 def check_ens(casefile, logfile):
00083     if not has_ens_checker:
00084         return
00085     cmd = "(cd %s; ens_checker %s > %s 2>&1)" % (outDir, casefile, logfile)
00086     err = os.system( cmd )
00087     if os.access(logfile, os.F_OK):
00088         log = open(logfile).read()
00089         if search("bummer", log):
00090             print log
00091             raise RuntimeError, "cd %s; ens_checker %s" % (outDir, casefile)
00092         if search("Warning:", log):
00093             print log
00094         pass
00095     pass

Definition at line 96 of file ensightMedEnsight_test.py.

00096 
00097 def compatibilityPb():
00098     "Print traceback and return true if exception is due to EnSight-MEDMEM incompatibility"
00099     isCompatibilityPb = ( sys.exc_value.__str__().find("compatibility problem") > 0 )
00100     if isCompatibilityPb:
00101         print '$$$$$$$$$$$$$$$$$$$$ COMPATIBILITY PROBLEM $$$$$$$$$$$$$$$$$$$$$$$$'
00102         print sys.exc_value, "\n"
00103     else:
00104         import traceback
00105         traceback.print_exc()
00106     return isCompatibilityPb


Variable Documentation

Definition at line 38 of file ensightMedEnsight_test.py.

Definition at line 39 of file ensightMedEnsight_test.py.

tuple ensightMedEnsight_test.checkFile = os.path.join( outDir, basename + ".ens_checker" )

Definition at line 263 of file ensightMedEnsight_test.py.

tuple ensightMedEnsight_test.dataDir = os.getenv("DATA_DIR")

Definition at line 47 of file ensightMedEnsight_test.py.

Definition at line 78 of file ensightMedEnsight_test.py.

Definition at line 75 of file ensightMedEnsight_test.py.

tuple ensightMedEnsight_test.ensFile = os.path.join( inDir, inFile )

Definition at line 158 of file ensightMedEnsight_test.py.

Definition at line 162 of file ensightMedEnsight_test.py.

string ensightMedEnsight_test.formatName = "ENSIGHT GOLD"

Definition at line 213 of file ensightMedEnsight_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 40 of file ensightMedEnsight_test.py.

tuple ensightMedEnsight_test.fTyped = f.castToTypedField()

Definition at line 204 of file ensightMedEnsight_test.py.

Definition at line 64 of file ensightMedEnsight_test.py.

Definition at line 160 of file ensightMedEnsight_test.py.

tuple ensightMedEnsight_test.inDir = os.path.join( dataDir, "EnSight")

Definition at line 54 of file ensightMedEnsight_test.py.

Definition at line 109 of file ensightMedEnsight_test.py.

Definition at line 237 of file ensightMedEnsight_test.py.

tuple ensightMedEnsight_test.medFile = os.path.join( outDir, basename + ".med" )

Definition at line 197 of file ensightMedEnsight_test.py.

Definition at line 164 of file ensightMedEnsight_test.py.

list ensightMedEnsight_test.mesh = MESH(ENSIGHT_DRIVER,ensFile,"")

Definition at line 167 of file ensightMedEnsight_test.py.

Definition at line 240 of file ensightMedEnsight_test.py.

Definition at line 161 of file ensightMedEnsight_test.py.

Definition at line 170 of file ensightMedEnsight_test.py.

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

Definition at line 58 of file ensightMedEnsight_test.py.

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

Definition at line 48 of file ensightMedEnsight_test.py.

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

Definition at line 65 of file ensightMedEnsight_test.py.