bc69
07-26-2004, 05:06 PM
I've got a question about the mglin example in the C++ Examples Book.
After running mglin, the example does a check by setting up an array called f[][]. It then loads the values returned from mglin into the f array, comparing neighboring cells (if I understand correctly, this pattern of cells that it's comparing is a Laplacian). It then multiplies that value by (JMAX-1)*(JMAX-1), or effectively, the number of cells in the array.
What is the reason for multiplying by this number? Should I do this to my results? I noticed that most of the examples multiply by (JMAX-1) squared or just (JMAX -1) when filling out the f array.
Sorry if this is a basic question that seems obvious. I don't have a math background. Any help is appreciated.
thanks,
Brian
After running mglin, the example does a check by setting up an array called f[][]. It then loads the values returned from mglin into the f array, comparing neighboring cells (if I understand correctly, this pattern of cells that it's comparing is a Laplacian). It then multiplies that value by (JMAX-1)*(JMAX-1), or effectively, the number of cells in the array.
What is the reason for multiplying by this number? Should I do this to my results? I noticed that most of the examples multiply by (JMAX-1) squared or just (JMAX -1) when filling out the f array.
Sorry if this is a basic question that seems obvious. I don't have a math background. Any help is appreciated.
thanks,
Brian