Open dr-robertk opened 1 year ago
Hello,
I tried to run the example compressible_navier_stokes_naca0012
but it failed with:
WARNING:py.warnings:/XXX/dolfin_dg/demo/dolfinx/compressible_navier_stokes_naca0012/dg_naca0012_2d.py:86: DeprecationWarning: This method is deprecated. Use FunctionSpace with an element shape argument instead
V = dolfinx.fem.VectorFunctionSpace(mesh, ("DG", poly_o), dim=4)
Problem size: 18288 degrees of freedom
Traceback (most recent call last):
File "/XXX/dolfin_dg/demo/dolfinx/compressible_navier_stokes_naca0012/dg_naca0012_2d.py", line 95, in <module>
dolfinx.fem.Expression(gD_guess, V.element.interpolation_points()))
File "/XXX/lib/python3.9/site-packages/dolfinx/fem/function.py", line 182, in __init__
self._cpp_object = _create_expression(dtype)(ffi.cast("uintptr_t", ffi.addressof(self._ufcx_expression)),
TypeError: create_expression_complex128(): incompatible function arguments. The following argument types are supported:
1. (expression: int, coefficients: List[dolfinx.cpp.fem.Function_complex128], constants: List[dolfinx.cpp.fem.Constant_complex128], argument_function_space: dolfinx::fem::FunctionSpace<double>) -> dolfinx.cpp.fem.Expression_complex128
Invoked with: <cdata 'uintptr_t' 23404907635552>, [], [<dolfinx.cpp.fem.Constant_float64 object at 0x15496affea30>, <dolfinx.cpp.fem.Constant_float64 object at 0x15496b73d030>, <dolfinx.cpp.fem.Constant_float64 object at 0x15496a47c2f0>], None
Moreover, the example in demo/dolfinx/advection
raises the error:
Traceback (most recent call last):
File "XXX/dolfin_dg/demo/dolfinx/advection/dg_linear_advection.py", line 44, in <module>
F = ho.generate_fem_formulation(u, v)
File "XXX/lib/python3.9/site-packages/dolfin_dg/operators.py", line 275, in generate_fem_formulation
fos = dolfin_dg.primal.FirstOrderSystem(F_vec, L_vec, u, v)
File "XXX/lib/python3.9/site-packages/dolfin_dg/primal/__init__.py", line 81, in __init__
self.G_vec = [
File "XXX/lib/python3.9/site-packages/dolfin_dg/primal/__init__.py", line 82, in <listcomp>
dolfin_dg.math.homogenize(F_vec[i], u, L_vec[i](F_vec[i + 1](u)))
File "XXX/lib/python3.9/site-packages/dolfin_dg/primal/__init__.py", line 60, in flux_guard
return func(u, flux)
TypeError: F_c() takes 1 positional argument but 2 were given
PS: I use the complex version of dolfinx v.0.7
Since my last message, I installed the real version of dolfinx v.0.7. The demo compressible_navier_stokes_naca0012
can now compute the lift and drag:
DoFs: 18288, Drag: 6.37922e-02, Lift: 2.28879e-02
(are those the correct values?)
but still raises an error:
Traceback (most recent call last):
File "/XXX/dolfin_dg/demo/dolfinx/compressible_navier_stokes_naca0012/dg_naca0012_2d.py", line 190, in <module>
fi.write_function(u_vec.sub(0))
File "/XXX/dolfinx/Dist/real/lib/python3.9/site-packages/dolfinx/io/utils.py", line 235, in write_function
super().write_function(getattr(u, "_cpp_object", u), t, mesh_xpath)
RuntimeError: Function and Mesh dof layouts do not match. Maybe the Function needs to be interpolated?
However demo/dolfinx/advection
still raises the same error as above :-(
Upon loading and using the CompressibleNavierStokesOperator I get the following error message. I trying to figure out whether this is a dune-fem bug, or a ufl problem. Would it be possible to double check with FEinCS (or FEniCSx) whether this still works?