30 #include <boost/array.hpp>
32 #include "WTensorMeta.h"
33 #include "WTensorBase.h"
71 template< std::
size_t order, std::
size_t dim,
typename Data_T =
double >
72 class WTensorSym :
public WTensorFunc< WTensorBaseSym, order, dim, Data_T >
96 explicit WTensorSym(
const boost::array< Data_T, WTensorBaseSym< order, dim, Data_T >::dataSize >& data );
130 using WTensorFunc< WTensorBaseSym, order, dim, Data_T >::m_data;
133 template< std::
size_t order, std::
size_t dim,
typename Data_T >
135 : WTensorFunc< WTensorBaseSym, order, dim, Data_T >()
139 template< std::
size_t order, std::
size_t dim,
typename Data_T >
141 : WTensorFunc< WTensorBaseSym, order, dim, Data_T >( data )
145 template< std::
size_t order, std::
size_t dim,
typename Data_T >
147 : WTensorFunc< WTensorBaseSym, order, dim, Data_T >( data )
151 template< std::
size_t order, std::
size_t dim,
typename Data_T >
154 Data_T
const* tens = &m_data[ 0 ];
155 Data_T
const* grad = &gradient[ 0 ];
159 template< std::
size_t order, std::
size_t dim,
typename Data_T >
162 Data_T
const* tens = &m_data[ 0 ];
163 Data_T
const* grad = &gradient[ 0 ];
177 template< std::
size_t dim,
typename Data_T >
180 o << t() << std::endl;
192 template< std::
size_t dim,
typename Data_T >
195 for( std::size_t k = 0; k < dim; ++k )
211 template< std::
size_t dim,
typename Data_T >
214 for( std::size_t k = 0; k < dim; ++k )
216 for( std::size_t l = 0; l < dim; ++l )
218 o << t( k, l ) <<
" ";
241 std::size_t calcSupersymmetricTensorMultiplicity( std::size_t order, std::size_t numZeros, std::size_t numOnes, std::size_t numTwos );
A fixed size matrix class.
Implements a symmetric tensor that has the same number of components in every direction.
WTensorSym()
Default constructor of the symmetric tensor.
Data_T evaluateSphericalFunction(WValue< Data_T > const &gradient) const
Evaluate - for a given gradient - the spherical function represented by this symmetric tensor.
Data_T evaluateSphericalFunction(WMatrixFixed< Data_T, 3, 1 > const &gradient) const
Evaluate - for a given gradient - the spherical function represented by this symmetric tensor.
WTensorSym(const WValue< Data_T > &data)
Constructs and initializes the symmetrical Tensor with a WValue.
WTensorSym(const boost::array< Data_T, WTensorBaseSym< order, dim, Data_T >::dataSize > &data)
Constructs and initializes the symmetrical Tensor with a boost array.
Base class for all higher level values like tensors, vectors, matrices and so on.
Implements compile-time evaluation of factorials.
static Data_T evaluate(Data_T const *&tens, Data_T const *grad, Data_T w)
Multiply gradient components and divide by multiplicities.