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

Issue when writing d3plot with "node_temperature" field #65

Open
lgforvia opened this issue Oct 25, 2024 · 0 comments
Open

Issue when writing d3plot with "node_temperature" field #65

lgforvia opened this issue Oct 25, 2024 · 0 comments

Comments

@lgforvia
Copy link

🐛 Describe the bug
issue when trying to writing d3plot field "node_temperature"

🔢 To Reproduce
Steps to reproduce the behavior:

  1. read d3plot file
  2. change values in "node_temperature" field
  3. error when writing the new file

AttributeError Traceback (most recent call last)
Cell In[38], line 2
1 d3plot = D3plot(r'ori.d3plot',state_filter={0, -1})
----> 2 d3plot.write_d3plot(new.d3plot](file:///new.d3plot)')

File *\Lib\site-packages\lasso\dyna\d3plot.py:6217, in D3plot.write_d3plot(self, filepath, block_size_bytes, single_file)
6215 # determine write settings
6216 write_settings = D3plotWriterSettings(self, block_size_bytes, single_file)
-> 6217 write_settings.build_header()
6219 # remove old files
6220 if isinstance(filepath, str):

File *\Lib\site-packages\lasso\dyna\d3plot.py:355, in D3plotWriterSettings.build_header(self)
349 elif (
350 ArrayType.node_temperature in self.d3plot.arrays
351 and ArrayType.node_heat_flux in self.d3plot.arrays
352 ):
354 node_temp_shape = self.d3plot.arrays[ArrayType.node_temperature].shape
--> 355 if node_temp_shape.ndim == 2:
356 it_temp += 2
357 elif node_temp_shape.ndim == 3:

AttributeError: 'tuple' object has no attribute 'ndim'

💘 Expected behavior
write d3plot after having modified "node_temperature" field

🖥️ Setup

  • lasso-python version: 2.0.2
  • OS: windows 11
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