SheafSystem  0.0.0.0
fiber_bundle::symmetric_matrix_3x3< T > Class Template Reference

Symmetric matrix with 3 rows and 3 columns. More...

#include <symmetric_matrix_3x3.h>

Public Member Functions

 operator met_e3_row_dofs_type< T > & () const
 Operator to convert current to met_e3_row_dofs_type. More...
 
 operator st2_e3_row_dofs_type< T > & () const
 Operator to convert current to st2_e3_row_dofs_type. More...
 
T * operator[] (int xrow)
 Pointer to the first element in row xrow of this matrix. Facilitates accessing elements via matrix[i][j]. More...
 
const T * operator[] (int xrow) const
 Pointer to the first element in row xrow of this matrix. Facilitates accessing elements via matrix[i][j]. More...
 
 operator T* ()
 Conversion (cast) operator to convert to the associated matrix type (non const version). More...
 
 operator const T * () const
 Conversion (cast) operator to convert to the associated matrix type (const version). More...
 
int row_index (int xrow) const
 Index for row xrow in the linear storage array. More...
 
 operator general_matrix_3x3< T > () const
 Conversion operator to convert to the associated general matrix type. More...
 
general_matrix_1x3< T > row (int xrow) const
 A 1x3 matrix containing the elements or row xrow. More...
 
general_matrix_3x1< T > column (int xcolumn) const
 A 3x1 matrix containing the elements or column xcolumn. More...
 
void adjoint (symmetric_matrix_3x3< T > &xresult) const
 The adjoint of the matrix (pre-allocated). More...
 
symmetric_matrix_3x3< T > adjoint () const
 The adjoint of the matrix (auto-allocated). More...
 
void assign (const T &xscalar)
 Assign all elements of this matrix to the value xvalue. More...
 
void determinant (T &xresult) const
 The determinant of the matrix (pre-allocated). More...
 
determinant () const
 The determinant of the matrix (auto-allocated). More...
 
void diagonalization (symmetric_matrix_3x3< T > &xresult) const
 The diagonalization of the matrix (pre-allocated). More...
 
symmetric_matrix_3x3< T > diagonalization () const
 The diagonalization of the matrix (auto-allocated). More...
 
void identity (symmetric_matrix_3x3< T > &xresult) const
 The identity matrix (pre-allocated). More...
 
symmetric_matrix_3x3< T > identity () const
 The identity matrix (auto-allocated). More...
 
void inverse (symmetric_matrix_3x3< T > &xresult) const
 The inverse of the matrix (pre-allocated). More...
 
symmetric_matrix_3x3< T > inverse () const
 The inverse of the matrix (auto-allocated). More...
 
bool is_diagonal () const
 True if this matrix is diagonal. More...
 
bool is_identity () const
 True if this is an identity matrix. More...
 
bool is_positive_definite () const
 True if this matrix is positive definite. More...
 
void multiply (const T &xscalar, symmetric_matrix_3x3< T > &xresult) const
 This matrix multiplied by a scalar (pre-allocated). More...
 
symmetric_matrix_3x3< T > multiply (const T &xscalar) const
 This matrix multiplied by a scalar (auto-allocated). More...
 
void multiply (const general_matrix_3x1< T > &xother, general_matrix_3x1< T > &xresult) const
 Premultiply matrix xother by this matrix (pre-allocated). More...
 
general_matrix_3x1< T > multiply (const general_matrix_3x1< T > &xother) const
 Premultiply matrix xother by this matrix (auto-allocated). More...
 
void multiply (const general_matrix_3x2< T > &xother, general_matrix_3x2< T > &xresult) const
 Premultiply matrix xother by this matrix (pre-allocated). More...
 
general_matrix_3x2< T > multiply (const general_matrix_3x2< T > &xother) const
 Premultiply matrix xother by this matrix (auto-allocated). More...
 
void multiply (const general_matrix_3x3< T > &xother, general_matrix_3x3< T > &xresult) const
 Premultiply matrix xother by this matrix (pre-allocated). More...
 
general_matrix_3x3< T > multiply (const general_matrix_3x3< T > &xother) const
 Premultiply matrix xother by this matrix (auto-allocated). More...
 
