33 const SymmetricSquareMatrix<Type>& matrix
36 const label n = matrix.n();
38 SymmetricSquareMatrix<Type>
inv(n,
Zero);
42 inv(i, i) = 1.0/matrix(i, i);
44 for (
label j=0; j<i; j++)
50 sum -= matrix(i,
k)*
inv(
k, j);
53 inv(i, j) = sum/matrix(i, i);
57 SymmetricSquareMatrix<Type> result(n,
Zero);
61 for (
label i=0; i <=
k; i++)
63 for (
label j=0; j <=
k; j++)
77 const SymmetricSquareMatrix<Type>& matrix
80 SymmetricSquareMatrix<Type> matrixTmp(matrix);
92 for (
label i=0; i<matrix.
m(); i++)
94 diagProduct *= matrix(i, i);
97 return sqr(diagProduct);
scalar detDecomposed(const SquareMatrix< Type > &, const label sign)
Return the LU decomposed SquareMatrix det.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
void LUDecompose(scalarSquareMatrix &matrix, labelList &pivotIndices)
LU decompose the matrix with pivoting.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
dimensionedSphericalTensor inv(const dimensionedSphericalTensor &dt)
Traits class for primitives.
label k
Boltzmann constant.
dimensionedScalar det(const dimensionedSphericalTensor &dt)
SymmetricSquareMatrix< Type > invDecomposed(const SymmetricSquareMatrix< Type > &)
Return the LU decomposed SymmetricSquareMatrix inverse.
dimensioned< Type > sum(const DimensionedField< Type, GeoMesh > &df)
A templated 2D square symmetric matrix of objects of <T>, where the n x n matrix dimension is known a...
label m() const
Return the number of rows.