SymmetricTensor<2,1>::operator () (const TableIndices<2> &indices) const
{
const unsigned int rank = 2;
- const unsigned int dim = 1;
for (unsigned int r=0; r<rank; ++r)
- Assert (indices[r] < dim, ExcIndexRange (indices[r], 0, dim));
+ Assert (indices[r] < dimension, ExcIndexRange (indices[r], 0, dimension));
return data[0];
}
SymmetricTensor<2,2>::operator () (const TableIndices<2> &indices)
{
const unsigned int rank = 2;
- const unsigned int dim = 2;
for (unsigned int r=0; r<rank; ++r)
- Assert (indices[r] < dim, ExcIndexRange (indices[r], 0, dim));
+ Assert (indices[r] < dimension, ExcIndexRange (indices[r], 0, dimension));
// first treat the main diagonal
// elements, which are stored
SymmetricTensor<2,2>::operator () (const TableIndices<2> &indices) const
{
const unsigned int rank = 2;
- const unsigned int dim = 2;
for (unsigned int r=0; r<rank; ++r)
- Assert (indices[r] < dim, ExcIndexRange (indices[r], 0, dim));
+ Assert (indices[r] < dimension, ExcIndexRange (indices[r], 0, dimension));
// first treat the main diagonal
// elements, which are stored
SymmetricTensor<2,3>::operator () (const TableIndices<2> &indices)
{
const unsigned int rank = 2;
- const unsigned int dim = 3;
for (unsigned int r=0; r<rank; ++r)
- Assert (indices[r] < dim, ExcIndexRange (indices[r], 0, dim));
+ Assert (indices[r] < dimension, ExcIndexRange (indices[r], 0, dimension));
// first treat the main diagonal
// elements, which are stored
SymmetricTensor<2,3>::operator () (const TableIndices<2> &indices) const
{
const unsigned int rank = 2;
- const unsigned int dim = 3;
for (unsigned int r=0; r<rank; ++r)
- Assert (indices[r] < dim, ExcIndexRange (indices[r], 0, dim));
+ Assert (indices[r] < dimension, ExcIndexRange (indices[r], 0, dimension));
// first treat the main diagonal
// elements, which are stored
SymmetricTensor<4,1>::operator () (const TableIndices<4> &indices)
{
const unsigned int rank = 4;
- const unsigned int dim = 1;
for (unsigned int r=0; r<rank; ++r)
- Assert (indices[r] < dim, ExcIndexRange (indices[r], 0, dim));
+ Assert (indices[r] < dimension, ExcIndexRange (indices[r], 0, dimension));
return data[0][0];
}
SymmetricTensor<4,1>::operator () (const TableIndices<4> &indices) const
{
const unsigned int rank = 4;
- const unsigned int dim = 1;
for (unsigned int r=0; r<rank; ++r)
- Assert (indices[r] < dim, ExcIndexRange (indices[r], 0, dim));
+ Assert (indices[r] < dimension, ExcIndexRange (indices[r], 0, dimension));
return data[0][0];
}
SymmetricTensor<4,2>::operator () (const TableIndices<4> &indices)
{
const unsigned int rank = 4;
- const unsigned int dim = 2;
for (unsigned int r=0; r<rank; ++r)
- Assert (indices[r] < dim, ExcIndexRange (indices[r], 0, dim));
+ Assert (indices[r] < dimension, ExcIndexRange (indices[r], 0, dimension));
// each entry of the tensor can be
// thought of as an entry in a
SymmetricTensor<4,2>::operator () (const TableIndices<4> &indices) const
{
const unsigned int rank = 4;
- const unsigned int dim = 2;
for (unsigned int r=0; r<rank; ++r)
- Assert (indices[r] < dim, ExcIndexRange (indices[r], 0, dim));
+ Assert (indices[r] < dimension, ExcIndexRange (indices[r], 0, dimension));
// each entry of the tensor can be
// thought of as an entry in a
SymmetricTensor<4,3>::operator () (const TableIndices<4> &indices)
{
const unsigned int rank = 4;
- const unsigned int dim = 3;
for (unsigned int r=0; r<rank; ++r)
- Assert (indices[r] < dim, ExcIndexRange (indices[r], 0, dim));
+ Assert (indices[r] < dimension, ExcIndexRange (indices[r], 0, dimension));
// each entry of the tensor can be
// thought of as an entry in a
SymmetricTensor<4,3>::operator () (const TableIndices<4> &indices) const
{
const unsigned int rank = 4;
- const unsigned int dim = 3;
for (unsigned int r=0; r<rank; ++r)
- Assert (indices[r] < dim, ExcIndexRange (indices[r], 0, dim));
+ Assert (indices[r] < dimension, ExcIndexRange (indices[r], 0, dimension));
// each entry of the tensor can be
// thought of as an entry in a
unsigned int
SymmetricTensor<2,1>::component_to_unrolled_index (const TableIndices<2> &indices)
{
- const unsigned int dim = 1;
- Assert (indices[0] < dim, ExcIndexRange(indices[0], 0, dim));
- Assert (indices[1] < dim, ExcIndexRange(indices[1], 0, dim));
+ Assert (indices[0] < dimension, ExcIndexRange(indices[0], 0, dimension));
+ Assert (indices[1] < dimension, ExcIndexRange(indices[1], 0, dimension));
return 0;
}
unsigned int
SymmetricTensor<2,2>::component_to_unrolled_index (const TableIndices<2> &indices)
{
- const unsigned int dim = 2;
- Assert (indices[0] < dim, ExcIndexRange(indices[0], 0, dim));
- Assert (indices[1] < dim, ExcIndexRange(indices[1], 0, dim));
+ Assert (indices[0] < dimension, ExcIndexRange(indices[0], 0, dimension));
+ Assert (indices[1] < dimension, ExcIndexRange(indices[1], 0, dimension));
- static const unsigned int table[dim][dim] = {{0, 2},
- {2, 1}};
+ static const unsigned int table[dimension][dimension] = {{0, 2},
+ {2, 1}};
return table[indices[0]][indices[1]];
}