Computing the Spectrum of an FE Operator (e.g. Inverse Laplace) on Arbitrary Domains

I have a linear operator A (for simplicity, the inverse Laplace with homogeneous Dirichlet BC) on an arbitrary 2D/3D mesh. What is the general FEniCS workflow to assemble the discrete operator, apply boundary conditions, and compute its spectrum? A minimal code sketch or pointers to the key steps would be greatly appreciated.

Not sure if that is exactly what you mean, but I have a simple tutorial at tutorial_eigenvalue_laplacian

Note that for most of the code you don’t really need the additional library shown there (multiphenicsx) as standard dolfinx is already enough.