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)
const RawFieldType< FieldType >::type & operator()(unsigned int) const
RawFieldType< FieldType >::type & operator()(unsigned int)
RawAccessor(FieldType &data, const unsigned int dim)
This class defines a vector in LIBMESH_DIM dimensional Real or Complex space.
The libMesh namespace provides an interface to certain functionality in the library.
RawAccessor(FieldType &data, const unsigned int dim)
This class will eventually define a rank-N tensor in LIBMESH_DIM dimensional space of type T...
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?
This class provides single index access to FieldType (i.e.
This class defines a tensor in LIBMESH_DIM dimensional Real or Complex space.