Hm yes, its quite hacky, but you can do this:
Mirror the mesh, as long as you define no integrators on the interior boundaries nothing bad happens. The neumann boundaries come from the boundary term when deriving the weak formulation which cancel out on interior boundaries.
Then you have to set the surface elements of one of the boundaries to a different index, something like this should work:
Code:
from netgen.csg import unit_cube
from netgen.meshing import *
mesh = unit_cube.GenerateMesh(maxh=0.2)
mesh = mesh.Mirror((0,0,0),(-1,0,0))
new_index = mesh.GetNFaceDescriptors() + 1
mesh.Add(FaceDescriptor(new_index, 1, 0, new_index))
mesh.SetBCName(new_index-1, "new_bc")
for el in mesh.Elements2D():
if all([abs(mesh[p][0]+1) < 1e-10 for p in el.points]): # check somehow if on mirrored boundary
# print("points = ", [mesh[p] for p in el.points])
el.index = new_index
mapping = Trafo((-2, 0, 0))
mesh.IdentifyPeriodicBoundaries("front", "new_bc", mapping)
from ngsolve import *
from ngsolve.internal import *
viewoptions.drawidentified = 1
viewoptions.drawfilledtrigs = 0
mesh = Mesh(mesh)
Draw(mesh)