efficient way of storing tensors
Asked by
B. Emek Abali
Dear all,
in a dynamic problem, a trial of storing the history (the values of a tensor from the all the last time values) like:
-------
history=[]
def tensor(u):
.....
return as_tensor(...)
while t < end:
...
...
solve(u)
history.
-------
is working perfectly fine, but after couple of time steps, this listing is not really efficient anymore and 'append' takes more time than the solution itself :)
Is there a better way of storing tensors?
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- DOLFIN Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- Anders Logg
- Solved:
- Last query:
- Last reply:
To post a message you must log in.