1 #include <vector>
2 
3 template <int rank, int dim> class Tensor;
4 template <int dim>
5 class Tensor<1,dim>
6 {
7   public:
8     explicit Tensor (const bool initialize = true);
9     Tensor (const Tensor<1,dim> &);
10     double values[(dim!=0) ? (dim) : 1];
11 };
12 template <int dim>
Tensor(const Tensor<1,dim> & p)13 Tensor<1,dim>::Tensor (const Tensor<1,dim> &p)
14 {
15   for (unsigned int i=0; i<dim; ++i)
16     values[i] = p.values[i];
17 }
18 template <int dim>
19 class KellyErrorEstimator
20 {
21     struct PerThreadData
22     {
23  std::vector<std::vector<std::vector<Tensor<1,dim> > > > psi;
24  PerThreadData (const unsigned int n_solution_vectors,
25          const unsigned int n_components,
26          const unsigned int n_q_points);
27     };
28 };
29 template <int dim>
30 KellyErrorEstimator<dim>::PerThreadData::
PerThreadData(const unsigned int n_solution_vectors,const unsigned int n_components,const unsigned int n_q_points)31 PerThreadData (const unsigned int n_solution_vectors,
32         const unsigned int n_components,
33         const unsigned int n_q_points)
34 {
35   for (unsigned int i=0; i<n_solution_vectors; ++i)
36     for (unsigned int qp=0;qp<n_q_points;++qp)
37       psi[i][qp].resize(n_components);
38 }
39 template class KellyErrorEstimator<3>;
40