www.mooseframework.org
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | Friends | List of all members
RankThreeTensor Class Reference

RankThreeTensor is designed to handle any N-dimensional third order tensor, r. More...

#include <RankThreeTensor.h>

Public Types

enum  InitMethod { initNone }
 Initialization method. More...
 
enum  FillMethod { general }
 To fill up the 27 entries in the 3rd-order tensor, fillFromInputVector is called with one of the following fill_methods. More...
 

Public Member Functions

 RankThreeTensor ()
 Default constructor; fills to zero. More...
 
 RankThreeTensor (const InitMethod)
 Select specific initialization pattern. More...
 
 RankThreeTensor (const std::vector< Real > &, FillMethod)
 Fill from vector. More...
 
Real & operator() (unsigned int i, unsigned int j, unsigned int k)
 Gets the value for the index specified. Takes index = 0,1,2. More...
 
Real operator() (unsigned int i, unsigned int j, unsigned int k) const
 Gets the value for the index specified. Takes index = 0,1,2. Used for const. More...
 
void zero ()
 Zeros out the tensor. More...
 
void print (std::ostream &stm=Moose::out) const
 Print the rank three tensor. More...
 
RankThreeTensoroperator= (const RankThreeTensor &a)
 copies values from a into this tensor More...
 
RealVectorValue operator* (const RankTwoTensor &a) const
 r_ijk*a_kl More...
 
RankThreeTensor operator* (const Real a) const
 r_ijk*a_kl More...
 
RankThreeTensoroperator*= (const Real a)
 r_ijk *= a More...
 
RankThreeTensor operator/ (const Real a) const
 r_ijk/a More...
 
RankThreeTensoroperator/= (const Real a)
 r_ijk /= a for all i, j, k More...
 
RankThreeTensoroperator+= (const RankThreeTensor &a)
 r_ijk += a_ijk for all i, j, k More...
 
RankThreeTensor operator+ (const RankThreeTensor &a) const
 r_ijkl + a_ijk More...
 
RankThreeTensoroperator-= (const RankThreeTensor &a)
 r_ijk -= a_ijk More...
 
RankThreeTensor operator- (const RankThreeTensor &a) const
 r_ijk - a_ijk More...
 
RankThreeTensor operator- () const
 -r_ijk More...
 
Real L2norm () const
 (r_ijk*r_ijk) More...
 
template<class T >
void rotate (const T &R)
 Rotate the tensor using r_ijk = R_im R_in R_ko r_mno. More...
 
void rotate (const RealTensorValue &R)
 Rotate the tensor using r_ijk = R_im R_in R_ko r_mno. More...
 
void rotate (const RankTwoTensor &R)
 Rotate the tensor using r_ijk = R_im R_in R_ko R_lp r_mno. More...
 
void fillFromInputVector (const std::vector< Real > &input, FillMethod fill_method)
 fillFromInputVector takes some number of inputs to fill the Rank-3 tensor. More...
 
void fillFromPlaneNormal (const RealVectorValue &input)
 Fills RankThreeTensor from plane normal vectors ref. More...
 
RankFourTensor mixedProductRankFour (const RankTwoTensor &a) const
 Creates fourth order tensor D=A*b*A where A is rank 3 and b is rank 2. More...
 
RealVectorValue doubleContraction (const RankTwoTensor &b) const
 Creates a vector from the double contraction of a rank three and rank two tensor. More...
 

Static Public Member Functions

static MooseEnum fillMethodEnum ()
 Static method for use in validParams for getting the "fill_method". More...
 

Protected Member Functions

void fillGeneralFromInputVector (const std::vector< Real > &input)
 

Protected Attributes

Real _vals [N3]
 The values of the rank-three tensor stored by index=((i * LIBMESH_DIM + j) * LIBMESH_DIM + k) More...
 

Static Protected Attributes

static constexpr unsigned int N = LIBMESH_DIM
 Dimensionality of rank-three tensor. More...
 
static constexpr unsigned int N2 = N * N
 
static constexpr unsigned int N3 = N * N * N
 

Friends

template<class T >
void dataStore (std::ostream &, T &, void *)
 
template<class T >
void dataLoad (std::istream &, T &, void *)
 

Detailed Description

RankThreeTensor is designed to handle any N-dimensional third order tensor, r.

Definition at line 37 of file RankThreeTensor.h.

Member Enumeration Documentation

To fill up the 27 entries in the 3rd-order tensor, fillFromInputVector is called with one of the following fill_methods.

See the fill*FromInputVector functions for more details

Enumerator
general 

Definition at line 51 of file RankThreeTensor.h.

52  {
53  general
54  };

Initialization method.

Enumerator
initNone 

Definition at line 41 of file RankThreeTensor.h.

Constructor & Destructor Documentation

RankThreeTensor::RankThreeTensor ( )

Default constructor; fills to zero.

Definition at line 52 of file RankThreeTensor.C.

53 {
54  mooseAssert(N == 3, "RankThreeTensor is currently only tested for 3 dimensions.");
55 
56  for (unsigned int i = 0; i < N3; ++i)
57  _vals[i] = 0;
58 }
static constexpr unsigned int N
Dimensionality of rank-three tensor.
Real _vals[N3]
The values of the rank-three tensor stored by index=((i * LIBMESH_DIM + j) * LIBMESH_DIM + k) ...
static constexpr unsigned int N3
RankThreeTensor::RankThreeTensor ( const InitMethod  init)

Select specific initialization pattern.

Definition at line 60 of file RankThreeTensor.C.

61 {
62  switch (init)
63  {
64  case initNone:
65  break;
66 
67  default:
68  mooseError("Unknown RankThreeTensor initialization pattern.");
69  }
70 }
void mooseError(Args &&...args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:182
RankThreeTensor::RankThreeTensor ( const std::vector< Real > &  input,
FillMethod  fill_method 
)

Fill from vector.

Definition at line 72 of file RankThreeTensor.C.

73 {
74  fillFromInputVector(input, fill_method);
75 }
void fillFromInputVector(const std::vector< Real > &input, FillMethod fill_method)
fillFromInputVector takes some number of inputs to fill the Rank-3 tensor.

Member Function Documentation

RealVectorValue RankThreeTensor::doubleContraction ( const RankTwoTensor b) const

Creates a vector from the double contraction of a rank three and rank two tensor.

Definition at line 357 of file RankThreeTensor.C.

Referenced by operator()().

358 {
359  RealVectorValue result;
360 
361  for (unsigned int i = 0; i < N; ++i)
362  for (unsigned int j = 0; j < N2; ++j)
363  result(i) += _vals[i * N2 + j] * b._vals[j];
364 
365  return result;
366 }
VectorValue< Real > RealVectorValue
Definition: Assembly.h:40
static constexpr unsigned int N2
Real _vals[N2]
The values of the rank-two tensor stored by index=(i * LIBMESH_DIM + j)
static constexpr unsigned int N
Dimensionality of rank-three tensor.
Real _vals[N3]
The values of the rank-three tensor stored by index=((i * LIBMESH_DIM + j) * LIBMESH_DIM + k) ...
void RankThreeTensor::fillFromInputVector ( const std::vector< Real > &  input,
FillMethod  fill_method 
)

fillFromInputVector takes some number of inputs to fill the Rank-3 tensor.

Parameters
inputthe numbers that will be placed in the tensor
fill_methodthis can be: general (use fillGeneralFromInputVector) more fill_methods to be implemented soon!

Definition at line 212 of file RankThreeTensor.C.

Referenced by operator()(), and RankThreeTensor().

213 {
214  zero();
215 
216  switch (fill_method)
217  {
218  case general:
220  break;
221  default:
222  mooseError("fillFromInputVector called with unknown fill_method of ", fill_method);
223  }
224 }
void mooseError(Args &&...args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:182
void fillGeneralFromInputVector(const std::vector< Real > &input)
void zero()
Zeros out the tensor.
void RankThreeTensor::fillFromPlaneNormal ( const RealVectorValue &  input)

Fills RankThreeTensor from plane normal vectors ref.

Kuhl et. al. Int. J. Solids Struct. 38(2001) 2933-2952

Parameters
inputplane normal vector

Definition at line 227 of file RankThreeTensor.C.

Referenced by operator()().

228 {
229  unsigned int index = 0;
230  for (unsigned int i = 0; i < N; ++i)
231  {
232  const Real a = input(i);
233  for (unsigned int j = 0; j < N; ++j)
234  {
235  const Real b = input(j);
236  for (unsigned int k = 0; k < N; ++k)
237  {
238  const Real c = input(k);
239  Real sum = 0;
240  sum = -2 * a * b * c;
241  if (i == j)
242  sum += c;
243  if (i == k)
244  sum += b;
245  _vals[index++] = sum / 2.0;
246  }
247  }
248  }
249 }
static constexpr unsigned int N
Dimensionality of rank-three tensor.
Real _vals[N3]
The values of the rank-three tensor stored by index=((i * LIBMESH_DIM + j) * LIBMESH_DIM + k) ...
void RankThreeTensor::fillGeneralFromInputVector ( const std::vector< Real > &  input)
protected

Definition at line 334 of file RankThreeTensor.C.

Referenced by fillFromInputVector().

335 {
336  if (input.size() != 27)
337  mooseError("To use fillGeneralFromInputVector, your input must have size 27. Yours has size ",
338  input.size());
339 
340  for (unsigned int i = 0; i < N3; ++i)
341  _vals[i] = input[i];
342 }
void mooseError(Args &&...args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:182
Real _vals[N3]
The values of the rank-three tensor stored by index=((i * LIBMESH_DIM + j) * LIBMESH_DIM + k) ...
static constexpr unsigned int N3
MooseEnum RankThreeTensor::fillMethodEnum ( )
static

Static method for use in validParams for getting the "fill_method".

Definition at line 46 of file RankThreeTensor.C.

Referenced by operator()().

48 {
49  return MooseEnum("general");
50 }
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type It sho...
Definition: MooseEnum.h:37
Real RankThreeTensor::L2norm ( ) const

(r_ijk*r_ijk)

Definition at line 201 of file RankThreeTensor.C.

Referenced by operator()().

202 {
203  Real l2 = 0;
204 
205  for (unsigned int i = 0; i < N3; ++i)
206  l2 += Utility::pow<2>(_vals[i]);
207 
208  return std::sqrt(l2);
209 }
Real _vals[N3]
The values of the rank-three tensor stored by index=((i * LIBMESH_DIM + j) * LIBMESH_DIM + k) ...
static constexpr unsigned int N3
RankFourTensor RankThreeTensor::mixedProductRankFour ( const RankTwoTensor a) const

Creates fourth order tensor D=A*b*A where A is rank 3 and b is rank 2.

Parameters
aRankTwoTensor A in the equation above

Definition at line 252 of file RankThreeTensor.C.

Referenced by operator()().

253 {
254  RankFourTensor result;
255 
256  unsigned int index = 0;
257  for (unsigned int i = 0; i < N; ++i)
258  for (unsigned int j = 0; j < N; ++j)
259  for (unsigned int k = 0; k < N; ++k)
260  for (unsigned int l = 0; l < N; ++l)
261  {
262  for (unsigned int m = 0; m < N; ++m)
263  for (unsigned int n = 0; n < N; ++n)
264  result._vals[index] += (*this)(m, i, j) * a._vals[m * N + n] * (*this)(n, k, l);
265  index++;
266  }
267 
268  return result;
269 }
Real _vals[N2]
The values of the rank-two tensor stored by index=(i * LIBMESH_DIM + j)
static constexpr unsigned int N
Dimensionality of rank-three tensor.
PetscInt m
Real _vals[N4]
The values of the rank-four tensor stored by index=(((i * LIBMESH_DIM + j) * LIBMESH_DIM + k) * LIBME...
PetscInt n
RankFourTensor is designed to handle any N-dimensional fourth order tensor, C.
Real& RankThreeTensor::operator() ( unsigned int  i,
unsigned int  j,
unsigned int  k 
)
inline

Gets the value for the index specified. Takes index = 0,1,2.

Definition at line 66 of file RankThreeTensor.h.

67  {
68  return _vals[((i * N + j) * N + k)];
69  }
static constexpr unsigned int N
Dimensionality of rank-three tensor.
Real _vals[N3]
The values of the rank-three tensor stored by index=((i * LIBMESH_DIM + j) * LIBMESH_DIM + k) ...
Real RankThreeTensor::operator() ( unsigned int  i,
unsigned int  j,
unsigned int  k 
) const
inline

Gets the value for the index specified. Takes index = 0,1,2. Used for const.

Definition at line 72 of file RankThreeTensor.h.

73  {
74  return _vals[((i * N + j) * N + k)];
75  }
static constexpr unsigned int N
Dimensionality of rank-three tensor.
Real _vals[N3]
The values of the rank-three tensor stored by index=((i * LIBMESH_DIM + j) * LIBMESH_DIM + k) ...
RealVectorValue RankThreeTensor::operator* ( const RankTwoTensor a) const

r_ijk*a_kl

b_i = r_ijk * a_jk

Definition at line 93 of file RankThreeTensor.C.

Referenced by operator()(), and operator*().

94 {
95  RealVectorValue result;
96 
97  for (unsigned int i = 0; i < N; ++i)
98  {
99  Real sum = 0;
100  unsigned int i1 = i * N2;
101  for (unsigned int j1 = 0; j1 < N2; j1 += N)
102  for (unsigned int k = 0; k < N; ++k)
103  sum += _vals[i1 + j1 + k] * a._vals[j1 + k];
104  result(i) = sum;
105  }
106 
107  return result;
108 }
VectorValue< Real > RealVectorValue
Definition: Assembly.h:40
static constexpr unsigned int N2
Real _vals[N2]
The values of the rank-two tensor stored by index=(i * LIBMESH_DIM + j)
static constexpr unsigned int N
Dimensionality of rank-three tensor.
Real _vals[N3]
The values of the rank-three tensor stored by index=((i * LIBMESH_DIM + j) * LIBMESH_DIM + k) ...
RankThreeTensor RankThreeTensor::operator* ( const Real  a) const

r_ijk*a_kl

r_ijk*a

Definition at line 110 of file RankThreeTensor.C.

111 {
112  RankThreeTensor result;
113 
114  for (unsigned int i = 0; i < N3; ++i)
115  result._vals[i] = _vals[i] * b;
116 
117  return result;
118 }
RankThreeTensor is designed to handle any N-dimensional third order tensor, r.
Real _vals[N3]
The values of the rank-three tensor stored by index=((i * LIBMESH_DIM + j) * LIBMESH_DIM + k) ...
static constexpr unsigned int N3
RankThreeTensor & RankThreeTensor::operator*= ( const Real  a)

r_ijk *= a

Definition at line 121 of file RankThreeTensor.C.

Referenced by operator()().

122 {
123  for (unsigned int i = 0; i < N3; ++i)
124  _vals[i] *= a;
125 
126  return *this;
127 }
Real _vals[N3]
The values of the rank-three tensor stored by index=((i * LIBMESH_DIM + j) * LIBMESH_DIM + k) ...
static constexpr unsigned int N3
RankThreeTensor RankThreeTensor::operator+ ( const RankThreeTensor a) const

r_ijkl + a_ijk

Definition at line 159 of file RankThreeTensor.C.

Referenced by operator()().

160 {
161  RankThreeTensor result;
162 
163  for (unsigned int i = 0; i < N3; ++i)
164  result._vals[i] = _vals[i] + b._vals[i];
165 
166  return result;
167 }
RankThreeTensor is designed to handle any N-dimensional third order tensor, r.
Real _vals[N3]
The values of the rank-three tensor stored by index=((i * LIBMESH_DIM + j) * LIBMESH_DIM + k) ...
static constexpr unsigned int N3
RankThreeTensor & RankThreeTensor::operator+= ( const RankThreeTensor a)

r_ijk += a_ijk for all i, j, k

Definition at line 150 of file RankThreeTensor.C.

Referenced by operator()().

151 {
152  for (unsigned int i = 0; i < N3; ++i)
153  _vals[i] += a._vals[i];
154 
155  return *this;
156 }
Real _vals[N3]
The values of the rank-three tensor stored by index=((i * LIBMESH_DIM + j) * LIBMESH_DIM + k) ...
static constexpr unsigned int N3
RankThreeTensor RankThreeTensor::operator- ( const RankThreeTensor a) const

r_ijk - a_ijk

Definition at line 179 of file RankThreeTensor.C.

180 {
181  RankThreeTensor result;
182 
183  for (unsigned int i = 0; i < N3; ++i)
184  result._vals[i] = _vals[i] - b._vals[i];
185 
186  return result;
187 }
RankThreeTensor is designed to handle any N-dimensional third order tensor, r.
Real _vals[N3]
The values of the rank-three tensor stored by index=((i * LIBMESH_DIM + j) * LIBMESH_DIM + k) ...
static constexpr unsigned int N3
RankThreeTensor RankThreeTensor::operator- ( ) const

-r_ijk

Definition at line 190 of file RankThreeTensor.C.

Referenced by operator()().

191 {
192  RankThreeTensor result;
193 
194  for (unsigned int i = 0; i < N3; ++i)
195  result._vals[i] = -_vals[i];
196 
197  return result;
198 }
RankThreeTensor is designed to handle any N-dimensional third order tensor, r.
Real _vals[N3]
The values of the rank-three tensor stored by index=((i * LIBMESH_DIM + j) * LIBMESH_DIM + k) ...
static constexpr unsigned int N3
RankThreeTensor & RankThreeTensor::operator-= ( const RankThreeTensor a)

r_ijk -= a_ijk

Definition at line 170 of file RankThreeTensor.C.

Referenced by operator()().

171 {
172  for (unsigned int i = 0; i < N3; ++i)
173  _vals[i] -= a._vals[i];
174 
175  return *this;
176 }
Real _vals[N3]
The values of the rank-three tensor stored by index=((i * LIBMESH_DIM + j) * LIBMESH_DIM + k) ...
static constexpr unsigned int N3
RankThreeTensor RankThreeTensor::operator/ ( const Real  a) const

r_ijk/a

Definition at line 130 of file RankThreeTensor.C.

Referenced by operator()().

131 {
132  RankThreeTensor result;
133 
134  for (unsigned int i = 0; i < N3; ++i)
135  result._vals[i] = _vals[i] / b;
136 
137  return result;
138 }
RankThreeTensor is designed to handle any N-dimensional third order tensor, r.
Real _vals[N3]
The values of the rank-three tensor stored by index=((i * LIBMESH_DIM + j) * LIBMESH_DIM + k) ...
static constexpr unsigned int N3
RankThreeTensor & RankThreeTensor::operator/= ( const Real  a)

r_ijk /= a for all i, j, k

Definition at line 141 of file RankThreeTensor.C.

Referenced by operator()().

142 {
143  for (unsigned int i = 0; i < N3; ++i)
144  _vals[i] /= a;
145 
146  return *this;
147 }
Real _vals[N3]
The values of the rank-three tensor stored by index=((i * LIBMESH_DIM + j) * LIBMESH_DIM + k) ...
static constexpr unsigned int N3
RankThreeTensor & RankThreeTensor::operator= ( const RankThreeTensor a)

copies values from a into this tensor

Definition at line 85 of file RankThreeTensor.C.

Referenced by operator()().

86 {
87  for (unsigned int i = 0; i < N3; ++i)
88  _vals[i] = a._vals[i];
89 
90  return *this;
91 }
Real _vals[N3]
The values of the rank-three tensor stored by index=((i * LIBMESH_DIM + j) * LIBMESH_DIM + k) ...
static constexpr unsigned int N3
void RankThreeTensor::print ( std::ostream &  stm = Moose::out) const

Print the rank three tensor.

Referenced by operator()().

template<class T >
void RankThreeTensor::rotate ( const T &  R)

Rotate the tensor using r_ijk = R_im R_in R_ko r_mno.

Definition at line 206 of file RankThreeTensor.h.

Referenced by operator()().

207 {
208  unsigned int index = 0;
209  for (unsigned int i = 0; i < N; ++i)
210  for (unsigned int j = 0; j < N; ++j)
211  for (unsigned int k = 0; k < N; ++k)
212  {
213  unsigned int index2 = 0;
214  Real sum = 0.0;
215  for (unsigned int m = 0; m < N; ++m)
216  {
217  Real a = R(i, m);
218  for (unsigned int n = 0; n < N; ++n)
219  {
220  Real ab = a * R(j, n);
221  for (unsigned int o = 0; o < N; ++o)
222  sum += ab * R(k, o) * _vals[index2++];
223  }
224  }
225  _vals[index++] = sum;
226  }
227 }
static constexpr unsigned int N
Dimensionality of rank-three tensor.
PetscInt m
Real _vals[N3]
The values of the rank-three tensor stored by index=((i * LIBMESH_DIM + j) * LIBMESH_DIM + k) ...
PetscInt n
void RankThreeTensor::rotate ( const RealTensorValue &  R)

Rotate the tensor using r_ijk = R_im R_in R_ko r_mno.

Definition at line 272 of file RankThreeTensor.C.

273 {
274  RankThreeTensor old = *this;
275 
276  unsigned int index = 0;
277  for (unsigned int i = 0; i < N; ++i)
278  for (unsigned int j = 0; j < N; ++j)
279  for (unsigned int k = 0; k < N; ++k)
280  {
281  Real sum = 0.0;
282  unsigned int index2 = 0;
283  for (unsigned int m = 0; m < N; ++m)
284  {
285  Real a = R(i, m);
286  for (unsigned int n = 0; n < N; ++n)
287  {
288  Real ab = a * R(j, n);
289  for (unsigned int o = 0; o < N; ++o)
290  sum += ab * R(k, o) * old._vals[index2++];
291  }
292  }
293  _vals[index++] = sum;
294  }
295 }
static constexpr unsigned int N
Dimensionality of rank-three tensor.
PetscInt m
RankThreeTensor is designed to handle any N-dimensional third order tensor, r.
Real _vals[N3]
The values of the rank-three tensor stored by index=((i * LIBMESH_DIM + j) * LIBMESH_DIM + k) ...
PetscInt n
void RankThreeTensor::rotate ( const RankTwoTensor R)

Rotate the tensor using r_ijk = R_im R_in R_ko R_lp r_mno.

Definition at line 298 of file RankThreeTensor.C.

299 {
300  RankThreeTensor old = *this;
301 
302  unsigned int index = 0;
303  unsigned int i1 = 0;
304  for (unsigned int i = 0; i < N; ++i)
305  {
306  unsigned int j1 = 0;
307  for (unsigned int j = 0; j < N; ++j)
308  {
309  unsigned int k1 = 0;
310  for (unsigned int k = 0; k < N; ++k)
311  {
312  Real sum = 0.0;
313  unsigned int index2 = 0;
314  for (unsigned int m = 0; m < N; ++m)
315  {
316  Real a = R._vals[i1 + m];
317  for (unsigned int n = 0; n < N; ++n)
318  {
319  Real ab = a * R._vals[j1 + n];
320  for (unsigned int o = 0; o < N; ++o)
321  sum += ab * R._vals[k1 + o] * old._vals[index2++];
322  }
323  }
324  _vals[index++] = sum;
325  k1 += N;
326  }
327  j1 += N;
328  }
329  i1 += N;
330  }
331 }
Real _vals[N2]
The values of the rank-two tensor stored by index=(i * LIBMESH_DIM + j)
static constexpr unsigned int N
Dimensionality of rank-three tensor.
PetscInt m
RankThreeTensor is designed to handle any N-dimensional third order tensor, r.
Real _vals[N3]
The values of the rank-three tensor stored by index=((i * LIBMESH_DIM + j) * LIBMESH_DIM + k) ...
PetscInt n
void RankThreeTensor::zero ( )

Zeros out the tensor.

Definition at line 78 of file RankThreeTensor.C.

Referenced by fillFromInputVector(), and operator()().

79 {
80  for (unsigned int i = 0; i < N3; ++i)
81  _vals[i] = 0;
82 }
Real _vals[N3]
The values of the rank-three tensor stored by index=((i * LIBMESH_DIM + j) * LIBMESH_DIM + k) ...
static constexpr unsigned int N3

Friends And Related Function Documentation

template<class T >
void dataLoad ( std::istream &  stream,
T &  v,
void *   
)
friend

Definition at line 351 of file DataIO.h.

352 {
353  stream.read((char *)&v, sizeof(v));
354 }
template<class T >
void dataStore ( std::ostream &  stream,
T &  v,
void *   
)
friend

Definition at line 155 of file DataIO.h.

156 {
157 #ifdef LIBMESH_HAVE_CXX11_TYPE_TRAITS
158  static_assert(std::is_polymorphic<T>::value == false,
159  "Cannot serialize a class that has virtual "
160  "members!\nWrite a custom dataStore() "
161  "template specialization!\n\n");
162  static_assert(std::is_trivially_copyable<T>::value || std::is_same<T, Point>::value,
163  "Cannot serialize a class that is not trivially copyable!\nWrite a custom "
164  "dataStore() template specialization!\n\n");
165 #endif
166 
167  // Moose::out<<"Generic dataStore"<<std::endl;
168  stream.write((char *)&v, sizeof(v));
169 }

Member Data Documentation

Real RankThreeTensor::_vals[N3]
protected

The values of the rank-three tensor stored by index=((i * LIBMESH_DIM + j) * LIBMESH_DIM + k)

Definition at line 182 of file RankThreeTensor.h.

Referenced by dataLoad(), dataStore(), doubleContraction(), fillFromPlaneNormal(), fillGeneralFromInputVector(), L2norm(), operator()(), operator*(), operator*=(), operator+(), operator+=(), operator-(), operator-=(), operator/(), operator/=(), operator=(), RankThreeTensor(), rotate(), and zero().

constexpr unsigned int RankThreeTensor::N = LIBMESH_DIM
staticprotected

Dimensionality of rank-three tensor.

Definition at line 177 of file RankThreeTensor.h.

Referenced by doubleContraction(), fillFromPlaneNormal(), mixedProductRankFour(), operator()(), operator*(), RankThreeTensor(), and rotate().

constexpr unsigned int RankThreeTensor::N2 = N * N
staticprotected

Definition at line 178 of file RankThreeTensor.h.

Referenced by doubleContraction(), and operator*().

constexpr unsigned int RankThreeTensor::N3 = N * N * N
staticprotected

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