Hello Firedrakers! I am attempting to setup a NonlinearVariationalSolver and I am encountering some difficulties which I hope someone can help with... The problem appears to be with the form: F = ( phi*div(v) + inner(w,v) - div(theta*w)*cp*pi + g*w[1] )*dx + theta*cp*inner(w,n)*ds_b I get the message: ufl.log.UFLException: Expecting all integrals in a form to share geometric dimension, got (). The code works if I remove both the g*w[1] and the boundary term. These terms are fine in a LinearVariationalSolver. Example code is attached... and the full error is: Expecting all integrals in a form to share geometric dimension, got (). Traceback (most recent call last): File "nonlinear_hydrostatic_solver.py", line 111, in <module> HSolver.solve() File "<string>", line 2, in solve File "/home/jemma/src/PyOP2/pyop2/profiling.py", line 203, in wrapper return f(*args, **kwargs) File "/home/jemma/src/firedrake/firedrake/variational_solver.py", line 173, in solve self.snes.solve(None, v) File "PETSc/SNES.pyx", line 520, in petsc4py.PETSc.SNES.solve (src/petsc4py.PETSc.c:167382) File "PETSc/petscsnes.pxi", line 286, in petsc4py.PETSc.SNES_Jacobian (src/petsc4py.PETSc.c:33352) File "/home/jemma/src/firedrake/firedrake/solving_utils.py", line 230, in form_jacobian nest=problem._nest) File "/home/jemma/src/firedrake/firedrake/assemble.py", line 68, in assemble inverse=inverse, nest=nest) File "/home/jemma/src/firedrake/firedrake/assemble.py", line 101, in _assemble inverse=inverse) File "/home/jemma/src/firedrake/firedrake/ffc_interface.py", line 267, in compile_form fd = compute_form_data(form) File "/usr/local/lib/python2.7/dist-packages/ufl/algorithms/compute_form_data.py", line 188, in compute_form_data "Expecting all integrals in a form to share geometric dimension, got %s." % str(tuple(sorted(gdims)))) File "/usr/local/lib/python2.7/dist-packages/ufl/assertions.py", line 37, in ufl_assert if not condition: error(*message) File "/usr/local/lib/python2.7/dist-packages/ufl/log.py", line 151, in error raise self._exception_type(self._format_raw(*message)) ufl.log.UFLException: Expecting all integrals in a form to share geometric dimension, got (). Thanks in advance for any help! Jemma
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 15/09/15 14:18, Shipton, Jemma wrote:
v,rho = w1.split()
v, rho = split(w1)
w,phi = TestFunctions(WV)
Lawrence -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJV+BskAAoJECOc1kQ8PEYvgrgIAIEFwAQL8PPqWM5rtZwG3ugB KpgBOiBFuf048QobPXlQBOranGOYplRP11HP0bPdB8pxVPrE2Bl3r/98gnHeJsAL LnqRNxAxksuecaCfWR5kJSq/IiSWh5R4LcKwOv3Qi7qdk7l022Fa9eTHGBnOuIw/ nKkkoj0nqV4pW3JnZBPqeJm6DdDWrrJ9OO6M8g6DNmqGannJl/Qjxcdwo9XIiSXd vi42HfNICH7ffRT4LuIeq8V9kZRrCGyeBUWogRQ9EqljwjBOg4Vky9xtKnMNsP9G wmfykMnL6EEhy0Kln7H3xu0jenoiF9xc3qESQ5y8C+QLelbmQtZr4bB8C3sJqmw= =aH7E -----END PGP SIGNATURE-----
participants (2)
-
Lawrence Mitchell
-
Shipton, Jemma