FeResPost Web Site                     FeResPost Online User Manual

V.1.1 Iterators

An example of an iterator with Python library is in “PYTHON/EX02/printGroups.py” and reads as follows:

for groupName in db.iter_groupName():
    grp = db.getGroupCopy(groupName)
    nodesNbr = grp.NbrElements
    elementsNbr = grp.NbrNodes
    rbesNbr = grp.NbrRbes
    coordNbr = grp.NbrCoordSys
    print("%20s%10d%10d%10d%10d"%(groupName,nodesNbr,elementsNbr,
        rbesNbr,coordNbr))

Note: