libMesh
Classes | Functions
libMesh::TensorTools Namespace Reference

Classes

struct  DecrementRank
 
struct  DecrementRank< TensorValue< T > >
 
struct  DecrementRank< TypeNTensor< N, T > >
 
struct  DecrementRank< TypeTensor< T > >
 
struct  DecrementRank< TypeVector< T > >
 
struct  DecrementRank< VectorValue< T > >
 
struct  IncrementRank
 
struct  IncrementRank< TensorValue< T > >
 
struct  IncrementRank< TypeNTensor< N, T > >
 
struct  IncrementRank< TypeTensor< T > >
 
struct  IncrementRank< TypeVector< T > >
 
struct  IncrementRank< VectorValue< T > >
 
struct  MakeNumber
 
struct  MakeNumber< std::complex< T > >
 
struct  MakeNumber< TensorValue< T > >
 
struct  MakeNumber< TypeNTensor< N, T > >
 
struct  MakeNumber< TypeTensor< T > >
 
struct  MakeNumber< TypeVector< T > >
 
struct  MakeNumber< VectorValue< T > >
 
struct  MakeReal
 
struct  MakeReal< std::complex< T > >
 
struct  MakeReal< TensorValue< T > >
 
struct  MakeReal< TypeNTensor< N, T > >
 
struct  MakeReal< TypeTensor< T > >
 
struct  MakeReal< TypeVector< T > >
 
struct  MakeReal< VectorValue< T > >
 

Functions

template<typename T , typename T2 >
boostcopy::enable_if_c< ScalarTraits< T >::value &&ScalarTraits< T2 >::value, typename CompareTypes< T, T2 >::supertype >::type inner_product (const T &a, const T2 &b)
 
template<typename T , typename T2 >
CompareTypes< T, T2 >::supertype inner_product (const TypeVector< T > &a, const TypeVector< T2 > &b)
 
template<typename T , typename T2 >
CompareTypes< T, T2 >::supertype inner_product (const TypeTensor< T > &a, const TypeTensor< T2 > &b)
 
template<unsigned int N, typename T , typename T2 >
CompareTypes< T, T2 >::supertype inner_product (const TypeNTensor< N, T > &a, const TypeNTensor< N, T2 > &b)
 
template<typename T >
norm_sq (std::complex< T > a)
 
template<typename T >
auto norm_sq (const T &a) -> decltype(std::norm(a))
 
template<typename T >
auto norm_sq (const TypeVector< T > &a) -> decltype(std::norm(T()))
 
template<typename T >
auto norm_sq (const VectorValue< T > &a) -> decltype(std::norm(T()))
 
template<typename T >
bool is_zero (const T &a)
 
Number curl_from_grad (const VectorValue< Number > &)
 
VectorValue< Numbercurl_from_grad (const TensorValue< Number > &grad)
 Computes the curl of a vector given the gradient of that vector. More...
 
TensorValue< Numbercurl_from_grad (const TypeNTensor< 3, Number > &grad)
 
Number div_from_grad (const VectorValue< Number > &grad)
 Dummy. Divergence of a scalar not defined, but is needed for ExactSolution to compile. More...
 
Number div_from_grad (const TensorValue< Number > &grad)
 Computes the divergence of a vector given the gradient of that vector. More...
 
VectorValue< Numberdiv_from_grad (const TypeNTensor< 3, Number > &grad)
 

Function Documentation

◆ curl_from_grad() [1/3]

Number libMesh::TensorTools::curl_from_grad ( const VectorValue< Number > &  )

◆ curl_from_grad() [2/3]

VectorValue<Number> libMesh::TensorTools::curl_from_grad ( const TensorValue< Number > &  grad)

Computes the curl of a vector given the gradient of that vector.

◆ curl_from_grad() [3/3]

TensorValue<Number> libMesh::TensorTools::curl_from_grad ( const TypeNTensor< 3, Number > &  grad)

Place holder needed for ExactSolution to compile. Will compute the curl of a tensor given the gradient of that tensor.

◆ div_from_grad() [1/3]

Number libMesh::TensorTools::div_from_grad ( const VectorValue< Number > &  grad)

Dummy. Divergence of a scalar not defined, but is needed for ExactSolution to compile.

◆ div_from_grad() [2/3]

Number libMesh::TensorTools::div_from_grad ( const TensorValue< Number > &  grad)

Computes the divergence of a vector given the gradient of that vector.

◆ div_from_grad() [3/3]

VectorValue<Number> libMesh::TensorTools::div_from_grad ( const TypeNTensor< 3, Number > &  grad)

Place holder needed for ExactSolution to compile. Will compute the divergence of a tensor given the gradient of that tensor.

◆ inner_product() [1/4]

template<typename T , typename T2 >
boostcopy::enable_if_c<ScalarTraits<T>::value && ScalarTraits<T2>::value, typename CompareTypes<T, T2>::supertype>::type libMesh::TensorTools::inner_product ( const T &  a,
const T2 &  b 
)

Definition at line 62 of file tensor_tools.h.

63 { return a * b; }

◆ inner_product() [2/4]

template<typename T , typename T2 >
CompareTypes<T, T2>::supertype libMesh::TensorTools::inner_product ( const TypeVector< T > &  a,
const TypeVector< T2 > &  b 
)

Definition at line 68 of file tensor_tools.h.

69 { return a * b; }

◆ inner_product() [3/4]

template<typename T , typename T2 >
CompareTypes<T, T2>::supertype libMesh::TensorTools::inner_product ( const TypeTensor< T > &  a,
const TypeTensor< T2 > &  b 
)

Definition at line 74 of file tensor_tools.h.

References libMesh::TypeTensor< T >::contract().

75 { return a.contract(b); }

◆ inner_product() [4/4]

template<unsigned int N, typename T , typename T2 >
CompareTypes<T, T2>::supertype libMesh::TensorTools::inner_product ( const TypeNTensor< N, T > &  a,
const TypeNTensor< N, T2 > &  b 
)

Definition at line 80 of file tensor_tools.h.

References libMesh::TypeNTensor< N, T >::contract().

81 { return a.contract(b); }

◆ is_zero()

template<typename T >
bool libMesh::TensorTools::is_zero ( const T &  a)

Definition at line 104 of file tensor_tools.h.

104 { return a.is_zero();}

◆ norm_sq() [1/4]

template<typename T >
T libMesh::TensorTools::norm_sq ( std::complex< T >  a)

◆ norm_sq() [2/4]

template<typename T >
auto libMesh::TensorTools::norm_sq ( const T &  a) -> decltype(std::norm(a))

Definition at line 89 of file tensor_tools.h.

References std::norm().

90 { return std::norm(a); }
MetaPhysicL::DualNumber< T, D > norm(const MetaPhysicL::DualNumber< T, D > &in)

◆ norm_sq() [3/4]

template<typename T >
auto libMesh::TensorTools::norm_sq ( const TypeVector< T > &  a) -> decltype(std::norm(T()))

Definition at line 94 of file tensor_tools.h.

95 {return a.norm_sq();}

◆ norm_sq() [4/4]

template<typename T >
auto libMesh::TensorTools::norm_sq ( const VectorValue< T > &  a) -> decltype(std::norm(T()))

Definition at line 99 of file tensor_tools.h.

100 {return a.norm_sq();}