Commit 05048f9a authored by Andreas Dedner's avatar Andreas Dedner

correct default penalty for dg scheme to work as before

parent f2dd02fb
Pipeline #21207 failed with stage
in 44 minutes and 12 seconds
......@@ -85,7 +85,7 @@ def burgers(space, model, name, viscosity, timestep, **kwargs):
return module(includes, typeName).Scheme((vspace, pspace), model, name, viscosity, timestep) # ,**kwargs)
from dune.fem.scheme.dgmodel import transform
def dg(model, space=None, penalty=0, solver=None, parameters={},
def dg(model, space=None, penalty=1, solver=None, parameters={},
penaltyClass=None):
"""create a scheme for solving second order pdes with discontinuous finite elements
......
......@@ -12,6 +12,8 @@ def codeDG(self):
u = self.trialFunction
ubar = Coefficient(u.ufl_function_space())
penalty = self.penalty
if penalty is None:
penalty = 1
if isinstance(penalty,Expr):
if penalty.ufl_shape == ():
penalty = as_vector([penalty])
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment