Hi Shahab,

  Please look at the following piece of code, it might be useful to you.


   unsigned int n_face_q_points = face_quadrature_formula.size();
   FEFaceValues<dim> fe_face_values (fe, face_quadrature_formula,
                                      update_values |
*update_normal_vectors*
                                      | update_JxW_values);

   typename DoFHandler<dim>::active_cell_iterator
    cell = dof_handler.begin_active(),
    endc = dof_handler.end();

 // iterate over cells
    for (; cell!=endc; ++cell)
      {
      // iterate over faces
      for (unsigned int face = 0; face < GeometryInfo<dim>::faces_per_cell;
             ++face)
         // query if the faces of the cell belong to the boundary id needed
          if (cell->face(face)->*at_boundary()* == true
              && cell->face(face)->*boundary_id()* == 2)
            {
              *fe_face_values.reinit(cell, face)*;

              for (unsigned int f_q_point = 0; f_q_point <n_face_q_points;
                   ++f_q_point)
                {
                  const Tensor<1, dim> &Nv =
                   *fe_face_values.normal_vector*(f_q_point);
                }
        }
}


Best,
Navneet


On Thu, Nov 28, 2019 at 3:26 AM Shahab Golshan <[email protected]>
wrote:

> Dear all,
> I was looking for a function to obtain the normal vectors of boundary
> faces. Are there any functions in dealII which returns the normal vector of
> a face?
> Thank you in advance.
> Shahab
>
> --
> The deal.II project is located at http://www.dealii.org/
> For mailing list/forum options, see
> https://groups.google.com/d/forum/dealii?hl=en
> ---
> 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 to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/dealii/1554c651-b524-4c15-b253-a6529dc2887e%40googlegroups.com
> <https://groups.google.com/d/msgid/dealii/1554c651-b524-4c15-b253-a6529dc2887e%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see 
https://groups.google.com/d/forum/dealii?hl=en
--- 
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 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/CAK9McD3x%2B3FTUsxs2JdMfwrDvmctG%3DvwXUM63QdBpifGdgS7pg%40mail.gmail.com.

Reply via email to