KratosMultiphysics
KRATOS Multiphysics (Kratos) is a framework for building parallel, multi-disciplinary simulation software, aiming at modularity, extensibility, and high performance. Kratos is written in C++, and counts with an extensive Python interface.
Public Types | Public Member Functions | Friends | List of all members
Kratos::Internals::Matrix< TDataType, TSize1, TSize2 > Class Template Reference

#include <amatrix_interface.h>

Inheritance diagram for Kratos::Internals::Matrix< TDataType, TSize1, TSize2 >:
Collaboration diagram for Kratos::Internals::Matrix< TDataType, TSize1, TSize2 >:

Public Types

using data_type = TDataType
 
using base_type = AMatrix::MatrixStorage< TDataType, TSize1, TSize2 >
 
using iterator = AMatrix::RandomAccessIterator< TDataType >
 
using const_iterator = AMatrix::RandomAccessIterator< const TDataType >
 
using value_type = TDataType
 
using size_type = std::size_t
 
using difference_type = std::size_t
 
using const_reference = const TDataType &
 
using reference = TDataType &
 
using const_pointer = TDataType *
 
using pointer = TDataType *
 

Public Member Functions

 Matrix ()
 
 Matrix (std::size_t TheSize1, std::size_t TheSize2)
 
 Matrix (std::size_t TheSize)
 
 Matrix (Matrix const &Other)
 
 Matrix (Matrix &&Other)
 
template<typename TExpressionType , std::size_t TCategory>
 Matrix (AMatrix::MatrixExpression< TExpressionType, TCategory > const &Other)
 
template<typename TExpressionType >
 Matrix (AMatrix::MatrixExpression< TExpressionType, AMatrix::row_major_access > const &Other)
 
 Matrix (std::initializer_list< TDataType > InitialValues)
 
template<typename TExpressionType , std::size_t TCategory>
Matrixoperator= (AMatrix::MatrixExpression< TExpressionType, TCategory > const &Other)
 
template<typename TExpressionType >
Matrixoperator= (AMatrix::MatrixExpression< TExpressionType, AMatrix::row_major_access > const &Other)
 
Matrixoperator= (Matrix const &Other)
 
Matrixoperator= (Matrix &&Other)
 
TDataType & operator() (std::size_t i)
 
TDataType const & operator() (std::size_t i) const
 
template<typename TExpressionType , std::size_t TCategory>
Matrixoperator+= (AMatrix::MatrixExpression< TExpressionType, TCategory > const &Other)
 
template<typename TExpressionType >
Matrixoperator+= (AMatrix::MatrixExpression< TExpressionType, AMatrix::row_major_access > const &Other)
 
template<typename TExpressionType , std::size_t TCategory>
Matrixoperator-= (AMatrix::MatrixExpression< TExpressionType, TCategory > const &Other)
 
template<typename TExpressionType >
Matrixoperator-= (AMatrix::MatrixExpression< TExpressionType, AMatrix::row_major_access > const &Other)
 
Matrixoperator*= (data_type TheValue)
 
Matrixoperator/= (data_type TheValue)
 
AMatrix::MatrixUnaryMinusExpression< Matrixoperator- () const
 
void resize (std::size_t NewSize1, std::size_t NewSize2, bool preserve=0)
 
void resize (std::size_t NewSize, bool preserve=0)
 
void resize (std::size_t NewSize, TDataType const &TheValue)
 
iterator begin ()
 
iterator end ()
 
const_iterator begin () const
 
const_iterator end () const
 
template<typename TExpressionType >
data_type dot (AMatrix::MatrixExpression< TExpressionType, AMatrix::row_major_access > const &Other) const
 
data_type squared_norm () const
 
data_type norm () const
 
void normalize ()
 
Matrixnoalias ()
 
AMatrix::TransposeMatrix< const Matrix< TDataType, TSize1, TSize2 > > transpose () const
 
AMatrix::TransposeMatrix< Matrix< TDataType, TSize1, TSize2 > > transpose ()
 
void clear ()
 
void swap (Matrix &Other)
 
bool check_aliasing (const data_type *From, const data_type *To) const
 
void fill (data_type const &value)
 
void fill_identity ()
 

Friends

bool operator== (Matrix const &First, Matrix const &Second)
 

Member Typedef Documentation

◆ base_type

template<typename TDataType , std::size_t TSize1, std::size_t TSize2>
using Kratos::Internals::Matrix< TDataType, TSize1, TSize2 >::base_type = AMatrix::MatrixStorage<TDataType, TSize1, TSize2>

◆ const_iterator

