cython._binary_reader: cells_with_*_nodes: Generalize and simplify by directly using offset for next cell offset; close: _file_out does not exist; correct pyvista version check for version 0.32.dev0
#74
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes of cython._binary_reader
cells_with_*_nodes: Generalize and simplify by directly using
offsetfor next cell offsetcell_lookup, which was limited to 3D cells, is no longer necessary.celltypesany more. Since they are only used in rst.py in the private methodResult._extract_node_components, I took the liberty to remove the parametercelltypesin the respective definition and the respective call.offset[i+1]first andoffset[i]in the next loop step.close:
_file_outdoes not exist: When you calledAnsysFile.close()you got at line 255del self._file_out:'ansys.mapdl.reader._binary_reader.AnsysFile' object has no attribute '_file_out'as_file_outis never created (this line is the only occurrence). Thus, I removed this line in commit 1c6351e.Remark: Only tested with a pure python version of the functions, please test the cython functions of this commit!
Fix of Result._plot_point_scalars (improvement for 1c00879)
pv._version.version_info = (0, 32, "dev0"). There, the string"dev0"can not be compared with0, so that comparison failed for this version. I removed the last element on the right-hand side expression of the comparison to solve this. Now, the new comparison(0, 32, "dev0") > (0, 32)works as expected. Commit 3f6e296 was tested manually.