void multiply (const symmetric_matrix_3x3< T > &xother, general_matrix_3x3< T > &xresult) const
 Premultiply matrix xother by this matrix (pre-allocated). Note that multiplying 2 symmetric matrices results (in general) in a general square matrix. More...
 
general_matrix_3x3< T > multiply (const symmetric_matrix_3x3< T > &xother) const
 Premultiply matrix xother by this matrix (auto-allocated). Note that multiplying 2 symmetric matrices results (in general) in a general square matrix. More...
 
void trace (T &xresult) const
 The trace of the matrix (pre-allocated). More...
 
trace () const
 The trace of the matrix (auto-allocated). More...
 
void transpose (symmetric_matrix_3x3< T > &xresult) const
 The transpose of the matrix (pre-allocated). More...
 
symmetric_matrix_3x3< T > transpose () const
 The transpose of the matrix (auto-allocated). More...
 

Static Public Member Functions

static int number_of_rows ()
 The number of rows. More...
 
static int number_of_columns ()
 The number of columns. More...
 
static int d ()
 Dimension of the underlying elements. More...
 

Public Attributes

components [6]
 Linear storage array. More...
 

Detailed Description

template<typename T>
class fiber_bundle::symmetric_matrix_3x3< T >

Symmetric matrix with 3 rows and 3 columns.

Class symmetric_matrix_3x3 is a special kind of matrix class intended to be used in conjunction with various row_dofs_type classes (pod types). The pod types will be converted (cast) to appropriate matrix types. So, this class is also required to be a pod type also (ie: really just a struct with no inheritance, no constructors, no virtual functions, etc.).

Definition at line 38 of file general_matrix_3x3.h.

Member Function Documentation

◆ adjoint() [1/2]

template<typename T >
void fiber_bundle::symmetric_matrix_3x3< T >::adjoint ( symmetric_matrix_3x3< T > &  xresult) const

The adjoint of the matrix (pre-allocated).

Definition at line 405 of file symmetric_matrix_3x3.impl.h.

References fiber_bundle::symmetric_matrix_3x3< T >::adjoint().

◆ adjoint() [2/2]

template<typename T >
symmetric_matrix_3x3< T > fiber_bundle::symmetric_matrix_3x3< T >::adjoint ( ) const

◆ assign()

template<typename T >
void fiber_bundle::symmetric_matrix_3x3< T >::assign ( const T &  xscalar)

Assign all elements of this matrix to the value xvalue.

Postcondition
  • for(int i = ( 0 ); i < ( d() ); ++ i ) components[i] == xvalue

Definition at line 481 of file symmetric_matrix_3x3.impl.h.

References fiber_bundle::symmetric_matrix_3x3< T >::determinant().

Referenced by fiber_bundle::symmetric_matrix_3x3< T >::adjoint(), fiber_bundle::symmetric_matrix_3x3< T >::diagonalization(), and fiber_bundle::symmetric_matrix_3x3< T >::identity().

◆ column()

template<typename T >
general_matrix_3x1< T > fiber_bundle::symmetric_matrix_3x3< T >::column ( int  xcolumn) const

A 3x1 matrix containing the elements or column xcolumn.

Precondition

Definition at line 363 of file symmetric_matrix_3x3.impl.h.

References fiber_bundle::symmetric_matrix_3x3< T >::adjoint(), and fiber_bundle::general_matrix_3x1< T >::components.

Referenced by fiber_bundle::symmetric_matrix_3x3< T >::row().

◆ d()

template<typename T >
int fiber_bundle::symmetric_matrix_3x3< T >::d ( )
static

Dimension of the underlying elements.

Definition at line 153 of file symmetric_matrix_3x3.impl.h.

References fiber_bundle::symmetric_matrix_3x3< T >::operator[]().

Referenced by fiber_bundle::symmetric_matrix_3x3< T >::number_of_columns().

◆ determinant() [1/2]

template<typename T >
void fiber_bundle::symmetric_matrix_3x3< T >::determinant ( T &  xresult) const

The determinant of the matrix (pre-allocated).

Definition at line 504 of file symmetric_matrix_3x3.impl.h.

References fiber_bundle::symmetric_matrix_3x3< T >::determinant().

◆ determinant() [2/2]

template<typename T >
T fiber_bundle::symmetric_matrix_3x3< T >::determinant ( ) const