template<typename TDataType , std::size_t TSize1, std::size_t TSize2>
using Kratos::Internals::Matrix< TDataType, TSize1, TSize2 >::const_iterator = AMatrix::RandomAccessIterator<const TDataType>

◆ const_pointer

template<typename TDataType , std::size_t TSize1, std::size_t TSize2>
using Kratos::Internals::Matrix< TDataType, TSize1, TSize2 >::const_pointer = TDataType*

◆ const_reference

template<typename TDataType , std::size_t TSize1, std::size_t TSize2>
using Kratos::Internals::Matrix< TDataType, TSize1, TSize2 >::const_reference = const TDataType&

◆ data_type

template<typename TDataType , std::size_t TSize1, std::size_t TSize2>
using Kratos::Internals::Matrix< TDataType, TSize1, TSize2 >::data_type = TDataType

◆ difference_type

template<typename TDataType , std::size_t TSize1, std::size_t TSize2>
using Kratos::Internals::Matrix< TDataType, TSize1, TSize2 >::difference_type = std::size_t

◆ iterator

template<typename TDataType , std::size_t TSize1, std::size_t TSize2>
using Kratos::Internals::Matrix< TDataType, TSize1, TSize2 >::iterator = AMatrix::RandomAccessIterator<TDataType>

◆ pointer

template<typename TDataType , std::size_t TSize1, std::size_t TSize2>
using Kratos::Internals::Matrix< TDataType, TSize1, TSize2 >::pointer = TDataType*

◆ reference

template<typename TDataType , std::size_t TSize1, std::size_t TSize2>
using Kratos::Internals::Matrix< TDataType, TSize1, TSize2 >::reference = TDataType&

◆ size_type

template<typename TDataType , std::size_t TSize1, std::size_t TSize2>
using Kratos::Internals::Matrix< TDataType, TSize1, TSize2 >::size_type = std::size_t

◆ value_type

template<typename TDataType , std::size_t TSize1, std::size_t TSize2>
using Kratos::Internals::Matrix< TDataType, TSize1, TSize2 >::value_type = TDataType

Constructor & Destructor Documentation

◆ Matrix() [1/8]

template<typename TDataType , std::size_t TSize1, std::size_t TSize2>
Kratos::Internals::Matrix< TDataType, TSize1, TSize2 >::Matrix ( )
inline

◆ Matrix() [2/8]

template<typename TDataType , std::size_t TSize1, std::size_t TSize2>
Kratos::Internals::Matrix< TDataType, TSize1, TSize2 >::Matrix ( std::size_t  TheSize1,
std::size_t  TheSize2 
)
inlineexplicit

◆ Matrix() [3/8]

template<typename TDataType , std::size_t TSize1, std::size_t TSize2>
Kratos::Internals::Matrix< TDataType, TSize1, TSize2 >::Matrix ( std::size_t  TheSize)
inlineexplicit

◆ Matrix() [4/8]

template<typename TDataType , std::size_t TSize1, std::size_t TSize2>
Kratos::Internals::Matrix< TDataType, TSize1, TSize2 >::Matrix ( Matrix< TDataType, TSize1, TSize2 > const &  Other)
inline

◆ Matrix() [5/8]

template<typename TDataType , std::size_t TSize1, std::size_t TSize2>
Kratos::Internals::Matrix< TDataType, TSize1, TSize2 >::Matrix ( Matrix< TDataType, TSize1, TSize2 > &&  Other)
inline

◆ Matrix() [6/8]

template<typename TDataType , std::size_t TSize1, std::size_t TSize2>
template<typename TExpressionType , std::size_t TCategory>
Kratos::Internals::Matrix< TDataType, TSize1, TSize2 >::Matrix ( AMatrix< TDataType, TSize1, TSize2 >::MatrixExpression< TExpressionType, TCategory > const &  Other)
inline

◆ Matrix() [7/8]

template<typename TDataType , std::size_t TSize1, std::size_t TSize2>
template<typename TExpressionType >
Kratos::Internals::Matrix< TDataType, TSize1, TSize2 >::Matrix ( AMatrix< TDataType, TSize1, TSize2 >::MatrixExpression< TExpressionType, AMatrix< TDataType, TSize1, TSize2 >::row_major_access > const &  Other)
inline

◆ Matrix() [8/8]

template<typename TDataType , std::size_t TSize1, std::size_t TSize2>
Kratos::Internals::Matrix< TDataType, TSize1, TSize2 >::Matrix ( std::initializer_list< TDataType >  InitialValues)
inlineexplicit

Member Function Documentation

◆ begin() [1/2]

