30#include "../aslUtilities.h"
38 template <
typename T =
double>
class AMatr
46 inline AMatr(
unsigned int nR,
unsigned int nC);
54 inline const T&
operator()(
int i,
int j)
const {
return internalVec[i*nCol+
j];}
58 inline const T&
operator[](
int i)
const {
return internalVec[i];}
59 inline unsigned int getNRow()
const;
60 inline unsigned int getNCol()
const;
61 inline void resize(
unsigned int nR,
unsigned int nCol);
106 template <
typename T>
127 template <
typename T>
178 template <
typename T>
182 template <
typename T>
186 template <
typename T>
206 internalVec(
a.internalVec)
236 template <
typename T>
244 template <
typename T>
251 template <
typename T>
257 template <
typename T>
263 template <
typename T>
346 double &
l1,
double &
l2,
double &
l3,
347 double &
v1x,
double &
v1y,
double &
v1z,
348 double &
v2x,
double &
v2y,
double &
v2z,
349 double &
v3x,
double &
v3y,
double &
v3z);
definition of class АVec<T>
AMatr< T > makeAMatr(const AVec< T > &a, const AVec< T > &b)
generates a matrix with two rows
const T trace(const AMatr< T > &a, const AMatr< T > &b)
Trace of a matrix product .
void setColumn(unsigned int c, const AVec< T > &a)
const T & operator()(int i, int j) const
doesn't chek boundaries
AMatr< T > elementProduct(const AVec< T > &a, const AVec< T > &b)
element product of two vectors
const AVec< T > & getInternalVec() const
T & operator()(int i, int j)
doesn't chek boundaries
AVec< T > getOffDiagonalUp(const AMatr< T > &a)
returns AVec<T> containing the uper off diagonal elements
AMatr< T > inverseMatrix(const AMatr< T > &a)
returns inverse matrix for cases 2x2 and 3x3<T>
const T trace(const AMatr< T > &a)
Trace of a matrix .
const AMatr< T > & operator=(const AMatr &a)
std::ostream & operator<<(std::ostream &f, const AMatr< T > &a)
T & operator[](int i)
doesn't chek boundaries
AMatr< T > replaceColumn(const AMatr< T > &a, const AVec< T > &b, unsigned int c)
generate matrix with content of the matrix a but with replaced column c by vector b<T>
AMatr(const AMatr< T1 > &a)
void setRow(unsigned int r, const AVec< T > &a)
T det(const AMatr< T > &m)
computes determinant expression fo cases 2x2 and 3x3 only
unsigned int getNCol() const
const T & operator[](int i) const
doesn't chek boundaries
AMatr< T > replaceRow(const AMatr< T > &a, const AVec< T > &b, unsigned int r)
generate matrix with content of the matrix a but with replaced row r by vector b<T>
unsigned int getNRow() const
void resize(unsigned int nR, unsigned int nCol)
AMatr< T > makeAMatr(const AVec< T > &a)
generates a matrix with a row
AMatr< T > makeAMatr(const AVec< T > &a, const AVec< T > &b, const AVec< T > &c)
generates a matrix with three rows
AVec< T > getDiagonal(const AMatr< T > &a)
returns AVec containing the diagonal elements
AMatr< T > makeAMatrUnit(unsigned int n)
AMatr< T > makeAMatr(AVec< T > *a, unsigned int n)
generates a matrix with n rows
void resize(unsigned int newSize)
AVec< T > solveSystem(const AMatr< T > &a, const AVec< T > &b)
returns solution of a system of linear equations
SPDataWrapperACLData generateDataContainerACL_SP(const Block &b, unsigned int n=1)
generates pointer to ACL Data field with n components
SPDistanceFunction operator-(SPDistanceFunction a)
SPPositionFunction operator*(SPPositionFunction a, SPPositionFunction b)
Advanced Simulation Library.
const AMatr< T > operator+(const AMatr< T > &a, const AMatr< T > &b)
const AMatr< T > & operator+=(AMatr< T > &a, const AMatr< T > &b)
const T l2(const AVec< T > &a)
void getEValEVecMatSym3x3(double a, double b, double c, double e, double f, double g, double &l1, double &l2, double &l3, double &v1x, double &v1y, double &v1z, double &v2x, double &v2y, double &v2z, double &v3x, double &v3y, double &v3z)
Eigenvalues and eigenvectors calcutaion for symetric matrix 2x2.
const AMatr< T > operator/(const AMatr< T > &b, const T &a)
void getEValEVecMatSym2x2(double a, double b, double c, double &l1, double &l2, double &v1x, double &v1y, double &v2x, double &v2y)
Eigenvalues and eigenvectors calcutaion for symetric matrix 2x2.