Hi,

I am trying to implement some simple slope-limiting algorithm for DG and for that, I need to understand the data structure of GridFunction objects. I use a 1st-order L2-conforming finite element space and my mesh is 2D.

fes = L2(mesh, order=1)

gfu = GridFunction(fes)

I can see that the coefficient vector of a GridFunction (gfu.vec) associated with this space has three coefficients for each mesh cell. According to what I have observed after some tests, the first coefficient of each set (gfu.vec.FV().NumPy()[::3]) represents the average value of the GridFunction within each mesh cell. However, I am not sure what the other two coefficients represent. I would appreciate it if you could please explain that.

Thanks!