| 1 |
/* { dg-do compile } */ |
| 2 |
/* { dg-skip-if "requires hosted libstdc++ for vector" { ! hostedlib } } */ |
| 3 |
|
| 4 |
#include <vector> |
| 5 |
|
| 6 |
template <int rank, int dim> class Tensor; |
| 7 |
template <int dim> class Tensor<1,dim> { |
| 8 |
public: |
| 9 |
explicit Tensor (const bool initialize = true); |
| 10 |
Tensor (const Tensor<1,dim> &); |
| 11 |
Tensor<1,dim> & operator = (const Tensor<1,dim> &); |
| 12 |
double values[(dim!=0) ? (dim) : 1]; |
| 13 |
}; |
| 14 |
template <int dim> |
| 15 |
inline Tensor<1,dim> & Tensor<1,dim>::operator = (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> class Quadrature { |
| 21 |
public: |
| 22 |
const unsigned int n_quadrature_points; |
| 23 |
}; |
| 24 |
class MappingQ1 |
| 25 |
{ |
| 26 |
class InternalData { |
| 27 |
public: |
| 28 |
std::vector<Tensor<1,3> > shape_derivatives; |
| 29 |
unsigned int n_shape_functions; |
| 30 |
}; |
| 31 |
void compute_data (const Quadrature<3> &quadrature, InternalData &data) |
| 32 |
const; |
| 33 |
}; |
| 34 |
void MappingQ1::compute_data (const Quadrature<3> &q, InternalData &data) const |
| 35 |
{ |
| 36 |
const unsigned int n_q_points = q.n_quadrature_points; |
| 37 |
data.shape_derivatives.resize(data.n_shape_functions * n_q_points); |
| 38 |
} |