pyyeti.nastran.op2.OP2.rdop2mats¶
- OP2.rdop2mats(names=None, lower=False, verbose=False, which=-1)[source]¶
Read all matrices from Nastran output2 file.
- Parameters:
names (list_like; optional) – Iterable of names to read in. If None, read all. These can be input in lower case. Each name in names can end in a “*” for simple wildcard matching.
lower (bool; optional) – If True, returned names will be in lower case.
verbose (bool; optional) – If True, print matrix names to screen as they are found.
which (integer or str; optional) – If integer, specifies which occurrence of each matrix to read starting at 0. Default is -1; read the last entry for each matrix only. Can also be the string “all”. In that case, each entry in the dictionary is a list of all occurrences of each matrix (even if there is only one occurrence).
- Returns:
dict – Dictionary containing all matrices in the op2 file. If which is an integer:
{'NAME1': matrix1, 'NAME2': matrix2, ...}
If which is “all”:
{'NAME1': [1st matrix1, 2nd matrix1, ...], 'NAME2': [1st matrix2, 2nd matrix2, ...], ...}
Notes
Unless lower is True, the keys are the names as stored in the op2 file (upper case).