[firedrake] ?==?utf-8?q? Mesh coordinates for higher degree of FE

Luca Mechelli luca.mechelli at uni-konstanz.de
Wed Dec 11 14:06:20 GMT 2019


Dear Koki, 

thank you for the hint, I really appreciate that. 

Thank Matt also for giving me a new perspective on FE,

Best regards to both,
Luca
 
 
The day Wednesday, December 11, 2019 14:38 CET, "Sagiyama, Koki" <k.sagiyama at imperial.ac.uk> wrote: 
 
> Dear Luca,
> 
> As Matt has already mentioned in item 2, we could use Firedrake `interpolate` function (https://www.firedrakeproject.org/interpolation.html) for this purpose if we are interpolating the coordinates in a finite element space of point evaluation nodes, e.g. ("CG", 2), as:
> 
> mesh = UnitSquareMesh(1, 1)
> 
> # Interpolate the coordinates in ("CG", 2) space with dimension = spatial dimension
> 
> V2 = VectorFunctionSpace(mesh, "CG", 2)
> 
> coord2 = interpolate(mesh.coordinates, V2)
> 
> print(coord2.dat.data_ro)
> 
> Interpolation — Firedrake 0.13.0+3065.g3b4138d9 documentation<https://www.firedrakeproject.org/interpolation.html>
> Interpolation from external data ¶. Unfortunately, UFL interpolation is not applicable if some of the source data is not yet available as a Firedrake Function or UFL expression. Here we describe a recipe for moving external to Firedrake fields.
> www.firedrakeproject.org
> 
> Thank you,
> 
> Koki
> ________________________________
> From: firedrake-bounces at imperial.ac.uk <firedrake-bounces at imperial.ac.uk> on behalf of Matthew Knepley <knepley at gmail.com>
> Sent: Wednesday, December 11, 2019 12:55 PM
> To: Luca Mechelli <luca.mechelli at uni-konstanz.de>
> Cc: firedrake <firedrake at imperial.ac.uk>
> Subject: Re: [firedrake] Mesh coordinates for higher degree of FE
> 
> On Wed, Dec 11, 2019 at 7:12 AM Luca Mechelli <luca.mechelli at uni-konstanz.de<mailto:luca.mechelli at uni-konstanz.de>> wrote:
> 
> *******************
> This email from originates from outside Imperial. Do not click on links and attachments unless you recognise the sender.
> If you trust the sender, add them to your safe senders list https://spam.ic.ac.uk/SpamConsole/Senders.aspx to disable email stamping for this address.
> *******************
> Dear all,
> 
> I am wondering if it is possible to access the list of all points used by piecewise quadratic (or higher order) elements on a regular mesh.

> For example, let's say I use the simple example of the Poisson equation at https://www.firedrakeproject.org/demos/poisson.py.html
> 
> If I print mesh.coordinates.dat.data_ro I can see the verteces of the mesh, but not the middle points used to build the quadratic elements, then if I print u.dat.data_ro the array has not the same length of mesh.coordinates.dat.data_ro because the middle points nodes are missing from the second array. Is it possible to obtain the full list of coordinates used? If yes, how?
> 
> The problem is that this is a completely crazy way of thinking about finite elements that we are stuck with thanks to Tom Hughes
> and his followers. Coordinates on a mesh are a field, just like any other field, and are discretized using a finite element space, just
> like any other field. What are the consequences of this?
> 
> 1) You should not assume that the dual basis for coordinates are point evaluation functionals, or another way, not assume
>      that we store coordinates by the values at certain points that you know ahead of time. For example, we might store them
>      as Bezier curves, or splines, or using model DG.
> 
> 2) If you want the coordinates at a point, you should interpolate them there just as you would a solution field.
> 
> 3) You cannot assume that coordinates use the same space, or degree, as the solution.
> 
> I am sure the FD folks can tell you the nicest way to interpolate.
> 
>   Thanks,
> 
>      Matt
> 
> Thank you in advance,
> best regards,
> Luca Mechelli
> 
> 
> --
> Dr. Luca Mechelli
> Wissenschaftlicher Mitarbeiter
> Arbeitsgruppe Numerik
> Fachbereich Mathematik und Statistik
> 
> Universität Konstanz
> Fach D 198
> D-78464 Konstanz
> Telefon: +49-(0) 7531-88-3646
> 
> _______________________________________________
> firedrake mailing list
> firedrake at imperial.ac.uk<mailto:firedrake at imperial.ac.uk>
> https://mailman.ic.ac.uk/mailman/listinfo/firedrake
> 
> 
> --
> What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.
> -- Norbert Wiener
> 
> https://www.cse.buffalo.edu/~knepley/<http://www.cse.buffalo.edu/~knepley/>
 
 





More information about the firedrake mailing list