libmesh解析
本工作只是尝试解析原libmesh的代码,供学习使用
 全部  命名空间 文件 函数 变量 类型定义 枚举 枚举值 友元 
Public 成员函数 | Private 成员函数 | Private 属性 | 所有成员列表
libMesh::RawAccessor< FieldType > 模板类 参考

This class provides single index access to FieldType (i.e. 更多...

#include <raw_accessor.h>

Public 成员函数

 RawAccessor (FieldType &data, const unsigned int dim)
 
 ~RawAccessor ()=default
 
RawFieldType< FieldType >::type & operator() (unsigned int i)
 
const RawFieldType< FieldType >
::type & 
operator() (unsigned int i) const
 
template<>
Numberoperator() (unsigned int libmesh_dbg_var(i))
 
template<>
Numberoperator() (unsigned int i)
 
template<>
Numberoperator() (unsigned int k)
 
template<>
Realoperator() (unsigned int libmesh_dbg_var(i))
 
template<>
Realoperator() (unsigned int i)
 
template<>
Realoperator() (unsigned int k)
 

Private 成员函数

 RawAccessor ()
 

Private 属性

FieldType & _data
 
const unsigned int _dim
 

详细描述

template<typename FieldType>
class libMesh::RawAccessor< FieldType >

This class provides single index access to FieldType (i.e.

Number, Gradient, Tensor, etc.).

在文件 raw_accessor.h93 行定义.

构造及析构函数说明

template<typename FieldType>
libMesh::RawAccessor< FieldType >::RawAccessor ( FieldType &  data,
const unsigned int  dim 
)
inline

在文件 raw_accessor.h97 行定义.

98  : _data(data),
99  _dim(dim)
100  {}
const unsigned int _dim
Definition: raw_accessor.h:111
template<typename FieldType>
libMesh::RawAccessor< FieldType >::~RawAccessor ( )
default
template<typename FieldType>
libMesh::RawAccessor< FieldType >::RawAccessor ( )
private

成员函数说明

template<typename FieldType>
RawFieldType<FieldType>::type& libMesh::RawAccessor< FieldType >::operator() ( unsigned int  i)
template<typename FieldType>
const RawFieldType<FieldType>::type& libMesh::RawAccessor< FieldType >::operator() ( unsigned int  i) const
template<>
Number & libMesh::RawAccessor< Number >::operator() ( unsigned int   libmesh_dbg_vari)
inline

在文件 raw_accessor.h117 行定义.

118 {
119  libmesh_assert_equal_to (i, 0);
120  return this->_data;
121 }
template<>
Number & libMesh::RawAccessor< Gradient >::operator() ( unsigned int  i)
inline

在文件 raw_accessor.h125 行定义.

126 {
127  libmesh_assert_less (i, this->_dim);
128  return this->_data(i);
129 }
const unsigned int _dim
Definition: raw_accessor.h:111
template<>
Number & libMesh::RawAccessor< Tensor >::operator() ( unsigned int  k)
inline

在文件 raw_accessor.h133 行定义.

134 {
135  libmesh_assert_less (k, this->_dim*this->_dim);
136 
137  // For tensors, each row is filled first, i.e. for 2-D
138  // [ 0 1; 2 3]
139  // Thus, k(i,j) = j + i*dim
140  unsigned int ii = k/_dim;
141  unsigned int jj = k - ii*_dim;
142 
143  return this->_data(ii,jj);
144 }
const unsigned int _dim
Definition: raw_accessor.h:111
template<>
Real & libMesh::RawAccessor< Real >::operator() ( unsigned int   libmesh_dbg_vari)
inline

在文件 raw_accessor.h181 行定义.

182 {
183  libmesh_assert_equal_to (i, 0);
184  return this->_data;
185 }
template<>
Real & libMesh::RawAccessor< RealGradient >::operator() ( unsigned int  i)
inline

在文件 raw_accessor.h189 行定义.

190 {
191  libmesh_assert_less (i, this->_dim);
192  return this->_data(i);
193 }
const unsigned int _dim
Definition: raw_accessor.h:111
template<>
Real & libMesh::RawAccessor< RealTensor >::operator() ( unsigned int  k)
inline

在文件 raw_accessor.h197 行定义.

198 {
199  libmesh_assert_less (k, this->_dim*this->_dim);
200 
201  // For tensors, each row is filled first, i.e. for 2-D
202  // [ 0 1; 2 3]
203  // Thus, k(i,j) = i + j*dim
204  unsigned int jj = k/_dim;
205  unsigned int ii = k - jj*_dim;
206 
207  return this->_data(ii,jj);
208 }
const unsigned int _dim
Definition: raw_accessor.h:111

类成员变量说明

template<typename FieldType>
FieldType& libMesh::RawAccessor< FieldType >::_data
private

在文件 raw_accessor.h110 行定义.

template<typename FieldType>
const unsigned int libMesh::RawAccessor< FieldType >::_dim
private

在文件 raw_accessor.h111 行定义.


该类的文档由以下文件生成: