Skip to content

Fix dg facetintegrator - #95

Open
PaulSt wants to merge 2 commits into
NGSolve:masterfrom
PaulSt:fix-dg-facetintegrator
Open

Fix dg facetintegrator#95
PaulSt wants to merge 2 commits into
NGSolve:masterfrom
PaulSt:fix-dg-facetintegrator

Conversation

@PaulSt

@PaulSt PaulSt commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Hello everyone!

the first commit fixes a memory error on DG facet terms that appears on facets between quads and trigs, or mixed spaces. Example:

from ngsolve import *
from netgen.occ import *

mesh = Mesh(OCCGeometry(Circle((0,0),1).Face(),dim=2).GenerateMesh(maxh=1,quad_dominated=True)).Curve(5)
fes = L2(mesh, order=5, dgjumps=True)
u,v = fes.TnT()
n = specialcf.normal(2)
a = BilinearForm(n*(grad(u)+grad(u.Other()))*(v-v.Other())*dx(skeleton=True)).Assemble()
print(a.mat)
print(sum(a.mat.AsVector()))

gives NaN (sometimes)

Second commit makes sure mixed spaces survive in the DG linearized facet matrix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant