Looking for more info on FE_RaviartThomas

99 views
Skip to first unread message

Praveen C

unread,
Aug 29, 2017, 9:14:27 AM8/29/17
to Deal.II Googlegroup
Dear all

I have used FE_RaviartThomasNodal to solve induction equation on Cartesian meshes which worked out very well.

Now I would like to solve Maxwell equations on general quad meshes. For this I have to use FE_RaviartThomas, but I do not completely understand this space.

I know that the dofs are certain moments on the faces and interior of the cell. But what are the test functions for these moments ? How can I get these test functions ?

Also what do the shape functions look like ?

I am looking for some references where I can read more about this space, wrt how it is implemented in deal.II

Thanks a lot
praveen

Wolfgang Bangerth

unread,
Aug 29, 2017, 6:10:59 PM8/29/17
to dea...@googlegroups.com

Praveen,

> I have used FE_RaviartThomasNodal to solve induction equation on
> Cartesian meshes which worked out very well.
>
> Now I would like to solve Maxwell equations on general quad meshes. For
> this I have to use FE_RaviartThomas, but I do not completely understand
> this space.

I'm not sure anyone has detailed knowledge left beyond what is already
in the documentation. Whatever you find out in the process would
certainly be much appreciated if you wanted to augment the documentation!

> I know that the dofs are certain moments on the faces and interior of
> the cell. But what are the test functions for these moments ? How can I
> get these test functions ?
>
> Also what do the shape functions look like ?

I'm not sure why you make a distinction between shape and test
functions. They are typically chosen the same, and at the very least the
finite element descriptions we have in deal.II do not make a distinction
between the two. In essence, the finite element descriptions simply
provide a basis for the local polynomial space (or its mapped equivalent
on actual cells).

The polynomial space is of course the same for the two FE_RT* elements.
The only difference is in the basis for this space. You ought to be able
to go through the constructor and see how this basis is built. In the
case of nodal elements, the basis is built as a linear combination of
some primitive polynomials (e.g., monomials). The linear combination of
primitive functions that forms the shape functions is computed in the
constructor; in the case of nodal elements, this is often done by
calling a function in the FETools namespace. I don't recall how the
modal element does it, though.


> I am looking for some references where I can read more about this space,
> wrt how it is implemented in deal.II

I don't think there is anything :-(

Best
W.


--
------------------------------------------------------------------------
Wolfgang Bangerth email: bang...@colostate.edu
www: http://www.math.colostate.edu/~bangerth/

Praveen C

unread,
Aug 30, 2017, 2:36:06 AM8/30/17
to Deal.II Googlegroup

I'm not sure why you make a distinction between shape and test functions. They are typically chosen the same, and at the very least the finite element descriptions we have in deal.II do not make a distinction between the two. In essence, the finite element descriptions simply provide a basis for the local polynomial space (or its mapped equivalent on actual cells).

The polynomial space is of course the same for the two FE_RT* elements. The only difference is in the basis for this space. You ought to be able to go through the constructor and see how this basis is built. In the case of nodal elements, the basis is built as a linear combination of some primitive polynomials (e.g., monomials). The linear combination of primitive functions that forms the shape functions is computed in the constructor; in the case of nodal elements, this is often done by calling a function in the FETools namespace. I don't recall how the modal element does it, though.


The RT(k) functions are defined in terms of some moments. In 2-d, there are edge moments with test functions in P_k and some cell moments with test functions like Q_{k-1,k} and Q_{k,k-1}. Usually these moments are used to define the basis functions, then we just work with the basis functions. 

But our scheme is non-standard, in that we actually evolve these edge and cell moments with a DG scheme. So my trial functions will be the shape functions in FE_RaviartThomas but my test functions are the ones used to define the edge and cell moments.

On Cartesian grids I have used FE_RaviartThomasNodal and defined my own test functions. But on quad meshes, there is this Piola transform that comes in, and I dont understand what are the test functions in this case. 

Anyway, I will try to read the code and see if I can figure out whats happening.

A basic question. If I have a solution vector in FE_RaviartThomas, then the dofs are the moments, right ? Or, are they nodal values ?

Thanks
praveen

Wolfgang Bangerth

unread,
Aug 30, 2017, 10:09:12 PM8/30/17
to dea...@googlegroups.com

