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

Reading 2023R1 CDB files fails #351

Open
germa89 opened this issue Dec 11, 2023 · 0 comments
Open

Reading 2023R1 CDB files fails #351

germa89 opened this issue Dec 11, 2023 · 0 comments

Comments

@germa89
Copy link
Contributor

germa89 commented Dec 11, 2023

The following code fails:

from ansys.mapdl.reader.archive import Archive
archive = Archive(r'2Blocks2023R2.cdb')

Traceback:

IndexError                                Traceback (most recent call last)
Cell In[7], line 1
----> 1 archive = Archive(r'/Users/german.ayuso/pymapdl/tmp/2Blocks2023R2.cdb')

File ~/pymapdl/.venv_macos/lib/python3.10/site-packages/ansys/mapdl/reader/archive.py:148, in Archive.__init__(self, filename, read_parameters, parse_vtk, force_linear, allowable_types, null_unallowed, verbose, name, read_eblock)
    145 self._null_unallowed = null_unallowed
    147 if parse_vtk:
--> 148     self._grid = self._parse_vtk(allowable_types, force_linear, null_unallowed)

File ~/pymapdl/.venv_macos/lib/python3.10/site-packages/ansys/mapdl/reader/mesh.py:185, in Mesh._parse_vtk(self, allowable_types, force_linear, null_unallowed, fix_midside, additional_checking)
    183 # ANSYS element type to VTK map
    184 type_ref = np.empty(2 << 16, np.int32)  # 131072
--> 185 type_ref[self._ekey[:, 0]] = etype_map[self._ekey[:, 1]]
    187 if allowable_types is None or 200 in allowable_types:
    188     for etype_ind, etype in self._ekey:
    189         # MESH200

IndexError: too many indices for array: array is 1-dimensional, but 2 were indexed

CDB File:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant