ENH: partial overhaul of Matrix type (#1220)

- additional operators:
  + compound assignment
  + inner product: operator&
  + outer product: operator^

- additional functions:
   - MatrixBlock methods: subColumn, subRow, subMatrix
   - L2 norms for matrix or column
   - trace, diag, round, transpose

- MatrixBlock methods: col(), block() are deprecated since their
  access patterns with (size, offset) are unnatural/unwieldy.

- verifications by test/Matrix/Test-Matrix
This commit is contained in:
kuti
2019-05-23 11:32:45 +01:00
committed by Andrew Heather
parent 3de7cd5207
commit 745624c024
15 changed files with 1974 additions and 594 deletions

View File

@ -190,9 +190,9 @@ inline Foam::RectangularMatrix<Type> outer
{
RectangularMatrix<Type> f1f2T(f1.size(), f2.size());
for (label i=0; i<f1f2T.m(); i++)
for (label i = 0; i < f1f2T.m(); ++i)
{
for (label j=0; j<f1f2T.n(); j++)
for (label j = 0; j < f1f2T.n(); ++j)
{
f1f2T(i, j) = f1[i]*f2[j];
}