#include <tensor_tools.h>
Public Types | |
| typedef tuple_of< N, unsigned int > | index_type |
Public Member Functions | |
| TypeNTensor () | |
| TypeNTensor (const T &) | |
| TypeNTensor (const TypeVector< T > &) | |
| TypeNTensor (const TypeTensor< T > &) | |
| operator TypeVector< T > () const | |
| operator VectorValue< T > () const | |
| operator TypeTensor< T > () const | |
| operator TensorValue< T > () const | |
| ~TypeNTensor () | |
| const TypeNTensor< N-1, T > | slice (const unsigned int) const |
| TypeNTensor< N-1, T > | slice (const unsigned int) |
| template<typename T2 > | |
| TypeNTensor< N, typename CompareTypes< T, T2 >::supertype > | operator+ (const TypeNTensor< N, T2 > &) const |
| template<typename T2 > | |
| const TypeNTensor< N, T > & | operator+= (const TypeNTensor< N, T2 > &) |
| template<typename T2 > | |
| TypeNTensor< N, typename CompareTypes< T, T2 >::supertype > | operator- (const TypeNTensor< N, T2 > &) const |
| template<typename T2 > | |
| const TypeNTensor< N, T > & | operator-= (const TypeNTensor< N, T2 > &) |
| TypeNTensor< N, T > | operator- () const |
| template<typename Scalar > | |
| boostcopy::enable_if_c< ScalarTraits< Scalar >::value, TypeNTensor< N, typename CompareTypes< T, Scalar >::supertype > >::type | operator* (const Scalar) const |
| template<typename Scalar > | |
| const TypeNTensor< N, T > & | operator*= (const Scalar) |
| template<typename Scalar > | |
| boostcopy::enable_if_c< ScalarTraits< Scalar >::value, TypeNTensor< N, typename CompareTypes< T, Scalar >::supertype > >::type | operator/ (const Scalar) const |
| const TypeNTensor< N, T > & | operator/= (const T) |
| template<typename T2 > | |
| CompareTypes< T, T2 >::supertype | contract (const TypeNTensor< N, T2 > &) const |
| Real | size_sq () const |
| Real | norm_sq () const |
| bool | operator== (const TypeNTensor< N, T > &) const |
| bool | operator< (const TypeNTensor< N, T > &) const |
| bool | operator> (const TypeNTensor< N, T > &) const |
| void | print (std::ostream &) const |
| template<typename T2 > | |
| void | add_scaled (const TypeNTensor< N, T2 > &, const T &) |
Public Attributes | |
| std::vector< T > | _coords |
Static Private Member Functions | |
| static constexpr int | int_pow (int b, int e) |
Friends | |
| std::ostream & | operator<< (std::ostream &os, const TypeNTensor< N, T > &t) |
This class will eventually define a rank-N tensor in LIBMESH_DIM dimensional space of type T.
Right now it defines a shim to allow for rank-independent code to compile (but not give correct results) in the case of vector-valued elements and second derivatives.
Definition at line 34 of file tensor_tools.h.
| typedef tuple_of<N, unsigned int> libMesh::TypeNTensor< N, T >::index_type |
Helper typedef for generic index programming
Definition at line 54 of file type_n_tensor.h.
|
inline |
Definition at line 56 of file type_n_tensor.h.
|
inline |
Definition at line 58 of file type_n_tensor.h.
|
inline |
Definition at line 60 of file type_n_tensor.h.
|
inline |
Definition at line 62 of file type_n_tensor.h.
|
inline |
|
inline |
Add a scaled type N tensor to this type N tensor without creating a temporary.
Definition at line 243 of file type_n_tensor.h.
|
inline |
Multiply 2 tensors together to return a scalar, i.e.
The tensors may contain different numeric types. Also known as the "double inner product" or "double dot product" of tensors.
Definition at line 164 of file type_n_tensor.h.
Referenced by libMesh::TensorTools::inner_product().
|
inlinestaticprivate |
Definition at line 233 of file type_n_tensor.h.
|
inline |
Definition at line 180 of file type_n_tensor.h.
|
inline |
Definition at line 68 of file type_n_tensor.h.
|
inline |
Definition at line 67 of file type_n_tensor.h.
|
inline |
Definition at line 64 of file type_n_tensor.h.
|
inline |
Definition at line 65 of file type_n_tensor.h.
|
inline |
Multiply every entry of a tensor by a number.
Definition at line 130 of file type_n_tensor.h.
|
inline |
Multiply every entry of this tensor by a number.
Definition at line 137 of file type_n_tensor.h.
|
inline |
Add two tensors.
Definition at line 92 of file type_n_tensor.h.
|
inline |
|
inline |
Subtract two tensors.
Definition at line 107 of file type_n_tensor.h.
|
inline |
Definition at line 120 of file type_n_tensor.h.
|
inline |
|
inline |
Divide every entry of a tensor by a number.
Definition at line 146 of file type_n_tensor.h.
|
inline |
Divide every entry of this tensor by a number.
Definition at line 151 of file type_n_tensor.h.
|
inline |
true if this tensor is "less" than another.Useful for sorting.
Definition at line 193 of file type_n_tensor.h.
|
inline |
true if two tensors are equal, false otherwise. Definition at line 185 of file type_n_tensor.h.
|
inline |
true if this tensor is "greater" than another. Definition at line 199 of file type_n_tensor.h.
|
inline |
Do a formatted print of this tensor to a stream which defaults to libMesh::out.
Definition at line 206 of file type_n_tensor.h.
|
inline |
Definition at line 173 of file type_n_tensor.h.
|
inline |
|
inline |
|
friend |
Does a formatted print (as above) but supports the syntax:
Definition at line 214 of file type_n_tensor.h.
| std::vector<T> libMesh::TypeNTensor< N, T >::_coords |
The coordinates of the TypeNTensor
Definition at line 230 of file type_n_tensor.h.