> To do this for quadrature points on a cell I use following code :
> 
> std::vector<unsigned int> Temperature_local_dof_indices;
> const unsigned int   Temperature_dofs_per_cell =
> cell->get_fe().dofs_per_cell;
> Temperature_local_dof_indices.resize
> cell->get_dof_indices(Temperature_local_dof_indices);
> for(int i=0;i<Temperature_dofs_per_cell;i++){
>    int dof = Temperature_local_dof_indices[i];
>    T += Temperature_old(dof) * Temperature_fe_values.shape_value(i,q);
> }

This code is more complicated than necessary. Simply use

  std::vector<double> T_at_q_points (n_q_points);
  Temperature_fe_values.get_function_values (Temperature_old,
                                                                        
T_at_q_points);

This also answers how to do it for faces: the FEFaceValues class also has a 
get_function_values function.

Best
 W.

-------------------------------------------------------------------------
Wolfgang Bangerth                email:            [email protected]
                                 www: http://www.math.tamu.edu/~bangerth/
_______________________________________________
dealii mailing list http://poisson.dealii.org/mailman/listinfo/dealii

Reply via email to