# What does the array of \`\`data\[ \]'' represent during the process of adding a new finite element?

**URL:** <https://community.freefem.org/t/what-does-the-array-of-data-represent-during-the-process-of-adding-a-new-finite-element/3635>\
**Category:** General Discussion\
**Created:** [December 16, 2024, 12:44pm UTC](https://community.freefem.org/t/what-does-the-array-of-data-represent-during-the-process-of-adding-a-new-finite-element/3635 "2024-12-16T12:44:06Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alex2019](https://avatars.discourse-cdn.com/v4/letter/a/f4b2a3/32.png) [@Alex2019](https://community.freefem.org/u/Alex2019)\
**Post date:** [December 16, 2024, 12:44pm UTC](https://community.freefem.org/t/what-does-the-array-of-data-represent-during-the-process-of-adding-a-new-finite-element/3635/1 "2024-12-16T12:44:06Z")

</div>

Hello all,  
I would like to add a new finite element  
[2010–A nonstandard mixed finite element family.pdf](https://community.freefem.org/uploads/short-url/22d36iafCXgaqFNbK5sB9buRgwc.pdf) (170.3 KB)  
in FreeFem as [https://doc.freefem.org/documentation/developers.html](https://doc.freefem.org/documentation/developers.html). However, I am unable to provide the exact values of the data[] for the new finite element, as I do not fully understand the meaning or structure of the array data[].

Could anyone provide references or share your experiences?

To make my point more clear, I show two examples in the following.  
For example, in FESpace.cpp line 553,  
int TypeOfFE\_P1Lagrange::Data[]  
={0,1,2,  
0,0,0,  
0,1,2,  
0,0,0,  
0,1,2,  
0, 0,3};  
I understand how the values in the 1st, 3rd and 5th lines are assigned, but I do not understand how the values in the 2nd and 6th lines are determined.

For example, in Element\_Mixte.cpp line 1313,  
int TypeOfFE\_BDM2\_2d::Data[] =  
{3, 3, 3, 4,4,4, 5,5,5, 6,6,6, // support on what  
0, 1, 2, 0,1,2, 0,1,2, 0,1,2, // df on node  
0, 0, 0, 1,1,1, 2,2,2, 3,3,3, // th node of df  
0, 0, 0, 0,0,0, 0,0,0, 0,0,0, // df previou FE  
0, 1, 2, 3,4,5, 6,7,8, 9,10,11 , // which df on prev  
0,0,0,0, 12, 12};  
I understand how the values 3, 3, 3, 4, 4, 4, 5, 5, 5, 6, 6, 6 are assigned, but I do not understand how the values in the 2nd, 3rd, 4th, and 6th lines are determined. Moreover, I do not understand why the 6th lines in P1 and BDM2 have different dimensions, i.e., 3 and 6.

Thank you in advance,

Best regards,

Alex
