34 const SquareMatrix<Type>& matrix,
38 Type diagProduct = pTraits<Type>::one;
40 for (
label i=0; i<matrix.m(); i++)
42 diagProduct *= matrix(i, i);
45 return sign*diagProduct;
50 Foam::scalar
Foam::det(
const SquareMatrix<Type>& matrix)
52 SquareMatrix<Type> matrixTmp = matrix;
63 Foam::scalar
Foam::det(SquareMatrix<Type>& matrix)
dimensionedScalar det(const dimensionedSphericalTensor &dt)
List< label > labelList
A List of labels.
dimensionedScalar sign(const dimensionedScalar &ds)
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.
scalar detDecomposed(const SquareMatrix< Type > &, const label sign)
Return the LU decomposed SquareMatrix det.