Class managing a 3x3 real matrix. More...
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). | |
| 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 | |
Static Private Member Functions | |
| constexpr __host__ static __device__ bool | _eq (Real a, Real b) |
| Compares the values of a and b with the TypeEqualT comparator. | |
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:
Definition at line 66 of file arccore/src/base/arccore/base/Real3x3.h.
|
inlineconstexpr |
Constructs the matrix with all coefficients zero.
Definition at line 71 of file arccore/src/base/arccore/base/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().
Constructs the matrix with rows (ax,ay,az).
Definition at line 78 of file arccore/src/base/arccore/base/Real3x3.h.
|
inlineexplicitconstexpr |
Constructs a triplet identical to f.
Definition at line 100 of file arccore/src/base/arccore/base/Real3x3.h.
|
inlineexplicitconstexpr |
Constructs the instance with the triplet (v,v,v).
Definition at line 107 of file arccore/src/base/arccore/base/Real3x3.h.
|
inlineexplicitconstexpr |
Constructs the triplet ((av[0], av[1], av[2]), (av[3], av[4], av[5]), (av[6], av[7], av[8])).
Definition at line 113 of file arccore/src/base/arccore/base/Real3x3.h.
|
inlinestaticconstexprprivate |
Compares the values of a and b with the TypeEqualT comparator.
| true | if a and b are equal, |
| false | otherwise. |
Definition at line 432 of file arccore/src/base/arccore/base/Real3x3.h.
References Arcane::TypeEqualT< T >::isEqual().
Adds b to the triplet.
Definition at line 215 of file arccore/src/base/arccore/base/Real3x3.h.
References Real3x3(), x, y, and z.
Referenced by operator+=().
|
inlineconstexpr |
Assigns the rows (ax,ay,az) to the instance.
Definition at line 171 of file arccore/src/base/arccore/base/Real3x3.h.
References Real3x3(), x, y, and z.
Referenced by operator>>.
| 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 arccore/src/base/arccore/base/Real3x3.cc.
|
inlineconstexpr |
Returns a constant view over the nine elements of the matrix. [x.x, x.y, x.z, y.x, y.y, y.z, z.x, z.y, z.z]
Definition at line 197 of file arccore/src/base/arccore/base/Real3x3.h.
References x.
|
inlineconstexpr |
Returns a copy of the matrix.
Definition at line 161 of file arccore/src/base/arccore/base/Real3x3.h.
References Real3x3().
|
inlineconstexpr |
Determinant of the matrix.
Definition at line 368 of file arccore/src/base/arccore/base/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 147 of file arccore/src/base/arccore/base/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 153 of file arccore/src/base/arccore/base/Real3x3.h.
References Real3x3().
Referenced by Arcane::math::matrixProduct().
|
inlinestaticconstexpr |
Constructs the identity matrix.
Definition at line 144 of file arccore/src/base/arccore/base/Real3x3.h.
References Real3x3().
|
inlineconstexpr |
Definition at line 52 of file MathReal3x3.h.
|
inlinestaticconstexpr |
Constructs the null tensor.
Definition at line 138 of file arccore/src/base/arccore/base/Real3x3.h.
References Real3x3().
|
inlineconstexpr |
Compares two triplets. For the notion of equality, see operator==().
| true | if the two triplets are different, |
| false | otherwise. |
Definition at line 298 of file arccore/src/base/arccore/base/Real3x3.h.
References operator==(), and Real3x3().
Access to the i-th row (between 0 and 2 inclusive) of the instance.
| i | row number to return |
Definition at line 349 of file arccore/src/base/arccore/base/Real3x3.h.
References x.
Read-only access to the i-th (between 0 and 2 inclusive) row of the instance.
| i | row number to return |
Definition at line 317 of file arccore/src/base/arccore/base/Real3x3.h.
References x.
Access to the i-th row and j-th column.
| i | row number to return |
| j | column number to return |
Definition at line 360 of file arccore/src/base/arccore/base/Real3x3.h.
References x.
Read-only access to the i-th row and j-th column.
| i | row number to return |
| j | column number to return |
Definition at line 328 of file arccore/src/base/arccore/base/Real3x3.h.
References x.
|
inlineconstexpr |
Multiplies each component of the matrix by the real b.
Definition at line 257 of file arccore/src/base/arccore/base/Real3x3.h.
Adds b to the triplet.
Definition at line 251 of file arccore/src/base/arccore/base/Real3x3.h.
References add(), and Real3x3().
|
inlineconstexpr |
Subtracts b from the triplet.
Definition at line 254 of file arccore/src/base/arccore/base/Real3x3.h.
References Real3x3(), and sub().
|
inlineconstexpr |
Divides each component of the matrix by the real b.
Definition at line 265 of file arccore/src/base/arccore/base/Real3x3.h.
|
inlineconstexpr |
Compares the current instance component by component to b.
| true | if this.x==b.x and this.y==b.y and this.z==b.z. |
| false | otherwise. |
Definition at line 287 of file arccore/src/base/arccore/base/Real3x3.h.
References Real3x3(), x, y, and z.
Referenced by operator!=().
Access to the i-th row (between 0 and 2 inclusive) of the instance.
| i | row number to return |
Definition at line 339 of file arccore/src/base/arccore/base/Real3x3.h.
References x.
Read-only access to the i-th (between 0 and 2 inclusive) row of the instance.
| i | row number to return |
Definition at line 307 of file arccore/src/base/arccore/base/Real3x3.h.
References x.
| 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 arccore/src/base/arccore/base/Real3x3.cc.
Referenced by operator<<.
|
inlineconstexpr |
Resets the coefficients of the matrix to zero.
Definition at line 164 of file arccore/src/base/arccore/base/Real3x3.h.
References Real3x3(), and zero().
Subtracts b from the triplet.
Definition at line 224 of file arccore/src/base/arccore/base/Real3x3.h.
References Real3x3(), x, y, and z.
Referenced by operator-=().
Returns a view over the nine elements of the matrix. [x.x, x.y, x.z, y.x, y.y, y.z, z.x, z.y, z.z]
Definition at line 190 of file arccore/src/base/arccore/base/Real3x3.h.
References x.
|
inlinestaticconstexpr |
Constructs the zero matrix.
Definition at line 141 of file arccore/src/base/arccore/base/Real3x3.h.
References Real3x3().
Referenced by Arcane::DataTypeTraitsT< Real3x3 >::defaultValue(), Real3x3(), and reset().
|
friend |
Writes the triplet t to the stream o.
Definition at line 374 of file arccore/src/base/arccore/base/Real3x3.h.
References printXyz(), and Real3x3().
|
friend |
Reads the triplet t from the stream o.
Definition at line 380 of file arccore/src/base/arccore/base/Real3x3.h.
| Real3 Arcane::Real3x3::x |
first element of the triplet
Definition at line 131 of file arccore/src/base/arccore/base/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(), 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 132 of file arccore/src/base/arccore/base/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(), Arcane::math::relativeError(), sub(), Arcane::Real3x3Proxy::sub(), subSame(), and Arcane::math::transpose().
| Real3 Arcane::Real3x3::z |
first element of the triplet
Definition at line 133 of file arccore/src/base/arccore/base/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(), Arcane::math::relativeError(), sub(), Arcane::Real3x3Proxy::sub(), subSame(), and Arcane::math::transpose().