Ah yes, I see your +1 to the indices, this fixed the issue:


with code:
# set periodic lateral boundary conditions :
minX = np.where(md.mesh.x == 0) + 1
maxX = np.where(md.mesh.x == L) + 1
# for y, maxX and minX should be excluded :
minY = np.where(np.logical_and(md.mesh.y == 0,
md.mesh.x != L,
md.mesh.x != 0)) + 1
maxY = np.where(np.logical_and(md.mesh.y == L,
md.mesh.x != L,
md.mesh.x != 0)) + 1
# set the nodes that should be paired together :
md.stressbalance.vertex_pairing = np.array().T
I did not see your post because I was formulating a response in this thread for some time.