JordiManyer / upa

FEM library for Plasma Physics and Confinement Fusion.
1 stars 0 forks source link

Basis Function library #6

Closed JordiManyer closed 3 years ago

JordiManyer commented 3 years ago

We need to implement a basis function library, similar on how the Reference element class is implemented.

Why do we need this?

Basis functions for different types of elements are needed for two things: First, you need to evaluate them at the gauss points when integrating the weak form (system matrix assembly). Second, you might need them after solving the system, to do postprocessing stuff. This second usage is increased if we want to have Nedelec Edge Elements (as Dani suggests). The reason is that Lagrangian basis functions (the standard ones) are interpolative at the nodes, so the solution of the problem can already be used without postprocessing. However Nedelec DOFs are non-interpolative and therefore the solution needs to be interpolated at the nodes as a post-process. This requires evaluating the basis functions.

So this is a feature we MUST have if we ever want to use Nedelec elements. It is also a more elegant way of doing things and a nice quality-of-life feauture even for Lagrangian elements.

How to do it

We can do one of the two things:

  1. Implement it as a different class, similar to the reference element class.
  2. Extend the reference element class with new templeted functions for basis function evaluation.

I lean towards the second option. We could also use this opportunity to revise how the reference elemnt class is implemented and enhance it we feel it is necessary.

To do:

Once this has been done, we will be able to start implementing Nedelec elements.