![]() |
ECOGEN 4.0
Evolutive, Compressible, Open, Genuine, Easy, N-phase
|
Class for a matrix 3x3 system object. More...
#include <Tensor.h>
Public Member Functions | |
Tensor () | |
Tensor (const Tensor &tensor) | |
Tensor (const double &xx, const double &xy, const double &xz, const double &yx, const double &yy, const double &yz, const double &zx, const double &zy, const double &zz) | |
Tensor (const Coord &x, const Coord &y, const Coord &z) | |
~Tensor () | |
const double & | getElement (const int &element) const |
Return the value of the specific element of the Tensor object. | |
const double & | getXX () const |
Return the value of the xx-element of the Tensor object. | |
const double & | getXY () const |
Return the value of the xy-element of the Tensor object. | |
const double & | getXZ () const |
Return the value of the xz-element of the Tensor object. | |
const double & | getYX () const |
Return the value of the yx-element of the Tensor object. | |
const double & | getYY () const |
Return the value of the yy-element of the Tensor object. | |
const double & | getYZ () const |
Return the value of the yz-element of the Tensor object. | |
const double & | getZX () const |
Return the value of the zx-element of the Tensor object. | |
const double & | getZY () const |
Return the value of the zy-element of the Tensor object. | |
const double & | getZZ () const |
Return the value of the zz-element of the Tensor object. | |
void | setXX (const double &xx) |
Set the value in the xx-element of the Tensor object. | |
void | setXY (const double &xy) |
Set the value in the xy-element of the Tensor object. | |
void | setXZ (const double &xz) |
Set the value in the xz-element of the Tensor object. | |
void | setYX (const double &xx) |
Set the value in the yx-element of the Tensor object. | |
void | setYY (const double &xy) |
Set the value in the yy-element of the Tensor object. | |
void | setYZ (const double &xz) |
Set the value in the yz-element of the Tensor object. | |
void | setZX (const double &xx) |
Set the value in the zx-element of the Tensor object. | |
void | setZY (const double &xy) |
Set the value in the zy-element of the Tensor object. | |
void | setZZ (const double &xz) |
Set the value in the zz-element of the Tensor object. | |
void | setTensor (const Tensor &tensor) |
Set the Tensor object. | |
void | setTensor (const double &value) |
Set all the elements of the Tensor object to a scalar value. | |
void | identity () |
Set the Tensor object to identity. | |
void | correctZeros () |
Set to perfect zero each of the epsilon terms. | |
Coord | scalar (const Coord &a) const |
Return the scalar product between the Tensor and the Coord. | |
void | localProjection (const Coord &normal, const Coord &tangent, const Coord &binormal) |
Projection in the local coordinate system which is defined by the transmitted normal, tangent and binormal. | |
void | reverseProjection (const Coord &normal, const Coord &tangent, const Coord &binormal) |
Reverse projection in the absolute Cartesian coordinate system. | |
void | setTensorByLines (const Coord &x, const Coord &y, const Coord &z) |
void | setTensorByColumns (const Coord &x, const Coord &y, const Coord &z) |
void | tensorToCoords (Coord &x, Coord &y, Coord &z) const |
Transform the Tensor into Coords (vectors) | |
void | tensorToArray (double *array) const |
Transform the Tensor into 1D array (pointer) | |
void | arrayToTensor (const double *array) |
Transform the 1D array (pointer) into Tensor. | |
void | transpose (Tensor &transposedTensor) const |
Compute the transpose of the tensor. | |
void | matrixProduct (const Tensor &tensor2, Tensor &resultingTensor) const |
Compute the matrix product of the two tensors. | |
double | trace () const |
Return the trace of the tensor. | |
double | determinant () const |
Return the determinant of the tensor. | |
void | inverse (Tensor &inverseTensor) const |
Compute the inverse of the tensor. | |
bool | isIdentity () const |
Return true if equal to identity. | |
void | eigen (Tensor &eigenvalues, Tensor &eigenvectors) const |
Compute the eigenvalues and eigenvectors of the tensor with Jacobi's algorithm. | |
Tensor & | operator= (const double &scalar) |
Tensor & | operator= (const Tensor &a) |
Tensor & | operator*= (const double &scalar) |
Tensor & | operator/= (const double &scalar) |
Tensor | operator* (const double &scalar) const |
Tensor | operator/ (const double &scalar) const |
Tensor & | operator+= (const Tensor &a) |
Tensor & | operator-= (const Tensor &a) |
Static Public Attributes | |
static const Tensor | defaultTensor = Tensor() |
Default Tensor object (const version) | |
static Tensor | defaultTensorNonConst = Tensor() |
Default Tensor object (non-const version) | |
Protected Attributes | |
std::array< double, 9 > | m_array |
Class for a matrix 3x3 system object.
Tensor::Tensor | ( | ) |
Tensor::Tensor | ( | const Tensor & | tensor | ) |
Tensor::Tensor | ( | const double & | xx, |
const double & | xy, | ||
const double & | xz, | ||
const double & | yx, | ||
const double & | yy, | ||
const double & | yz, | ||
const double & | zx, | ||
const double & | zy, | ||
const double & | zz | ||
) |
Tensor::~Tensor | ( | ) |
void Tensor::arrayToTensor | ( | const double * | array | ) |
Transform the 1D array (pointer) into Tensor.
array | 1D array (pointer) |
void Tensor::correctZeros | ( | ) |
Set to perfect zero each of the epsilon terms.
double Tensor::determinant | ( | ) | const |
Return the determinant of the tensor.
|
inline |
Return the value of the specific element of the Tensor object.
|
inline |
Return the value of the xx-element of the Tensor object.
|
inline |
Return the value of the xy-element of the Tensor object.
|
inline |
Return the value of the xz-element of the Tensor object.
|
inline |
Return the value of the yx-element of the Tensor object.
|
inline |
Return the value of the yy-element of the Tensor object.
|
inline |
Return the value of the yz-element of the Tensor object.
|
inline |
Return the value of the zx-element of the Tensor object.
|
inline |
Return the value of the zy-element of the Tensor object.
|
inline |
Return the value of the zz-element of the Tensor object.
void Tensor::identity | ( | ) |
Set the Tensor object to identity.
void Tensor::inverse | ( | Tensor & | inverseTensor | ) | const |
Compute the inverse of the tensor.
inverseTensor | inverse tensor (Tensor) |
bool Tensor::isIdentity | ( | ) | const |
Return true if equal to identity.
Tensor Tensor::operator* | ( | const double & | scalar | ) | const |
Tensor & Tensor::operator*= | ( | const double & | scalar | ) |
Tensor Tensor::operator/ | ( | const double & | scalar | ) | const |
Tensor & Tensor::operator/= | ( | const double & | scalar | ) |
Tensor & Tensor::operator= | ( | const double & | scalar | ) |
void Tensor::setTensor | ( | const double & | value | ) |
Set all the elements of the Tensor object to a scalar value.
value | scalar value to set all elements |
void Tensor::setXX | ( | const double & | xx | ) |
Set the value in the xx-element of the Tensor object.
xx | value of the xx-element coordinate |
void Tensor::setXY | ( | const double & | xy | ) |
Set the value in the xy-element of the Tensor object.
xy | value of the xy-element coordinate |
void Tensor::setXZ | ( | const double & | xz | ) |
Set the value in the xz-element of the Tensor object.
xz | value of the xz-element coordinate |
void Tensor::setYX | ( | const double & | xx | ) |
Set the value in the yx-element of the Tensor object.
xx | value of the yx-element coordinate |
void Tensor::setYY | ( | const double & | xy | ) |
Set the value in the yy-element of the Tensor object.
xy | value of the yy-element coordinate |
void Tensor::setYZ | ( | const double & | xz | ) |
Set the value in the yz-element of the Tensor object.
xz | value of the yz-element coordinate |
void Tensor::setZX | ( | const double & | xx | ) |
Set the value in the zx-element of the Tensor object.
xx | value of the zx-element coordinate |
void Tensor::setZY | ( | const double & | xy | ) |
Set the value in the zy-element of the Tensor object.
xy | value of the zy-element coordinate |
void Tensor::setZZ | ( | const double & | xz | ) |
Set the value in the zz-element of the Tensor object.
xz | value of the zz-element coordinate |
void Tensor::tensorToArray | ( | double * | array | ) | const |
Transform the Tensor into 1D array (pointer)
array | 1D array (pointer) |
double Tensor::trace | ( | ) | const |
Return the trace of the tensor.
void Tensor::transpose | ( | Tensor & | transposedTensor | ) | const |
Compute the transpose of the tensor.
transposedTensor | transposed tensor (Tensor) |
|
protected |