cee::SharedMemorySymmetricTensor Class Reference

A symmetric 3x3 tensor represented by 6 values: xx, yy, zz, xy, yz, zx. More...

Public Member Functions

 SharedMemorySymmetricTensor (double *data)
 Constructs a null tensor. More...
 
void setSharedData (double *data)
 Sets the shared data pointer. 6 values will be used after this address in sequence : xx, yy, zz, xy, yz, zx. More...
 
- Public Member Functions inherited from cee::SymmetricTensor
 SymmetricTensor ()
 Constructs a null tensor. More...
 
 SymmetricTensor (const SymmetricTensor &other)
 Constructs a tensor as a copy of other. More...
 
 SymmetricTensor (double xx, double yy, double zz, double xy, double yz, double zx)
 Constructs a tensor from an the 6 values (xx, yy, zz, xy, yz, zx) More...
 
SymmetricTensoroperator= (const SymmetricTensor &SymmetricTensor)
 Assigns other to this tensor and returns a reference to this tensor. More...
 
bool operator== (const SymmetricTensor &rhs) const
 Returns true if two tensors are equal, otherwise returns false. More...
 
bool operator!= (const SymmetricTensor &rhs) const
 Returns true if two tensors are not equal, otherwise returns false. More...
 
const SymmetricTensor operator+ (const SymmetricTensor &rhs) const
 Returns a tensor that is this tensor added with rhs. More...
 
const SymmetricTensor operator- (const SymmetricTensor &rhs) const
 Returns a tensor that is this tensor subtracted with rhs. More...
 
SymmetricTensoroperator+= (const SymmetricTensor &rhs)
 Adds the given rhs tensor to this. More...
 
SymmetricTensoroperator-= (const SymmetricTensor &rhs)
 Subtracts the given rhs tensor from this. More...
 
const Vec3d operator* (const Vec3d &v) const
 Returns a vector that is this tensor multiplied by vector. More...
 
const SymmetricTensor operator* (double scalar) const
 Returns a tensor that is this tensor multiplied by scalar. More...
 
const SymmetricTensor operator/ (double scalar) const
 Returns a tensor that is this vector divided by scalar. More...
 
SymmetricTensoroperator*= (double scalar)
 Multiplies every component of this tensor by the given scalar. More...
 
SymmetricTensoroperator/= (double scalar)
 Divides every component of this tensor by the given scalar. More...
 
const double & xx () const
 XX element of the tensor. More...
 
const double & yy () const
 YY element of the tensor. More...
 
const double & zz () const
 ZZ element of the tensor. More...
 
const double & xy () const
 XY element of the tensor. More...
 
const double & yz () const
 YZ element of the tensor. More...
 
const double & zx () const
 ZX element of the tensor. More...
 
double & xx ()
 XX element of the tensor. More...
 
double & yy ()
 YY element of the tensor. More...
 
double & zz ()
 ZZ element of the tensor. More...
 
double & xy ()
 XY element of the tensor. More...
 
double & yz ()
 YZ element of the tensor. More...
 
double & zx ()
 ZX element of the tensor. More...
 
void set (double xx, double yy, double zz, double xy, double yz, double zx)
 Sets xx, yy, zz, xy, yz, zx values. More...
 
const double * rawPointer () const
 Returns a pointer to the raw array storing the 6 components. More...
 
double trace () const
 Returns trace. More...
 
SymmetricTensor deviator () const
 Returns the deviator. More...
 
double vonMises () const
 Returns vonMises value. More...
 
double firstPrincipalValue () const
 Returns first principal value. More...
 
double secondPrincipalValue () const
 Returns second principal value. More...
 
double thirdPrincipalValue () const
 Returns third principal value. More...
 
Vec3d firstPrincipalVector () const
 Returns first principal vector. More...
 
Vec3d secondPrincipalVector () const
 Returns second principal value. More...
 
Vec3d thirdPrincipalVector () const
 Returns third principal value. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from cee::SymmetricTensor
static SymmetricTensor identity ()
 Returns identity tensor. More...
 
- Protected Member Functions inherited from cee::SymmetricTensor
 SymmetricTensor (double *values)
 Constructs a null tensor which will not own its data. Use SharedMemorySymmetricTensor to achieve this. More...
 
Inheritance diagram for cee::SharedMemorySymmetricTensor:
cee::SymmetricTensor

Detailed Description

A symmetric 3x3 tensor represented by 6 values: xx, yy, zz, xy, yz, zx.

This tensor does not own its data which provided when it is instantiated

Constructor & Destructor Documentation

cee::SharedMemorySymmetricTensor::SharedMemorySymmetricTensor ( double *  data)

Constructs a null tensor.

Member Function Documentation

void cee::SharedMemorySymmetricTensor::setSharedData ( double *  data)

Sets the shared data pointer. 6 values will be used after this address in sequence : xx, yy, zz, xy, yz, zx.