Compute Cell Coordinates and Cell_Jacobian dolfinx through ufl form

I have a general query in dolfinx. For each cell, I want to compute

  1. Cell_Jacobian (Jacobian(mesh) is not evaluated for each cell)
  2. cell coordinates

I wanted to make a vector using cell origin and midpoint of cell facet for each element and interpolating the vector to a ufl form. How can I approach for a simple unit square mesh?
With this I want to make a local orthogonal frame for each element using 2 in-plane vectors and 1 normal vector (through Jacobian).
Any help is appreciated!

This should help you
https://bleyerj.github.io/comet-fenicsx/tours/shells/linear_shell/linear_shell.html#computing-a-local-tangent-frame

1 Like