# How can I get the basis function of an existing finite element space or to build a finite element space according to my existing basis functions?

**URL:** <https://community.freefem.org/t/how-can-i-get-the-basis-function-of-an-existing-finite-element-space-or-to-build-a-finite-element-space-according-to-my-existing-basis-functions/914>\
**Category:** General Discussion\
**Created:** [April 14, 2021, 8:37am UTC](https://community.freefem.org/t/how-can-i-get-the-basis-function-of-an-existing-finite-element-space-or-to-build-a-finite-element-space-according-to-my-existing-basis-functions/914 "2021-04-14T08:37:21Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Duzi100](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/duzi100/32/441_2.png) [@Duzi100](https://community.freefem.org/u/Duzi100)\
**Post date:** [April 14, 2021, 8:37am UTC](https://community.freefem.org/t/how-can-i-get-the-basis-function-of-an-existing-finite-element-space-or-to-build-a-finite-element-space-according-to-my-existing-basis-functions/914/1 "2021-04-14T08:37:21Z")

</div>

Dear all，

At present，I‘m going to deal with the basis function using a spacial algorithm to realize optimizing finite element method， so I’m facing the following two challenges：

（1）With knowing mesh “TH” ，I can use the code " fespace Vh(TH,p1);" to get the finite element space. How can I get the basis functions of the space “Vh”?

(2) If I have had some basis functions “a1, a2, …, an” on the mash “TH”, how can I build a new finite element space?

Thank you advance!  
Cindy
