Memosa-FVM  0.2
StressTensor< T > Class Template Reference

#include <StressTensor.h>

Collaboration diagram for StressTensor< T >:

Public Types

typedef StressTensor< T > This_T
 
typedef NumTypeTraits< T >
::T_Scalar 
T_Scalar
 
typedef NumTypeTraits< T >
::T_BuiltIn 
T_BuiltIn
 

Public Member Functions

T & operator[] (int n)
 
const T & operator[] (int n) const
 
StressTensoroperator= (const T &o)
 
StressTensoroperator= (const StressTensor &o)
 
StressTensor operator- ()
 
StressTensoroperator+= (const StressTensor &o)
 
StressTensoroperator+= (const T s)
 
StressTensoroperator-= (const StressTensor &o)
 
StressTensoroperator-= (const T s)
 
StressTensoroperator/= (const T s)
 
StressTensoroperator/= (const StressTensor &o)
 
StressTensoroperator*= (const T s)
 
StressTensoroperator*= (const StressTensor &o)
 
void zero ()
 
mag2 () const
 
bool operator< (const double tolerance) const
 

Static Public Member Functions

static string getTypeName ()
 
static int getDimension ()
 
static void getShape (int *shp)
 
static int getDataSize ()
 
static StressTensor getZero ()
 
static double doubleMeasure (const StressTensor &x)
 
static StressTensor getNegativeUnity ()
 
static StressTensor getUnity ()
 
static void accumulateOneNorm (StressTensor &sum, const StressTensor &v)
 
static void accumulateDotProduct (StressTensor &sum, const StressTensor &v0, const StressTensor &v1)
 
static void reduceSum (T_Scalar &sum, const This_T &x)
 
static void safeDivide (StressTensor &x, const StressTensor &y)
 
static void normalize (StressTensor &x, const StressTensor &y)
 
static void setMax (StressTensor &x, const StressTensor &y)
 

Private Attributes

_data [6]
 

Detailed Description

template<class T>
class StressTensor< T >

Symmetric 3x3 tensor to store stresses. Components are stored in the following order: xx, yy, zz, xy, yz, zx

Only used for exporting the stresses to MPM so most of the algebra operations aren't currently implemented.

Definition at line 23 of file StressTensor.h.

Member Typedef Documentation

template<class T>
typedef NumTypeTraits<T>::T_BuiltIn StressTensor< T >::T_BuiltIn

Definition at line 28 of file StressTensor.h.

template<class T>
typedef NumTypeTraits<T>::T_Scalar StressTensor< T >::T_Scalar

Definition at line 27 of file StressTensor.h.

template<class T>
typedef StressTensor<T> StressTensor< T >::This_T

Definition at line 26 of file StressTensor.h.

Member Function Documentation

template<class T>
static void StressTensor< T >::accumulateDotProduct ( StressTensor< T > &  sum,
const StressTensor< T > &  v0,
const StressTensor< T > &  v1 
)
inlinestatic

Definition at line 165 of file StressTensor.h.

167  {
168  throw;
169  }
template<class T>
static void StressTensor< T >::accumulateOneNorm ( StressTensor< T > &  sum,
const StressTensor< T > &  v 
)
inlinestatic

Definition at line 160 of file StressTensor.h.

161  {
162  throw;
163  }
template<class T>
static double StressTensor< T >::doubleMeasure ( const StressTensor< T > &  x)
inlinestatic

Definition at line 145 of file StressTensor.h.

146  {
147  throw;
148  }
template<class T>
static int StressTensor< T >::getDataSize ( )
inlinestatic

Definition at line 41 of file StressTensor.h.

42  {
44  }
template<class T>
static int StressTensor< T >::getDimension ( )
inlinestatic

Definition at line 37 of file StressTensor.h.

37 {return 1;}
template<class T>
static StressTensor StressTensor< T >::getNegativeUnity ( )
inlinestatic

Definition at line 150 of file StressTensor.h.

151  {
152  throw;
153  }
template<class T>
static void StressTensor< T >::getShape ( int *  shp)
inlinestatic

Definition at line 39 of file StressTensor.h.

39 { *shp = 6;}
template<class T>
static string StressTensor< T >::getTypeName ( )
inlinestatic

Definition at line 30 of file StressTensor.h.

31  {
32  return "StressTensor<" + NumTypeTraits<T>::getTypeName() +
33  ">";
34  }
template<class T>
static StressTensor StressTensor< T >::getUnity ( )
inlinestatic

Definition at line 155 of file StressTensor.h.

156  {
157  throw;
158  }
template<class T>
static StressTensor StressTensor< T >::getZero ( )
inlinestatic

Definition at line 138 of file StressTensor.h.

References StressTensor< T >::zero().

139  {
140  StressTensor z;
141  z.zero();
142  return z;
143  }
template<class T>
T StressTensor< T >::mag2 ( ) const
inline

Definition at line 128 of file StressTensor.h.

Referenced by StressTensor< T >::operator<().

129  {
130  throw;
131  }
template<class T>
static void StressTensor< T >::normalize ( StressTensor< T > &  x,
const StressTensor< T > &  y 
)
inlinestatic

Definition at line 181 of file StressTensor.h.

182  {
183  throw;
184  }
template<class T>
StressTensor& StressTensor< T >::operator*= ( const T  s)
inline

Definition at line 111 of file StressTensor.h.

References StressTensor< T >::_data.

112  {
113  for(int i=0;i<6;i++)
114  _data[i] *= s;
115  return *this;
116  }
template<class T>
StressTensor& StressTensor< T >::operator*= ( const StressTensor< T > &  o)
inline

Definition at line 118 of file StressTensor.h.

119  {
120  throw;
121  }
template<class T>
StressTensor& StressTensor< T >::operator+= ( const StressTensor< T > &  o)
inline

Definition at line 71 of file StressTensor.h.

References StressTensor< T >::_data.

72  {
73  for(int i=0;i<6;i++)
74  _data[i] += o[i];
75  return *this;
76  }
template<class T>
StressTensor& StressTensor< T >::operator+= ( const T  s)
inline

Definition at line 78 of file StressTensor.h.

References StressTensor< T >::_data.

79  {
80  for(int i=0;i<6;i++)
81  _data[i] += s;
82  return *this;
83  }
template<class T>
StressTensor StressTensor< T >::operator- ( )
inline

Definition at line 63 of file StressTensor.h.

References StressTensor< T >::_data.

64  {
65  StressTensor r;
66  for(int i=0;i<6;i++)
67  r[i]=-_data[i];
68  return r;
69  }
template<class T>
StressTensor& StressTensor< T >::operator-= ( const StressTensor< T > &  o)
inline

Definition at line 85 of file StressTensor.h.

References StressTensor< T >::_data.

86  {
87  for(int i=0;i<6;i++)
88  _data[i] -= o[i];
89  return *this;
90  }
template<class T>
StressTensor& StressTensor< T >::operator-= ( const T  s)
inline

Definition at line 92 of file StressTensor.h.

References StressTensor< T >::_data.

93  {
94  for(int i=0;i<6;i++)
95  _data[i] -= s;
96  return *this;
97  }
template<class T>
StressTensor& StressTensor< T >::operator/= ( const T  s)
inline

Definition at line 99 of file StressTensor.h.

References StressTensor< T >::_data.

100  {
101  for(int i=0;i<6;i++)
102  _data[i] /= s;
103  return *this;
104  }
template<class T>
StressTensor& StressTensor< T >::operator/= ( const StressTensor< T > &  o)
inline

Definition at line 106 of file StressTensor.h.

107  {
108  throw;
109  }
template<class T>
bool StressTensor< T >::operator< ( const double  tolerance) const
inline

Definition at line 133 of file StressTensor.h.

References StressTensor< T >::mag2().

134  {
135  return mag2() < tolerance*tolerance;
136  }
T mag2() const
Definition: StressTensor.h:128
template<class T>
StressTensor& StressTensor< T >::operator= ( const T &  o)
inline

Definition at line 49 of file StressTensor.h.

References StressTensor< T >::_data.

50  {
51  for(int i=0;i<6;i++)
52  _data[i] = o;
53  return *this;
54  }
template<class T>
StressTensor& StressTensor< T >::operator= ( const StressTensor< T > &  o)
inline

Definition at line 56 of file StressTensor.h.

References StressTensor< T >::_data.

57  {
58  for(int i=0;i<6;i++)
59  _data[i] = o[i];
60  return *this;
61  }
template<class T>
T& StressTensor< T >::operator[] ( int  n)
inline

Definition at line 46 of file StressTensor.h.

References StressTensor< T >::_data.

46 {return _data[n];}
template<class T>
const T& StressTensor< T >::operator[] ( int  n) const
inline

Definition at line 47 of file StressTensor.h.

References StressTensor< T >::_data.

47 {return _data[n];}
template<class T>
static void StressTensor< T >::reduceSum ( T_Scalar sum,
const This_T x 
)
inlinestatic

Definition at line 171 of file StressTensor.h.

172  {
173  throw;
174  }
template<class T>
static void StressTensor< T >::safeDivide ( StressTensor< T > &  x,
const StressTensor< T > &  y 
)
inlinestatic

Definition at line 176 of file StressTensor.h.

177  {
178  throw;
179  }
template<class T>
static void StressTensor< T >::setMax ( StressTensor< T > &  x,
const StressTensor< T > &  y 
)
inlinestatic

Definition at line 186 of file StressTensor.h.

187  {
188  throw;
189  }
template<class T>
void StressTensor< T >::zero ( )
inline

Definition at line 123 of file StressTensor.h.

Referenced by StressTensor< T >::getZero().

124  {
125  for(int i=0;i<6;i++) _data[i] = NumTypeTraits<T>::getZero();
126  }

Member Data Documentation


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