Obtaining the boundary data of a solution

44 views
Skip to first unread message

Turiya Soham

unread,
May 28, 2021, 1:06:57 PM5/28/21
to deal.II User Group
Hi all,

I have just started in dealii and going through the tutorials to solve a Neumann boundary value problem. 

I have the following situation: the Neumann boundary data (say g) is defined as a Function and the  solution obtained by solving my pde is a Vector<double> (say v). How do I take the L2 inner product of g and trace(v). How do I get this inner product between a Function and a Vector <double>.

I can find each face which is on the boundary and I can get the values of g at all the
quadrature points of the face and the JxW at those points. However, to obtain the
surface intergral, I also need the values of v at these quadrature points. How can I get
the values at the quadrature points of the solution v?

Thank you,

Wolfgang Bangerth

unread,
May 28, 2021, 4:54:29 PM5/28/21
to dea...@googlegroups.com

Turiya,
Your inner product is, I assume, an integral over the boundary. Boundary
integrals are always computed via the FEFaceValues class, in the same way as
integrals over cells are computed via the FEValues class.

To get the solution values at quadrature points you would use the
FEFaceValues::get_function_values() function. This is no different than what
FEValues::get_function_values() does for quadrature points on cells, which is
something you can find in a number of tutorial programs (e.g., step-9,
step-21, or step-15's and step-19's use of the corresponding
get_function_gradients() function).

Best
W.


--
------------------------------------------------------------------------
Wolfgang Bangerth email: bang...@colostate.edu
www: http://www.math.colostate.edu/~bangerth/

Turiya Soham

unread,
Jun 20, 2021, 2:01:54 PM6/20/21
to deal.II User Group
Dear Prof. Bangerth,

Thank you. I checked this on my problem and it is working.

Regards,
Reply all
Reply to author
Forward
0 new messages