" This is feasible, though finding the closest vertex is an expensive
operation.
For this to work, you will have to find which cell is closest to the point
in
question, for which I would use
   GridTools::find_closest_vertex()
and
   GridTools::find_cells_adjacent_to_vertex() "

I was not aware that GridTools::find_closest_vertex() works if the point
is outside the domain.

Say, P=(Px,Py) is the point outside the domain,
T=(Tx, Tx) the closest vertex at the boundary as computed above,
and grad_T the gradient of the finite element function at T.
Then I would compute the function value at P as
f(P) = f(T) + grad_T[0]*(Px-Tx) + grad_T[1]*(Py-Ty).
Is that reasonable?

Thanks,
Math


Am Fr., 9. Juni 2023 um 00:49 Uhr schrieb Wolfgang Bangerth <
bange...@colostate.edu>:

> On 6/7/23 11:42, Mathieu wrote:
> > A bilinear extrapolation seems to be a suitable first try since the
> shape
> > functions are bilinear.
> > Going this way, I would compute the gradient of the function at a point
> at the
> > boundary to come up with the extrapolated function value.
> > Call the point outside the grid P, I would project P to the closest at
> the
> > boundary of the triangulation and evaluate the gradient there.
> >
> > So, given P, how can I find the closest point at the boundary?
> > Or would you choose a different point at the boundary?
>
> This is feasible, though finding the closest vertex is an expensive
> operation.
> For this to work, you will have to find which cell is closest to the point
> in
> question, for which I would use
>    GridTools::find_closest_vertex()
> and
>    GridTools::find_cells_adjacent_to_vertex()
>
> 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/da423275-46d8-b6b0-2a9d-37e7d3f10f2e%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/CA%2BwBsdM%3DsbWAo8v%3D5fODM%3D0AkQ8PBV4JRJ6P0jervYyiamCU0Q%40mail.gmail.com.

Reply via email to