Is FEValueViews implemented for every call in FEValuesBase? The following code produces a "no matching function call" type error in 7.0.0:

const unsigned int n_q_points = quadrature_formula.size();
const FEValuesExtractors::Vector velocities (0);
std::vector<std::vector<Tensor<1,dim> > > velocity_grads(n_q_points);

fe_values[velocities].get_function_gradients(solution,velocity_grads);

The exact error is:
error: no matching function for call to ‘dealii::FEValuesViews::Vector<2, 2>::get_function_gradients(const dealii::BlockVector<double>&, std::vector<std::vector<dealii::Tensor<1, 2>, std::allocator<dealii::Tensor<1, 2> > >, std::allocator<std::vector<dealii::Tensor<1, 2>, std::allocator<dealii::Tensor<1, 2> > > > >&) const’

This is not a serious problem - the call works if each component of the velocity is passed separately (i.e. using the scalar get_function_gradients call) i.e. the following works:

const FEValuesExtractors::Scalar velocity_x (0);
std::vector<Tensor<1,dim> > velocity_x_grads(n_q_points);
fe_values[velocity_x].get_function_gradients(solution(0), velocity_x_grads);

I don't know if this is a bug or some error in the original code snippet.

Thanks,

John


_______________________________________________
dealii mailing list http://poisson.dealii.org/mailman/listinfo/dealii

Reply via email to