35 typename LB::Traits::DomainType x;
37 const int size = 1<<dim;
40 Dune::FieldVector<C,size> q1Coefficients;
42 for (
int i=0; i< (1<<dim); i++) {
47 for (
int j=0; j<dim; j++)
48 x[j] = (i & (1<<j)) ? 1.0 : 0.0;
50 q1Coefficients[i] = f(x);
57 Dune::FieldMatrix<C,size,size> mat;
59 for (
int i=0; i<size; i++)
60 for (
int j=0; j<size; j++)
61 mat[i][j] = coefficients_[j][i];
64 Dune::FieldVector<C,size> sol(0);
66 mat.solve(sol,q1Coefficients);
69 for (
int i=0; i<size; i++)
74 std::array<Dune::FieldVector<
typename LB::Traits::RangeFieldType, (1<<dim)> ,(1<<dim)> coefficients_;