Adding new finite element to the library

40 views
Skip to first unread message

Eldar Khattatov

unread,
Jan 6, 2017, 2:24:20 PM1/6/17
to deal.II User Group
Hello,

I was working on implementing new finite element space, which can roughly be described as RT + curl bubbles. I wrote the new FE class and the class for the underlying polynomials space. I wanted to incorporate these to my local installation of Deal.II in order to test it, so my question is how should I compile the library after adding these new source and header files in respective directories? I already added the appropriate inst.in files and modified the FE_poly_tensor.inst.in to account for this new polynomial space, however I still don't know how should I proceed with actual configuring and installing the library using cmake. 

Thank you

Bruno Turcksin

unread,
Jan 6, 2017, 2:34:36 PM1/6/17
to deal.II User Group
Hi,

you also need to add your .cc and .inst.in files to the CMakeLists.txt  https://github.com/dealii/dealii/blob/master/source/fe/CMakeLists.txt Then you need to reconfigure deal, so that the .inst files can be created, and finally you can recompile.

Best,

Bruno

Denis Davydov

unread,
Jan 6, 2017, 2:36:57 PM1/6/17
to deal.II User Group
Hi Eldar,

The main thing to add your new FE class is 
source/fe/CMakeLists.txt
That should be all you need to do (plus, of course, don't forget to instantiate it for all dim/spacedim as done for other FE spaces).
You should also consider adding tests and checking that things like shape values, gradients, evaluate of field values/ gradients 
etc all work as expected both in volume as well as on faces.
From my recent experience that is at least half of the work ;-)

Regards,
Denis.

Eldar Khattatov

unread,
Jan 9, 2017, 2:41:28 PM1/9/17
to deal.II User Group
Thank you, it worked perfectly fine and now I can use these elements and do the tests.
Reply all
Reply to author
Forward
0 new messages