Package mbdyn :: Module groups :: Class ItemGroup
[hide private]

Class ItemGroup

source code

               object --+    
                        |    
                     list --+
                            |
record.RecordBase --+       |
                    |       |
        record.Record --+   |
                        |   |
       common.BasicObject --+
                            |
                           ItemGroup
Known Subclasses:
ElementGroup, NodeGroup, ReferenceList

A general interface for a Node group or an Elem group. The mbdyn_key is the same key as used in MBDyn, this is the name of the group in capital letters (FORCE, BEAM and so on).

Instance Methods [hide private]
 
__init__(self, name)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
add_item(self, item)
Add an item to the list and keep track of its name
source code
 
get_number(self)
Return the number of items in the list
source code
 
set_labels(self)
Save the labels on all the item contained into the list
source code
 
get_from_label(self, label)
Return the node according to its label
source code
 
get(self, name)
Return a node from its name
source code
 
set_labels_auto(self, offset=1)
Set automatically the labels for MBDyn.
source code
 
_is_more_than_one_time(self, name)
Function only used for naming (or renaming) the nodes and elements
source code
 
set_names_auto(self)
Set automatically the names.
source code

Inherited from list: __add__, __contains__, __delitem__, __delslice__, __eq__, __ge__, __getattribute__, __getitem__, __getslice__, __gt__, __hash__, __iadd__, __imul__, __iter__, __le__, __len__, __lt__, __mul__, __ne__, __new__, __repr__, __reversed__, __rmul__, __setitem__, __setslice__, append, count, extend, index, insert, pop, remove, reverse, sort

Inherited from object: __delattr__, __reduce__, __reduce_ex__, __setattr__, __str__

Inherited from common.BasicObject: get_lines, get_mbdyn_instance, set_comment, set_label, set_name, set_simulation_ref

Inherited from record.Record: common_init_results, init_results, save, set_own_parameters, will_save, will_save_nothing, will_save_only

Inherited from record.RecordBase: collect_own_parameters, collect_parameters, set_own_para, set_parameters

Inherited from record.RecordBase (private): _collect_own_para

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, name)
(Constructor)

source code 
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
Returns:
new list

Overrides: list.__init__
(inherited documentation)

set_labels_auto(self, offset=1)

source code 
Set automatically the labels for MBDyn. This function is only used when the user is writing the MBDyn input file from Python.

set_names_auto(self)

source code 
Set automatically the names. It may change the ones of the user if the name is present more than one time in the list. This function is not safe, the name could be renamed to an existing one but the names are not important for the package work.