◆ diagonalization() [1/2]

template<typename T >
void fiber_bundle::symmetric_matrix_3x3< T >::diagonalization ( symmetric_matrix_3x3< T > &  xresult) const

◆ diagonalization() [2/2]

template<typename T >
symmetric_matrix_3x3< T > fiber_bundle::symmetric_matrix_3x3< T >::diagonalization ( ) const

The diagonalization of the matrix (auto-allocated).

Postcondition
  • result.is_diagonal()
  • -unexecutable( "for_all i, 0, 2, result[i][i] == real number" )

Definition at line 685 of file symmetric_matrix_3x3.impl.h.

References fiber_bundle::symmetric_matrix_3x3< T >::identity(), and fiber_bundle::symmetric_matrix_3x3< T >::is_diagonal().

Referenced by fiber_bundle::symmetric_matrix_3x3< T >::determinant(), and fiber_bundle::symmetric_matrix_3x3< T >::diagonalization().

◆ identity() [1/2]

template<typename T >
void fiber_bundle::symmetric_matrix_3x3< T >::identity ( symmetric_matrix_3x3< T > &  xresult) const

The identity matrix (pre-allocated).

Postcondition
  • xresult.is_identity()

Definition at line 708 of file symmetric_matrix_3x3.impl.h.

References fiber_bundle::symmetric_matrix_3x3< T >::assign(), fiber_bundle::symmetric_matrix_3x3< T >::identity(), and fiber_bundle::symmetric_matrix_3x3< T >::is_identity().

◆ identity() [2/2]

template<typename T >
symmetric_matrix_3x3< T > fiber_bundle::symmetric_matrix_3x3< T >::identity ( ) const

◆ inverse() [1/2]

template<typename T >
void fiber_bundle::symmetric_matrix_3x3< T >::inverse ( symmetric_matrix_3x3< T > &  xresult) const

The inverse of the matrix (pre-allocated).

Definition at line 757 of file symmetric_matrix_3x3.impl.h.

References fiber_bundle::determinant(), and fiber_bundle::symmetric_matrix_3x3< T >::inverse().

◆ inverse() [2/2]

◆ is_diagonal()

template<typename T >
bool fiber_bundle::symmetric_matrix_3x3< T >::is_diagonal ( ) const

◆ is_identity()

template<typename T >
bool fiber_bundle::symmetric_matrix_3x3< T >::is_identity ( ) const

◆ is_positive_definite()

template<typename T >
bool fiber_bundle::symmetric_matrix_3x3< T >::is_positive_definite ( ) const

True if this matrix is positive definite.

Issue:
This is NOT the most efficient way to do this. But it gets the job done.
Todo:
Optimize this function.

Definition at line 882 of file symmetric_matrix_3x3.impl.h.

References fiber_bundle::symmetric_matrix_3x3< T >::multiply().

Referenced by fiber_bundle::symmetric_matrix_3x3< T >::is_identity(), and fiber_bundle::general_matrix_3x3< T >::is_positive_definite().

◆ multiply() [1/10]

template<typename T >
void fiber_bundle::symmetric_matrix_3x3< T >::multiply ( const T &  xscalar,
symmetric_matrix_3x3< T > &  xresult 
) const

◆ multiply() [2/10]

template<typename T >
symmetric_matrix_3x3< T > fiber_bundle::symmetric_matrix_3x3< T >::multiply ( const T &  xscalar) const

This matrix multiplied by a scalar (auto-allocated).

Definition at line 944 of file symmetric_matrix_3x3.impl.h.

References fiber_bundle::symmetric_matrix_3x3< T >::multiply(), and fiber_bundle::vd_algebra::multiply().

◆ multiply() [3/10]

template<typename T >
void fiber_bundle::symmetric_matrix_3x3< T >::multiply ( const general_matrix_3x1< T > &  xother,
general_matrix_3x1< T > &  xresult 
) const

Premultiply matrix xother by this matrix (pre-allocated).

Definition at line 964 of file symmetric_matrix_3x3.impl.h.

References fiber_bundle::symmetric_matrix_3x3< T >::multiply().

◆ multiply() [4/10]

template<typename T >
general_matrix_3x1< T > fiber_bundle::symmetric_matrix_3x3< T >::multiply ( const general_matrix_3x1< T > &  xother) const