> The RT(k) functions are defined in terms of some moments. In 2-d, there
> are edge moments with test functions in P_k and some cell moments with
> test functions like Q_{k-1,k} and Q_{k,k-1}. Usually these moments are
> used to define the basis functions, then we just work with the basis
> functions.

Correct. I don't recall exactly how they were defined for the elements
we use, but it should be reasonably easy to find out by just plotting
all shape functions for the element for k=2 or k=3.


> But our scheme is non-standard, in that we actually evolve these edge
> and cell moments with a DG scheme. So my trial functions will be the
> shape functions in FE_RaviartThomas but my test functions are the ones
> used to define the edge and cell moments.

Ah. So you are using a scheme where the space of test functions is
genuinely different than the space of trial functions? (I.e., a
Petrov-Galerkin method?)

But can you elaborate what you mean by "my test functions are the ones
> used to define the edge and cell moments"?


> On Cartesian grids I have used FE_RaviartThomasNodal and defined my own
> test functions. But on quad meshes, there is this Piola transform that
> comes in, and I dont understand what are the test functions in this case.

In the traditional Galerkin method, the test functions are of course
exactly the same as the trial functions. So they are transformed the
same way, because they *are* the same.


> A basic question. If I have a solution vector in FE_RaviartThomas, then
> the dofs are the moments, right ? Or, are they nodal values ?

For FE_RT, the DoFs are indeed the moments. For FE_RTNodal, they are
nodal values.

Guido Kanschat

unread,
Aug 31, 2017, 3:23:07 AM8/31/17
to dea...@googlegroups.com
Dear Praveen,

> Now I would like to solve Maxwell equations on general quad meshes. For this
> I have to use FE_RaviartThomas, but I do not completely understand this
> space.

This statement is puzzling, since Raviart-Thomas elements are for
H^div, while at least what I consider Maxwell problems are posed in
H^curl.

> I know that the dofs are certain moments on the faces and interior of the
> cell. But what are the test functions for these moments ? How can I get
> these test functions ?

I just taught a course on mixed finite elements. Check out the
definition on page 97 here:
http://www.mathsim.eu/~gkanscha/notes/mixed.pdf

It's Definition 4.2.35. What you see is that the test functions are
the space Q_k on the faces and the Nedelec elements in the interior.

Note that the definition is with respect to test function spaces, not
to actual test functions. For that, you have to choose a basis for
these spaces.

On the faces, we have two different bases in deal.II: one using a
Legendre basis for Q_k, the other uses Lagrange interpolation in the
Gauss points on each face. I confess, I forgot how we did the
interior.

If you want to understand the mechanisms behind the choice of test and
shape function spaces, you cannot avoid the articles by Arnold, Falk,
and Winther on finite element exterior calculus. For rectangles, also
Arnold and Awanou, and Barnold, Boffi and Bonizzoni.

When it comes to general quadrilaterals, search for the Piola
transform in my notes. And for an in-depth analysis of convergence,
the articles by Arnold, Boffi, and Falk. I am not completely d'accord
with their conclusions, since I see the divergence of RT_k in the dual
of Q_k, and those spaces do not naturally coincide on general
quadrilaterals.

> Also what do the shape functions look like ?

Let me explain 2D. 3D is analogous. We have two shape function sets
for each direction. The shape functions for the x-component of the
vector associated with the two vertical faces are tensor products
between the basis in y (Legendre or Lagrange as described for the test
functions above) and polynomials in x such that they are one on this
face, zero on the other and all interior degrees of freedom vanish.
Similarly, you define basis functions for interior degrees of freedom.
Then you do the same for the y-component, switching x and y.

> I am looking for some references where I can read more about this space, wrt
> how it is implemented in deal.II

For the implementation of such spaces, you have two options:

1) Find out what the basis functions for the chosen node value set
look like and implement them directly. This would have been fairly
easy if we had had a strict tensor product concept and applied it.
Unfortunately, we didn't at the time.

2) you take a convenient basis (Monomials, Legendre, Lobatto), then
you apply each node functional to each basis function, which gets you
a square matrix. Applying the inverse of this matrix to the vector of
the original basis functions, you get the basis you want. This is,
what I implemented at least for the non-nodal version.

