op2 Package

This is the pyNastran.op2.rst file.

op2 Module

op2_scalar Module

fortran_format Module

Inheritance diagram of pyNastran.op2.fortran_format

class pyNastran.op2.fortran_format.FortranFormat[source]

Bases: object

Parameters:self – the OP2 object pointer
_get_record_length()[source]

The record length helps us figure out data block size, which is used to quickly size the arrays. We just need a bit of meta data and can jump around quickly.

_get_table_mapper()[source]
Parameters:self – the OP2 object pointer
_read_record(stream=False, debug=True)[source]
Parameters:self – the OP2 object pointer
_read_subtable_3_4(table3_parser, table4_parser, passer)[source]
_read_subtable_results(table4_parser, record_len)[source]

# if reading the data # 0 - non-vectorized # 1 - 1st pass to size the array (vectorized) # 2 - 2nd pass to read the data (vectorized)

_read_subtables()[source]
Parameters:self – the OP2 object pointer
_skip_record()[source]
_skip_subtables()[source]
Parameters:self – the OP2 object pointer
_stream_record(debug=True)[source]

Creates a “for” loop that keeps giving us records until we’re done.

Parameters:self – the OP2 object pointer
get_nmarkers(n, rewind=True)[source]

Gets n markers, so if n=2, it will get 2 markers.

Parameters:
  • self – the OP2 object pointer
  • n – number of markers to get
  • rewind – should the file be returned to the starting point
Retval markers:

list of [1, 2, 3, ...] markers

goto(n)[source]

Jumps to position n in the file

Parameters:
  • self – the OP2 object pointer
  • n – the position to goto
isAllSubcases = None

stores if the user entered [] for iSubcases

is_valid_subcase()[source]

Lets the code check whether or not to read a subcase

Parameters:self – the OP2 object pointer
Retval is_valid:
 should this subcase defined by self.isubcase be read?
passer(data)[source]

dummy function used for unsupported tables :param self: the OP2 object pointer

read_block()[source]
Reads a block following a pattern of:
[nbytes, data, nbytes]
Retval data:the data in binary
read_markers(markers)[source]

Gets specified markers, where a marker has the form of [4, value, 4]. The “marker” corresponds to the value, so 3 markers takes up 9 integers. These are used to indicate position in the file as well as the number of bytes to read.

Parameters:
  • self – the OP2 object pointer
  • markers – markers to get; markers = [-10, 1]
show(n, types='ifs')[source]
Parameters:self – the OP2 object pointer
show_data(data, types='ifs')[source]
show_ndata(n, types='ifs')[source]
skip_block()[source]
Skips a block following a pattern of:
[nbytes, data, nbytes]
Parameters:self – the OP2 object pointer
Retval data:since data can never be None, a None value indicates something bad happened.
write_data(f, data, types='ifs')[source]

Useful function for seeing what’s going on locally when debugging.

Parameters:self – the OP2 object pointer
write_ndata(f, n, types='ifs')[source]

Useful function for seeing what’s going on locally when debugging.

Parameters:self – the OP2 object pointer

op2Codes Module

Inheritance diagram of pyNastran.op2.op2Codes

class pyNastran.op2.op2Codes.Op2Codes[source]

Bases: object

_set_op2_date(month, day, year)[source]
code_information()[source]

prints the general table information DMAP - page 60-63

get_element_type(eCode)[source]
isRandomResponse()[source]
isReal()[source]
isRealImaginaryOrMagnitudePhase()[source]
isSortedResponse()[source]
isStress()[source]
is_magnitude_phase()[source]
is_real_imaginary()[source]
is_sort1()[source]
is_sort2()[source]
is_thermal()[source]
print_table_code(table_code)[source]

op2_helper Module

op2_common Module

op2_f06_common Module

vector_utils Module