/**
* Help function for unroll.
*/
- void unroll_recursion(Vector<double> &result,
- unsigned int &start_index) const;
+ void unroll_recursion(Vector<double> &result,
+ const unsigned int &start_index) const;
// make the following class a
// friend to this class. in principle,
template <int dim>
void
-Tensor<1,dim>::unroll( Vector<double>& result) const
+Tensor<1,dim>::unroll (Vector<double> &result) const
{
- Assert(result.size()==dim,
- ExcWrongVectorSize(dim, result.size()));
+ Assert (result.size()==dim,
+ ExcDimensionMismatch(dim, result.size()));
unsigned index = 0;
- unroll_recursion(result,index);
+ unroll_recursion (result,index);
}
template <int rank_, int dim>
void
-Tensor<rank_, dim>::unroll( Vector<double>& result) const
+Tensor<rank_, dim>::unroll (Vector<double> &result) const
{
Assert(result.size()==std::pow(static_cast<double>(dim),rank_),
ExcWrongVectorSize(static_cast<unsigned int>(std::pow(static_cast<double>(dim),rank_)),
result.size()));
unsigned index = 0;
- unroll_recursion(result,index);
+ unroll_recursion (result, index);
}
template <int rank_, int dim>
void
-Tensor<rank_, dim>::unroll_recursion( Vector<double>& result, unsigned& index) const
+Tensor<rank_, dim>::unroll_recursion (Vector<double> &result,
+ const unsigned int &index) const
{
for (unsigned i=0; i<dim; ++i)
{
template<int dim>
void
-Tensor<1,dim>::unroll_recursion( Vector<double>& result, unsigned& index) const
+Tensor<1,dim>::unroll_recursion (Vector<double> &result,
+ const unsigned int &index) const
{
for (unsigned i=0; i<dim; ++i)
result(index++) = operator[](i);