Itasca C++ Interface
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | List of all members
SymTensor Class Reference

A symmetric 2nd order tensor. More...

#include <symtensor.h>

Public Member Functions

 SymTensor ()
 Default constructor, no data initialization.
 
 SymTensor (const SymTensor &s)
 Copy constructor.
 
 SymTensor (const double &i11, const double &i22=0.0, const double &i33=0.0, const double &i12=0.0, const double &i13=0.0, const double &i23=0.0)
 
const SymTensoroperator= (const SymTensor &s)
 Assignment operator.
 
bool operator== (const SymTensor &s) const
 Equality operator.
 
bool operator< (const SymTensor &s) const
 
const double & s11 () const
 Component access, note that s12 is equivalent to s21 (for instance).
 
const double & s22 () const
 Component access, note that s12 is equivalent to s21 (for instance).
 
const double & s33 () const
 Component access, note that s12 is equivalent to s21 (for instance).
 
const double & s12 () const
 Component access, note that s12 is equivalent to s21 (for instance).
 
const double & s13 () const
 Component access, note that s12 is equivalent to s21 (for instance).
 
const double & s23 () const
 Component access, note that s12 is equivalent to s21 (for instance).
 
const double & s21 () const
 Component access, note that s12 is equivalent to s21 (for instance).
 
const double & s31 () const
 Component access, note that s12 is equivalent to s21 (for instance).
 
const double & s32 () const
 Component access, note that s12 is equivalent to s21 (for instance).
 
double & rs11 ()
 Reference access to components, note that s12 is equivalent to s21 (for instance).
 
double & rs22 ()
 Reference access to components, note that s12 is equivalent to s21 (for instance).
 
double & rs33 ()
 Reference access to components, note that s12 is equivalent to s21 (for instance).
 
double & rs12 ()
 Reference access to components, note that s12 is equivalent to s21 (for instance).
 
double & rs13 ()
 Reference access to components, note that s12 is equivalent to s21 (for instance).
 
double & rs23 ()
 Reference access to components, note that s12 is equivalent to s21 (for instance).
 
double & rs21 ()
 Reference access to components, note that s12 is equivalent to s21 (for instance).
 
double & rs31 ()
 Reference access to components, note that s12 is equivalent to s21 (for instance).
 
double & rs32 ()
 Reference access to components, note that s12 is equivalent to s21 (for instance).
 
const double & operator[] (unsigned int i) const
 Allows Index access to tensor components.
 
double & operator[] (unsigned int i)
 
const double & operator() (unsigned int i, unsigned int j) const
 Allows 2D index access to tensor components - base 0.
 
double & operator() (unsigned int i, unsigned int j)
 Allows 2D index access to tensor components - base 0.
 
DVect3 getEigenInfo (SymTensorInfo *si=0) const
 Returns the eigenvalues (principal components) and eigenvectors (principal directions). The information necessary to regenerate the tensor from eigenvalues is placed in the helper class si. x = minimum (most negative), y = intermediate, z = maximum (most positive)
 
double getTrace () const
 Returns the trace of the tensor (11+22+33). I1.
 
SymTensor getDeviatoric () const
 Returns the deviatoric tensor.
 
double getI1 () const
 Same as getTrace() - returns the first invariant.
 
double getI2 () const
 Returns the second invariant.
 
double getI3 () const
 Returns the third invariant, or I3.
 
double getJ2 () const
 Returns the second invariant of the deviatoric – J2.
 
double getJ2 (SymTensor *dev, double *I1=nullptr)
 Returns the second invariant of the deviatoric – J2.
 
double getJ3 () const
 returns the third invariant of the deviatoric – J3
 
double getLode (double *I1=nullptr, double *J2=nullptr, double *J3=nullptr)
 returns the Lode's angle in rad, TX = pi/6, TE = -pi/6
 
double getDeterminate () const
 Returns the determinate of the tensor.
 
double getNorm2 () const
 Returns a scalar norm (magnitude) value for the tensor, can be used for tolerance checking, etc.
 
double getTotalMeasure () const
 
SymTensor toGlobal (const Axes3D &a) const
 Transforms tensor from local (a) to global system.
 
DVect3 operator* (const DVect3 &input) const
 Performs the linear mapping represented by the tensor on the vector input.
 
DVect2 operator* (const DVect2 &input) const
 
