Skip to content

Reading 2023R1 CDB files fails #351

Open
@germa89

Description

@germa89

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:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions