diff --git a/generate_all_operators.py b/generate_all_operators.py index 282f968421204f8f540bd6040003dc56603159ec..50a66bcd0e613cad016ff67423ef3ebfba7e3e31 100644 --- a/generate_all_operators.py +++ b/generate_all_operators.py @@ -619,7 +619,7 @@ def all_operators( type_descriptor=type_descriptor, geometries=list(geometries), opts=opts, blending=blending)) ops.append(OperatorInfo("P1", "NonlinearDiffusionNewtonGalerkin", TrialSpace(P1), TestSpace(P1), form=partial(nonlinear_diffusion_newton_galerkin, - coefficient_function_space=P1, onlyNewtonGalerkinPartOfForm=False), + coefficient_function_space=P1, only_newton_galerkin_part_of_form=False), type_descriptor=type_descriptor, geometries=list(geometries), opts=opts, blending=blending)) ops.append(OperatorInfo("P1Vector", "Diffusion", TrialSpace(P1Vector), TestSpace(P1Vector), diff --git a/hog/forms.py b/hog/forms.py index b959b215a52d2f2f5c48f1d5806e1f221a64510f..b3f87b4d9d92f2f43a7797b67904bd7339af486c 100644 --- a/hog/forms.py +++ b/hog/forms.py @@ -212,7 +212,7 @@ Note: :math:`a(c) = 1/8 + u^2` is currently hard-coded and the form is intended tabulate, **_, ): - a = sp.Matrix([sp.Rational(1, 8)]) + k[0] * k[0] + a = sp.Rational(1, 8) + k["u"] * k["u"] return a * tabulate( double_contraction( jac_a_inv.T * grad_u, @@ -279,8 +279,8 @@ Note: :math:`a(k) = 1/8 + k^2` is currently hard-coded and the form is intended tabulate, **_, ): - a = sp.Matrix([sp.Rational(1, 8)]) + k[0] * k[0] - a_prime = 2 * k[0] + a = sp.Rational(1, 8) + k["k"] * k["k"] + a_prime = 2 * k["k"] diffusion_term = a * tabulate( dot(jac_a_inv.T * grad_u, jac_a_inv.T * grad_v) * jac_a_abs_det @@ -289,7 +289,7 @@ Note: :math:`a(k) = 1/8 + k^2` is currently hard-coded and the form is intended newton_galerkin_term = ( a_prime * u - * dot(jac_a_inv.T * grad_k, tabulate(jac_a_inv.T * grad_v)) + * dot(jac_a_inv.T * grad_k["k"], tabulate(jac_a_inv.T * grad_v)) * tabulate(jac_a_abs_det) )