Thank you again for your help. I have another question. I want to find the
projection of a point on a face (the point on a face that has the closest
distance to the query point). I think the function:
project_real_point_to_unit_point_on_face should do this task, but I'm not
sure. Can someone help me on this?
On Thursday, November 28, 2019 at 12:57:43 AM UTC-5, navneet roshan wrote:
>
> 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]
> <javascript:>> 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] <javascript:>.
>> 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/4167235a-22b8-4615-a770-b17b40a23f26%40googlegroups.com.