SymTensor operator* (const double &mul) const
 
const SymTensoroperator*= (const double &mul)
 
SymTensor operator/ (const double &mul) const
 
const SymTensoroperator/= (const double &mul)
 
SymTensor mul (const double &d) const
 Returns a SymTensor with every component multiplied by a scalar value.
 
const SymTensoroperator+= (const SymTensor &s)
 += operator for a SymTensor
 
const SymTensoroperator-= (const SymTensor &s)
 
SymTensor operator+ (const SymTensor &s) const
 
SymTensor operator- (const SymTensor &s) const
 
bool isDiagonal (double tol=std::numeric_limits< double >::epsilon() *1000.0) const
 Determines whether or not the SymTensor is diagonal.
 
bool isIsotropic (double tol=std::numeric_limits< double >::epsilon() *1000.0) const
 
void adjustTrace (const double &newTrace)
 
void incrementDiagonal (const double &increment)
 
void rotate (const DVect3 &rot)
 
double maxAbs () const
 
bool zero () const
 

Static Public Member Functions

static SymTensor fromPrincipal (const DVect3 &prin, const Axes3D &axes)
 Creates a full SymTensor given principal vectors (in a DVect3) and an Axes3D for orientation.
 
static SymTensor fromForceNormal (const DVect3 &normal, const DVect3 &force)
 
static uint32 doubleToSingleComponent (uint32 dof1, uint32 dof2)
 

Detailed Description

A symmetric 2nd order tensor.

Includes helper functions for converting to and from eigenvalues and eigenvectors.

Constructor & Destructor Documentation

◆ SymTensor()

SymTensor::SymTensor ( const double & i11,
const double & i22 = 0.0,
const double & i33 = 0.0,
const double & i12 = 0.0,
const double & i13 = 0.0,
const double & i23 = 0.0 )
inlineexplicit

Explicit constructor, from the six components.
The diagonal components are optional.

Member Function Documentation

◆ fromForceNormal()

SymTensor SymTensor::fromForceNormal ( const DVect3 & normal,
const DVect3 & force )
static

Find a stress that produces the given force when multiplied by the given normal There is not a unique solution to to this - uses the max normal abs component. Note does not check normal.

◆ rs12()

double & SymTensor::rs12 ( )
inline

Reference access to components, note that s12 is equivalent to s21 (for instance).

◆ rs13()

double & SymTensor::rs13 ( )
inline

Reference access to components, note that s12 is equivalent to s21 (for instance).

◆ rs21()

double & SymTensor::rs21 ( )
inline

Reference access to components, note that s12 is equivalent to s21 (for instance).

◆ rs22()

double & SymTensor::rs22 ( )
inline

Reference access to components, note that s12 is equivalent to s21 (for instance).

◆ rs23()

double & SymTensor::rs23 ( )
inline

Reference access to components, note that s12 is equivalent to s21 (for instance).

◆ rs31()

double & SymTensor::rs31 ( )
inline

Reference access to components, note that s12 is equivalent to s21 (for instance).

◆ rs32()

double & SymTensor::rs32 ( )
inline

Reference access to components, note that s12 is equivalent to s21 (for instance).

◆ rs33()

double & SymTensor::rs33 ( )
inline

Reference access to components, note that s12 is equivalent to s21 (for instance).

◆ s12()

const double & SymTensor::s12 ( ) const
inline

Component access, note that s12 is equivalent to s21 (for instance).

◆ s13()

const double & SymTensor::s13 ( ) const
inline

Component access, note that s12 is equivalent to s21 (for instance).

◆ s21()

const double & SymTensor::s21 ( ) const
inline

Component access, note that s12 is equivalent to s21 (for instance).

◆ s22()

const double & SymTensor::s22 ( ) const
inline

Component access, note that s12 is equivalent to s21 (for instance).

◆ s23()

const double & SymTensor::s23 ( ) const
inline

Component access, note that s12 is equivalent to s21 (for instance).

◆ s31()

const double & SymTensor::s31 ( ) const
inline

Component access, note that s12 is equivalent to s21 (for instance).

◆ s32()

const double & SymTensor::s32 ( ) const
inline

Component access, note that s12 is equivalent to s21 (for instance).

◆ s33()

const double & SymTensor::s33 ( ) const
inline

Component access, note that s12 is equivalent to s21 (for instance).


The documentation for this class was generated from the following files: