Package testMedMemGeneral


Functions

def print_ord
def add_one

Variables

list filesPath = os.environ["MED_ROOT_DIR"]
string filesPath = "/share/salome/resources/med/"
list files = []
list meshNameFiles = []
tuple nbOfFiles = len(files)
 files.append("maill.0.med") meshNameFiles.append("MAILTRQU") files.append("zzzz121b.med") meshNameFiles.append("MUN") files.append("test19.med") meshNameFiles.append("CartGrid") files.append("test19.med") meshNameFiles.append("bodyfitted") files.append("test19.med") meshNameFiles.append("maa1") files.append("TimeStamps.med") meshNameFiles.append("dom")
list file = files[i]
tuple decompFile = string.split(file,".")
tuple lenDecompFileM1 = len(decompFile)
list extensionFile = decompFile[lenDecompFileM1]
list rootFile = decompFile[0]
string rootFile = "."
string medV21FileName = "V21_test.med"
string medV22FileName = "V22_test.med"
string vtkFileName = "_test.vtk"
tuple mesh = MESH()
tuple meshDriver = MED_MESH_RDONLY_DRIVER(file,mesh)
tuple meshDriver = GIBI_MESH_RDONLY_DRIVER(file,mesh)
tuple meshDriver = PORFLOW_MESH_RDONLY_DRIVER(file,mesh)
 type = MED_CARTESIAN
tuple mesh = GRID()
tuple meshDriver = MED_MESH_RDONLY_DRIVER(file,mesh)
tuple meshDriver = GIBI_MESH_RDONLY_DRIVER(file,mesh)
tuple meshDriver = PORFLOW_MESH_RDONLY_DRIVER(file,mesh)
tuple mesh = GRID()
 type = MED_POLAR
tuple meshDriver = MED_MESH_RDONLY_DRIVER(file,mesh)
tuple meshDriver = GIBI_MESH_RDONLY_DRIVER(file,mesh)
tuple mesh = GRID()
 type = MED_BODY_FITTED
tuple meshDriver = MED_MESH_RDONLY_DRIVER(file,mesh)
tuple meshDriver = GIBI_MESH_RDONLY_DRIVER(file,mesh)
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)
list type = types[k]
tuple nbElemType = mesh.getNumberOfElements(MED_CELL,type)
tuple connectivity = mesh.getConnectivity(MED_FULL_INTERLACE,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_FULL_INTERLACE,MED_DESCENDING,MED_CELL,MED_ALL_ELEMENTS)
tuple ConnectivityIndex = mesh.getConnectivityIndex(MED_DESCENDING,MED_CELL)
list begin = ConnectivityIndex[j]
list end = ConnectivityIndex[j+1]
 constituent = MED_FACE
 constituent = MED_EDGE
tuple nbTypesConst = mesh.getNumberOfTypes(constituent)
tuple types = mesh.getTypes(constituent)
list type = types[k]
tuple nbElemType = mesh.getNumberOfElements(constituent,type)
tuple connectivity = mesh.getConnectivity(MED_FULL_INTERLACE,MED_NODAL,constituent,type)
int nbNodesPerConst = 100
tuple ReverseConnectivity = mesh.getReverseConnectivity(MED_NODAL,constituent)
tuple ReverseConnectivityIndex = mesh.getReverseConnectivityIndex(MED_NODAL,constituent)
list begin = ReverseConnectivityIndex[j]
list end = ReverseConnectivityIndex[j+1]
tuple nbElemts = mesh.getNumberOfElements(constituent,MED_ALL_ELEMENTS)
tuple Connectivity = mesh.getConnectivity(MED_FULL_INTERLACE,MED_DESCENDING,constituent,MED_ALL_ELEMENTS)
tuple ConnectivityIndex = mesh.getConnectivityIndex(MED_DESCENDING,constituent)
list begin = ConnectivityIndex[j]
list end = ConnectivityIndex[j+1]
tuple nbFam = mesh.getNumberOfFamilies(entity)
tuple nbGrp = mesh.getNumberOfGroups(entity)
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 types = family.getTypes()
list type = types[k]
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 nbOfTypes = group.getNumberOfTypes()
tuple types = group.getTypes()
list type = types[k]
tuple nbOfElmtsOfType = group.getNumberOfElements(type)
tuple number = group.getNumber(type)
tuple medFileVersion = getMedFileVersionForWriting()
tuple idMedV21 = mesh.addDriver(MED_DRIVER,medV21FileName,mesh.getName(),MED_REMP)
tuple idMedV22 = mesh.addDriver(MED_DRIVER,medV22FileName,mesh.getName(),MED_REMP)
tuple idVtk = mesh.addDriver(VTK_DRIVER,vtkFileName,mesh.getName())
tuple supportCell = SUPPORT(mesh)
tuple barycenter = mesh.getBarycenter(supportCell)
tuple barycenterCell = barycenter.getRow(j+1)
tuple medFileVersion = getMedFileVersionForWriting()
tuple idMedV21 = barycenter.addDriver(MED_DRIVER,medV21FileName,barycenter.getName())
tuple idMedV22 = barycenter.addDriver(MED_DRIVER,medV22FileName,barycenter.getName())
tuple idVtk = barycenter.addDriver(VTK_DRIVER,vtkFileName,barycenter.getName())
tuple volume = mesh.getVolume(supportCell)
int voltot = 0
tuple volumeCell = volume.getValueIJ(j+1,1)
 voltot = voltot+volumeCell
