pyyeti.nastran.bulk.rdcsupers

pyyeti.nastran.bulk.rdcsupers(f, *, follow_includes=True, include_symbols=None, encoding='utf_8')[source]

Read CSUPER entries

Parameters:
  • f (string or file_like or None) – Either a filename, or is a file_like object as returned by open(). If file_like object, it is rewound first. Can also be the name of a directory or None; in these cases, a GUI is opened for file selection.

  • follow_includes (bool; optional) – If True, INCLUDE statements will be followed recursively. Note that if f is a StringIO object, or another object that does not have a name property, this parameter will be set to False.

  • include_symbols (dict; optional) – A dictionary mapping Nastran symbols to an associated path. These can be read from a file using rdsymbols().

  • encoding (string; optional) – Encoding to use when opening text file. This option will be passed to any files read in via the follow_includes option.

Returns:

dictionary – The dictionary keys are the CSUPER IDs. The dictionary values are all the ids from the CSUPER card in the form: [csuper_id, 0, node_id_1, node_id_2, … node_id_n]

Notes

Any “THRU” fields will be set to -1. This routine simply calls the more general routine rdcards():

rdcards(f, 'csuper', return_var='dict', dtype=np.int64, blank=-1)

Examples

>>> import numpy as np
>>> from pyyeti import nastran
>>> from io import StringIO
>>> np.set_printoptions(linewidth=60)
>>> f = StringIO("CSUPER,101,0,3,11,19,27,1995001,1995002\n"
...              ",1995003,thru,1995010  $ comment")
>>> nastran.rdcsupers(f)
{101: array([    101,       0,       3,      11,      19,      27,
       1995001, 1995002, 1995003,      -1, 1995010]...)}