libmesh解析
本工作只是尝试解析原libmesh的代码,供学习使用
 全部  命名空间 文件 函数 变量 类型定义 枚举 枚举值 友元 
| 函数
libMesh::TensorTools 命名空间参考

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 > >
 
struct  MathWrapperTraits
 此辅助结构用于确定模板类是否是我们的数学结构之一, 例如TypeVector、TypeTensor及其后代 更多...
 
struct  MathWrapperTraits< TypeVector< T > >
 此模板特化表示模板类型是TypeVector时为true 更多...
 
struct  MathWrapperTraits< VectorValue< T > >
 此模板特化表示模板类型是VectorValue时为true 更多...
 
struct  MathWrapperTraits< TypeTensor< T > >
 此模板特化表示模板类型是TypeTensor时为true 更多...
 
struct  MathWrapperTraits< TensorValue< T > >
 此模板特化表示模板类型是TensorValue时为true 更多...
 
struct  MathWrapperTraits< TypeNTensor< N, T > >
 此模板特化表示模板类型是TypeNTensor时为true 更多...
 
struct  MakeBaseNumber
 此模板结构用于创建基础数值类型,支持标量类型。 如果模板类型不是标量类型,则不会创建基础数值类型。 更多...
 
struct  MakeBaseNumber< T, typename std::enable_if< ScalarTraits< T >::value >::type >
 此模板特化表示对于标量类型,将使用MakeNumber来创建基础数值类型。 更多...
 
struct  MakeBaseNumber< Wrapper< T >, typename std::enable_if< MathWrapperTraits< Wrapper< T > >::value >::type >
 此模板结构用于根据模板包装类型创建基础数值类型。 如果模板类型不是数学包装类型,则不会创建基础数值类型。 更多...
 
struct  TensorTraits
 此模板结构用于获取张量的特性,包括张量的秩。 默认情况下,它被断言为false,需要为特定类型进行特化。 更多...
 
struct  TensorTraits< T, typename std::enable_if< ScalarTraits< T >::value >::type >
 此模板特化表示对于标量类型,张量秩为0。 更多...
 
struct  TensorTraits< TypeVector< T > >
 此模板特化表示对于TypeVector类型,张量秩为1。 更多...
 
struct  TensorTraits< VectorValue< T > >
 此模板特化表示对于VectorValue类型,张量秩为1。 更多...
 
struct  TensorTraits< TypeTensor< T > >
 此模板特化表示对于TypeTensor类型,张量秩为2。 更多...
 
struct  TensorTraits< TensorValue< T > >
 此模板特化表示对于TensorValue类型,张量秩为2。 更多...
 
struct  TensorTraits< TypeNTensor< N, T > >
 此模板特化表示对于TypeNTensor类型,张量秩为N,其中N是模板参数。 更多...
 

函数

Number curl_from_grad (const VectorValue< Number > &)
 
VectorValue< Numbercurl_from_grad (const TensorValue< Number > &grad)
 根据梯度计算矢量的旋度 更多...
 
TensorValue< Numbercurl_from_grad (const TypeNTensor< 3, Number > &)
 
Number div_from_grad (const VectorValue< Number > &grad)
 虚拟函数。标量的散度未定义,但需要使ExactSolution编译通过 更多...
 
Number div_from_grad (const TensorValue< Number > &grad)
 根据梯度计算矢量的散度 更多...
 
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 (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 libMesh::TensorTools::curl_from_grad ( const VectorValue< Number > &  )

在文件 tensor_tools.C28 行定义.

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

根据梯度计算矢量的旋度

在文件 tensor_tools.C33 行定义.

34 {
35  const Number duz_dy = grad(2,1);
36  const Number duy_dz = grad(1,2);
37  const Number dux_dz = grad(0,2);
38  const Number duz_dx = grad(2,0);
39  const Number duy_dx = grad(1,0);
40  const Number dux_dy = grad(0,1);
41 
42  return VectorValue<Number>(duz_dy - duy_dz,
43  dux_dz - duz_dx,
44  duy_dx - dux_dy);
45 }
TensorValue< Number > libMesh::TensorTools::curl_from_grad ( const TypeNTensor< 3, Number > &  grad)

占位符,用于使ExactSolution编译通过。将根据张量的梯度计算张量的旋度。

在文件 tensor_tools.C48 行定义.

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

虚拟函数。标量的散度未定义,但需要使ExactSolution编译通过

在文件 tensor_tools.C54 行定义.

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

根据梯度计算矢量的散度

在文件 tensor_tools.C59 行定义.

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)

占位符,用于使ExactSolution编译通过。将根据张量的梯度计算张量的散度。

在文件 tensor_tools.C69 行定义.

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

在文件 tensor_tools.h47 行定义.

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

在文件 tensor_tools.h54 行定义.

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

在文件 tensor_tools.h61 行定义.

参考 libMesh::TypeTensor< T >::contract().

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

在文件 tensor_tools.h68 行定义.

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

69 { return a.contract(b); }
template<typename T >
bool libMesh::TensorTools::is_zero ( const T &  a)
inline

在文件 tensor_tools.h97 行定义.

97 { return a.is_zero();}
template<typename T >
T libMesh::TensorTools::norm_sq ( std::complex< T >  a)
inline
template<typename T >
auto libMesh::TensorTools::norm_sq ( const T &  a) -> decltype(std::norm(a))
inline

在文件 tensor_tools.h79 行定义.

参考 std::norm().

80 { return std::norm(a); }
ADRealEigenVector< T, D, asd > norm(const ADRealEigenVector< T, D, asd > &)
计算自动微分实数向量的范数。
Definition: type_vector.h:64
template<typename T >
auto libMesh::TensorTools::norm_sq ( const TypeVector< T > &  a) -> decltype(std::norm(T()))
inline

在文件 tensor_tools.h85 行定义.

86 { return a.norm_sq(); }
template<typename T >
auto libMesh::TensorTools::norm_sq ( const VectorValue< T > &  a) -> decltype(std::norm(T()))
inline

在文件 tensor_tools.h91 行定义.

92 { return a.norm_sq(); }