Premultiply matrix xother by this matrix (auto-allocated).

Definition at line 1003 of file symmetric_matrix_3x3.impl.h.

References fiber_bundle::symmetric_matrix_3x3< T >::multiply(), and fiber_bundle::vd_algebra::multiply().

◆ multiply() [5/10]

template<typename T >
void fiber_bundle::symmetric_matrix_3x3< T >::multiply ( const general_matrix_3x2< T > &  xother,
general_matrix_3x2< T > &  xresult 
) const

Premultiply matrix xother by this matrix (pre-allocated).

Definition at line 1023 of file symmetric_matrix_3x3.impl.h.

References fiber_bundle::symmetric_matrix_3x3< T >::multiply().

◆ multiply() [6/10]

template<typename T >
general_matrix_3x2< T > fiber_bundle::symmetric_matrix_3x3< T >::multiply ( const general_matrix_3x2< T > &  xother) const

Premultiply matrix xother by this matrix (auto-allocated).

Definition at line 1072 of file symmetric_matrix_3x3.impl.h.

References fiber_bundle::symmetric_matrix_3x3< T >::multiply(), and fiber_bundle::vd_algebra::multiply().

◆ multiply() [7/10]

template<typename T >
void fiber_bundle::symmetric_matrix_3x3< T >::multiply ( const general_matrix_3x3< T > &  xother,
general_matrix_3x3< T > &  xresult 
) const

Premultiply matrix xother by this matrix (pre-allocated).

Definition at line 1092 of file symmetric_matrix_3x3.impl.h.

References fiber_bundle::symmetric_matrix_3x3< T >::multiply().

◆ multiply() [8/10]

template<typename T >
general_matrix_3x3< T > fiber_bundle::symmetric_matrix_3x3< T >::multiply ( const general_matrix_3x3< T > &  xother) const

Premultiply matrix xother by this matrix (auto-allocated).

Definition at line 1147 of file symmetric_matrix_3x3.impl.h.

References fiber_bundle::symmetric_matrix_3x3< T >::multiply(), and fiber_bundle::vd_algebra::multiply().

◆ multiply() [9/10]

template<typename T >
void fiber_bundle::symmetric_matrix_3x3< T >::multiply ( const symmetric_matrix_3x3< T > &  xother,
general_matrix_3x3< T > &  xresult 
) const

Premultiply matrix xother by this matrix (pre-allocated). Note that multiplying 2 symmetric matrices results (in general) in a general square matrix.

Definition at line 1167 of file symmetric_matrix_3x3.impl.h.

References fiber_bundle::symmetric_matrix_3x3< T >::multiply().

◆ multiply() [10/10]

template<typename T >
general_matrix_3x3< T > fiber_bundle::symmetric_matrix_3x3< T >::multiply ( const symmetric_matrix_3x3< T > &  xother) const

Premultiply matrix xother by this matrix (auto-allocated). Note that multiplying 2 symmetric matrices results (in general) in a general square matrix.

Definition at line 1220 of file symmetric_matrix_3x3.impl.h.

References fiber_bundle::vd_algebra::multiply(), and fiber_bundle::symmetric_matrix_3x3< T >::trace().

◆ number_of_columns()

template<typename T >
int fiber_bundle::symmetric_matrix_3x3< T >::number_of_columns ( )
static

◆ number_of_rows()

◆ operator const T *()

template<typename T >
fiber_bundle::symmetric_matrix_3x3< T >::operator const T * ( ) const

Conversion (cast) operator to convert to the associated matrix type (const version).

Postcondition
  • result != 0

Definition at line 236 of file symmetric_matrix_3x3.impl.h.

References fiber_bundle::symmetric_matrix_3x3< T >::row_index().

◆ operator general_matrix_3x3< T >()

template<typename T >
fiber_bundle::symmetric_matrix_3x3< T >::operator general_matrix_3x3< T > ( ) const

Conversion operator to convert to the associated general matrix type.

Postcondition
  • -unexecutable( "result == *this" )

Definition at line 285 of file symmetric_matrix_3x3.impl.h.

References fiber_bundle::symmetric_matrix_3x3< T >::row().

◆ operator met_e3_row_dofs_type< T > &()

