I am using deal.ii to solve a 3D solid mechanics problem. My code uses
PetSc and P4est.
The geometry is a cubical box [0 1] X [0 1] X [0 1] with a uniform
rectilinear mesh in the domain.
I have obtained the scalar solution vector u in the domain.
I need to find the line integral of the solution along the boundary. For
example: lets say
I want to integrate the solution variable
\int u dx on the line which is on +z face and goes from from (0,0,1) to
Can someone please help to figure out how to do this? In the pseudo code,
my doubt is how to initialize
the fe_face_values (line values?) object and the gauss quadrature formula
integral = 0;
for (; cell != endc; ++cell)
for (face = 0; face<GeometryInfo<dim::faces_per_cell;++face)
if(cell->face(face)->boundary_id == my_boundary_id) //
normal facing the -y direction: bottom face
for (line = 0;
if (cell->face(face)->line(line)->center()(2) ==
1) // boundary line needed
for (q = 0; q < number_of_q_points; ++q)
integral += function_value_at_q *
integral = SUM of integral from all processes
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see
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
For more options, visit https://groups.google.com/d/optout.