template<typename TDataType , std::size_t TSize1, std::size_t TSize2>
iterator Kratos::Internals::Matrix< TDataType, TSize1, TSize2 >::begin ( )
inline

◆ begin() [2/2]

template<typename TDataType , std::size_t TSize1, std::size_t TSize2>
const_iterator Kratos::Internals::Matrix< TDataType, TSize1, TSize2 >::begin ( ) const
inline

◆ check_aliasing()

template<typename TDataType , std::size_t TSize1, std::size_t TSize2>
bool Kratos::Internals::Matrix< TDataType, TSize1, TSize2 >::check_aliasing ( const data_type From,
const data_type To 
) const
inline

◆ clear()

template<typename TDataType , std::size_t TSize1, std::size_t TSize2>
void Kratos::Internals::Matrix< TDataType, TSize1, TSize2 >::clear ( )
inline

◆ dot()

template<typename TDataType , std::size_t TSize1, std::size_t TSize2>
template<typename TExpressionType >
data_type Kratos::Internals::Matrix< TDataType, TSize1, TSize2 >::dot ( AMatrix< TDataType, TSize1, TSize2 >::MatrixExpression< TExpressionType, AMatrix< TDataType, TSize1, TSize2 >::row_major_access > const &  Other) const
inline

◆ end() [1/2]

template<typename TDataType , std::size_t TSize1, std::size_t TSize2>
iterator Kratos::Internals::Matrix< TDataType, TSize1, TSize2 >::end ( )
inline

◆ end() [2/2]

template<typename TDataType , std::size_t TSize1, std::size_t TSize2>
const_iterator Kratos::Internals::Matrix< TDataType, TSize1, TSize2 >::end ( ) const
inline

◆ fill()

template<typename TDataType , std::size_t TSize1, std::size_t TSize2>
void Kratos::Internals::Matrix< TDataType, TSize1, TSize2 >::fill ( data_type const &  value)
inline

◆ fill_identity()

template<typename TDataType , std::size_t TSize1, std::size_t TSize2>
void Kratos::Internals::Matrix< TDataType, TSize1, TSize2 >::fill_identity ( )
inline

◆ noalias()

template<typename TDataType , std::size_t TSize1, std::size_t TSize2>
Matrix& Kratos::Internals::Matrix< TDataType, TSize1, TSize2 >::noalias ( )
inline

◆ norm()

template<typename TDataType , std::size_t TSize1, std::size_t TSize2>
data_type Kratos::Internals::Matrix< TDataType, TSize1, TSize2 >::norm ( ) const
inline

◆ normalize()

template<typename TDataType , std::size_t TSize1, std::size_t TSize2>
void Kratos::Internals::Matrix< TDataType, TSize1, TSize2 >::normalize ( )
inline

◆ operator()() [1/2]

template<typename TDataType , std::size_t TSize1, std::size_t TSize2>
TDataType& Kratos::Internals::Matrix< TDataType, TSize1, TSize2 >::operator() ( std::size_t  i)
inline

◆ operator()() [2/2]

template<typename TDataType , std::size_t TSize1, std::size_t TSize2>
TDataType const& Kratos::Internals::Matrix< TDataType, TSize1, TSize2 >::operator() ( std::size_t  i) const
inline

◆ operator*=()

template<typename TDataType , std::size_t TSize1, std::size_t TSize2>
Matrix& Kratos::Internals::Matrix< TDataType, TSize1, TSize2 >::operator*= ( data_type  TheValue)
inline

◆ operator+=() [1/2]

template<typename TDataType , std::size_t TSize1, std::size_t TSize2>
template<typename TExpressionType >
Matrix& Kratos::Internals::Matrix< TDataType, TSize1, TSize2 >::operator+= ( AMatrix< TDataType, TSize1, TSize2 >::MatrixExpression< TExpressionType, AMatrix< TDataType, TSize1, TSize2 >::row_major_access > const &  Other)
inline

◆ operator+=() [2/2]

template<typename TDataType , std::size_t TSize1, std::size_t TSize2>
template<typename TExpressionType , std::size_t TCategory>
Matrix& Kratos::Internals::Matrix< TDataType, TSize1, TSize2 >::operator+= ( AMatrix< TDataType, TSize1, TSize2 >::MatrixExpression< TExpressionType, TCategory > const &  Other)
inline

◆ operator-()

template<typename TDataType , std::size_t TSize1, std::size_t TSize2>
AMatrix::MatrixUnaryMinusExpression<Matrix> Kratos::Internals::Matrix< TDataType, TSize1, TSize2 >::operator- ( ) const
inline

◆ operator-=() [1/2]

