pyyeti.nastran.bulk.rdrvdof

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

Read RVDOF and RVDOF1 cards from a file.

This supports both RVDOF and RVDOF1 cards, with and without a “THRU” field.

Parameters:
  • f (string or file_like or None) – Either a name of a file, 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:

rvdofs (list) – The RVDOF entries. This is a sorted list of (ID, DOF) tuples.

Examples

>>> from pyyeti import nastran
>>> from io import StringIO
>>> f = StringIO("RVDOF1,13,1001,THRU,1002")
>>> print(nastran.rdrvdof(f))
[(1001, 1), (1001, 3), (1002, 1), (1002, 3)]