I am trying to plot stress vs strain graph. I have used quadrature scheme to implement plasticity model.

`def project(function, space): p = ufl.TrialFunction(space) q = ufl.TestFunction(space) dz = ufl.Measure('dx', domain = domain, metadata={"quadrature_degree": 2, "quadrature_scheme": "default"}) a = ufl.inner(p, q) * dz L = ufl.inner(function, q) * dz problem = fem.petsc.LinearProblem(a, L, bcs = []) return problem.solve() stress_11 = fem.functionspace(domain, ("DG", 0)) sigma_11 = fem.Function(stress_11) sigma_11 = project(sig[0], stress_11) print(sigma_11)`

Now I am not able to obtain the value of stress along 11. It is the same code implemented by @Jeremy_Bleyer in his website.

how can the value of stress be obtained so that I can save the stress values and plot for stress vs strain.