tuple medFileVersion = getMedFileVersionForWriting()
tuple idMedV21 = volume.addDriver(MED_DRIVER,medV21FileName,volume.getName())
tuple idMedV22 = volume.addDriver(MED_DRIVER,medV22FileName,volume.getName())
tuple idVtk = volume.addDriver(VTK_DRIVER,vtkFileName,volume.getName())
tuple supportFace = SUPPORT(mesh,"Support on all faces of the mesh",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)
tuple medFileVersion = getMedFileVersionForWriting()
tuple idMedV21 = normal.addDriver(MED_DRIVER,medV21FileName,normal.getName())
tuple idMedV22 = normal.addDriver(MED_DRIVER,medV22FileName,normal.getName())
tuple area = mesh.getArea(supportCell)
int areatot = 0
tuple areaCell = area.getValueIJ(j+1,1)
 areatot = areatot+areaCell
tuple medFileVersion = getMedFileVersionForWriting()
tuple idMedV21 = area.addDriver(MED_DRIVER,medV21FileName,area.getName())
tuple idMedV22 = area.addDriver(MED_DRIVER,medV22FileName,area.getName())
tuple idVtk = area.addDriver(VTK_DRIVER,vtkFileName,area.getName())
tuple supportEdge = SUPPORT(mesh,"Support on all edges of the mesh",MED_EDGE)
tuple nbEdge = mesh.getNumberOfElements(MED_EDGE,MED_ALL_ELEMENTS)
tuple nbTypeEdge = mesh.getNumberOfTypes(MED_EDGE)
tuple TypeEdge = mesh.getTypes(MED_EDGE)
tuple normal = mesh.getNormal(supportEdge)
tuple length = mesh.getLength(supportEdge)
tuple normalEdge = normal.getRow(j+1)
tuple lengthEdge = length.getRow(j+1)
list value1 = normalEdge[0]
list value2 = normalEdge[1]
tuple norm = (value1*value1 + value2*value2)
tuple medFileVersion = getMedFileVersionForWriting()
tuple idMedV21 = normal.addDriver(MED_DRIVER,medV21FileName,normal.getName())
tuple idMedV22 = normal.addDriver(MED_DRIVER,medV22FileName,normal.getName())
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)
list value1 = normalBoundJ[0]
list value2 = normalBoundJ[1]
list value3 = normalBoundJ[2]
tuple norm = (value1*value1 + value2*value2 + value3*value3)
tuple suppBound = mesh.getBoundaryElements(MED_EDGE)
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)
list value1 = normalBoundJ[0]
list value2 = normalBoundJ[1]
tuple norm = (value1*value1 + value2*value2)
tuple md = MED()
tuple mdDriver = MED_MED_RDONLY_DRIVER(file,md)
tuple nbMeshes = md.getNumberOfMeshes()
tuple nbFields = md.getNumberOfFields()
tuple mesh_name = md.getMeshName(imsh)
tuple field_name = md.getFieldName(ifld)
list mesh_name = meshNameFiles[i]
tuple mesh = md.getMesh(mesh_name)
tuple spaceDim = mesh.getSpaceDimension()
tuple meshDim = mesh.getMeshDimension()
tuple nbNodes = mesh.getNumberOfNodes()
tuple field_name = md.getFieldName(ifld)
tuple nbOfIt = md.getFieldNumberOfIteration(field_name)
tuple dtitfield = md.getFieldIteration(field_name,j)
tuple dt = dtitfield.getdt()
tuple it = dtitfield.getit()
tuple field = md.getField(field_name,dt,it)
tuple type = field.getValueType()
tuple fieldint = createFieldIntFromField(field)
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()
int kp1 = 1
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)
int fieldintadd = 2
tuple name = fieldintadd.getName()
tuple desc = fieldintadd.getDescription()
tuple nbOfComp = fieldintadd.getNumberOfComponents()
tuple iterationNb = fieldintadd.getIterationNumber()
tuple orderNb = fieldintadd.getOrderNumber()
tuple time = fieldintadd.getTime()
int kp1 = 1
tuple compName = fieldintadd.getComponentName(kp1)
tuple compDesc = fieldintadd.getComponentDescription(kp1)
tuple compUnit = fieldintadd.getMEDComponentUnit(kp1)
tuple support = fieldintadd.getSupport()
tuple nbOf = support.getNumberOfElements(MED_ALL_ELEMENTS)
tuple valueI = fieldintadd.getRow(k+1)
int fieldintsub = 2
tuple name = fieldintsub.getName()
tuple desc = fieldintsub.getDescription()
tuple nbOfComp = fieldintsub.getNumberOfComponents()
tuple iterationNb = fieldintsub.getIterationNumber()
tuple orderNb = fieldintsub.getOrderNumber()
tuple time = fieldintsub.getTime()
int kp1 = 1
tuple compName = fieldintsub.getComponentName(kp1)
tuple compDesc = fieldintsub.getComponentDescription(kp1)
tuple compUnit = fieldintsub.getMEDComponentUnit(kp1)
tuple support = fieldintsub.getSupport()
tuple nbOf = support.getNumberOfElements(MED_ALL_ELEMENTS)
tuple valueI = fieldintsub.getRow(k+1)
int fieldintmul = 2
tuple name = fieldintmul.getName()
tuple desc = fieldintmul.getDescription()
tuple nbOfComp = fieldintmul.getNumberOfComponents()
tuple iterationNb = fieldintmul.getIterationNumber()
tuple orderNb = fieldintmul.getOrderNumber()
tuple time = fieldintmul.getTime()
int kp1 = 1
tuple compName = fieldintmul.getComponentName(kp1)
tuple compDesc = fieldintmul.getComponentDescription(kp1)
tuple compUnit = fieldintmul.getMEDComponentUnit(kp1)
tuple support = fieldintmul.getSupport()
tuple nbOf = support.getNumberOfElements(MED_ALL_ELEMENTS)
tuple valueI = fieldintmul.getRow(k+1)
int fieldintdiv = 2
tuple name = fieldintdiv.getName()
tuple desc = fieldintdiv.getDescription()
tuple nbOfComp = fieldintdiv.getNumberOfComponents()
tuple iterationNb = fieldintdiv.getIterationNumber()
tuple orderNb = fieldintdiv.getOrderNumber()
tuple time = fieldintdiv.getTime()
int kp1 = 1
tuple compName = fieldintdiv.getComponentName(kp1)
tuple compDesc = fieldintdiv.getComponentDescription(kp1)
tuple compUnit = fieldintdiv.getMEDComponentUnit(kp1)
tuple support = fieldintdiv.getSupport()
tuple nbOf = support.getNumberOfElements(MED_ALL_ELEMENTS)
tuple valueI = fieldintdiv.getRow(k+1)
int fieldintadd = 2
int fieldintsub = 2
int fieldintmul = 2
int fieldintdiv = 2
 fieldintdiv = None
 fieldintasso = fieldint+fieldint*fieldint
