Description
🐛 Describe the bug
issue when trying to writing d3plot field "node_temperature"
🔢 To Reproduce
Steps to reproduce the behavior:
- read d3plot file
- change values in "node_temperature" field
- 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