Class managing a 3x3 real matrix. More...
#include <arcane/utils/Real3x3.h>
Public Member Functions | |
| constexpr __host__ __device__ | Real3x3 () |
| Constructs the matrix with all coefficients zero. | |
| constexpr __host__ __device__ | Real3x3 (Real3 ax, Real3 ay, Real3 az) |
| Constructs the matrix with rows (ax,ay,az). | |
| ARCANE_DEPRECATED_116 | Real3x3 (Real ax, Real ay, Real az, Real bx, Real by, Real bz, Real cx, Real cy, Real cz) |
| Constructs the tensor ((ax,bx,cx),(ay,by,cy),(az,bz,cz)). | |
| Real3x3 (const Real3x3 &f)=default | |
| Constructs a triplet identical to f. | |
| constexpr __host__ __device__ | Real3x3 (const Real3x3POD &f) |
| Constructs a triplet identical to f. | |
| constexpr __host__ __device__ | Real3x3 (Real v) |
| Constructs the instance with the triplet (v,v,v). | |
| constexpr __host__ __device__ | Real3x3 (ConstArrayView< Real > av) |
| Constructs the triplet ((av[0], av[1], av[2]), (av[3], av[4], av[5]), (av[6], av[7], av[8])). | |
| Real3x3 & | operator= (const Real3x3 &f)=default |
| Copy assignment operator. | |
| constexpr __host__ __device__ Real3x3 & | operator= (Real v) |
| Assigns the triplet (v,v,v) to the instance. | |
| constexpr __host__ __device__ Real3x3 | copy () const |
| Returns a copy of the matrix. | |
| constexpr __host__ __device__ Real3x3 & | reset () |
| Resets the coefficients of the matrix to zero. | |
| constexpr __host__ __device__ Real3x3 & | assign (Real3 ax, Real3 ay, Real3 az) |
| Assigns the rows (ax,ay,az) to the instance. | |
| constexpr __host__ __device__ Real3x3 & | assign (Real3x3 f) |
| Copies matrix f. | |
| constexpr __host__ __device__ ArrayView< Real > | view () |
| constexpr __host__ __device__ ConstArrayView< Real > | constView () const |
| std::istream & | assign (std::istream &i) |
| Reads the matrix from the stream i The matrix is read in the form of three Real3s. | |
| std::ostream & | print (std::ostream &o) const |
| Writes the triplet to the stream o readable by an assign(). | |
| std::ostream & | printXyz (std::ostream &o) const |
| Writes the triplet to the stream o in the form (x,y,z). | |
| constexpr __host__ __device__ Real3x3 & | add (Real3x3 b) |
| Adds b to the triplet. | |
| constexpr __host__ __device__ Real3x3 & | sub (Real3x3 b) |
| Subtracts b from the triplet. | |
| constexpr __host__ __device__ Real3x3 & | addSame (Real3 b) |
| Adds b to each component of the triplet. | |
| constexpr __host__ __device__ Real3x3 & | subSame (Real3 b) |
| Subtracts b from each component of the triplet. | |
| constexpr __host__ __device__ Real3x3 & | operator+= (Real3x3 b) |
| Adds b to the triplet. | |
| constexpr __host__ __device__ Real3x3 & | operator-= (Real3x3 b) |
| Subtracts b from the triplet. | |
| constexpr __host__ __device__ void | operator*= (Real b) |
| Multiplies each component of the matrix by the real b. | |
| constexpr __host__ __device__ void | operator/= (Real b) |
| Divides each component of the matrix by the real b. | |
| constexpr __host__ __device__ Real3x3 | operator+ (Real3x3 b) const |
| Creates a triplet that equals this triplet added to b. | |
| constexpr __host__ __device__ Real3x3 | operator- (Real3x3 b) const |
| Creates a triplet that equals b subtracted from this triplet. | |
| constexpr __host__ __device__ Real3x3 | operator- () const |
| Creates a tensor opposite to the current tensor. | |
| constexpr __host__ __device__ bool | operator== (Real3x3 b) const |
| Compares the current instance component by component to b. | |
| constexpr __host__ __device__ bool | operator!= (Real3x3 b) const |
| Compares two triplets. For the notion of equality, see operator==(). | |
| __host__ __device__ Real3 | operator[] (Integer i) const |
| Read-only access to the i-th (between 0 and 2 inclusive) row of the instance. | |
| __host__ __device__ Real3 | operator() (Integer i) const |
| Read-only access to the i-th (between 0 and 2 inclusive) row of the instance. | |
| __host__ __device__ Real | operator() (Integer i, Integer j) const |
| Read-only access to the i-th row and j-th column. | |
| __host__ __device__ Real3 & | operator[] (Integer i) |
| Access to the i-th row (between 0 and 2 inclusive) of the instance. | |
| __host__ __device__ Real3 & | operator() (Integer i) |
| Access to the i-th row (between 0 and 2 inclusive) of the instance. | |
| __host__ __device__ Real & | operator() (Integer i, Integer j) |
| Access to the i-th row and j-th column. | |
| constexpr __host__ __device__ Real | determinant () const |
| Determinant of the matrix. | |
| constexpr __host__ __device__ bool | isNearlyZero () const |
Static Public Member Functions | |
| constexpr __host__ static __device__ Real3x3 | null () |
| Constructs the null tensor. | |
| constexpr __host__ static __device__ Real3x3 | zero () |
| Constructs the zero matrix. | |
| constexpr __host__ static __device__ Real3x3 | identity () |
| Constructs the identity matrix. | |
| constexpr __host__ static __device__ Real3x3 | fromColumns (Real ax, Real ay, Real az, Real bx, Real by, Real bz, Real cx, Real cy, Real cz) |
| Constructs the matrix ((ax,bx,cx),(ay,by,cy),(az,bz,cz)). | |
| constexpr __host__ static __device__ Real3x3 | fromLines (Real ax, Real bx, Real cx, Real ay, Real by, Real cy, Real az, Real bz, Real cz) |
| Constructs the matrix ((ax,bx,cx),(ay,by,cy),(az,bz,cz)). | |
Public Attributes | |
| Real3 | x |
| first element of the triplet | |
| Real3 | y |
| first element of the triplet | |
| Real3 | z |
| first element of the triplet | |
Friends | |
| std::ostream & | operator<< (std::ostream &o, Real3x3 t) |
| Writes the triplet t to the stream o. | |
| std::istream & | operator>> (std::istream &i, Real3x3 &t) |
| Reads the triplet t from the stream o. | |
| constexpr __host__ __device__ Real3x3 | operator* (Real sca, Real3x3 vec) |
| Multiplication by a scalar. | |
| constexpr __host__ __device__ Real3x3 | operator* (Real3x3 vec, Real sca) |
| Multiplication by a scalar. | |
| constexpr __host__ __device__ Real3x3 | operator/ (Real3x3 vec, Real sca) |
| Division by a scalar. | |
| constexpr __host__ __device__ bool | operator< (Real3x3 v1, Real3x3 v2) |
| Comparison operator. | |
Class managing a 3x3 real matrix.
The matrix comprises three components x, y and z of type Real3. Each component represents a row of the matrix. Consequently, for a matrix m, m.y.z represents the 2nd row and the 3rd column of the matrix.
It is also possible to access the matrix elements like an array. For example m[1][2] represents the 2nd row and the 3rd column of the matrix.
Matrices can be constructed by row by specifying the values by row (fromLines()) or by specifying by column (fromColumns()).
For example:
|
inlineconstexpr |
Constructs the matrix with all coefficients zero.
Definition at line 71 of file Real3x3.h.
References x, y, z, and zero().
Referenced by add(), addSame(), assign(), assign(), copy(), fromColumns(), fromLines(), identity(), null(), operator!=(), operator*, operator*, operator+(), operator+=(), operator-(), operator-(), operator-=(), operator/, operator<, operator<<, operator=(), operator=(), operator==(), operator>>, Real3x3(), reset(), sub(), subSame(), and zero().
|
inline |
Constructs the tensor ((ax,bx,cx),(ay,by,cy),(az,bz,cz)).
|
inlineexplicitconstexpr |
|
inlineexplicitconstexpr |
|
inlineexplicitconstexpr |
| std::istream & Arcane::Real3x3::assign | ( | std::istream & | i | ) |
Reads the matrix from the stream i The matrix is read in the form of three Real3s.
Definition at line 28 of file Real3x3.cc.
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
Determinant of the matrix.
Definition at line 366 of file Real3x3.h.
Referenced by Arcane::math::inverseMatrix(), and Arcane::math::matrixDeterminant().
|
inlinestaticconstexpr |
Constructs the matrix ((ax,bx,cx),(ay,by,cy),(az,bz,cz)).
Definition at line 145 of file Real3x3.h.
References Real3x3().
Referenced by Arcane::math::matrix3x3Prod(), and Arcane::math::matrix3x3Transp().
|
inlinestaticconstexpr |
Constructs the matrix ((ax,bx,cx),(ay,by,cy),(az,bz,cz)).
Definition at line 151 of file Real3x3.h.
References Real3x3().
Referenced by Arcane::math::matrixProduct().
|
inlinestaticconstexpr |
|
inlineconstexpr |
|
inlinestaticconstexpr |
|
inlineconstexpr |
Compares two triplets. For the notion of equality, see operator==().
| true | if the two triplets are different, |
| false | otherwise. |
Definition at line 296 of file Real3x3.h.
References operator==(), and Real3x3().
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
| std::ostream & Arcane::Real3x3::print | ( | std::ostream & | o | ) | const |
| std::ostream & Arcane::Real3x3::printXyz | ( | std::ostream & | o | ) | const |
Writes the triplet to the stream o in the form (x,y,z).
Definition at line 48 of file Real3x3.cc.
Referenced by operator<<.
|
inlineconstexpr |
|
inlinestaticconstexpr |
|
friend |
Writes the triplet t to the stream o.
Definition at line 372 of file Real3x3.h.
References printXyz(), and Real3x3().
|
friend |
| Real3 Arcane::Real3x3::x |
first element of the triplet
Definition at line 129 of file Real3x3.h.
Referenced by add(), Arcane::Real3x3Proxy::add(), addSame(), assign(), assign(), assign(), Arcane::Real3x3Proxy::assign(), Arcane::GeometricUtilities::QuadMapping::cartesianToIso(), constView(), determinant(), Arcane::math::doubleContraction(), Arcane::math::inverseMatrix(), Arcane::math::isNearlyId(), Arcane::math::isNearlyZero(), Arcane::math::matrix3x3Prod(), Arcane::math::matrix3x3Transp(), Arcane::math::matrixProduct(), Arcane::math::matrixTranspose(), Arcane::math::max(), Arcane::math::min(), Arcane::math::multiply(), operator()(), operator()(), operator()(), operator()(), operator*, operator*, operator*=(), operator+(), Arcane::Real3x3Proxy::operator+(), operator-(), operator-(), Arcane::Real3x3Proxy::operator-(), operator/, operator/=(), operator<, operator=(), operator==(), operator[](), operator[](), print(), printXyz(), Arcane::math::prodTensVec(), Arcane::math::prodVecTens(), Real3x3(), Real3x3(), Real3x3(), Real3x3(), Real3x3(), Real3x3(), Arcane::math::relativeError(), sub(), Arcane::Real3x3Proxy::sub(), subSame(), Arcane::math::transpose(), and view().
| Real3 Arcane::Real3x3::y |
first element of the triplet
Definition at line 130 of file Real3x3.h.
Referenced by add(), Arcane::Real3x3Proxy::add(), addSame(), assign(), assign(), assign(), Arcane::Real3x3Proxy::assign(), Arcane::GeometricUtilities::QuadMapping::cartesianToIso(), determinant(), Arcane::math::doubleContraction(), Arcane::math::inverseMatrix(), Arcane::math::isNearlyId(), Arcane::math::isNearlyZero(), Arcane::math::matrix3x3Prod(), Arcane::math::matrix3x3Transp(), Arcane::math::matrixProduct(), Arcane::math::matrixTranspose(), Arcane::math::max(), Arcane::math::min(), Arcane::math::multiply(), operator*, operator*, operator*=(), operator+(), Arcane::Real3x3Proxy::operator+(), operator-(), operator-(), Arcane::Real3x3Proxy::operator-(), operator/, operator/=(), operator<, operator=(), operator==(), print(), printXyz(), Arcane::math::prodTensVec(), Arcane::math::prodVecTens(), Real3x3(), Real3x3(), Real3x3(), Real3x3(), Real3x3(), Real3x3(), Arcane::math::relativeError(), sub(), Arcane::Real3x3Proxy::sub(), subSame(), and Arcane::math::transpose().
| Real3 Arcane::Real3x3::z |
first element of the triplet
Definition at line 131 of file Real3x3.h.
Referenced by add(), Arcane::Real3x3Proxy::add(), addSame(), assign(), assign(), assign(), Arcane::Real3x3Proxy::assign(), Arcane::GeometricUtilities::QuadMapping::cartesianToIso(), determinant(), Arcane::math::doubleContraction(), Arcane::math::inverseMatrix(), Arcane::math::isNearlyId(), Arcane::math::isNearlyZero(), Arcane::math::matrix3x3Prod(), Arcane::math::matrix3x3Transp(), Arcane::math::matrixProduct(), Arcane::math::matrixTranspose(), Arcane::math::max(), Arcane::math::min(), Arcane::math::multiply(), operator*, operator*, operator*=(), operator+(), Arcane::Real3x3Proxy::operator+(), operator-(), operator-(), Arcane::Real3x3Proxy::operator-(), operator/, operator/=(), operator<, operator=(), operator==(), print(), printXyz(), Arcane::math::prodTensVec(), Arcane::math::prodVecTens(), Real3x3(), Real3x3(), Real3x3(), Real3x3(), Real3x3(), Real3x3(), Arcane::math::relativeError(), sub(), Arcane::Real3x3Proxy::sub(), subSame(), and Arcane::math::transpose().