op2 Package¶
This is the pyNastran.op2.rst file.
op2 Module¶
op2_scalar Module¶
fortran_format Module¶
- 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.
- _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)
- _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]
- 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.
op2_helper Module¶
op2_common Module¶
op2_f06_common Module¶
vector_utils Module¶
- resultObjects Package
- tables Package
- test Package