22#include "rheolef/tensor3.h"
43 _x[i][j][k] = a._x[i][j][k];
55 b(i,j) += _x[i][j][z]*v[z];
67 b(i,j,k) += _x[i][j][z]*t(z,k);
78 c(i,j,k) = _x[i][j][k] + b(i,j,k);
89 c(i,j,k) = _x[i][j][k] - b(i,j,k);
101 r += a(i,j,k) * b(i,j,k);
111 _x[i][j][k] += b._x[i][j][k];
121 _x[i][j][k] -= b._x[i][j][k];
144 case 1 :
return out << _x[0][0];
145 case 2 :
return out <<
"[[" << _x[0][0][0] <<
", " << _x[0][0][1] <<
";" << endl
146 <<
" " << _x[0][1][0] <<
", " << _x[0][1][1] <<
"]," << endl
147 <<
" [" << _x[1][0][0] <<
", " << _x[1][0][1] <<
";" << endl
148 <<
" " << _x[1][1][0] <<
", " << _x[1][1][1] <<
"]]";
150 default:
return out <<
"[[" << _x[0][0][0] <<
", " << _x[0][0][1] <<
", " << _x[0][0][2] <<
";" << endl
151 <<
" " << _x[0][1][0] <<
", " << _x[0][1][1] <<
", " << _x[0][1][2] <<
";" << endl
152 <<
" " << _x[0][2][0] <<
", " << _x[0][2][1] <<
", " << _x[0][2][2] <<
"]," << endl
153 <<
" [" << _x[1][0][0] <<
", " << _x[1][0][1] <<
", " << _x[1][0][2] <<
";" << endl
154 <<
" " << _x[1][1][0] <<
", " << _x[1][1][1] <<
", " << _x[1][1][2] <<
";" << endl
155 <<
" " << _x[1][2][0] <<
", " << _x[1][2][1] <<
", " << _x[1][2][2] <<
"]," << endl
156 <<
" [" << _x[2][0][0] <<
", " << _x[2][0][1] <<
", " << _x[2][0][2] <<
";" << endl
157 <<
" " << _x[2][1][0] <<
", " << _x[2][1][1] <<
", " << _x[2][1][2] <<
";" << endl
158 <<
" " << _x[2][2][0] <<
", " << _x[2][2][1] <<
", " << _x[2][2][2] <<
"]]";
172#define _RHEOLEF_instanciation(T) \
173template class tensor3_basic<T>; \
174template T dddot (const tensor3_basic<T>&, const tensor3_basic<T>&); \
#define _RHEOLEF_instanciation(T, M, A)
field::size_type size_type
see the Float page for the full documentation
tensor3_basic< T > operator-(const tensor3_basic< T > &b) const
std::ostream & put(std::ostream &s, size_type d=3) const
tensor3_basic< T > & operator-=(const tensor3_basic< T > &)
std::istream & get(std::istream &)
tensor3_basic< T > & operator*=(const T &k)
tensor3_basic< T > & operator=(const tensor3_basic< T > &a)
tensor3_basic< T > operator*(const T &k) const
tensor3_basic< T > & operator+=(const tensor3_basic< T > &)
tensor3_basic< T > operator+(const tensor3_basic< T > &b) const
#define fatal_macro(message)
This file is part of Rheolef.
T dddot(const tensor3_basic< T > &a, const tensor3_basic< T > &b)