Hollow matrices?

06-27-2006, 12:18 PM
I am dealing with large 3D matrices and to overcome memory problems I have to be thrifty with the use of memory, but I want the program to be flexible.
The problem is that the calculation of the outer points (a layer usually about 5 to 10 points) in the 3D matrix is different from the interior and also it contains auxiliary parameters. In order to keep the memory needed as small as possible it is not effective that assign a complete 3D matrices to these auxiliary parameters since they are not needed in the interior.
It is possible to treat the outer shell in invidual slabs but this not a nice method and it becomes rather complex and prone to create programming errors.
Somebody told me that it is possible to design "hollow" matrices in C++ using pointers i.e. matrices which only contains values of the outer shell. I'm not really an expert programmer in Fortran and I don't know if it possible to design "hollow" matrices. Can anybody help me with this problem?