Package mbdyn :: Package bindings :: Module groups
[hide private]

Module groups

source code

The definition of all the MBDyn groups. The top class of that module is ItemGroup, an abstract class that will be the base of a list of nodes, NodeGroup, or a list of elements, ElementGroup. The motivation is to access any object inside a group by a list syntax once the parsing of the MBDyn input file done. As the simplest example:
   >>> wm = WraptMBDyn("input_file")
   >>> wm.init()
   >>> node = wm.nodes.structurals[0]
node is a reference to the first structural node written in the input file. Another example:
   >>> for node in wm.nodes.structurals:
           print node.label

       1001
       1002
       1003
   >>> node = wm.nodes.structurals.get_from_label(1002)

The groups can be iterated as list. Moreover by knowing the MBDyn label used in the input file, any reference to the C++ instance can be got as a Python object.

The work of the group is also to answer to the convert method called by Groups, and thus get down from the MBDyn polymorphism.

Note also GROUP_TABLE, a dictionary gathering the group descriptions for nodes and elements in a table (or list of tuples). Inside a table, the first field is the MBDyn name of the group (used as an enumeration in the C++ code). The second is the attribute name that will be set in the Groups class. The third and last field is the class reference of the group, so then WraptMBDyn will be able to create the group class during its init method.

Classes [hide private]
  ItemGroup
An element or node group used by MBDyn.
  NodeGroup
The top class for all the node group
  Abstracts
The "ABSTRACT" node group
  Structurals
The "STRUCTURAL" node group
  NodeElectrics
The "ELECTRIC" node group
  Parameters
The "PARAMETER" node group
  NodeHydraulics
The "HYDRAULIC" node group
  ElementGroup
The top class for the element group
  Rotors
The "ROTOR" element group
  AutomaticStructurals
The "AUTOMATICSTRUCTURAL" element group
  Gravities
The "GRAVITY" element group
  Bodies
The "BODY" element group
  Joints
The "JOINT" element group
  Beams
The "BEAM" element group
  Plates
The "PLATE" element group
  Forces
The "FORCE" element group
  ElectricBulks
The "ELECTRICBULK" element group
  Electrics
The "ELECTRICS" element group
  Hydraulics
The "HYDRAULICS" element group
  Bulks
The "BULKS" element group
  Loadables
The "LOADABLE" element group
  Drivens
The "DRIVEN" element group
  Externals
The "EXTERNAL" element group
  AirProperties
The "AIRPROPERTIES" element group
  Aeromodals
The "AEROMODAL" element group
  Aerodynamics
The "AERODYNAMIC" element group
  Genels
The "GENEL" element group
  SocketStreamOutputs
The "SOCKETSTREAM_OUTPUT" element group
  class_name
The "SOCKETSTREAM_OUTPUT" element group
Variables [hide private]
  CLASS = {'ELEM': {'AERODYNAMIC': {'general': <class mbdyn.bind...
  GROUP_TABLE = {'ELEM': [('ROTOR', 'rotors', <class 'mbdyn.bind...
  GROUP = {'ELEM': {'ATTRIBUTES': ['rotors', 'automatic_structur...
  attr = 'socketstream_outputs'
  item_type = 'ELEM'
  key = 'SOCKETSTREAM_OUTPUT'
Variables Details [hide private]

CLASS

Value:
{}

GROUP_TABLE

Value:
{'ELEM': [('ROTOR', 'rotors', <class 'mbdyn.bindings.groups.Rotors'>),
          ('AUTOMATICSTRUCTURAL',
           'automatic_structurals',
           <class 'mbdyn.bindings.groups.AutomaticStructurals'>),
          ('GRAVITY',
           'gravities',
           <class 'mbdyn.bindings.groups.Gravities'>),
          ('BODY', 'bodies', <class 'mbdyn.bindings.groups.Bodies'>),
...

GROUP

Value:
{'ELEM': {'ATTRIBUTES': ['rotors',
                         'automatic_structurals',
                         'gravities',
                         'bodies',
                         'joints',
                         'beams',
                         'plates',
                         'forces',
...