tuple fieldintSP = createFieldIntScalarProduct(fieldint, fieldint2)
 fieldint = None
tuple fielddouble = createFieldDoubleFromField(field)
tuple name = fielddouble.getName()
tuple desc = fielddouble.getDescription()
tuple nbOfComp = fielddouble.getNumberOfComponents()
tuple iterationNb = fielddouble.getIterationNumber()
tuple orderNb = fielddouble.getOrderNumber()
tuple time = fielddouble.getTime()
tuple fieldEntity = fielddouble.getSupport()
tuple fielddouble_vol = fielddouble.getSupport()
tuple fielddouble_vol = fielddouble.getSupport()
tuple fielddouble_vol = fielddouble.getSupport()
tuple fielddouble_vol = fielddouble.getSupport()
int kp1 = 1
tuple compName = fielddouble.getComponentName(kp1)
tuple compDesc = fielddouble.getComponentDescription(kp1)
tuple compUnit = fielddouble.getMEDComponentUnit(kp1)
tuple support = fielddouble.getSupport()
tuple nbOf = support.getNumberOfElements(MED_ALL_ELEMENTS)
tuple valueI = fielddouble.getRow(k+1)
tuple fielddouble2 = FIELDDOUBLE(fielddouble)
int fielddoubleadd = 2
tuple name = fielddoubleadd.getName()
tuple desc = fielddoubleadd.getDescription()
tuple nbOfComp = fielddoubleadd.getNumberOfComponents()
tuple iterationNb = fielddoubleadd.getIterationNumber()
tuple orderNb = fielddoubleadd.getOrderNumber()
tuple time = fielddoubleadd.getTime()
int kp1 = 1
tuple compName = fielddoubleadd.getComponentName(kp1)
tuple compDesc = fielddoubleadd.getComponentDescription(kp1)
tuple compUnit = fielddoubleadd.getMEDComponentUnit(kp1)
tuple support = fielddoubleadd.getSupport()
tuple nbOf = support.getNumberOfElements(MED_ALL_ELEMENTS)
tuple valueI = fielddoubleadd.getRow(k+1)
int fielddoublesub = 2
tuple name = fielddoublesub.getName()
tuple desc = fielddoublesub.getDescription()
tuple nbOfComp = fielddoublesub.getNumberOfComponents()
tuple iterationNb = fielddoublesub.getIterationNumber()
tuple orderNb = fielddoublesub.getOrderNumber()
tuple time = fielddoublesub.getTime()
int kp1 = 1
tuple compName = fielddoublesub.getComponentName(kp1)
tuple compDesc = fielddoublesub.getComponentDescription(kp1)
tuple compUnit = fielddoublesub.getMEDComponentUnit(kp1)
tuple support = fielddoublesub.getSupport()
tuple nbOf = support.getNumberOfElements(MED_ALL_ELEMENTS)
tuple valueI = fielddoublesub.getRow(k+1)
int fielddoublemul = 2
tuple name = fielddoublemul.getName()
tuple desc = fielddoublemul.getDescription()
tuple nbOfComp = fielddoublemul.getNumberOfComponents()
tuple iterationNb = fielddoublemul.getIterationNumber()
tuple orderNb = fielddoublemul.getOrderNumber()
tuple time = fielddoublemul.getTime()
int kp1 = 1
tuple compName = fielddoublemul.getComponentName(kp1)
tuple compDesc = fielddoublemul.getComponentDescription(kp1)
tuple compUnit = fielddoublemul.getMEDComponentUnit(kp1)
tuple support = fielddoublemul.getSupport()
tuple nbOf = support.getNumberOfElements(MED_ALL_ELEMENTS)
tuple valueI = fielddoublemul.getRow(k+1)
int fielddoublediv = 2
tuple name = fielddoublediv.getName()
tuple desc = fielddoublediv.getDescription()
tuple nbOfComp = fielddoublediv.getNumberOfComponents()
tuple iterationNb = fielddoublediv.getIterationNumber()
tuple orderNb = fielddoublediv.getOrderNumber()
tuple time = fielddoublediv.getTime()
int kp1 = 1
tuple compName = fielddoublediv.getComponentName(kp1)
tuple compDesc = fielddoublediv.getComponentDescription(kp1)
tuple compUnit = fielddoublediv.getMEDComponentUnit(kp1)
tuple support = fielddoublediv.getSupport()
tuple nbOf = support.getNumberOfElements(MED_ALL_ELEMENTS)
tuple valueI = fielddoublediv.getRow(k+1)
int fielddoublesub = 2
int fielddoublemul = 2
int fielddoublediv = 2
 fielddoublediv = None
