Version: 6.3.1
Functions | Variables

Package testMedMemGeneral

Functions

def print_ord
def add_one

Variables

list filesPath = os.environ["MED_ROOT_DIR"]
tuple tmpDir = os.getenv("TEMP")
tuple tmpMask = os.path.join(tmpDir, "*_test.*")
list fileNames = []
list meshNames = []
tuple nbOfFiles = len(fileNames)
list filesFull = []
list fileName = fileNames[i]
 Loop on all files.
list fileFull = filesFull[i]
tuple decompFile = string.split(fileName,".")
tuple lenDecompFileM1 = len(decompFile)
list extensionFile = decompFile[lenDecompFileM1]
list rootFile = decompFile[0]
tuple rootFileFull = os.path.join(tmpDir, rootFile)
string medV22FileName = "V22_test.med"
string vtkFileName = "_test.vtk"
tuple mesh = MESH()
tuple meshDriver = MED_MESH_RDONLY_DRIVER(fileFull,mesh)
 type = MED_CARTESIAN
tuple meshName = mesh.getName()
tuple spaceDim = mesh.getSpaceDimension()
tuple meshDim = mesh.getMeshDimension()
tuple nbNodes = mesh.getNumberOfNodes()
tuple coordSyst = mesh.getCoordinatesSystem()
list coordNames = []
list coordUnits = []
tuple coordinates = mesh.getCoordinates(MED_FULL_INTERLACE)
int kp1 = 1
list coords = []
int isdp1 = 1
tuple nbTypesCell = mesh.getNumberOfTypes(MED_CELL)
tuple types = mesh.getTypes(MED_CELL)
tuple nbElemType = mesh.getNumberOfElements(MED_CELL,type)
tuple connectivity = mesh.getConnectivity(MED_NODAL,MED_CELL,type)
int nbNodesPerCell = 100
tuple ReverseConnectivity = mesh.getReverseConnectivity(MED_NODAL)
tuple ReverseConnectivityIndex = mesh.getReverseConnectivityIndex(MED_NODAL)
list begin = ReverseConnectivityIndex[j]
list end = ReverseConnectivityIndex[j+1]
tuple nbElemts = mesh.getNumberOfElements(MED_CELL,MED_ALL_ELEMENTS)
tuple Connectivity = mesh.getConnectivity(MED_DESCENDING,MED_CELL,MED_ALL_ELEMENTS)
tuple ConnectivityIndex = mesh.getConnectivityIndex(MED_DESCENDING,MED_CELL)
 constituent = MED_FACE
