A symmetric 3x3 tensor represented by 6 values: xx, yy, zz, xy, yz, zx. More...
Public Member Functions | |
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... | |
SymmetricTensor & | operator= (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... | |
SymmetricTensor & | operator+= (const SymmetricTensor &rhs) |
Adds the given rhs tensor to this. More... | |
SymmetricTensor & | operator-= (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... | |
SymmetricTensor & | operator*= (double scalar) |
Multiplies every component of this tensor by the given scalar. More... | |
SymmetricTensor & | operator/= (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... | |
Static Public Member Functions | |
static SymmetricTensor | identity () |
Returns identity tensor. More... | |
Protected Member Functions | |
SymmetricTensor (double *values) | |
Constructs a null tensor which will not own its data. Use SharedMemorySymmetricTensor to achieve this. More... | |
Friends | |
SymmetricTensor | operator* (double scalar, const SymmetricTensor &t) |
A symmetric 3x3 tensor represented by 6 values: xx, yy, zz, xy, yz, zx.
cee::SymmetricTensor::SymmetricTensor | ( | ) |
Constructs a null tensor.
cee::SymmetricTensor::SymmetricTensor | ( | const SymmetricTensor & | other | ) |
Constructs a tensor as a copy of other.
cee::SymmetricTensor::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)
|
protected |
Constructs a null tensor which will not own its data. Use SharedMemorySymmetricTensor to achieve this.
SymmetricTensor cee::SymmetricTensor::deviator | ( | ) | const |
Returns the deviator.
double cee::SymmetricTensor::firstPrincipalValue | ( | ) | const |
Returns first principal value.
cee::Vec3d cee::SymmetricTensor::firstPrincipalVector | ( | ) | const |
Returns first principal vector.
|
static |
Returns identity tensor.
bool cee::SymmetricTensor::operator!= | ( | const SymmetricTensor & | rhs | ) | const |
Returns true if two tensors are not equal, otherwise returns false.
Exact comparison is used (!= between doubles)
Returns a vector that is this tensor multiplied by vector.
const SymmetricTensor cee::SymmetricTensor::operator* | ( | double | scalar | ) | const |
Returns a tensor that is this tensor multiplied by scalar.
SymmetricTensor & cee::SymmetricTensor::operator*= | ( | double | scalar | ) |
Multiplies every component of this tensor by the given scalar.
const SymmetricTensor cee::SymmetricTensor::operator+ | ( | const SymmetricTensor & | rhs | ) | const |
Returns a tensor that is this tensor added with rhs.
cee::SymmetricTensor & cee::SymmetricTensor::operator+= | ( | const SymmetricTensor & | rhs | ) |
Adds the given rhs tensor to this.
const SymmetricTensor cee::SymmetricTensor::operator- | ( | const SymmetricTensor & | rhs | ) | const |
Returns a tensor that is this tensor subtracted with rhs.
cee::SymmetricTensor & cee::SymmetricTensor::operator-= | ( | const SymmetricTensor & | rhs | ) |
Subtracts the given rhs tensor from this.
const SymmetricTensor cee::SymmetricTensor::operator/ | ( | double | scalar | ) | const |
Returns a tensor that is this vector divided by scalar.
SymmetricTensor & cee::SymmetricTensor::operator/= | ( | double | scalar | ) |
Divides every component of this tensor by the given scalar.
SymmetricTensor & cee::SymmetricTensor::operator= | ( | const SymmetricTensor & | SymmetricTensor | ) |
Assigns other to this tensor and returns a reference to this tensor.
bool cee::SymmetricTensor::operator== | ( | const SymmetricTensor & | rhs | ) | const |
Returns true if two tensors are equal, otherwise returns false.
An exact match is required xx() == rhs.xx(), etc.
const double * cee::SymmetricTensor::rawPointer | ( | ) | const |
Returns a pointer to the raw array storing the 6 components.
double cee::SymmetricTensor::secondPrincipalValue | ( | ) | const |
Returns second principal value.
cee::Vec3d cee::SymmetricTensor::secondPrincipalVector | ( | ) | const |
Returns second principal value.
void cee::SymmetricTensor::set | ( | double | xx, |
double | yy, | ||
double | zz, | ||
double | xy, | ||
double | yz, | ||
double | zx | ||
) |
Sets xx, yy, zz, xy, yz, zx values.
double cee::SymmetricTensor::thirdPrincipalValue | ( | ) | const |
Returns third principal value.
cee::Vec3d cee::SymmetricTensor::thirdPrincipalVector | ( | ) | const |
Returns third principal value.
double cee::SymmetricTensor::trace | ( | ) | const |
Returns trace.
double cee::SymmetricTensor::vonMises | ( | ) | const |
Returns vonMises value.
const double & cee::SymmetricTensor::xx | ( | ) | const |
XX element of the tensor.
double & cee::SymmetricTensor::xx | ( | ) |
XX element of the tensor.
const double & cee::SymmetricTensor::xy | ( | ) | const |
XY element of the tensor.
double & cee::SymmetricTensor::xy | ( | ) |
XY element of the tensor.
const double & cee::SymmetricTensor::yy | ( | ) | const |
YY element of the tensor.
double & cee::SymmetricTensor::yy | ( | ) |
YY element of the tensor.
const double & cee::SymmetricTensor::yz | ( | ) | const |
YZ element of the tensor.
double & cee::SymmetricTensor::yz | ( | ) |
YZ element of the tensor.
const double & cee::SymmetricTensor::zx | ( | ) | const |
ZX element of the tensor.
double & cee::SymmetricTensor::zx | ( | ) |
ZX element of the tensor.
const double & cee::SymmetricTensor::zz | ( | ) | const |
ZZ element of the tensor.
double & cee::SymmetricTensor::zz | ( | ) |
ZZ element of the tensor.