Hey,

I’m new to Fenicsx and wondering if there is any easy and clean solution to 2D Periodic BCs?

Something like this implementation in dolfin but on all boundary sites and in dolfinx : https://fenicsproject.org/olddocs/dolfin/1.4.0/python/demo/documented/periodic/python/documentation.html

```
# Sub domain for Periodic boundary condition
class PeriodicBoundary(SubDomain):
# Left boundary is "target domain" G
def inside(self, x, on_boundary):
return bool(x[0] < DOLFIN_EPS and x[0] > -DOLFIN_EPS and on_boundary)
# Map right boundary (H) to left boundary (G)
def map(self, x, y):
y[0] = x[0] - 1.0
y[1] = x[1]
# Create periodic boundary condition
pbc = PeriodicBoundary()
```

Thanks in advance