2 # This script illustrates the basic features of MEDLoader
3 # (gboulant, 17 nov 2012)
5 filename = "timeseries.med"
6 filepath = os.path.join(os.path.abspath(os.path.dirname(__file__)),filename)
9 from MEDLoader import MEDLoader
10 meshNames = MEDLoader.GetMeshNames(filepath)
14 fieldNames = MEDLoader.GetAllFieldNamesOnMesh(filepath,meshName)
16 fieldName=fieldNames[0]
18 listOfTypes = MEDLoader.GetTypesOfField(filepath,meshName,fieldName)
20 typeOfDiscretization=listOfTypes[0]
22 fieldIterations = MEDLoader.GetFieldIterations(typeOfDiscretization,
28 iteration = fieldIterations[0]
29 iterationNumber = iteration[0]
30 iterationOrder = iteration[1]
34 mesh = MEDLoader.ReadUMeshFromFile(filepath, meshName, dimrestriction)
37 field = MEDLoader.ReadField(typeOfDiscretization,
38 filepath, meshName, dimrestriction,
39 fieldName, iterationNumber, iterationOrder)