tuple nbTypesConst = mesh.getNumberOfTypes(constituent)
int nbNodesPerConst = 100
tuple nbFam = mesh.getNumberOfFamilies(entity)
tuple nbGrp = mesh.getNumberOfGroups(entity)
tuple family = mesh.getFamily(entity,j+1)
tuple familyName = family.getName()
tuple familyDescription = family.getDescription()
tuple familyEntity = family.getEntity()
tuple familyBool = family.isOnAllElements()
tuple familyIdentifier = family.getIdentifier()
tuple nbOfAtt = family.getNumberOfAttributes()
tuple attributesids = family.getAttributesIdentifiers()
tuple attributesvals = family.getAttributesValues()
tuple nbOfGrp = family.getNumberOfGroups()
tuple nbOfTypes = family.getNumberOfTypes()
tuple nbOfElmtsOfType = family.getNumberOfElements(type)
tuple number = family.getNumber(type)
tuple group = mesh.getGroup(entity,j+1)
tuple groupName = group.getName()
tuple groupDescription = group.getDescription()
tuple groupEntity = group.getEntity()
tuple groupBool = group.isOnAllElements()
tuple nbOfFam = group.getNumberOfFamilies()
tuple idMedV22 = mesh.addDriver(MED_DRIVER,medV22FileName,mesh.getName(),RDWR)
tuple idVtk = mesh.addDriver(VTK_DRIVER,vtkFileName,mesh.getName())
tuple supportCell = mesh.getSupportOnAll( MED_CELL )
tuple barycenter = mesh.getBarycenter(supportCell)
tuple barycenterCell = barycenter.getRow(j+1)
tuple volume = mesh.getVolume(supportCell)
int voltot = 0
tuple volumeCell = volume.getValueIJ(j+1,1)
tuple supportFace = mesh.getSupportOnAll(MED_FACE)
tuple nbFace = mesh.getNumberOfElements(MED_FACE,MED_ALL_ELEMENTS)
tuple nbTypeFace = mesh.getNumberOfTypes(MED_FACE)
tuple TypeFace = mesh.getTypes(MED_FACE)
tuple normal = mesh.getNormal(supportFace)
tuple area = mesh.getArea(supportFace)
tuple normalFace = normal.getRow(j+1)
tuple areaFace = area.getRow(j+1)
list value1 = normalFace[0]
list value2 = normalFace[1]
list value3 = normalFace[2]
tuple norm = (value1*value1 + value2*value2 + value3*value3)
int areatot = 0
tuple areaCell = area.getValueIJ(j+1,1)
tuple supportEdge = mesh.getSupportOnAll(MED_EDGE)
tuple nbEdge = mesh.getNumberOfElements(MED_EDGE,MED_ALL_ELEMENTS)
tuple nbTypeEdge = mesh.getNumberOfTypes(MED_EDGE)
tuple TypeEdge = mesh.getTypes(MED_EDGE)
tuple length = mesh.getLength(supportEdge)
tuple normalEdge = normal.getRow(j+1)
tuple lengthEdge = length.getRow(j+1)
tuple suppBound = mesh.getBoundaryElements(MED_FACE)
tuple nbElmBound = suppBound.getNumberOfElements(MED_ALL_ELEMENTS)
tuple normalBound = mesh.getNormal(suppBound)
tuple numberSuppBound = suppBound.getNumber(MED_ALL_ELEMENTS)
list valInd = numberSuppBound[j]
tuple normalBoundJ = normalBound.getRow(valInd)
tuple md = MEDFILEBROWSER(fileFull)
tuple nbMeshes = md.getNumberOfMeshes()
tuple nbFields = md.getNumberOfFields()
tuple mesh_name = md.getMeshName(imsh)
tuple field_name = md.getFieldName(ifld)
tuple dtits = md.getFieldIteration(field_name)
tuple dt = dtitfield.getdt()
tuple it = dtitfield.getit()
tuple fieldint = FIELDINT(MED_DRIVER,md.getFileName(),field_name,dt,it,mesh)
tuple name = fieldint.getName()
tuple desc = fieldint.getDescription()
tuple nbOfComp = fieldint.getNumberOfComponents()
tuple iterationNb = fieldint.getIterationNumber()
tuple orderNb = fieldint.getOrderNumber()
tuple time = fieldint.getTime()
tuple fieldint_vol = fieldint.getSupport()
tuple compName = fieldint.getComponentName(kp1)
tuple compDesc = fieldint.getComponentDescription(kp1)
tuple compUnit = fieldint.getMEDComponentUnit(kp1)
tuple support = fieldint.getSupport()
tuple nbOf = support.getNumberOfElements(MED_ALL_ELEMENTS)
tuple valueI = fieldint.getRow(k+1)
tuple fieldint2 = FIELDINT(fieldint)
 fieldintadd = fieldint+fieldint2
 fieldintsub = fieldint-fieldint2
 fieldintmul = fieldint*fieldint2
 fieldintdiv = fieldint/fieldint2
 fieldintasso = fieldint+fieldint*fieldint
tuple fieldintSP = createFieldIntScalarProduct(fieldint, fieldint2)
tuple fielddouble = FIELDDOUBLE(MED_DRIVER,md.getFileName(),field_name,dt,it,mesh)
tuple fieldEntity = fielddouble.getSupport()
tuple fielddouble_vol = fielddouble.getSupport()
tuple fielddouble2 = FIELDDOUBLE(fielddouble)
 fielddoubleadd = fielddouble+fielddouble2
 fielddoublesub = fielddouble-fielddouble2
 fielddoublemul = fielddouble*fielddouble2
 fielddoublediv = fielddouble/fielddouble2
 fielddoubleasso = fielddouble+fielddouble2*fielddouble2
tuple fielddoubleSP = createFieldDoubleScalarProduct(fielddouble, fielddouble2)

Function Documentation

def testMedMemGeneral.print_ord (   i)
def testMedMemGeneral.add_one (   i)

Variable Documentation

tuple testMedMemGeneral::filesPath = os.environ["MED_ROOT_DIR"]
string testMedMemGeneral::tmpDir = os.getenv("TEMP")
tuple testMedMemGeneral.tmpMask = os.path.join(tmpDir, "*_test.*")

Loop on all files.

