Matrix: Added (i, j) addressing to allow support for addressing blocks of the matrix

This change brings OpenFOAM into line with the standard matrix
addressing in other C++ libraries for better interoperability.
This commit is contained in:
Henry Weller
2016-03-20 19:44:29 +00:00
parent 767ffc3c7b
commit c13421b10a
29 changed files with 197 additions and 224 deletions

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -75,25 +75,25 @@ public:
dfdx[2] = (2.0/sqr(x))*y[2];
dfdx[3] = (3.0/sqr(x))*y[3];
dfdy[0][0] = 0.0;
dfdy[0][1] = -1.0;
dfdy[0][2] = 0.0;
dfdy[0][3] = 0.0;
dfdy(0, 0) = 0.0;
dfdy(0, 1) = -1.0;
dfdy(0, 2) = 0.0;
dfdy(0, 3) = 0.0;
dfdy[1][0] = 1.0;
dfdy[1][1] = -1.0/x;
dfdy[1][2] = 0.0;
dfdy[1][3] = 0.0;
dfdy(1, 0) = 1.0;
dfdy(1, 1) = -1.0/x;
dfdy(1, 2) = 0.0;
dfdy(1, 3) = 0.0;
dfdy[2][0] = 0.0;
dfdy[2][1] = 1.0;
dfdy[2][2] = -2.0/x;
dfdy[2][3] = 0.0;
dfdy(2, 0) = 0.0;
dfdy(2, 1) = 1.0;
dfdy(2, 2) = -2.0/x;
dfdy(2, 3) = 0.0;
dfdy[3][0] = 0.0;
dfdy[3][1] = 0.0;
dfdy[3][2] = 1.0;
dfdy[3][3] = -3.0/x;
dfdy(3, 0) = 0.0;
dfdy(3, 1) = 0.0;
dfdy(3, 2) = 1.0;
dfdy(3, 3) = -3.0/x;
}
};