Skip to content
Snippets Groups Projects
Commit 550ed255 authored by Daniel Bauer's avatar Daniel Bauer :speech_balloon:
Browse files

fix nonlinear diffusion forms

parent 9112002c
No related branches found
No related tags found
1 merge request!25Fix nonlinear diffusion forms
Pipeline #68481 passed with warnings
......@@ -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),
......
......@@ -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)
)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment