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++)
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);
label m() const
Return the number of rows.
A templated 2D square symmetric matrix of objects of <T>, where the n x n matrix dimension is known a...
Traits class for primitives.
dimensionedScalar det(const dimensionedSphericalTensor &dt)
SymmetricSquareMatrix< Type > invDecomposed(const SymmetricSquareMatrix< Type > &)
Return the LU decomposed SymmetricSquareMatrix inverse.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
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 > &, const label sign)
Return the LU decomposed SquareMatrix det.