nate-sime / dolfin_dg

Utility functions for the automatic generation of nonlinear DG FEM formulations using UFL
Other
18 stars 2 forks source link

Bug in `dolfinx/dg_linear_advection.py` demo #8

Open Corwinpro opened 6 months ago

Corwinpro commented 6 months ago

Running this demo

https://github.com/nate-sime/dolfin_dg/blob/ca7ea93216e7a871e30d7b07036919153f741029/demo/dolfinx/advection/dg_linear_advection.py

fails with

TypeError: F_c() takes 1 positional argument but 2 were given

because the HyperbolicOperator.__init__ calls dolfin_dg.primal.first_order_flux on F_c which only has one argument (does not accept the second flux input).

Manually changing this https://github.com/nate-sime/dolfin_dg/blob/ca7ea93216e7a871e30d7b07036919153f741029/demo/dolfinx/advection/dg_linear_advection.py#L36-L38 to def F_c(u, flux): does not help because then another error is raised:

ValueError: Expecting Form, Integral or Expr.