Dear Pietro,

> Ke = x * grad_phi_i * grad_phi_j
> 
> with the integral sign of course and dx at the end.
> 
> Whilst assembling the matrix, I need to multiply with x. How do I
> obtain this value.

By x you mean the spatial variable? By using
  fe_values.get_quadrature_points()[q_point]
you get a Point<dim> of the position in real space of the quadrature point 
q_point. To get a certain component, you can use the bracket operator [] with 
argument 0,...,dim-1.
For this to work, you will need to add the flag update_quadrature_points
to the FEValues constructor.

Best,
Martin

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

Reply via email to