Skip to content
Snippets Groups Projects
Commit 461446a0 authored by Andreas Klöckner's avatar Andreas Klöckner
Browse files

Allow integral() to work on surfaces

parent 519e3e71
No related branches found
No related tags found
No related merge requests found
......@@ -475,11 +475,18 @@ def stiffness_t(dim):
def integral(arg, dd=None):
sym = _sym()
if dd is None:
dd = _sym().DD_VOLUME
dd = sym.DD_VOLUME
from grudge import sym
return sym.NodalSum(dd)(sym.MassOperator()(sym.Ones(dd))*arg)
dd = sym.as_dofdesc(dd)
return sym.NodalSum(dd)(
arg * sym.cse(
sym.MassOperator(dd_in=dd)(sym.Ones(dd)),
"mass_quad_weights",
sym.cse_scope.DISCRETIZATION))
def norm(p, arg, dd=None):
......@@ -489,7 +496,9 @@ def norm(p, arg, dd=None):
sym = _sym()
if dd is None:
dd = _sym().DD_VOLUME
dd = sym.DD_VOLUME
dd = sym.as_dofdesc(dd)
if p == 2:
norm_squared = sym.NodalSum(dd_in=dd)(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment