|
IFEM 90A354
|
Simple class for representing a non-symmetric fourth-order tensor. More...
#include <Tensor4.h>


Public Member Functions | |
| Tensor4 (t_ind nsd=3, Real scale=Real(1), bool makeJ=false) | |
| The default constructor creates a (scaled) identity tensor. | |
| Tensor4 (const std::vector< Real > &x, t_ind nsd=3) | |
| Constructor creating a tensor from a vector of components. | |
| void | zero () |
| Sets this to the 0-tensor. | |
| operator const std::vector< Real > & () const | |
| Type casting to a one-dimensional vector, for referencing. | |
| operator std::vector< Real > & () | |
| Type casting to a one-dimensional vector, for assignment. | |
| const Real * | ptr () const |
| Reference through a pointer. | |
| const Real & | operator() (t_ind i, t_ind j, t_ind d, t_ind l) const |
| Index-1 based component reference. | |
| Real & | operator() (t_ind i, t_ind j, t_ind k, t_ind l) |
| Index-1 based component access. | |
| Tensor4 & | operator= (const Tensor4 &T) |
| Assignment operator. | |
| Tensor4 & | operator= (Real val) |
| Overloaded assignment operator. | |
| Tensor4 & | operator+= (Real val) |
| Incrementation operator. | |
Protected Types | |
| typedef unsigned short int | t_ind |
| Tensor index type (for convenience) | |
Protected Member Functions | |
| virtual void | redim (t_ind nsd) |
| Auxilliary method used by the constructors. | |
| virtual std::ostream & | print (std::ostream &os) const |
| Prints out the tensor to an output stream. | |
Protected Attributes | |
| t_ind | n |
| Number of spatial dimensions for the tensor. | |
| t_ind | m |
| Dimension of the matrix representation. | |
| std::vector< Real > | v |
| The actual tensor component values. | |
Private Member Functions | |
| t_ind | index (t_ind i, t_ind j, t_ind k, t_ind l) const |
| Returns a 0-based array index for the given tensor indices. | |
Friends | |
| std::ostream & | operator<< (std::ostream &os, const Tensor4 &T) |
| Output stream operator. | |
Simple class for representing a non-symmetric fourth-order tensor.
|
protectedvirtual |
Prints out the tensor to an output stream.
Reimplemented in SymmTensor4.
References utl::matrix< T >::fill(), m, and v.
|
inlineprotectedvirtual |
Auxilliary method used by the constructors.
Reimplemented in SymmTensor4.
Referenced by operator=(), Tensor4(), and Tensor4().