[JOSS] Lid-driven cavity example crashes with UFLException
Issue #9
resolved
Running
ocellaris lid_driven_cavity_flow.inp
on my Debian system:
Running on Python 3.7.2+ (default, Feb 27 2019, 15:41:59)
[GCC 8.2.0]
Using dolfin 2018.1.0
Using mpi4py 2.0.0
Using h5py 2.9.0
Using meshio 2.3.5
Using PyYAML 3.13
Using petsc4py 3.10.1
Using PETSc 3.10.3
I get the following exception:
Calling FFC just-in-time (JIT) compiler, this may take some time.
Returning zero from jump of expression without a domain. This may be erroneous if a dolfin.Expression is involved.
Dot product requires non-scalar arguments, got arguments with ranks 1 and 0.
=== EXCEPTION ===== EXCEPTION ===== EXCEPTION ===== EXCEPTION ===== EXCEPTION ==
Traceback:
File "/home/andreask_work/tmp/ocellaris/ocellaris/run.py", line 28, in setup_simulation
simulation.setup()
File "/home/andreask_work/tmp/ocellaris/ocellaris/utils/timer.py", line 27, in wrapper
ret = f(*args, **kwds)
File "/home/andreask_work/tmp/ocellaris/ocellaris/simulation/simulation.py", line 72, in setup
setup_simulation(self)
File "/home/andreask_work/tmp/ocellaris/ocellaris/simulation/setup.py", line 114, in setup_simulation
simulation.solver = solver_class(simulation)
File "/home/andreask_work/tmp/ocellaris/ocellaris/solvers/ipcs.py", line 90, in __init__
include_hydrostatic_pressure=self.hydrostatic_pressure.every_timestep,
File "/home/andreask_work/tmp/ocellaris/ocellaris/solvers/ipcs_equations.py", line 45, in __init__
self.define_momentum_equation()
File "/home/andreask_work/tmp/ocellaris/ocellaris/solvers/ipcs_equations.py", line 84, in define_momentum_equation
use_stress_divergence_form=self.use_stress_divergence_form,
File "/home/andreask_work/tmp/ocellaris/ocellaris/solvers/coupled_equations.py", line 224, in define_dg_equations
eq -= (avg(q) - dot(D12, jump(q, n))) * jump(u[d]) * n[d]('+') * dS
File "/usr/lib/python3/dist-packages/ufl/operators.py", line 162, in dot
return Dot(a, b)
File "/usr/lib/python3/dist-packages/ufl/tensoralgebra.py", line 204, in __new__
"got arguments with ranks %d and %d." % (ar, br))
File "/usr/lib/python3/dist-packages/ufl/log.py", line 172, in error
raise self._exception_type(self._format_raw(*message))
Got UFLException exception when running setup:
Dot product requires non-scalar arguments, got arguments with ranks 1 and 0.
Setup did not suceed, exiting
I'm running this with an unmodified revision 6addaea.
Comments (3)
-
-
reporter Yes, 762876f fixed this for me.
-
reporter - changed status to resolved
- Log in to comment
Thanks for reporting this!
I have gone through, cleaned up, and fixed some issues in the lid-driven cavity demo. I mistakenly believed that the CI system would have warned me if the demo stopped working, but in the tests the demos only ran through a setup phase, they were not run through the actual time loop (to make the automated tests relatively fast), so no assembly took place and no errors where apparent. Now, a collection of demos are run for one time step to catch this kind of problem. The fix and new test regime is in the merged PR #21.
Please note: I did not get the exact same error as you got, also when I tested on Debian Buster. Researching this I found that FEniCS 2018.1 has a problem with SymPy >= 1.2. This issue is fixed in FEniCS 2019.1 which should be released any day now, but that may (??) have been the reason that the UFL error was different on your system?
Please let me know if this fixes the problem. PR #21 shows the results I get with the updated demo. You should hopefully get the same.