Hello all,
I am trying to use adaptive meshing to solve a nonlinear equation. In my code, I am trying to minimize elastic energy (such as this example on documentation: https://fenicsproject.org/docs/dolfin/2019.1.0/python/demos/hyperelasticity/demo_hyperelasticity.py.html).
My problem is that when I use “solve(F == 0, u, bcs=bc, tol=tol, M=M)” to solve my problem, it gives me the following error:
File “/usr/lib/petsc/lib/python3/dist-packages/dolfin/fem/solving.py”, line 228, in solve
_solve_varproblem_adaptive(*args, **kwargs)
File “/usr/lib/petsc/lib/python3/dist-packages/dolfin/fem/solving.py”, line 321, in _solve_varproblem_adaptive
eq, u, bcs, J, tol, M, form_compiler_parameters,
ValueError: too many values to unpack (expected 8)
Please also note that since I am trying to solve a VectorFunctionSpace parameter, I have defined goal function M as below:
M = y[1] * dx(0)
where y is the deformation vector.
For solving nonlinear equation adaptively, I am using section 4 of the following document:
https://fenicsproject.org/docs/dolfin/2017.2.0/python/programmers-reference/fem/solving/solve.html
Any help is much appreciated!