Loading...
Searching...
No Matches
<tt>tensor3</tt>

d-dimensional physical third-order tensor

# Description

The `tensor3` class defines a `d*d*d` array with floating coefficients. This class is suitable for defining third-order tensors, i.e. `field` with `d*d*d` matrix values at each physical position.

It is represented as a tridimensional array of coordinates. The coordinate indexes start at zero and finishes at `d-1`, e.g. `a(0,0,0)`, `a(0,0,1)`, ..., `a(2,2,2)`.

The default constructor set all components to zero:

        tensor3 a;

The linear algebra with scalars and `tensor` is supported.

# Implementation

This documentation has been generated from file fem/geo_element/tensor3.h

The `tensor3` class is simply an alias to the `tensor3_basic` class

typedef tensor3_basic<Float> tensor3;
tensor3
see the tensor3 page for the full documentation

The `tensor3_basic` class is a template class with the floating type as parameter:

template<class T>
class tensor3_basic {
public:
typedef size_t size_type;
typedef T element_type;
typedef T float_type;
// allocators:
tensor3_basic (const T& init_val = 0);
tensor3_basic (const tensor3_basic<T>& a);
// affectation:
tensor3_basic<T>& operator= (const tensor3_basic<T>& a);
tensor3_basic<T>& operator= (const T& val);
// accessors:
T& operator()(size_type i, size_type j, size_type k);
const T& operator()(size_type i, size_type j, size_type k) const;
// algebra
tensor3_basic<T> operator* (const T& k) const;
tensor3_basic<T> operator/ (const T& k) const;
tensor_basic<T> operator* (const point_basic<T>& v) const;
tensor3_basic<T> operator* (const tensor_basic<T>& b) const;
tensor3_basic<T> operator+ (const tensor3_basic<T>& b) const;
tensor3_basic<T> operator- (const tensor3_basic<T>& b) const;
tensor3_basic<T>& operator+= (const tensor3_basic<T>&);
tensor3_basic<T>& operator-= (const tensor3_basic<T>&);
tensor3_basic<T>& operator*= (const T& k);
tensor3_basic<T>& operator/= (const T& k) { return operator*= (1./k); }
// inputs/outputs:
std::ostream& put (std::ostream& s, size_type d = 3) const;
std::istream& get (std::istream&);
size_type
field::size_type size_type
Definition branch.cc:430
rheolef::tensor3_basic::operator-
tensor3_basic< T > operator-(const tensor3_basic< T > &b) const
Definition tensor3.cc:83
rheolef::tensor3_basic::put
std::ostream & put(std::ostream &s, size_type d=3) const
Definition tensor3.cc:140
rheolef::tensor3_basic::operator-=
tensor3_basic< T > & operator-=(const tensor3_basic< T > &)
Definition tensor3.cc:116
rheolef::tensor3_basic::get
std::istream & get(std::istream &)
Definition tensor3.cc:163
rheolef::tensor3_basic::operator*=
tensor3_basic< T > & operator*=(const T &k)
Definition tensor3.cc:126
rheolef::tensor3_basic::operator=
tensor3_basic< T > & operator=(const tensor3_basic< T > &a)
Definition tensor3.cc:38
rheolef::tensor3_basic::size_type
size_t size_type
Definition tensor3.h:76
rheolef::tensor3_basic::operator*
tensor3_basic< T > operator*(const T &k) const
Definition tensor3.h:159
rheolef::tensor3_basic::operator/=
tensor3_basic< T > & operator/=(const T &k)
Definition tensor3.h:105
rheolef::tensor3_basic::operator()
T & operator()(size_type i, size_type j, size_type k)
Definition tensor3.h:145
rheolef::tensor3_basic::operator+=
tensor3_basic< T > & operator+=(const tensor3_basic< T > &)
Definition tensor3.cc:106
rheolef::tensor3_basic::operator+
tensor3_basic< T > operator+(const tensor3_basic< T > &b) const
Definition tensor3.cc:72
rheolef::tensor3_basic::operator/
tensor3_basic< T > operator/(const T &k) const
Definition tensor3.h:179
rheolef::tensor3_basic::element_type
T element_type
Definition tensor3.h:77
rheolef::tensor3_basic::float_type
T float_type
Definition tensor3.h:78
T
Expr1::float_type T
Definition field_expr.h:230
d
size_t d
Definition neumann-laplace-lambda.cc:28
};