tuple testMedMemGeneral.decompFile = string.split(fileName,".")
string testMedMemGeneral.medV22FileName = "V22_test.med"
string testMedMemGeneral.vtkFileName = "_test.vtk"
tuple testMedMemGeneral::meshDriver = MED_MESH_RDONLY_DRIVER(fileFull,mesh)
tuple testMedMemGeneral::type = MED_CARTESIAN
tuple testMedMemGeneral.meshName = mesh.getName()
tuple testMedMemGeneral::spaceDim = mesh.getSpaceDimension()
tuple testMedMemGeneral::meshDim = mesh.getMeshDimension()
tuple testMedMemGeneral::nbNodes = mesh.getNumberOfNodes()
tuple testMedMemGeneral.coordSyst = mesh.getCoordinatesSystem()
tuple testMedMemGeneral.coordinates = mesh.getCoordinates(MED_FULL_INTERLACE)
tuple testMedMemGeneral.nbTypesCell = mesh.getNumberOfTypes(MED_CELL)
tuple testMedMemGeneral::types = mesh.getTypes(MED_CELL)
tuple testMedMemGeneral::nbElemType = mesh.getNumberOfElements(MED_CELL,type)
tuple testMedMemGeneral::connectivity = mesh.getConnectivity(MED_NODAL,MED_CELL,type)
tuple testMedMemGeneral::ReverseConnectivity = mesh.getReverseConnectivity(MED_NODAL)
tuple testMedMemGeneral::ReverseConnectivityIndex = mesh.getReverseConnectivityIndex(MED_NODAL)
tuple testMedMemGeneral::nbElemts = mesh.getNumberOfElements(MED_CELL,MED_ALL_ELEMENTS)
tuple testMedMemGeneral::Connectivity = mesh.getConnectivity(MED_DESCENDING,MED_CELL,MED_ALL_ELEMENTS)
tuple testMedMemGeneral::ConnectivityIndex = mesh.getConnectivityIndex(MED_DESCENDING,MED_CELL)
tuple testMedMemGeneral.nbTypesConst = mesh.getNumberOfTypes(constituent)
tuple testMedMemGeneral::nbFam = mesh.getNumberOfFamilies(entity)
tuple testMedMemGeneral::nbGrp = mesh.getNumberOfGroups(entity)
tuple testMedMemGeneral.family = mesh.getFamily(entity,j+1)
tuple testMedMemGeneral.familyName = family.getName()
tuple testMedMemGeneral.familyDescription = family.getDescription()
tuple testMedMemGeneral.familyEntity = family.getEntity()
tuple testMedMemGeneral.familyBool = family.isOnAllElements()
tuple testMedMemGeneral.familyIdentifier = family.getIdentifier()
tuple testMedMemGeneral.nbOfAtt = family.getNumberOfAttributes()
tuple testMedMemGeneral.attributesids = family.getAttributesIdentifiers()
tuple testMedMemGeneral.attributesvals = family.getAttributesValues()
tuple testMedMemGeneral.nbOfGrp = family.getNumberOfGroups()
tuple testMedMemGeneral::nbOfTypes = family.getNumberOfTypes()
tuple testMedMemGeneral::nbOfElmtsOfType = family.getNumberOfElements(type)
tuple testMedMemGeneral::number = family.getNumber(type)
tuple testMedMemGeneral.group = mesh.getGroup(entity,j+1)
tuple testMedMemGeneral.groupName = group.getName()
tuple testMedMemGeneral.groupDescription = group.getDescription()
tuple testMedMemGeneral.groupEntity = group.getEntity()
tuple testMedMemGeneral.groupBool = group.isOnAllElements()
tuple testMedMemGeneral.nbOfFam = group.getNumberOfFamilies()
tuple testMedMemGeneral::idMedV22 = mesh.addDriver(MED_DRIVER,medV22FileName,mesh.getName(),RDWR)
tuple testMedMemGeneral::idVtk = mesh.addDriver(VTK_DRIVER,vtkFileName,mesh.getName())
tuple testMedMemGeneral.supportCell = mesh.getSupportOnAll( MED_CELL )
tuple testMedMemGeneral.barycenter = mesh.getBarycenter(supportCell)
tuple testMedMemGeneral.barycenterCell = barycenter.getRow(j+1)
tuple testMedMemGeneral.volume = mesh.getVolume(supportCell)
tuple testMedMemGeneral.volumeCell = volume.getValueIJ(j+1,1)
tuple testMedMemGeneral.supportFace = mesh.getSupportOnAll(MED_FACE)
tuple testMedMemGeneral.nbFace = mesh.getNumberOfElements(MED_FACE,MED_ALL_ELEMENTS)
tuple testMedMemGeneral.nbTypeFace = mesh.getNumberOfTypes(MED_FACE)
tuple testMedMemGeneral.TypeFace = mesh.getTypes(MED_FACE)
tuple testMedMemGeneral::normal = mesh.getNormal(supportFace)
tuple testMedMemGeneral::area = mesh.getArea(supportFace)
tuple testMedMemGeneral.normalFace = normal.getRow(j+1)
tuple testMedMemGeneral.areaFace = area.getRow(j+1)
tuple testMedMemGeneral.areaCell = area.getValueIJ(j+1,1)
tuple testMedMemGeneral.supportEdge = mesh.getSupportOnAll(MED_EDGE)
tuple testMedMemGeneral.nbEdge = mesh.getNumberOfElements(MED_EDGE,MED_ALL_ELEMENTS)
tuple testMedMemGeneral.nbTypeEdge = mesh.getNumberOfTypes(MED_EDGE)
tuple testMedMemGeneral.TypeEdge = mesh.getTypes(MED_EDGE)
tuple testMedMemGeneral.length = mesh.getLength(supportEdge)
tuple testMedMemGeneral.normalEdge = normal.getRow(j+1)
tuple testMedMemGeneral.lengthEdge = length.getRow(j+1)
tuple testMedMemGeneral::suppBound = mesh.getBoundaryElements(MED_FACE)
tuple testMedMemGeneral::nbElmBound = suppBound.getNumberOfElements(MED_ALL_ELEMENTS)
tuple testMedMemGeneral::normalBound = mesh.getNormal(suppBound)
tuple testMedMemGeneral::numberSuppBound = suppBound.getNumber(MED_ALL_ELEMENTS)
tuple testMedMemGeneral::normalBoundJ = normalBound.getRow(valInd)
tuple testMedMemGeneral.md = MEDFILEBROWSER(fileFull)
tuple testMedMemGeneral.nbMeshes = md.getNumberOfMeshes()
tuple testMedMemGeneral.nbFields = md.getNumberOfFields()
list testMedMemGeneral::mesh_name = md.getMeshName(imsh)
tuple testMedMemGeneral::field_name = md.getFieldName(ifld)
tuple testMedMemGeneral.dtits = md.getFieldIteration(field_name)
tuple testMedMemGeneral.dt = dtitfield.getdt()
tuple testMedMemGeneral.it = dtitfield.getit()
testMedMemGeneral.fieldint = FIELDINT(MED_DRIVER,md.getFileName(),field_name,dt,it,mesh)
tuple testMedMemGeneral::name = fieldint.getName()
tuple testMedMemGeneral::desc = fieldint.getDescription()
tuple testMedMemGeneral::nbOfComp = fieldint.getNumberOfComponents()
tuple testMedMemGeneral::iterationNb = fieldint.getIterationNumber()
tuple testMedMemGeneral::orderNb = fieldint.getOrderNumber()
tuple testMedMemGeneral::time = fieldint.getTime()
tuple testMedMemGeneral.fieldint_vol = fieldint.getSupport()
tuple testMedMemGeneral::compName = fieldint.getComponentName(kp1)
tuple testMedMemGeneral::compDesc = fieldint.getComponentDescription(kp1)
tuple testMedMemGeneral::compUnit = fieldint.getMEDComponentUnit(kp1)
tuple testMedMemGeneral::support = fieldint.getSupport()
tuple testMedMemGeneral::nbOf = support.getNumberOfElements(MED_ALL_ELEMENTS)
tuple testMedMemGeneral::valueI = fieldint.getRow(k+1)
tuple testMedMemGeneral.fieldintSP = createFieldIntScalarProduct(fieldint, fieldint2)
tuple testMedMemGeneral.fielddouble = FIELDDOUBLE(MED_DRIVER,md.getFileName(),field_name,dt,it,mesh)
tuple testMedMemGeneral.fieldEntity = fielddouble.getSupport()
tuple testMedMemGeneral::fielddouble_vol = fielddouble.getSupport()
tuple testMedMemGeneral.fielddoubleSP = createFieldDoubleScalarProduct(fielddouble, fielddouble2)
Copyright © 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE
Copyright © 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS