-
Notifications
You must be signed in to change notification settings - Fork 25
Open
Labels
bugSomething isn't workingSomething isn't working
Description
What happened?
I've loaded a set of results using fdsreader.Simulation(), and then after parsing some data from it, I use simulation.clear_cache() to reduce memory usage. However for examples which contain a line DEVC device, eg
&DEVC XB=1.5,1.5,0,0,0,2.9, QUANTITY='VISIBILITY', ID='visibility_line', POINTS=100, STATISTICS_START=0., STATISTICS_END=5. /
clear_cache() crashes with this error:
def clear_cache(self):
"""Remove all data from the internal cache that has been loaded so far to free memory.
"""
for element in self._elements:
> element.clear_cache()
E AttributeError: 'list' object has no attribute 'clear_cache'
When inspecting the simulation object, it looks like this is because the line DEVC device has been loaded a list of Device() objects:
print(sim.devices._elements[6])
[
Device(id='visibility_line', xyz=(1.5, 0.001, 0.001), quantity=Quantity('VISIBILITY')),
Device(id='visibility_line', xyz=(1.5, 0.001, 0.02929), quantity=Quantity('VISIBILITY')),
...
]
Steps to reproduce
- Run an FDS case which includes a line DEVC device definition, eg the one mentioned above
- Load the simulation with
simulation = Simulation(results_dir) - Try to clear the cache with
simulation.clear_cache()
FDS version used
6.9.1
fdsreader version used
1.11.7
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working