libMesh::TensorTools Namespace Reference

Classes

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

Functions

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 > &)
 
Number div_from_grad (const VectorValue< Number > &grad)
 Dummy. Divgerence 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 > &)
 
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 (T a)
 
template<typename T >
norm_sq (std::complex< T > a)
 
template<typename T >
Real norm_sq (const TypeVector< T > &a)
 
template<typename T >
Real norm_sq (const VectorValue< T > &a)
 

Function Documentation

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

Definition at line 28 of file tensor_tools.C.

References libMesh::err.

Referenced by libMesh::ExactSolution::_compute_error().

29  {
30  libMesh::err << "Operation not defined for scalar quantities." << std::endl;
31  libmesh_error();
32  }
VectorValue< Number > libMesh::TensorTools::curl_from_grad ( const TensorValue< Number > &  grad)

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

Definition at line 34 of file tensor_tools.C.

35  {
36  const Number duz_dy = grad(2,1);
37  const Number duy_dz = grad(1,2);
38  const Number dux_dz = grad(0,2);
39  const Number duz_dx = grad(2,0);
40  const Number duy_dx = grad(1,0);
41  const Number dux_dy = grad(0,1);
42 
43  return VectorValue<Number>( duz_dy - duy_dz, dux_dz - duz_dx, duy_dx - dux_dy);
44  }
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.

Definition at line 47 of file tensor_tools.C.

48  {
49  libmesh_not_implemented();
50  }
Number libMesh::TensorTools::div_from_grad ( const VectorValue< Number > &  )

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

Definition at line 53 of file tensor_tools.C.

References libMesh::err.

Referenced by libMesh::ExactSolution::_compute_error().

54  {
55  libMesh::err << "Operation not defined for scalar quantities." << std::endl;
56  libmesh_error();
57  }
Number libMesh::TensorTools::div_from_grad ( const TensorValue< Number > &  grad)

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

Definition at line 59 of file tensor_tools.C.

60  {
61  const Number dux_dx = grad(0,0);
62  const Number duy_dy = grad(1,1);
63  const Number duz_dz = grad(2,2);
64 
65  return dux_dx + duy_dy + duz_dz;
66  }
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.

Definition at line 69 of file tensor_tools.C.

70  {
71  libmesh_not_implemented();
72  }
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 
)
inline
template<typename T , typename T2 >
CompareTypes<T, T2>::supertype libMesh::TensorTools::inner_product ( const TypeVector< T > &  a,
const TypeVector< T2 > &  b 
)
inline

Definition at line 54 of file tensor_tools.h.

55  { return a * b; }
template<typename T , typename T2 >
CompareTypes<T, T2>::supertype libMesh::TensorTools::inner_product ( const TypeTensor< T > &  a,
const TypeTensor< T2 > &  b 
)
inline

Definition at line 60 of file tensor_tools.h.

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

61  { return a.contract(b); }
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 
)
inline

Definition at line 66 of file tensor_tools.h.

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

67  { return a.contract(b); }
template<typename T >
T libMesh::TensorTools::norm_sq ( std::complex< T >  a)
inline

Definition at line 75 of file tensor_tools.h.

75 { return std::norm(a); }
template<typename T >
Real libMesh::TensorTools::norm_sq ( const TypeVector< T > &  a)
inline

Definition at line 79 of file tensor_tools.h.

References libMesh::TypeVector< T >::size_sq().

80  {return a.size_sq();}
template<typename T >
Real libMesh::TensorTools::norm_sq ( const VectorValue< T > &  a)
inline

Definition at line 84 of file tensor_tools.h.

References libMesh::TypeVector< T >::size_sq().

85  {return a.size_sq();}

Site Created By: libMesh Developers
Last modified: February 07 2014 16:57:33 UTC

Hosted By:
SourceForge.net Logo