20 #ifndef LIBMESH_RAW_ACCESSOR_H
21 #define LIBMESH_RAW_ACCESSOR_H
24 #include "libmesh/libmesh_common.h"
26 #include "libmesh/tensor_value.h"
27 #include "libmesh/vector_value.h"
28 #include "libmesh/type_n_tensor.h"
36 template <
typename FieldType>
63 #ifdef LIBMESH_USE_COMPLEX_NUMBERS
92 template <
typename FieldType>
119 libmesh_assert_equal_to (i, 0);
127 libmesh_assert_less (i, this->_dim);
128 return this->_data(i);
135 libmesh_assert_less (k, this->_dim*this->_dim);
140 unsigned int ii = k/_dim;
141 unsigned int jj = k - ii*_dim;
143 return this->_data(ii,jj);
149 template <
unsigned int N,
typename ScalarType>
172 ScalarType dummy = 0;
178 #ifdef LIBMESH_USE_COMPLEX_NUMBERS
183 libmesh_assert_equal_to (i, 0);
191 libmesh_assert_less (i, this->_dim);
192 return this->_data(i);
199 libmesh_assert_less (k, this->_dim*this->_dim);
204 unsigned int jj = k/_dim;
205 unsigned int ii = k - jj*_dim;
207 return this->_data(ii,jj);
213 #endif // LIBMESH_RAW_ACCESSOR_H
RawFieldType< FieldType >::type & operator()(unsigned int i)
RawFieldType< FieldType >::type & operator()(unsigned int)
RawAccessor(FieldType &data, const unsigned int dim)
此类定义了LIBMESH_DIM维的实数或复数空间中的向量。
RawAccessor(FieldType &data, const unsigned int dim)
该类最终将定义一个在类型为T的LIBMESH_DIM维空间中的N阶张量。
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
TypeNTensor< N, ScalarType > FieldType
What underlying data type would we need to access in each field?
const RawFieldType< FieldType >::type & operator()(unsigned int) const
This class provides single index access to FieldType (i.e.
此类定义了LIBMESH_DIM维度的实数或复数空间中的张量。typedef RealTensorValue总是定义为实数值的张量, 而NumberTensorValue则根据库的配置定义为实数或复数值...