________________________________
From: Martin Kronbichler <[email protected]>
To: Pietro Maximoff <[email protected]>
Cc: [email protected]
Sent: Monday, August 31, 2009 7:40:01 AM
Subject: Re: [deal.II] What to Use for the Solution Point

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.


Dear Martin

Thanks, that worked.

I wonder if you could also help me with these:

As I refine the mesh (1D), I'd need to scale the right-hand-side appropriately 
as in that case, the solution would grow as 1/h. Do I do this by just dividing 
the right-hand-side by 1/(2^refinement) ?

Also, how would I go about applying a non-homogeneous Neumann boundary 
condition quickly at the right end?
I know that Step-7 shows an example but I was just wondering if there was a 
simpler or another way.

Best regards

Pietro


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

Reply via email to