[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Structures and tensors
From: |
John W. Eaton |
Subject: |
Re: Structures and tensors |
Date: |
Mon, 21 Aug 2006 14:37:25 -0400 |
On 2-Aug-2006, Jordi Gutierrez Hermoso wrote:
| On 02/08/06, Peter Cloetens <address@hidden> wrote:
| > Then I rewrote everything with cells, where each element of the cell
| > array corresponds to 1 matrix. This improved the speed very considerably.
|
| I think I'm having similar issues right now with some weather
| equations. Any idea what the order of magnitude of the improvement is?
|
| > You use:
| > E{k} instead of E(:,:,k)
| > As long as you do not need to access your data in the third dimension this
| > is much more efficient and readable.
|
| How about if I need FOUR dimensions? See, I'm modelling some weather
| dynamics, and I would like to keep track of the passage of time, and
| I'm not assuming the atmosphere to be thin enough to consider it
| two-dimensional (though I probably should). So I end up having rank 4
| tensors, one for each spacetime dimension. :-/
|
| Any suggestion how to improve this?
Yes. Find out why it is slow. Design a better way of doing it.
Submit a patch.
jwe