36 const SymmetricSquareMatrix<Type>& matrix
39 const label
n = matrix.n();
41 SymmetricSquareMatrix<Type>
inv(
n, Zero);
43 for (label i = 0; i <
n; ++i)
45 inv(i, i) = 1.0/matrix(i, i);
47 for (label j = 0; j < i; ++j)
51 for (label
k = j;
k < i; ++
k)
56 inv(i, j) =
sum/matrix(i, i);
60 SymmetricSquareMatrix<Type> result(
n, Zero);
62 for (label
k = 0;
k <
n; ++
k)
64 for (label i = 0; i <=
k; ++i)
66 for (label j = 0; j <=
k; ++j)
80 const SymmetricSquareMatrix<Type>& matrix
83 SymmetricSquareMatrix<Type> matrixTmp(matrix);
95 for (label i = 0; i < matrix.
m(); ++i)
97 diagProduct *= matrix(i, i);
100 return sqr(diagProduct);
117template<
class AnyType>
122 for (label i=0; i < this->
n(); ++i)
Templated identity and dual space identity tensors derived from SphericalTensor.
A templated (m x n) matrix of objects of <T>. The layout is (mRows x nCols) - row-major order:
label m() const noexcept
The number of rows.
A templated (N x N) square matrix of objects of <Type>, containing N*N elements, derived from Matrix.
SymmetricSquareMatrix & operator=(const SymmetricSquareMatrix &)=default
Copy assignment.
A class representing the concept of 1 (one) that can be used to avoid manipulating objects known to b...
dimensionedScalar det(const dimensionedSphericalTensor &dt)
dimensionedSymmTensor sqr(const dimensionedVector &dv)
dimensioned< Type > sum(const DimensionedField< Type, GeoMesh > &df)
void LUDecompose(scalarSquareMatrix &matrix, labelList &pivotIndices)
LU decompose the matrix with pivoting.
dimensionedSphericalTensor inv(const dimensionedSphericalTensor &dt)
scalar detDecomposed(const SquareMatrix< Type > &matrix, const label sign)
Return the determinant of the LU decomposed SquareMatrix.
SymmetricSquareMatrix< Type > invDecomposed(const SymmetricSquareMatrix< Type > &)
Return the LU decomposed SymmetricSquareMatrix inverse.