Cheers, you explanation is excellent. I really wasn't sure what the *** actually did.

The code is quite big 500kb of source. I found it in the code at a later time used in memory allocation, I don't know does this help you understand further what is happening:

Note: The code is a numerical simulation, it's a 3d code, so cells just refers to the 3d cell in question on the grid. the flux is just the amount of heat or material etc. flowing through a face of a cell.

Code:

if(rank == MASTER)
printf("Allocating memory\n");
cell=(CELL ***)calloc(nx_cells+2,sizeof(CELL **));
testdiss=(double ***)calloc(nx_cells+2,sizeof(double **));
inith2=(double ***)calloc(nx_cells+2,sizeof(double **));
temp=(double ***)calloc(nx_cells+2,sizeof(double **));
cooling=(double ***)calloc(nx_cells+2,sizeof(double **));
cv=(double ***)calloc(nx_cells+2,sizeof(double **));
subarray=(double ***)calloc(nx_cells+2,sizeof(double **));
initp=(double ***)calloc(nx_cells+2,sizeof(double **));
initden=(double ***)calloc(nx_cells+2,sizeof(double **));
init_source1=(double ***)calloc(nx_cells+2,sizeof(double **));
init_source2=(double ***)calloc(nx_cells+2,sizeof(double **));
for(i=0;i<nx_cells+2;i++){
cell[i]=(CELL **)calloc(ny_cells+2,sizeof(CELL *));
testdiss[i]=(double **)calloc(ny_cells+2,sizeof(double *));
inith2[i]=(double **)calloc(ny_cells+2,sizeof(double *));
temp[i]=(double **)calloc(ny_cells+2,sizeof(double *));
cooling[i]=(double **)calloc(ny_cells+2,sizeof(double *));
cv[i]=(double **)calloc(ny_cells+2,sizeof(double *));
subarray[i]=(double **)calloc(ny_cells+2,sizeof(double *));
initp[i]=(double **)calloc(ny_cells+2,sizeof(double *));
initden[i]=(double **)calloc(ny_cells+2,sizeof(double *));
init_source1[i]=(double **)calloc(ny_cells+2,sizeof(double *));
init_source2[i]=(double **)calloc(ny_cells+2,sizeof(double *));
for(j=0;j<ny_cells+2;j++){
cell[i][j]=(CELL *)calloc(nz_cells+2,sizeof(CELL));
testdiss[i][j]=(double *)calloc(nz_cells+2,sizeof(double));
inith2[i][j]=(double *)calloc(nz_cells+2,sizeof(double));
temp[i][j]=(double *)calloc(nz_cells+2,sizeof(double));
cooling[i][j]=(double *)calloc(nz_cells+2,sizeof(double));
cv[i][j]=(double *)calloc(nz_cells+2,sizeof(double));
subarray[i][j]=(double *)calloc(nz_cells+2,sizeof(double));
initp[i][j]=(double *)calloc(nz_cells+2,sizeof(double));
initden[i][j]=(double *)calloc(nz_cells+2,sizeof(double));
init_source1[i][j]=(double *)calloc(nz_cells+2,sizeof(double));
init_source2[i][j]=(double *)calloc(nz_cells+2,sizeof(double));
}

I had a look through the header files for this and found the following:

Code:

extern CELL average(CELL , double, CELL , double, CELL , double);
extern CELL extrapolate(CELL , double, CELL , int);

Thanks for your help with my question, it is much appreciated.

Wayne.