# cee::SymmetricTensor

class `SymmetricTensor`

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

  Subclassed by SharedMemorySymmetricTensor

  Public Functions

  `SymmetricTensor`()

    Constructs a null tensor.

  `SymmetricTensor`(const SymmetricTensor &other)

    Constructs a tensor as a copy of other.

  `SymmetricTensor`(double xx, double yy, double zz, double xy, double yz, double zx)

    Constructs a tensor from the 6 values (xx, yy, zz, xy, yz, zx)

  SymmetricTensor &`operator=`(const SymmetricTensor &SymmetricTensor)

    Assigns other to this tensor and returns a reference to this tensor.

  bool `operator==`(const SymmetricTensor &rhs) const

    Returns true if two tensors are equal, otherwise returns false.

    An exact match is required xx() == rhs.xx(), etc.

  bool `operator!=`(const SymmetricTensor &rhs) const

    Returns true if two tensors are not equal, otherwise returns false.

    Exact comparison is used (!= between doubles)

  const SymmetricTensor `operator+`(const SymmetricTensor &rhs) const

    Returns a tensor that is this tensor added with rhs.

  const SymmetricTensor `operator-`(const SymmetricTensor &rhs) const

    Returns a tensor that is this tensor subtracted with rhs.

  SymmetricTensor &`operator+=`(const SymmetricTensor &rhs)

    Adds the given rhs tensor to this.

  SymmetricTensor &`operator-=`(const SymmetricTensor &rhs)

    Subtracts the given rhs tensor from this.

  const Vec3d `operator*`(const Vec3d &v) const

    Returns a vector that is this tensor multiplied by vector.

  const SymmetricTensor `operator*`(double scalar) const

    Returns a tensor that is this tensor multiplied by scalar.

  const SymmetricTensor `operator/`(double scalar) const

    Returns a tensor that is this vector divided by scalar.

  SymmetricTensor &`operator*=`(double scalar)

    Multiplies every component of this tensor by the given scalar.

  SymmetricTensor &`operator/=`(double scalar)

    Divides every component of this tensor by the given scalar.

  const double &`xx`() const

    XX element of the tensor.

  const double &`yy`() const

    YY element of the tensor.

  const double &`zz`() const

    ZZ element of the tensor.

  const double &`xy`() const

    XY element of the tensor.

  const double &`yz`() const

    YZ element of the tensor.

  const double &`zx`() const

    ZX element of the tensor.

  double &`xx`()

    XX element of the tensor.

  double &`yy`()

    YY element of the tensor.

  double &`zz`()

    ZZ element of the tensor.

  double &`xy`()

    XY element of the tensor.

  double &`yz`()

    YZ element of the tensor.

  double &`zx`()

    ZX element of the tensor.

  void `set`(double xx, double yy, double zz, double xy, double yz, double zx)

    Sets xx, yy, zz, xy, yz, zx values.

  const double *`rawPointer`() const

    Returns a pointer to the raw array storing the 6 components.

  double `trace`() const

    Returns trace.

  SymmetricTensor `deviator`() const

    Returns the deviator.

  double `vonMises`() const

    Returns vonMises value.

  double `firstPrincipalValue`() const

    Returns first principal value.

  double `secondPrincipalValue`() const

    Returns second principal value.

  double `thirdPrincipalValue`() const

    Returns third principal value.

  Vec3d `firstPrincipalVector`() const

    Returns first principal vector.

  Vec3d `secondPrincipalVector`() const

    Returns second principal value.

  Vec3d `thirdPrincipalVector`() const

    Returns third principal value.

  Public Static Functions

  static SymmetricTensor `identity`()

    Returns identity tensor.

  Protected Functions

  `SymmetricTensor`(double *values)

    Constructs a null tensor which will not own its data. Use SharedMemorySymmetricTensor to achieve this.

  Friends

  inline friend SymmetricTensor `operator*`(double scalar, const SymmetricTensor &t)

Conversation saved
HOOPSY BETA

### Hello! I'm HOOPSY

Your multilingual generative AI assistant for documentation. Ask me anything about HOOPS Envision for Desktop in your own language, or choose a sample question below to start a conversation:

What is HOOPS Envision for Desktop?
What are the latest release notes for HOOPS Envision for Desktop?
How do I start evaluating HOOPS Envision for Desktop?
How do I write my first sample application?
How can I get assistance?

HOOPSY may store conversations according to OpenAI's policy. Responses may not always be accurate.

HOOPSY is thinking...