The Matrix (C notation)
| A[1][1] | A[1][2] | A[1][3] |
| A[2][1] | A[2][2] | A[2][3] |
| A(1,1) | A(1,2) | A(1,3) |
| A(2,1) | A(2,2) | A(2,3) |
Some packages use Row Majority, some Column and some can handle both. The following table summarizes Row and Column Majority, and shows how the packages want their multi-dimensional arrays.
| Majority | Index | How Stored | The Loop C Fortran |
Packages |
|---|---|---|---|---|
| Row (C-order) |
Last Index Varies Fastest | A[1][1] A[1][2] A[1][3] A[2][1] A[2][2] A[2][3] |
WRITE(IUNIT)((A(I,J),j=1,2),I=1,3) |
PV~Wave DX(Row) |
| Column (Fortran-order) | First Index Varies Fastest | A[1][1] A[2][1] A[1][2] A[2][2] A[1][3] A[2][3] |
WRITE(IUNIT)((A(I,J),I=1,3),j=1,2) |
Bob Fast DX(Column) Tecplot |
This information is available in alternative formats upon request by individuals with disabilities. Please send email to alt-format@msi.umn.edu or call 612-624-0528. |
||||||||||||
|
HOME | QUESTIONS | FEEDBACK |
||||||||||||
|
||||||||||||