if (flags & update_values)
{
std::vector<Tensor<1,dim> > shape_values (n_q_points);
+
+ Assert (data.shape_values.n_rows() == dofs_per_cell * dim,
+ ExcInternalError());
+ Assert (data.shape_values.n_cols() == n_q_points,
+ ExcInternalError());
+
for (unsigned int k=0; k<dofs_per_cell; ++k)
{
// first transform shape
mapping_data);
// then copy over to target:
- Assert (data.shape_values[k].size() == n_q_points*dim,
- ExcInternalError());
- unsigned index = 0;
for (unsigned int q=0; q<n_q_points; ++q)
- for (unsigned int d=0; d<dim; ++d, ++index)
- data.shape_values[k][index] = shape_values[q][d];
+ for (unsigned int d=0; d<dim; ++d)
+ data.shape_values[k*dim+d][q] = shape_values[q][d];
};
};
{
static const double constraint_q1[] =
{
- 0
-//TODO[WB]
-// .25,.25,.25,.25,
-// .5,.5,0.,0.,
-// 0.,.5,.5,0.,
-// 0.,0.,.5,.5,
-// .5,0.,0.,.5
+ 0, .5, 0, .5, // first the four interior lines
+ .5, 0, .5, 0,
+ 0, .5, 0, .5,
+ .5, 0, .5, 0,
+ 1, 0, 0, 0, // then the two child lines of each of the four outer ones.
+ 1, 0, 0, 0, // since the shape functions are constant on each line,
+ 0, 1, 0, 0, // the two child lines get the same weights
+ 0, 1, 0, 0,
+ 0, 0, 1, 0,
+ 0, 0, 1, 0,
+ 0, 0, 0, 1,
+ 0, 0, 0, 1
};
-
};