Entity_maps is required for problems that use submeshes . If you do not need submeshes, you do not need to worry about this.
I do use submeshes: cohesive zone model, in the spirit of Bleyer’s CG + CZM interface tutorial.
I skimmed the SNESSolver class and I am not sure I found entity_maps anywhere, yet being necessary, as far as I understand. I might be wrong and entity_maps has to be used in a different way. Any instructions here would be very useful.
I’ve just pushed a commit that allows you to pass entity_maps to the SNESSolver (as it was an oversight from my end).
Previously, you would have to compute the jacobian yourself, and call dolfinx.fem.form on the residual and Jacobian prior to sending them into the SNESProblem.
I saw you added a line to import assign from dolfinx.fem.petsc, in nls.petsc.
When I try to import this petsc code (dolfinx.nls.petsc) in my main code, I get the error: cannot import name 'assign' from 'dolfinx.fem.petsc'. Could it be that I have an old version of dolfinx.fem.petsc? I am confused here.
To sum up: I downloaded dolfinx.nls.petsc, dolfinx.fem.forms, modified in the former the line to import forms from the second (and not my dolfinx installation), and then imported the former petsc in my main code. I use v0.9.0.
For some reason I do not get the version of dolfinx.fem.petsc that contains the assign function when installing fenics-dolfinx with Conda, i.e., conda install -c conda-forge fenics-dolfinx. I updated the channel. I use Mac. Yet, it seems I get an older version of the file.