# How to properly defined element of PkEdge

**URL:** https://community.freefem.org/t/how-to-properly-defined-element-of-pkedge/1660
**Category:** General Discussion
**Created:** [April 11, 2022, 9:13am UTC](https://community.freefem.org/t/how-to-properly-defined-element-of-pkedge/1660 "2022-04-11T09:13:57Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Trophime](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/trophime/32/215_2.png) [@Trophime](https://community.freefem.org/u/Trophime)
#### Post date: [April 11, 2022, 9:13am UTC](https://community.freefem.org/t/how-to-properly-defined-element-of-pkedge/1660/1 "2022-04-11T09:13:57Z")

</div>

Hi,  
I’m trying to implement maxwell equations in 2D using the so called H model in H(curl). I cannot figure out how to declare the components of the vectorial field. I’ve naively tried:

```auto
func Pk = P1edge;
fespace Ah(Th, Pk);
Ah u, v, u0;

macro Curl(ux, uy)[dx(uy)-dy(ux)]//
macro CrossN(ux, uy)[ux*N.y-uy*N.x]//

real rho = 1;
real T = 0;
real dt = 1;

//Problem
problem mqs([ux,uy], [vx,vy], solver=sparsesolver, eps=1.e-10)
     = int2d(Th)(Mu0 * ( [ux,uy]'*[vx,vy] )/dt)
     - int2d(Th)(Mu0 * ( [ux,uy]'*[vx,vy] )/dt)
     + int2d(Th)(rho * Curl(ux,uy)' * Curl(vx,vy))
     + on(BoxWall, ux=uxinit, uy=uyinit)
     ;

```

But ff complains with The Identifier `ux does not exist`  
What’s the correct way to do that?

Thanks  
C

---

<div class="post-metadata">

### Author: ![prj](https://avatars.discourse-cdn.com/v4/letter/p/ecae2f/32.png) [@prj](https://community.freefem.org/u/prj)
#### Post date: [April 12, 2022, 10:37am UTC](https://community.freefem.org/t/how-to-properly-defined-element-of-pkedge/1660/2 "2022-04-12T10:37:41Z")

</div>

I’m not sure `P1Edge` are in H(\text{curl}), how about using `RT1Ortho` from `Element_Mixte`?
