All right, my understanding is that fv now is a FESystem object and have to 
be used correspondingly. So I tried and it worked.
hp::FEValue<dim> hp_fv(fe_c,q_c,update_values | update_quadrature_points);
for(cells)
{
  const FEValues<dim> &fv = hp_fv.get_present_fe_values();

  FEValuesExtractors::Scalar tmp(cell->active_fe_index());
  //this is how I get a mask for non-FENothing component


  std::vector<double> local_solution(q_c[0].size());//I am using the same 
quadrature rule for all
  
  fv[tmp].get_function_values(/*Vector<double>*/ global_solution,
                              local_solution);
  /*do something to local_solution*/
}

Then I got confused:
1. I used hp class a year ago or so, fv.get_function_values works directly. 
Now I have to use the above change. Did I do something wrong?
2. Then why fv.shape_value still works as it did? Isn't fv still a FESystem 
object?

Thanks

在 2017年6月12日星期一 UTC-7下午3:25:13,Weixiong Zheng写道:
>
> Dear all,
>
> I am writing code using hp class. When accessing the solution as:
> /*fe_c and q_c are fe and q collections*/
> hp::FEValue<dim> hp_fv(fe_c,q_c,update_values | update_quadrature_points);
> for(cells)
> {
>   const FEValues<dim> &fv = hp_fv.get_present_fe_values();
>   std::vector<double> local_solution(q_c[0].size());//I am using the same 
> quadrature rule for all
>   fv.get_function_values(/*Vector<double>*/ global_solution,
>                          local_solution);
>   /*do something to local_solution*/
> }
> The problem is a scalar problem. It is about solving the same equation in 
> different subdomains with different finite elements.
>
> I then got the following error message. Any ideas?
>
> Thanks.
> Weixiong
>
> An error occurred in line <2717> of file <../source/fe/fe_values.cc> in 
> function
>
>     void dealii::FEValuesBase<2, 2>::get_function_values(const InputVector 
> &, std::vector<typename InputVector::value_type> &) const [dim = 2, 
> spacedim = 2, InputVector = dealii::Vector<double>]
>
> The violated condition was: 
>
>     (fe->n_components()) == (1)
>
> The name and call sequence of the exception was:
>
>     dealii::ExcDimensionMismatch((fe->n_components()),(1))
>
> Additional Information: 
>
> Dimension 2 not equal to 1
>

-- 
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see 
https://groups.google.com/d/forum/dealii?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dealii+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to