This is a read only copy of the old FEniCS QA forum. Please visit the new QA forum to ask questions

I want to change the basis functions in FENICS by my own

+1 vote

Hi

I want to change the basis functions in FENICS by my own. It would be very kind of you if you guide me how I can do that? For example, I want to use my own basis function instead of using Lagrange. Is it possible in FENICS?

Is it possible to do that in C++?

Bests,

Iman

asked Jan 10, 2017 by Iman FEniCS Novice (150 points)

1 Answer

0 votes

Hi Iman,

There is a list of finite element choices available in FEniCS at https://www.femtable.org/. You have many choices other than Lagrange elements available. You can also check the UFL documentation at http://fenics.readthedocs.io/projects/ufl/en/latest/manual/form_language.html?highlight=family. You can take a look at these two to see if the basis function you want to use is already available.

However, if after doing this, you truly want to define your own element, you can look at registering a new element using the ufl.finiteelement.elementlist module (you can read its contents at https://bitbucket.org/fenics-project/ufl/src/704787bf914cef326faa9c96c1dab85b2e51a74b/ufl/finiteelement/elementlist.py?at=master&fileviewer=file-view-default ).

You can also explore FIAT: https://fenics.readthedocs.io/projects/fiat/en/latest/.

Hope this helps.

SM

answered Jan 12, 2017 by SM FEniCS Novice (630 points)
edited Jan 12, 2017 by SM
...