How to compute entity-to-cell connectivity?

Continuing the discussion from Any guides to implement a material model with softening with DOLFINx?:

Hi. Firstly, sorry for the lack of MWE (I am updating @bleyerj’s dolfinx_materials to run with FEniCSx 0.8.x, and creating one will take some time, and it may be that it’s not completely needed). Also, I tried a search: connectivity after:2022-01-01 date, but that didn’t lead anywhere.

Mainly, I am getting a

RuntimeError: Entity-to-cell connectivity has not been computed.

Is anybody familiar with this? For what I have seen, there are a lot of quadrature elements. Is there a quick hint? (otherwise, I’ll try to synthetise a MWE). Thanks!

Something like my_mesh_object.topology.create_connectivity(mesh.topology.dim, 0), where you may want to tweak the two integer arguments depending on which connectivity you need to create. For instance, the call I copied creates connectivity from cells to vertices.

2 Likes