36 std::array<double,6>
myT;
53 double t12 = 0.0,
double t13 = 0.0,
double t23 = 0.0)
55 myT = { t11, t22, t33, t12, t13, t23 };
74 for (
int i=0; i<6; i++)
myT[i] += t.
myT[i];
81 for (
int i=0; i<6; i++)
myT[i] -= t.
myT[i];
88 for (
int i=0; i<6; i++)
myT[i] *= d;
95 for (
int i=0; i<6; i++)
myT[i] /= d;
180 #ifdef FFA_INDEXCHECK
182 std::cerr <<
"FFaTensor3::operator[]: index i="<< i
183 <<
" is out of range [0,5]"<< std::endl;
190 #ifdef FFA_INDEXCHECK
192 std::cerr <<
"FFaTensor3::operator[]: index i="<< i
193 <<
" is out of range [0,5]"<< std::endl;
Class to represent a 1D simple tensor.
Definition: FFaTensor1.H:31
Class to represent a 2D symmetrical tensor.
Definition: FFaTensor2.H:35
Class to represent a 3D symmetric tensor.
Definition: FFaTensor3.H:35
double minPrinsipal() const
Returns the min principal value of the tensor.
Definition: FFaTensor3.C:202
void prinsipalValues(double &max, double &middle, double &min) const
Gets the principal values of the tensor.
Definition: FFaTensor3.C:217
double vonMises() const
Returns the von Mises value of the tensor.
Definition: FFaTensor3.C:129
FFaTensor3 & operator=(const FFaTensor1 &t)
Overloaded assignment operator.
Definition: FFaTensor3.C:56
FFaTensor3 & rotate(const FaMat33 &rotMx)
Rotates the tensor to the given coordinate system.
Definition: FFaTensor3.C:64
FFaTensor3 & translateInertia(const FaVec3 &x, double mass)
Translates an inertia tensor using the parallel-axis theorem.
Definition: FFaTensor3.C:116
FFaTensor3 & makeInertia(const FaVec3 &v1, const FaVec3 &v2, const FaVec3 &v3)
Makes the inertia tensor of a tetrahedron defined by three points.
Definition: FFaTensor3.C:91
FFaTensor3(double t11, double t22, double t33, double t12=0.0, double t13=0.0, double t23=0.0)
Constructor creating a tensor from 3 to 6 component values.
Definition: FFaTensor3.H:52
FFaTensor3(double d=0.0)
Default constructor initializing the tensor to 0 (or given value).
Definition: FFaTensor3.H:40
double maxPrinsipal(bool absMax=false) const
Returns the max or absolute max principal value of the tensor.
Definition: FFaTensor3.C:172
friend FFaTensor3 operator+(const FFaTensor3 &, const FFaTensor3 &)
Global addition operator.
FFaTensor3(const float *t)
Constructor creating a tensor from a float array.
Definition: FFaTensor3.H:42
friend std::ostream & operator<<(std::ostream &, const FFaTensor3 &)
Printing operator.
friend FFaTensor3 operator/(const FFaTensor3 &, double)
Scaling operator, division by a scalar.
double middlePrinsipal() const
Returns the middle principal value of the tensor.
Definition: FFaTensor3.C:187
FFaTensor3 & operator*=(double d)
Scaling operator (multiplication by a scalar).
Definition: FFaTensor3.H:86
FFaTensor3 & operator+=(const FFaTensor3 &t)
Addition operator.
Definition: FFaTensor3.H:72
friend bool operator==(const FFaTensor3 &, const FFaTensor3 &)
Equality operator,.
friend bool operator!=(const FFaTensor3 &, const FFaTensor3 &)
Inequality operator,.
FFaTensor3 & operator-=(const FFaTensor3 &t)
Subtraction operator.
Definition: FFaTensor3.H:79
FFaTensor3(const FaVec3 &v1, const FaVec3 &v2, const FaVec3 &v3)
Constructor creating an intertia tensor of a tetrahedron.
Definition: FFaTensor3.H:58
const double & operator[](int i) const
Zero-based indexing operator (read only).
Definition: FFaTensor3.H:178
double maxShear() const
Returns the max shear value of the tensor.
Definition: FFaTensor3.C:140
double * getPt()
Accesses the internal array (for update).
Definition: FFaTensor3.H:102
void fill(double d)
Initializes all tensor components to the given value.
Definition: FFaTensor3.H:64
FFaTensor3 & operator/=(double d)
Scaling operator (division by a scalar).
Definition: FFaTensor3.H:93
const double * getPt() const
Accesses the internal array (read only).
Definition: FFaTensor3.H:100
friend FFaTensor3 operator*(const FFaTensor3 &, double)
Scaling operator, multiplication of a tensor and a scalar.
std::array< double, 6 > myT
Tensor component values (11,22,33,12,13,23)
Definition: FFaTensor3.H:36
friend std::istream & operator>>(std::istream &, FFaTensor3 &)
Reading operator.
FFaTensor3(const double *t)
Constructor creating a tensor from a double array.
Definition: FFaTensor3.H:44
friend FFaTensor3 operator-(const FFaTensor3 &)
Unary negation operator.
Class for point transformations in 3D space.
Definition: FFaMat33.H:27
Class for positions in 3D space.
Definition: FFaMat34.H:32
Class for point vectors in 3D space.
Definition: FFaVec3.H:40
real(dp), dimension(:), allocatable v1
Definition: inverseModule.f90:27
real(dp), dimension(:), allocatable v2
Definition: inverseModule.f90:28