Serendipity elements
Dear Firedrakers, I would like to use continuous finite elements from the serendipity family. At the moment, I would like to use some simple quadratic 8-nodes quadrangles and 20-nodes hexaedra (the S2 element from the “Periodic table of the finite elements”). I do not find any tests in Firedrake src (grep -ri functionspace * | grep \"S). How can I do to use these finite elements? Thanks, Nicolas
Dear Firedrakers, I apologize to insist on the topic of serendipity finite elements. Perhaps my previous message was unclear. I would like to define some simple serendipity quadratic 8-nodes quadrangles and 20-nodes hexaedrain Firedrake but I do not know how to do it. Thanks for your help, Nicolas ---------- Forwarded message --------- De : Karin&NiKo <niko.karin@gmail.com> Date: ven. 24 janv. 2020 à 15:48 Subject: Serendipity elements To: firedrake <firedrake@imperial.ac.uk> Dear Firedrakers, I would like to use continuous finite elements from the serendipity family. At the moment, I would like to use some simple quadratic 8-nodes quadrangles and 20-nodes hexaedra (the S2 element from the “Periodic table of the finite elements”). I do not find any tests in Firedrake src (grep -ri functionspace * | grep \"S). How can I do to use these finite elements? Thanks, Nicolas
Dear Nicolas,
On 27 Jan 2020, at 14:28, Karin&NiKo <niko.karin@gmail.com> wrote:
Dear Firedrakers,
I apologize to insist on the topic of serendipity finite elements. Perhaps my previous message was unclear. I would like to define some simple serendipity quadratic 8-nodes quadrangles and 20-nodes hexaedrain Firedrake but I do not know how to do it.
Apologies for the delayed response. We do have implementations of serendipity elements available, however they are not merged into the master branch yet. I do not recall exactly the state of play in terms of which branches you need, perhaps Rob Kirby can comment. Thanks, Lawrence
Dear Lawrence, thank you for your answer. It seems that I am currently using version 0.13.0+3203.g3498fdf3 in the master branch. This is what gave me : """
firedrake.__version__ '0.13.0+3203.g3498fdf3' """ I could switch to another branch if needed.
Nicolas Le lun. 27 janv. 2020 à 17:22, Lawrence Mitchell <wence@gmx.li> a écrit :
Dear Nicolas,
On 27 Jan 2020, at 14:28, Karin&NiKo <niko.karin@gmail.com> wrote:
Dear Firedrakers,
I apologize to insist on the topic of serendipity finite elements. Perhaps my previous message was unclear. I would like to define some simple serendipity quadratic 8-nodes quadrangles and 20-nodes hexaedrain Firedrake but I do not know how to do it.
Apologies for the delayed response. We do have implementations of serendipity elements available, however they are not merged into the master branch yet. I do not recall exactly the state of play in terms of which branches you need, perhaps Rob Kirby can comment.
Thanks,
Lawrence
Dear Nicolas, The serendipity family is called “S” in Firedrake, so the following code would create a Serendipity 2 function space on a unit square: In [1]: from firedrake import * In [2]: mesh = UnitSquareMesh(10, 10, quadrilateral=True) In [3]: fs = FunctionSpace(mesh, "S", 2) You could also create a quad mesh in, for example, gmsh and read it in. For the 3D case you would need to extrude a quad mesh, and the rest follows. Regards, DAvid From: <firedrake-bounces@imperial.ac.uk> on behalf of Karin&NiKo <niko.karin@gmail.com> Date: Friday, 24 January 2020 at 14:49 To: firedrake <firedrake@imperial.ac.uk> Subject: [firedrake] Serendipity elements Dear Firedrakers, I would like to use continuous finite elements from the serendipity family. At the moment, I would like to use some simple quadratic 8-nodes quadrangles and 20-nodes hexaedra (the S2 element from the “Periodic table of the finite elements”). I do not find any tests in Firedrake src (grep -ri functionspace * | grep \"S). How can I do to use these finite elements? Thanks, Nicolas
Dear David, Thank you very much for your answer. To satisfy my curiosity, let me ask a question. I had the feeling, based of the Periodic table of the finite elements, that the name of the function space should be "S". So I moved to the firedrake/src/firedrake directory and ran : grep -ri functionspace * | grep \"S But I did not get any example of the "S" function space. Are there examples of the usage of such finite elements? The reason of my question is that I run benchmarks between industrial finite element software and firedrake. Everything is OK with simplical finite elements but I get different results when using Serendipity elements. I am wondering why and would like to investigate (integration schemes for instance?). Best regards, Nicolas Le mar. 28 janv. 2020 à 10:32, Ham, David A <david.ham@imperial.ac.uk> a écrit :
Dear Nicolas,
The serendipity family is called “S” in Firedrake, so the following code would create a Serendipity 2 function space on a unit square:
In [1]: from firedrake import *
In [2]: mesh = UnitSquareMesh(10, 10, quadrilateral=True)
In [3]: fs = FunctionSpace(mesh, "S", 2)
You could also create a quad mesh in, for example, gmsh and read it in.
For the 3D case you would need to extrude a quad mesh, and the rest follows.
Regards,
DAvid
*From: *<firedrake-bounces@imperial.ac.uk> on behalf of Karin&NiKo < niko.karin@gmail.com> *Date: *Friday, 24 January 2020 at 14:49 *To: *firedrake <firedrake@imperial.ac.uk> *Subject: *[firedrake] Serendipity elements
Dear Firedrakers,
I would like to use continuous finite elements from the serendipity family. At the moment, I would like to use some simple quadratic 8-nodes quadrangles and 20-nodes hexaedra (the S2 element from the “Periodic table of the finite elements”).
I do not find any tests in Firedrake src (grep -ri functionspace * | grep \"S).
How can I do to use these finite elements?
Thanks,
Nicolas
Dear Nicolas, You are very correct. Serendipity elements can defeat the quadrature degree estimator, resulting in inadvertent underintegration. Embarrassingly, we seem to have forgotten to merge the branch with the tests on it. These tests do manually set the quadrature degree. You can find them at: https://github.com/firedrakeproject/firedrake/pull/1430/files I will update that PR and merge it assuming it still passes. Regards, David From: Karin&NiKo <niko.karin@gmail.com> Date: Tuesday, 28 January 2020 at 12:19 To: David Ham <david.ham@imperial.ac.uk> Cc: firedrake <firedrake@imperial.ac.uk> Subject: Re: [firedrake] Serendipity elements Dear David, Thank you very much for your answer. To satisfy my curiosity, let me ask a question. I had the feeling, based of the Periodic table of the finite elements, that the name of the function space should be "S". So I moved to the firedrake/src/firedrake directory and ran : grep -ri functionspace * | grep \"S But I did not get any example of the "S" function space. Are there examples of the usage of such finite elements? The reason of my question is that I run benchmarks between industrial finite element software and firedrake. Everything is OK with simplical finite elements but I get different results when using Serendipity elements. I am wondering why and would like to investigate (integration schemes for instance?). Best regards, Nicolas Le mar. 28 janv. 2020 à 10:32, Ham, David A <david.ham@imperial.ac.uk<mailto:david.ham@imperial.ac.uk>> a écrit : Dear Nicolas, The serendipity family is called “S” in Firedrake, so the following code would create a Serendipity 2 function space on a unit square: In [1]: from firedrake import * In [2]: mesh = UnitSquareMesh(10, 10, quadrilateral=True) In [3]: fs = FunctionSpace(mesh, "S", 2) You could also create a quad mesh in, for example, gmsh and read it in. For the 3D case you would need to extrude a quad mesh, and the rest follows. Regards, DAvid From: <firedrake-bounces@imperial.ac.uk<mailto:firedrake-bounces@imperial.ac.uk>> on behalf of Karin&NiKo <niko.karin@gmail.com<mailto:niko.karin@gmail.com>> Date: Friday, 24 January 2020 at 14:49 To: firedrake <firedrake@imperial.ac.uk<mailto:firedrake@imperial.ac.uk>> Subject: [firedrake] Serendipity elements Dear Firedrakers, I would like to use continuous finite elements from the serendipity family. At the moment, I would like to use some simple quadratic 8-nodes quadrangles and 20-nodes hexaedra (the S2 element from the “Periodic table of the finite elements”). I do not find any tests in Firedrake src (grep -ri functionspace * | grep \"S). How can I do to use these finite elements? Thanks, Nicolas
participants (3)
-
Ham, David A
-
Karin&NiKo
-
Lawrence Mitchell