Demos `finite_strain_elastoplasticity` and `phase_field` fail with FEniCS 2019.2
Here is the output of the phase_field
demo:
$ python3 mgis_fenics_phase_field.py
Calling FFC just-in-time (JIT) compiler, this may take some time.
Calling FFC just-in-time (JIT) compiler, this may take some time.
Calling FFC just-in-time (JIT) compiler, this may take some time.
Calling FFC just-in-time (JIT) compiler, this may take some time.
Traceback (most recent call last):
File "/home/tom/codes/mgis-fenics-demos/tests/phase_field/mgis_fenics_phase_field.py", line 316, in <module>
problem_u.register_external_state_variable("Damage", d)
File "/home/tom/codes/mgis/master/install-d4058ad4/lib/python3.10/site-packages/mgis/fenics/nonlinear_problem.py", line 256, in register_external_state_variable
{name: Var(self.u, expression, name, self.material.hypothesis)})
File "/home/tom/codes/mgis/master/install-d4058ad4/lib/python3.10/site-packages/mgis/fenics/gradient_flux.py", line 161, in __init__
Gradient.__init__(self, variable, expression, name, hypothesis)
File "/home/tom/codes/mgis/master/install-d4058ad4/lib/python3.10/site-packages/mgis/fenics/gradient_flux.py", line 118, in __init__
shape = ufl.shape(self.expression)
File "/usr/lib/python3/dist-packages/ufl/operators.py", line 52, in shape
f = as_ufl(f)
File "/usr/lib/python3/dist-packages/ufl/constantvalue.py", line 438, in as_ufl
raise UFLValueError("Invalid type conversion: %s can not be converted"
ufl.log.UFLValueError: Invalid type conversion: Damage can not be converted to any UFL type.