Bloch boundary conditions

Is there a way to implement Bloch (i.e. “twisted” periodic) boundary conditions in FreeFEM?

yes ,

on square

mesh Th=square(10,10);
fespace Vh(Th,P1,periodic=[[4,y],[2,1-y]]);