Re: [deal.II] determine global dof index of a point

2023-05-18 Thread Daniel Arndt
There is also DoFTools::map_support_points_to_dofs, see
https://www.dealii.org/current/doxygen/deal.II/namespaceDoFTools.html#a3540ceb577e65414bde1b6b14808da2c

Best,
Daniel

On Thu, May 18, 2023 at 11:15 AM Wolfgang Bangerth 
wrote:

> On 5/17/23 12:00, Mathieu wrote:
> >
> > I apologize for my simple question:
> > Given a point, which is also a vertex (support point of FE_Q element),
> in real
> > coordinates, is there a function that allows me to query the global dof
> index
> > associated with that support point?
> >
> > I know all the cells at which these support point lives.
> > One could then loop over the vertices of anyone of these cells, and call
> > cell->vertex_dof_index(vertex,...)
> > if vertex is the one that matches the support point.
> >
> > But I was wondering if there is a direct way to get the dof index of a
> vertex
> > based on the coordinates in real space.
>
> You can use DoFTools::map_dofs_to_support_points(). This gives you the map
> "in
> the wrong direction", but would probably still be useful for your case.
>
> Best
>   W.
>
> --
> 
> Wolfgang Bangerth  email: bange...@colostate.edu
> www: http://www.math.colostate.edu/~bangerth/
>
>
> --
> 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 dealii+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/dealii/78768f0a-b5a4-b689-adeb-e6a95e6da1a8%40colostate.edu
> .
>

-- 
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 dealii+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/CAOYDWbLt1EKRRu-H6T3Sxk2fYm5UZYquuBc_Mb_QuEJ_SvYw%2Bg%40mail.gmail.com.


Re: [deal.II] determine global dof index of a point

2023-05-18 Thread Wolfgang Bangerth

On 5/17/23 12:00, Mathieu wrote:


I apologize for my simple question:
Given a point, which is also a vertex (support point of FE_Q element), in real 
coordinates, is there a function that allows me to query the global dof index 
associated with that support point?


I know all the cells at which these support point lives.
One could then loop over the vertices of anyone of these cells, and call
cell->vertex_dof_index(vertex,...)
if vertex is the one that matches the support point.

But I was wondering if there is a direct way to get the dof index of a vertex 
based on the coordinates in real space.


You can use DoFTools::map_dofs_to_support_points(). This gives you the map "in 
the wrong direction", but would probably still be useful for your case.


Best
 W.

--

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


--
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 dealii+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/78768f0a-b5a4-b689-adeb-e6a95e6da1a8%40colostate.edu.


[deal.II] determine global dof index of a point

2023-05-17 Thread Mathieu
Hello everyone,

I apologize for my simple question:
Given a point, which is also a vertex (support point of FE_Q element), in 
real coordinates, is there a function that allows me to query the global 
dof index associated with that support point?

I know all the cells at which these support point lives.
One could then loop over the vertices of anyone of these cells, and call
cell->vertex_dof_index(vertex,...)
if vertex is the one that matches the support point. 

But I was wondering if there is a direct way to get the dof index of a 
vertex based on the coordinates in real space.

Thank you
Math

-- 
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 dealii+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/798c8e5f-57d5-4636-931f-12d66d462631n%40googlegroups.com.