Coordinate specific dirichlet boundaries in periodic VerctorH1 not working

Hello everyone!

I tried to use the Periodic() option on a VectorH1() space while using coordinate specific Dirichlet boundary conditions (dirichletx, dirichlety, dirichletz). It seems like the as soon as the Periodic(_) option is set the coordinate specific Dirichlet boundaries are not working anymore and just the overall flag dirichlet=”Edge|Surface”. Consequently, the combination of a Newmark & Dirichlet boundary e.g. constrained displacement in x/y-direction + pressure in z-direction does not work.

(This problem occurs for 2D and well as 3D geometries.)

Currently, I am bypassing this issue by building a vector valued FESpace using a CompundFESpace with H1 spaces and setting an overall flag (Dirichlet=”Edge|Surface”) on the respective space. I added a generic example to demonstrate the issue.

# 1 Boundaries working
fes = VectorH1(mesh,  order=order, dirichletx = "bottom|top", dirichlety="bottom|top", dirichletz="bottom")

# 2 Boundaries not working
fes = Periodic(VectorH1(mesh,  order=order, dirichletx = "bottom|top", dirichlety="bottom|top", dirichletz="bottom"))

# 3 Option to get # 2 working + some further details
# H1 FESpaces for every direction
fes_x = Periodic(H1(mesh,  order=order, dirichlet = "bottom|top"))
fes_y = Periodic(H1(mesh,  order=order, dirichlet = "bottom|top"))
fes_z = Periodic(H1(mesh,  order=order, dirichlet = "bottom"))

# Generating CompoundFESpace
fes = fes_x * fes_y * fes_z  

# Generating a GridFunction on the CompoundFESPace
q = GridFunction(fes)
ux,uy,uz = q.components

u = CoefficientFunction((ux,uy,uz))

# Test and TrialFunctions
UX, UY, UZ = fes.TrialFunction()

U = CoefficientFunction((UX,UY,UZ))

# U & DELTAU can be now used in your BLF
# u contains your solution 

In case of further interested, I can provide a full code example.

Thank you!

All the best,