template<typename TDataType , std::size_t TSize1, std::size_t TSize2>
template<typename TExpressionType >
Matrix& Kratos::Internals::Matrix< TDataType, TSize1, TSize2 >::operator-= ( AMatrix< TDataType, TSize1, TSize2 >::MatrixExpression< TExpressionType, AMatrix< TDataType, TSize1, TSize2 >::row_major_access > const &  Other)
inline

◆ operator-=() [2/2]

template<typename TDataType , std::size_t TSize1, std::size_t TSize2>
template<typename TExpressionType , std::size_t TCategory>
Matrix& Kratos::Internals::Matrix< TDataType, TSize1, TSize2 >::operator-= ( AMatrix< TDataType, TSize1, TSize2 >::MatrixExpression< TExpressionType, TCategory > const &  Other)
inline

◆ operator/=()

template<typename TDataType , std::size_t TSize1, std::size_t TSize2>
Matrix& Kratos::Internals::Matrix< TDataType, TSize1, TSize2 >::operator/= ( data_type  TheValue)
inline

◆ operator=() [1/4]

template<typename TDataType , std::size_t TSize1, std::size_t TSize2>
template<typename TExpressionType >
Matrix& Kratos::Internals::Matrix< TDataType, TSize1, TSize2 >::operator= ( AMatrix< TDataType, TSize1, TSize2 >::MatrixExpression< TExpressionType, AMatrix< TDataType, TSize1, TSize2 >::row_major_access > const &  Other)
inline

◆ operator=() [2/4]

template<typename TDataType , std::size_t TSize1, std::size_t TSize2>
template<typename TExpressionType , std::size_t TCategory>
Matrix& Kratos::Internals::Matrix< TDataType, TSize1, TSize2 >::operator= ( AMatrix< TDataType, TSize1, TSize2 >::MatrixExpression< TExpressionType, TCategory > const &  Other)
inline

◆ operator=() [3/4]

template<typename TDataType , std::size_t TSize1, std::size_t TSize2>
Matrix& Kratos::Internals::Matrix< TDataType, TSize1, TSize2 >::operator= ( Matrix< TDataType, TSize1, TSize2 > &&  Other)
inline

◆ operator=() [4/4]

template<typename TDataType , std::size_t TSize1, std::size_t TSize2>
Matrix& Kratos::Internals::Matrix< TDataType, TSize1, TSize2 >::operator= ( Matrix< TDataType, TSize1, TSize2 > const &  Other)
inline

◆ resize() [1/3]

template<typename TDataType , std::size_t TSize1, std::size_t TSize2>
void Kratos::Internals::Matrix< TDataType, TSize1, TSize2 >::resize ( std::size_t  NewSize,
bool  preserve = 0 
)
inline

◆ resize() [2/3]

template<typename TDataType , std::size_t TSize1, std::size_t TSize2>
void Kratos::Internals::Matrix< TDataType, TSize1, TSize2 >::resize ( std::size_t  NewSize,
TDataType const &  TheValue 
)
inline

◆ resize() [3/3]

template<typename TDataType , std::size_t TSize1, std::size_t TSize2>
void Kratos::Internals::Matrix< TDataType, TSize1, TSize2 >::resize ( std::size_t  NewSize1,
std::size_t  NewSize2,
bool  preserve = 0 
)
inline

◆ squared_norm()

template<typename TDataType , std::size_t TSize1, std::size_t TSize2>
data_type Kratos::Internals::Matrix< TDataType, TSize1, TSize2 >::squared_norm ( ) const
inline

◆ swap()

template<typename TDataType , std::size_t TSize1, std::size_t TSize2>
void Kratos::Internals::Matrix< TDataType, TSize1, TSize2 >::swap ( Matrix< TDataType, TSize1, TSize2 > &  Other)
inline

◆ transpose() [1/2]

template<typename TDataType , std::size_t TSize1, std::size_t TSize2>
AMatrix::TransposeMatrix<Matrix<TDataType, TSize1, TSize2> > Kratos::Internals::Matrix< TDataType, TSize1, TSize2 >::transpose ( )
inline

◆ transpose() [2/2]

template<typename TDataType , std::size_t TSize1, std::size_t TSize2>
AMatrix::TransposeMatrix<const Matrix<TDataType, TSize1, TSize2> > Kratos::Internals::Matrix< TDataType, TSize1, TSize2 >::transpose ( ) const
inline

Friends And Related Function Documentation

◆ operator==

template<typename TDataType , std::size_t TSize1, std::size_t TSize2>
bool operator== ( Matrix< TDataType, TSize1, TSize2 > const &  First,
Matrix< TDataType, TSize1, TSize2 > const &  Second 
)
friend

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