" If T is a vertex, then the solution generally has a kink there and the
gradient can have several values depending on which adjacent cell you take
it
on. "

To have a unique gradient, it would be better to not search for the closest
vertex,
but rather to the closest point at the boundary, which may be a point at
the line connecting two vertices.
But there is no straightforward way to obtain this point, right?
At least, I did not find a functionality in the GridTools namespace, which
is probably the right place to look for.

-Math

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

> On 6/9/23 08:27, Mathieu wrote:
> >
> > 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?
>
> Yes, that is just a linear extrapolation and that's reasonable if your
> solution is smooth and if P is close to T.
>
> If T is a vertex, then the solution generally has a kink there and the
> gradient can have several values depending on which adjacent cell you take
> it
> on. Whether that matters to you is a separate question -- it may be
> sufficient
> to simply take the gradient from one of the adjacent cells.
>
> 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 a topic in the
> Google Groups "deal.II User Group" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/dealii/RmYuqy3_3FY/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> dealii+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/dealii/dcf478b6-5810-4fcf-e174-1f7ed33050f5%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%2BwBsdN%3DQBZ8Qt%3DR-ncw3Rc11NR_EDwr%3Dtq9hCQCHQX3hFC2uQ%40mail.gmail.com.

Reply via email to