template<typename T >
fiber_bundle::symmetric_matrix_3x3< T >::operator met_e3_row_dofs_type< T > & ( ) const

Operator to convert current to met_e3_row_dofs_type.

Definition at line 81 of file symmetric_matrix_3x3.impl.h.

◆ operator st2_e3_row_dofs_type< T > &()

template<typename T >
fiber_bundle::symmetric_matrix_3x3< T >::operator st2_e3_row_dofs_type< T > & ( ) const

Operator to convert current to st2_e3_row_dofs_type.

Definition at line 100 of file symmetric_matrix_3x3.impl.h.

References fiber_bundle::symmetric_matrix_3x3< T >::number_of_rows().

◆ operator T*()

template<typename T >
fiber_bundle::symmetric_matrix_3x3< T >::operator T* ( )

Conversion (cast) operator to convert to the associated matrix type (non const version).

Postcondition
  • result != 0

Definition at line 214 of file symmetric_matrix_3x3.impl.h.

◆ operator[]() [1/2]

template<typename T >
T * fiber_bundle::symmetric_matrix_3x3< T >::operator[] ( int  xrow)

Pointer to the first element in row xrow of this matrix. Facilitates accessing elements via matrix[i][j].

Precondition
Postcondition
  • result != 0

Definition at line 170 of file symmetric_matrix_3x3.impl.h.

Referenced by fiber_bundle::symmetric_matrix_3x3< T >::d().

◆ operator[]() [2/2]

template<typename T >
const T * fiber_bundle::symmetric_matrix_3x3< T >::operator[] ( int  xrow) const

Pointer to the first element in row xrow of this matrix. Facilitates accessing elements via matrix[i][j].

Precondition
Postcondition
  • result != 0

Definition at line 192 of file symmetric_matrix_3x3.impl.h.

◆ row()

template<typename T >
general_matrix_1x3< T > fiber_bundle::symmetric_matrix_3x3< T >::row ( int  xrow) const

A 1x3 matrix containing the elements or row xrow.

Precondition

Definition at line 320 of file symmetric_matrix_3x3.impl.h.

References fiber_bundle::symmetric_matrix_3x3< T >::column(), and fiber_bundle::general_matrix_1x3< T >::components.

Referenced by fiber_bundle::symmetric_matrix_3x3< T >::operator general_matrix_3x3< T >().

◆ row_index()

template<typename T >
int fiber_bundle::symmetric_matrix_3x3< T >::row_index ( int  xrow) const

Index for row xrow in the linear storage array.

Precondition
Postcondition
  • result == (xrow*(2*number_of_rows()-1-xrow))/2

Definition at line 259 of file symmetric_matrix_3x3.impl.h.

Referenced by fiber_bundle::symmetric_matrix_3x3< T >::operator const T *().

◆ trace() [1/2]

template<typename T >
void fiber_bundle::symmetric_matrix_3x3< T >::trace ( T &  xresult) const

The trace of the matrix (pre-allocated).

Definition at line 1240 of file symmetric_matrix_3x3.impl.h.

References fiber_bundle::symmetric_matrix_3x3< T >::trace().

◆ trace() [2/2]

template<typename T >
T fiber_bundle::symmetric_matrix_3x3< T >::trace ( ) const

◆ transpose() [1/2]

template<typename T >
void fiber_bundle::symmetric_matrix_3x3< T >::transpose ( symmetric_matrix_3x3< T > &  xresult) const

The transpose of the matrix (pre-allocated).

Definition at line 1282 of file symmetric_matrix_3x3.impl.h.

References fiber_bundle::symmetric_matrix_3x3< T >::components, and fiber_bundle::symmetric_matrix_3x3< T >::transpose().

◆ transpose() [2/2]

template<typename T >
symmetric_matrix_3x3< T > fiber_bundle::symmetric_matrix_3x3< T >::transpose ( ) const

The transpose of the matrix (auto-allocated).

Definition at line 1309 of file symmetric_matrix_3x3.impl.h.

Referenced by fiber_bundle::symmetric_matrix_3x3< T >::trace(), and fiber_bundle::symmetric_matrix_3x3< T >::transpose().

Member Data Documentation

◆ components

template<typename T>
T fiber_bundle::symmetric_matrix_3x3< T >::components[6]

The documentation for this class was generated from the following files: