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