int fielddoubleasso = 2
tuple fielddoubleSP = createFieldDoubleScalarProduct(fielddouble, fielddouble2)


Function Documentation

def testMedMemGeneral.print_ord   i  ) 
 

def testMedMemGeneral.add_one   i  ) 
 


Variable Documentation

list testMedMemGeneral.filesPath = os.environ["MED_ROOT_DIR"] [static]
 

string testMedMemGeneral.filesPath = "/share/salome/resources/med/" [static]
 

list testMedMemGeneral.files = [] [static]
 

list testMedMemGeneral.meshNameFiles = [] [static]
 

tuple testMedMemGeneral.nbOfFiles = len(files) [static]
 

files.append("maill.0.med") meshNameFiles.append("MAILTRQU") files.append("zzzz121b.med") meshNameFiles.append("MUN") files.append("test19.med") meshNameFiles.append("CartGrid") files.append("test19.med") meshNameFiles.append("bodyfitted") files.append("test19.med") meshNameFiles.append("maa1") files.append("TimeStamps.med") meshNameFiles.append("dom")

list testMedMemGeneral.file = files[i] [static]
 

tuple testMedMemGeneral.decompFile = string.split(file,".") [static]
 

tuple testMedMemGeneral.lenDecompFileM1 = len(decompFile) [static]
 

list testMedMemGeneral.extensionFile = decompFile[lenDecompFileM1] [static]
 

list testMedMemGeneral.rootFile = decompFile[0] [static]
 

string testMedMemGeneral.rootFile = "." [static]
 

string testMedMemGeneral.medV21FileName = "V21_test.med" [static]