This is a question concerning the implementation of jump terms in DG methods for periodic problems (2D unit square with periodic boundary conditions). I am new to ngsolve and would appreciate any help. I am working in the space L2(mesh, order=choose_poly_degree, dgjumps=True), where I use the discretization
periodic = SplineGeometry()
pnums = [periodic.AppendPoint(*p) for p in [ (0,0), (1,0), (1,1), (0,1) ]]
lright = periodic.Append ( [“line”, pnums, pnums],bc=“periodic”)
btop = periodic.Append ( [“line”, pnums, pnums], bc=“periodic”)
periodic.Append ( [“line”, pnums, pnums], leftdomain=0, rightdomain=1, copy=lright, bc=“periodic”)
periodic.Append ( [“line”, pnums, pnums], leftdomain=0, rightdomain=1, copy=btop, bc=“periodic”)
mesh = Mesh(periodic.GenerateMesh(maxh=choose_discretization_size))
Say we would like to have a bilinear form a(u,v) containing the integral of jump(u)*jump(v) over all faces, where the jump for boundary faces is defined in a periodic way.
While jumps over interior faces can be implemented using jump(u)=u-u.Other(), it is not clear to me how to do this for boundary faces. Ideally, this would be something like u-u.Otherbdry() with .Otherbdry() now accessing the periodic neighbour of a boundary element, i.e., the element on the opposite side of the square sharing the same boundary face upon periodic identification. Many thanks in advance for suggestions.