MercuryDPM  Beta
MatrixSymmetric.cc File Reference
#include "MatrixSymmetric.h"
#include "ExtendedMath.h"

Go to the source code of this file.

## Functions

Vec3D operator* (const MatrixSymmetric3D &A, const Vec3D &b)

std::ostream & operator<< (std::ostream &os, const MatrixSymmetric3D &A)

std::istream & operator>> (std::istream &is, MatrixSymmetric3D &A)

## Function Documentation

 Vec3D operator* ( const MatrixSymmetric3D & A, const Vec3D & b )

Multiplication of a symmetric 3D matrix with a vector (global operator, friend of this class)

Parameters
 [in] A the matrix [in] b the vector
Returns
The multiplication result

Definition at line 130 of file MatrixSymmetric.cc.

131 {
132  return Vec3D(A.XX * b.X + A.XY * b.Y + A.XZ * b.Z,
133  A.XY * b.X + A.YY * b.Y + A.YZ * b.Z,
134  A.XZ * b.X + A.YZ * b.Y + A.ZZ * b.Z);
135 }
Mdouble X
the vector components
Definition: Vector.h:52
Mdouble Y
Definition: Vector.h:52
Implementation of a 3D vector (by Vitaliy).
Definition: Vector.h:45
Mdouble Z
Definition: Vector.h:52
Mdouble XX
The six distinctive matrix elements.
 std::ostream& operator<< ( std::ostream & os, const MatrixSymmetric3D & A )

Adds all elements of a symmetric 3D matrix to an ostream

Parameters
 [in,out] os output stream [in] A the matrix
Returns
(reference to) output stream with matrix elements added

Definition at line 164 of file MatrixSymmetric.cc.

165 {
166  os << A.XX << ' ' << A.XY << ' ' << A.XZ << " " << A.YY << ' ' << A.YZ << " " << A.ZZ;
167  return os;
168 }
Mdouble XX
The six distinctive matrix elements.
 std::istream& operator>> ( std::istream & is, MatrixSymmetric3D & A )

Reads the elements of a symmetric 3D matrix from an istream

Parameters
 [in,out] is input stream, [out] A the matrix
Returns
(reference to) input stream from with matrix elements were read

Definition at line 176 of file MatrixSymmetric.cc.

177 {
178  is >> A.XX >> A.XY >> A.XZ >> A.YY >> A.YZ >> A.ZZ;
179  return is;
180 }
Mdouble XX
The six distinctive matrix elements.