The definition of F_inv
is definitely introducing a nonlinearity. In such case, u
must be a dolfinx.fem.Function
, and not a ufl.TrialFunction
, and the problem is not a LinearProblem
anymore. To solve a nonlinear problem you can use dolfinx builtin NewtonSolver
, or use SNES
from PETSc.
Is the piola transform introducing some sort of non-linearity?
Yes
Is it fine to create two function spaces
Yes
Should this problem be solved as a linear or nonlinear problem in FEniCSx?
Nonlinear, at least as it is currently stated.