Hello!

I’m working on solving the eigenvalue problem of the Laplace operator with Bloch-Floquet boundary conditions.

I already solved it with periodic boundary conditions:

from dolfin import *

from mshr import *

import matplotlib.pyplot as plt

# Sub domain for Periodic boundary condition

class PeriodicBoundary(SubDomain):

```
# Left and bottom boundary is "target domain" G
def inside(self, x, on_boundary):
return bool((near(x[0], (-Laenge/2), tol) or near(x[1], (-Weite/2), tol)) and
(not ((near(x[0], (-Laenge/2)) and near(x[1], (Weite/2))) or
(near(x[0], (Laenge/2)) and near(x[1], (-Weite/2))))) and on_boundary)
def map(self, x, y):
if near(x[0], (Laenge/2)):
y[0] = x[0] - Laenge
y[1] = x[1]
else: # near(x[1], Weite/2)
y[0] = x[0]
y[1] = x[1] - Weite
```

# Create periodic boundary condition

pbc = PeriodicBoundary()

# Create mesh and define function space

Laenge = 10.0

Weite = 10.0

tol = 1E-14

alpha = 1.0

domain = Rectangle(Point(-(Laenge/2), -(Weite/2)), Point(Laenge/2, Weite/2)) - Circle(Point(0,0), alpha, 100)

mesh = generate_mesh(domain, 20)

V = FunctionSpace(mesh, “Lagrange”, 1, constrained_domain=pbc)

Unfortunately I have no idea how to implement the Bloch-Floquet boundary condition.

Can anyone help me with this?

Thanks!