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