Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 8 commits into from
Nov 8, 2021

Commits on Oct 12, 2021

  1. Result._plot_point_scalars: Use argument return_cpos in any case

    ... before, it was used only, when `if animate`. Now, it used in any case of the call `plotter.show`.
    beppo-dd committed Oct 12, 2021
    1 Configuration menu
    Copy the full SHA
    56f38f1 View commit details
    Browse the repository at this point in the history
  2. Result._plot_point_scalars: fix screenshot function on Windows OS

    pyvista\plotting\plotting.py:4882: On Windows OS "in the event that the user hits
    the exit-button on the GUI then it must be finalized and deleted as accessing it
    will kill the kernel... proper screenshots cannot be saved if this happens"
    Therefore, when you used ´_plot_point_scalars(..., screenshot=...)´, you got at
    ansys\mapdl\reader\rst.py:2830:
    ´RuntimeError: This plotter is closed and unable to save a screenshot.´
    
    The only solution is, to pass the ´screenshot´ argument to ´plotter.show´
    as done in this patch.
    beppo-dd committed Oct 12, 2021
    Configuration menu
    Copy the full SHA
    d5ad42d View commit details
    Browse the repository at this point in the history
  3. Result._plot_point_scalars: future-safe pyvista version check

    ... the old version would break with version 1.0.0.
    I used the same compare operation as in
    <https://github.com/rbarrois/python-semanticversion/blob/master/semantic_version/base.py>
    tested manually.
    beppo-dd committed Oct 12, 2021
    1 Configuration menu
    Copy the full SHA
    1c00879 View commit details
    Browse the repository at this point in the history

Commits on Oct 13, 2021

  1. cython._binary_reader.cells_with_*_nodes: Generalize and simplify by …

    …directly using `offset` for next cell offset
    
    - Therefore the function `cell_lookup`, which was limited to 3D cells, is no longer necessary.
    - Now, all cell types are supported, while the functions has even been simplified.
    - Now, the functions do not need the parameter `celltypes` any more. Since they are only used in rst.py in the private method `Result._extract_node_components`, I took the liberty to remove the parameter A in the respective definition und the respective call.
    
    Remark: Only tested with a pure python version of the functions, please test the cython function of the commit!
    beppo-dd committed Oct 13, 2021
    Configuration menu
    Copy the full SHA
    62edb6a View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    5ea8199 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    ae3a88e View commit details
    Browse the repository at this point in the history

Commits on Oct 25, 2021

  1. _binary.reader: _file_out does not exist

    When you called `AnsysFile.close()` you got at line 255
    
       'ansys.mapdl.reader._binary_reader.AnsysFile' object has no attribute '_file_out'
    
    as `_file_out` is never created (this line is the only occurrence).
    beppo-dd committed Oct 25, 2021
    Configuration menu
    Copy the full SHA
    1c6351e View commit details
    Browse the repository at this point in the history

Commits on Oct 26, 2021

  1. Result._plot_point_scalars: correct pyvista version check for version…

    … 0.32.dev0
    
    The actual development version is 0.32.dev0: `pv._version.version_info = (0, 32, "dev0")`. There, the string `"dev0"` can not be compared with `0`, so that comparison failed for this version. To solve this, I removed the last element on the right-hand side expression of the comparison. The new comparison `(0, 32, "dev0") > (0, 32)` works now as expected. Tested manually.
    beppo-dd committed Oct 26, 2021
    Configuration menu
    Copy the full SHA
    3f6e296 View commit details
    Browse the repository at this point in the history