$extrastylesheet
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.
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.
Number div_from_grad (const TensorValue< Number > &grad)
 Computes the divergence of a vector given the gradient of that vector.
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.

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

{
  libmesh_error_msg("Operation not defined for scalar quantities.");
}
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 33 of file tensor_tools.C.

{
  const Number duz_dy = grad(2,1);
  const Number duy_dz = grad(1,2);
  const Number dux_dz = grad(0,2);
  const Number duz_dx = grad(2,0);
  const Number duy_dx = grad(1,0);
  const Number dux_dy = grad(0,1);

  return VectorValue<Number>( duz_dy - duy_dz, dux_dz - duz_dx, duy_dx - dux_dy);
}
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 46 of file tensor_tools.C.

{
  libmesh_not_implemented();
}
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 52 of file tensor_tools.C.

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

{
  libmesh_error_msg("Operation not defined for scalar quantities.");
}
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 57 of file tensor_tools.C.

{
  const Number dux_dx = grad(0,0);
  const Number duy_dy = grad(1,1);
  const Number duz_dz = grad(2,2);

  return dux_dx + duy_dy + duz_dz;
}
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 67 of file tensor_tools.C.

{
  libmesh_not_implemented();
}
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.

{ 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().

{ 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().

{ 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.

{ 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().

{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().

{return a.size_sq();}