TypeError: __init__(): incompatible function arguments. The following argument types are supported:
1. __init__(self, markers: collections.abc.Sequence[dolfinx::mesh::MeshTags<int>], surfaces: dolfinx::graph::AdjacencyList<int>, contact_pairs: collections.abc.Sequence[collections.abc.Sequence[int]], mesh: dolfinx::mesh::Mesh<double>, search_method: collections.abc.Sequence[dolfinx_contact.cpp.ContactMode], quadrature_degree: int = 3) -> None
Invoked with types: dolfinx_contact.general_contact.contact_problem.ContactProblem, list, dolfinx.cpp.graph.AdjacencyList_int32, list, dolfinx.cpp.mesh.Mesh_float64, kwargs = { quadrature_degree: int, search_method: list }
I also experimented with changing the argument order in the ContactProblem call, but it didn’t resolve the issue.
I am not sure whether this is due to an installation/version mismatch or something subtle in how the demo is being run. Has anyone recently been able to run these demos successfully? Any guidance would be appreciated.
Hi, by following your installation I ran into the same error and it turned out to be a nanobind version mismatch. I’d suggest checking your nanobind version and comparing it with the one required by fenics-dolfinx=0.9.0 from conda-forge (it should be nanobind 2.8).
If it doesn’t match (in my case it was 2.12.0), the fix was:
Hello Mr. Dokken,
I updated my environment to dolfinx v0.10** and then rebuilt the asimov-contact library as recommended. The core contact functionality compiles and runs, so that part seems fine.
However, I am still facing several issues inside the ContactWriter class, especially in file output.py. Some of the errors appear to be related to API changes in UFL and dolfinx(e.g., Cell, quadrature elements, create_submesh, EntityMap, etc.). I tried adjusting the syntax manually, but each fix leads to another incompatibility.
I wanted to ask whether the ContactWriter code is already updated for DOLFINx v0.10 * or
if I might have an installation issue on my side.
Before I continue altering things manually, I thought it would be better to ask once with you.