# H1-P0 FEM

Hello everyone！

V = H1(mesh, order=0)
and
Vbar =H1(mesh, order=0, orderinner=0, dirichlet=[1,2,3,4])

Can these two finite element spaces be used？ and， do they have only one degree of freedom？

No the H1 space is only well defined for order >= 1. If you need a constant on the whole domain you can use the NumberSpace.
Best Christopher

Hi Christopher！

Now，can I define a constant on the skeleton？

Thanks！
Yongbin

The evaluator of the NumberSpace always returns the constant, so you should be able to use it in a skeleton formulation as well…
Did you try it?
Best
Christopher

Hi!
NumberSpace is the space V = FESpace(“number”,mesh) ?

Thanks！
Yongbin

Yes, better is the Python constructor: V = NumberSpace(mesh)
Best

Hi Christopher！

In my code， I have to use the space with dirichelet bounary
V = NumberSpace(mesh, dirichlet=[1,2,3,4)
,It’s still usable in my code, But I think it’s strange. because the trial function is only 0, namely V=0 .

Many thanks
Yongbin Han

Hi Yongbin,

using a NumberSpace together with Dirichlet boundaries does not make sense to me. The NumberSpace gives a singe scalar unknown (1 dof). If this scalar is then constrained to be zero at the boundary, it will simply be zero and there are no free dofs left over.

Best wishes,
Henry

Hi，Hvwahl！

Thank you very much！

Yongbin Han