20 #ifndef SYMMETRIC_MATRIX_3X3_H 21 #define SYMMETRIC_MATRIX_3X3_H 23 #ifndef SHEAF_DLL_SPEC_H 24 #include "SheafSystem/sheaf_dll_spec.h" 27 #ifndef STD_IOSTREAM_H 28 #include "SheafSystem/std_iostream.h" 34 template <
typename T>
class general_matrix_1x3;
35 template <
typename T>
class general_matrix_3x1;
36 template <
typename T>
class general_matrix_3x2;
37 template <
typename T>
class general_matrix_3x3;
39 template <
typename T>
class met_e3_row_dofs_type;
40 template <
typename T>
class st2_e3_row_dofs_type;
56 class symmetric_matrix_3x3
63 operator met_e3_row_dofs_type<T>& ()
const;
68 operator st2_e3_row_dofs_type<T>& ()
const;
107 operator const T* ()
const;
117 operator general_matrix_3x3<T> ()
const;
122 general_matrix_1x3<T>
row(
int xrow)
const;
127 general_matrix_3x1<T>
column(
int xcolumn)
const;
150 void assign(
const T& xscalar);
268 void trace(T& xresult)
const;
305 template <
typename T>
306 std::ostream& operator<<(std::ostream& xos, const symmetric_matrix_3x3<T>& xm);
314 template <
typename T>
325 template <
typename T>
333 template <
typename T>
339 #endif // ifndef SYMMETRIC_MATRIX_3X3_H void jacobi_transformation(const symmetric_matrix_3x3< T > &xm, general_matrix_3x3< T > &xeigenvectors, T xeigenvalues[3])
Determine the eigenvectors and eigenvalues of a real symmetric matrix xm.
bool is_identity() const
True if this is an identity matrix.
T trace() const
The trace of the matrix (auto-allocated).
static int d()
Dimension of the underlying elements.
General matrix with 3 rows and 2 columns.
static int number_of_rows()
The number of rows.
void sort_eigenvalues(general_matrix_3x3< T > &xeigenvectors, T xeigenvalues[3])
Utility function to sort the eigenvalues into ascending order. Called from jacobi_transformation.
void assign(const T &xscalar)
Assign all elements of this matrix to the value xvalue.
int row_index(int xrow) const
Index for row xrow in the linear storage array.
T * operator[](int xrow)
Pointer to the first element in row xrow of this matrix. Facilitates accessing elements via matrix[i]...
general_matrix_3x1< T > column(int xcolumn) const
A 3x1 matrix containing the elements or column xcolumn.
symmetric_matrix_3x3< T > identity() const
The identity matrix (auto-allocated).
General matrix with 3 rows and 1 column.
T components[6]
Linear storage array.
bool is_positive_definite() const
True if this matrix is positive definite.
symmetric_matrix_3x3< T > inverse() const
The inverse of the matrix (auto-allocated).
symmetric_matrix_3x3< T > adjoint() const
The adjoint of the matrix (auto-allocated).
symmetric_matrix_3x3< T > transpose() const
The transpose of the matrix (auto-allocated).
bool is_diagonal() const
True if this matrix is diagonal.
static int number_of_columns()
The number of columns.
General matrix with 3 rows and 3 columns.
general_matrix_1x3< T > row(int xrow) const
A 1x3 matrix containing the elements or row xrow.
void multiply(const T &xscalar, symmetric_matrix_3x3< T > &xresult) const
This matrix multiplied by a scalar (pre-allocated).
T determinant() const
The determinant of the matrix (auto-allocated).
Namespace for the fiber_bundles component of the sheaf system.
symmetric_matrix_3x3< T > diagonalization() const
The diagonalization of the matrix (auto-allocated).
Symmetric matrix with 3 rows and 3 columns.