136. fe.postproc_menu — Postprocessing Menu

136.1. Classes defined in module fe.postproc_menu

class fe.postproc_menu.AttributeModel(name, dic=None, parent=None, *args)[source]

A model representing the attributes of an object.

rowCount(self, parent: QModelIndex = QModelIndex()) int[source]
columnCount(self, parent: QModelIndex = QModelIndex()) int[source]
data(self, index: QModelIndex, role: int = Qt.ItemDataRole.DisplayRole) Any[source]
headerData(self, section: int, orientation: Orientation, role: int = Qt.ItemDataRole.DisplayRole) Any[source]
class fe.postproc_menu.DictModel(dic, name, parent=None, *args)[source]

A model representing a dictionary.

rowCount(self, parent: QModelIndex = QModelIndex()) int[source]
columnCount(self, parent: QModelIndex = QModelIndex()) int[source]
data(self, index: QModelIndex, role: int = Qt.ItemDataRole.DisplayRole) Any[source]
headerData(self, section: int, orientation: Orientation, role: int = Qt.ItemDataRole.DisplayRole) Any[source]
class fe.postproc_menu.Table(datamodel, caption='pyFormex - Table', parent=None, actions=[('OK',)], default='OK')[source]

A dialog widget to show two-dimensional arrays of items.

136.2. Functions defined in module fe.postproc_menu

fe.postproc_menu.showfields()[source]

Show the table of field acronyms.

fe.postproc_menu.showattr(name=None, dic=None)[source]

Show the table of field acronyms.

fe.postproc_menu.keys(items)[source]

Return the list of keys in items

fe.postproc_menu.named_item(items, name)[source]

Return the named item

fe.postproc_menu.showResults(nodes, elems, displ, text, val, showref=False, dscale=100.0, count=1, sleeptime=-1.0, symmetric_scale=False)[source]

Display a constant or linear field on triangular elements.

nodes is an array with nodal coordinates elems is a single element group or a list of elem groups displ are the displacements at the nodes, may be set to None. val are the scalar values at the nodes, may also be None. If not None, displ should have the same shape as nodes and val should have shape (nnodes).

If dscale is a list of values, the results will be drawn with subsequent deformation scales, with a sleeptime intermission, and the whole cycle will be repeated count times.

fe.postproc_menu.animateScenes(scenes, count=1, sleeptime=None)[source]

Animate a series of scenes.

Each scene is a triple of (actors, annots, decors), where each item is either a single item of resp. type Actor, Annotation, Decoration, or a (possibly empty) list of such items.

fe.postproc_menu.setDB(db)[source]

Set the current result. db is an FeResult instance.

fe.postproc_menu.selectDB(db=None)[source]

Select the result database to work upon.

If db is an FeResult instance, it is set as the current database. If None is given, a dialog is popped up to select one.

If a database is successfully selected, the screen is cleared and the geometry of the model is displayed.

Returns the database or None.

fe.postproc_menu.importCalculix(fn=None)[source]

Import a CalculiX results file and select it as the current results.

CalculiX result files are the .dat files resulting from a run of the ccx program with an .inp file as input. This function will need both files and supposes that the names are the same except for the extension.

If no file name is specified, the user is asked to select one (either the .inp or .dat file), will then read both the mesh and corresponding results files, and store the results in a FeResult instance, which will be set as the current results database for the postprocessing menu.

fe.postproc_menu.importFlavia(fn=None)[source]

Import a flavia file and select it as the current results.

Flavia files are the postprocessing format used by GiD pre- and postprocessor, and can also be written by the FE program calix. There usually are two files named ‘BASE.flavia.msh’ and ‘BASE.flavia.res’ which hold the FE mesh and results, respectively.

This functions asks the user to select a flavia file (either mesh or results), will then read both the mesh and corrseponding results files, and store the results in a FeResult instance, which will be set as the current results database for the postprocessing menu.

fe.postproc_menu.importDB(fn=None)[source]

Import a .post.py database and select it as the current.

fe.postproc_menu.checkDB()[source]

Make sure that a database is selected.

If no results database was already selected, asks the user to do so. Returns True if a databases is selected.

fe.postproc_menu.shortkey_results(data)[source]

Return the dialog data with short keys.

fe.postproc_menu.show()[source]

Show the results

fe.postproc_menu.show_results(step, inc, elgroup, autoscale, dscale, resindex, showref, symmetric_scale, animate, nframes, cycle, shape, count, sleeptime)[source]

Show the current DB results using the settings in data.

Note that while the data may contain a ‘step’ and ‘inc’ value, the displayed results are those of the step/inc in the database.

fe.postproc_menu.show_DB_results()[source]

Show the results at the current DB step,inc pointer.

If the result dialog is shown, its step,inc fields are also updated.

fe.postproc_menu.create_menu(before='help')[source]

Create the Postproc menu.