Go to the documentation of this file.
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)
56 inv(i, j) =
sum/matrix(i, i);
60 SymmetricSquareMatrix<Type> result(
n,
Zero);
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);
117 template<
class AnyType>
122 for (
label i=0; i < this->
n(); ++i)
static constexpr const zero Zero
Global zero.
scalar detDecomposed(const SquareMatrix< Type > &, const label sign)
Return the LU decomposed SquareMatrix det.
A templated (m x n) matrix of objects of <T>. The layout is (mRows x nCols) - row-major order:
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Templated identity and dual space identity tensors derived from SphericalTensor.
dimensionedSphericalTensor inv(const dimensionedSphericalTensor &dt)
void operator=(const zero)
Assign all elements to zero.
SymmetricSquareMatrix< Type > invDecomposed(const SymmetricSquareMatrix< Type > &)
Return the LU decomposed SymmetricSquareMatrix inverse.
A templated 2D square symmetric matrix of objects of <T>, where the n x n matrix dimension is known a...
void LUDecompose(scalarSquareMatrix &matrix, labelList &pivotIndices)
LU decompose the matrix with pivoting.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
label m() const noexcept
The number of rows.
Traits class for primitives.
label k
Boltzmann constant.
dimensioned< Type > sum(const DimensionedField< Type, GeoMesh > &df)
dimensionedScalar det(const dimensionedSphericalTensor &dt)