I hope this helps for the moment.

Best,
Guido

Guido Kanschat

unread,
Aug 31, 2017, 3:29:03 AM8/31/17
to dea...@googlegroups.com
> On Cartesian grids I have used FE_RaviartThomasNodal and defined my own test
> functions. But on quad meshes, there is this Piola transform that comes in,
> and I dont understand what are the test functions in this case.

I think you should be able to choose your basis by face/cells. That means:

1) Test functions on the faces can be transformed as is (as scalars,
no special transformation). This will still make the degrees of
freedom on both sides of the face coincide and you retain normal
continuity.

2) Test functions in the interior are 1-forms. Therefore, they
transform like the gradients of a scalar function.

> A basic question. If I have a solution vector in FE_RaviartThomas, then the
> dofs are the moments, right ? Or, are they nodal values ?

They are

1) The moments with respect to a Legendre basis of Q_k on the faces
2) The moments with respect to a Legendre basis of the Nedelec element
in the interior

Best,
Guido

--
Prof. Dr. Guido Kanschat
Interdisziplinäres Zentrum für Wissenschaftliches Rechnen
Universität Heidelberg
Im Neuenheimer Feld 368, 69120 Heidelberg

Uwe Köcher

unread,
Aug 31, 2017, 5:50:00 PM8/31/17
to deal.II User Group
Dear Praveen,
Dear Guido and Wolfgang,

to additionally support this discussion, I have some remarks here. I'm using the
RT-spaces for the diffusion equation (i.e. a heat equation with H^div conforming flux
for local mass conservation between elements, which is needed in porous media flow).
And from that former work - for the coupled Biot's poroelasticy problems up to now.



On Thursday, August 31, 2017 at 9:23:07 AM UTC+2, Guido Kanschat wrote:
> Now I would like to solve Maxwell equations on general quad meshes. For this
> I have to use FE_RaviartThomas, but I do not completely understand this
> space.

This statement is puzzling, since Raviart-Thomas elements are for
H^div, while at least what I consider Maxwell problems are posed in
H^curl.

Exactly, I'm coming from electrical engineering - you usually need H^curl-,
and not H^div-, conforming elements for the Maxwell equations.


> I know that the dofs are certain moments on the faces and interior of the
> cell. But what are the test functions for these moments ? How can I get
> these test functions ?

I just taught a course on mixed finite elements. Check out the
definition on page 97 here:
http://www.mathsim.eu/~gkanscha/notes/mixed.pdf

Thanks for sharing - I've added this to my lecture notes. Very nice work!


On the faces, we have two different bases in deal.II: one using a
Legendre basis for Q_k, the other uses Lagrange interpolation in the
Gauss points on each face. I confess, I forgot how we did the
interior.

It's some time ago, where I've looked in detail in this implementation.
When I remember correctly, there is some tensor-product type technique
used on those one dimensional polynomials used for the interior, at least
I'm stating that in my thesis on the implementation in deal.II of this element.

Look for p. 124 and following here:
(the page is in german, but the thesis is written in english)


The "other" interior (of the scalar variable) in deal.II is coming from using a
FE_DG element in the sense of using a FiniteElementSystem. This is already
explained in the belonging step tutorial of the instationary Stokes system).

How I'm using it in my context, look for code line 181 at

Hereby I'm using not the FE_DG element with equidistantly distributed
support points, I'm using the support points coming from the Gauß-quadrature,
since they typically have better physically relevant convergence properties
(at least for linear elasticity / elastic wave propagation phenomena)


The hole implementation works in my case without any special basis function
transformations on general quad-meshes.
Look for the test of numerical convergence on a distorted mesh
(2nd numerical example) in our recently published open access publication:
 

If you want to understand the mechanisms behind the choice of test and
shape function spaces, you cannot avoid the articles by Arnold, Falk,
and Winther on finite element exterior calculus. For rectangles, also
Arnold and Awanou, and Barnold, Boffi and Bonizzoni.

Indeed - read those references, they really help to understand this element.

For the implementation of such spaces, you have two options:

1) Find out what the basis functions for the chosen node value set
look like and implement them directly. This would have been fairly
easy if we had had a strict tensor product concept and applied it.
Unfortunately, we didn't at the time.

