Periodic condition in FEM space

Hi everybody,

I want to know how the function “periodic” work in FEM space.

For example, If I define fespace Vh(Th, P1, periodic = [[1, x], [3, x], [2, y], [4, y]]) with mesh Th = square(2, 2). Is it equivalent to define fespace Vh(Th, P1), and just force the degrees of freedom on 1, 3 sides to be equal (so are 2,4 sides)?

Best regards.

Yes, that is correct. There are multiple examples with periodic BC in the examples folder of FreeFEM if you need.

Thanks @prj for your reply.

I wrote two files about this,
test1.edp (505 Bytes)
test2.edp (1.3 KB)
I am confused that I get different results , could you please check it?

test1.edp is correct, test2.edp is wrong.

Is there any error in the finite element interpolation in test2.edp? I tried to achieve the same result as test1.edp without using function “periodic”, but failed.

I have no idea of what you are doing in test2.edp.

I will check it carefully. Thank you so much again @prj