Hi all,

Quick question.  I have an extractor, very much like in the example
for a scalar saturation:

-----

  std::vector<double> local_saturation_values (n_q_points);

  const FEValuesExtractors::Scalar saturation (dim);

  typename DoFHandler<dim>::active_cell_iterator
    cell = dof_handler.begin_active(),
    endc = dof_handler.end();
  for (; cell!=endc; ++cell)
    {
      fe_values.reinit (cell);

      fe_values[saturation].get_function_values (solution,
                                               local_saturation_values);

-----

And, like in step-21, I want to find the following:

             double  phi_i_s  = fe_values[saturation].gradient (i, q);

but instead of of getting back the full vector, I want to pull out
each component separately

              double  phi_i_s_l  = fe_values[saturation].gradient (i, q)[l];

by looping over

                for (unsigned int l=0; l<dim;++l)

I've tried the above, in various guises, and am getting variations of
the following error:

error: cannot convert ‘dealii::Tensor<1, 2>’ to ‘double’ in initialization

Anyone willing to share the easist way of doing this correctly?

Thanks again,
Evan
_______________________________________________
dealii mailing list http://poisson.dealii.org/mailman/listinfo/dealii

Reply via email to