Looks like that we need an Nedelec Element with continuous tangential
face flux components (an not continuous normal components).

Those type of element is (to my best knowlege) not implemented in deal.II,
but looking at "the finite element periodic system" from the Fenics community:

They have this element implemented. (The Nc^e elements on quads).
I think their implementation in deal.II can be done similar to our RT-element
(which is a Nc^f element in that sense) implementation.


You can find more on the finite element approximation of the Maxwell equations
from the group of Prof. C. Wieners and Prof. W. Dörfler from KIT / University of Karlsruhe.
They have recent publications, preprints and at least one recent doctoral
thesis from S. Findeisen on that topic. But the implementation is done in an inhouse code
(M++).

Please note that all references of mine and the group I'm working in are already
listed in the deal.II publication list. A shortcut can be found on my website:


Kind regards
  Uwe

Praveen C

unread,
Sep 1, 2017, 10:33:12 AM9/1/17
to Deal.II Googlegroup
Thanks a lot Guido and Uwe. The notes are definitely helpful.

I understand how the nodes are selected in FE_RT. I will read the code again after the insight from the notes and the discussion by Guido and Uwe.

Our DG scheme is somewhat non-standard. We discretize the pde on edges and inside cells. This allows us to use H(div) for maxwell. 

Best regards
praveen

--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Praveen C

unread,
Dec 13, 2017, 2:28:55 AM12/13/17
to Deal. II Googlegroup
Dear all

I have some doubts on the construction of FE_RaviartThomas space in deal.II. I have written my question in the attached pdf.

Also, is it possible to get this notes that Guido has posted


which seems to be inaccessible now. I seem to have lost the copy that I saved :-(

Thanks a lot
praveen

main.pdf

Wolfgang Bangerth

unread,
Dec 13, 2017, 10:25:54 PM12/13/17
to dea...@googlegroups.com

Praveen,

> I have some doubts on the construction of FE_RaviartThomas space in deal.II. I
> have written my question in the attached pdf.

It all depends on how you define k. Recall that RT(0) (i.e., k=0) has one
point on each edge, and RT(k) will have k+1. But the QGauss(k) rule will have
k points.

This looks like a bug in the documentation where this is not clearly
distinguished. Feel free to make the change to make this clear and submit a patch.


> Also, is it possible to get this notes that Guido has posted
>
> http://www.mathsim.eu/~gkanscha/notes/mixed.pdf
> <http://www.mathsim.eu/%7Egkanscha/notes/mixed.pdf>
>
> which seems to be inaccessible now. I seem to have lost the copy that I saved :-(

I think you'll have to ask Guido where you can get it now -- he's easy to find
on the internet :-)

Cheers

Praveen C

unread,
Dec 13, 2017, 11:28:23 PM12/13/17
to Deal. II Googlegroup

It all depends on how you define k. Recall that RT(0) (i.e., k=0) has one point on each edge, and RT(k) will have k+1. But the QGauss(k) rule will have k points.

This looks like a bug in the documentation where this is not clearly distinguished. Feel free to make the change to make this clear and submit a patch.

Right, it is just a mistake in the documentation. The code uses QGauss(k+1) for both face and interior quadrature as seen here



I can fix the doc.

Thanks
praveen

Wolfgang Bangerth

unread,
Dec 13, 2017, 11:32:42 PM12/13/17
to dea...@googlegroups.com
On 12/13/2017 09:28 PM, Praveen C wrote:
>>
> Right, it is just a mistake in the documentation. The code uses QGauss(k+1)
> for both face and interior quadrature as seen here
>
> https://github.com/dealii/dealii/blob/master/source/fe/fe_raviart_thomas.cc#L142
>
> https://github.com/dealii/dealii/blob/master/source/fe/fe_raviart_thomas.cc#L161
>
> I can fix the doc.

That would be much appreciated! Thanks!

Daniel Arndt

unread,
Dec 14, 2017, 3:19:42 AM12/14/17
to deal.II User Group
Praveen,  
 
Also, is it possible to get this notes that Guido has posted


which seems to be inaccessible now. I seem to have lost the copy that I saved :-(
the lecture notes are available again (using the same link).

Best,
Daniel
 

Thanks a lot
praveen

Reply all
Reply to author
Forward
0 new messages