# Spatial coordinate local values

**URL:** <https://fenicsproject.discourse.group/t/spatial-coordinate-local-values/11021>\
**Category:** mesh\
**Created:** [April 24, 2023, 7:45pm UTC](https://fenicsproject.discourse.group/t/spatial-coordinate-local-values/11021 "2023-04-24T19:45:36Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![dokken](https://yyz2.discourse-cdn.com/free1/user_avatar/fenicsproject.discourse.group/dokken/32/1560_2.png) [@dokken](https://fenicsproject.discourse.group/u/dokken)\
**Post date:** [April 25, 2023, 6:38am UTC](https://fenicsproject.discourse.group/t/spatial-coordinate-local-values/11021/4 "2023-04-25T06:38:42Z")

</div>

> [@bagla0](#):
>
> How can we get the determinant of jacobian matrix which is multiplied during assemble operation?  
> If not values, at least, I could get the formulation used by FEniCS for tetrahedron elements.

Consider the following (works for affine cells such as triangles, tetrahedrons and affine quads/hexes)

```python
import dolfin
from ufl import Jacobian
mesh = dolfin.UnitCubeMesh(1,1,1)
J = abs(dolfin.det(Jacobian(mesh)))

Q = dolfin.FunctionSpace(mesh, "DG", 0)
cell_jac = dolfin.project(J, Q)
print(cell_jac.vector().get_local())

```

> [@bagla0](#):
>
> Can we make the mesh to brick element from default tetrahedron element ?

When you say “brick” element, I suspect you mean: "Can we use hexahedral mesh elements.

Short answer is: This is not fully supported in legacy DOLFIN, and you are recommended to use DOLFINx if you want such elements.

Long answer: You can try to use it in DOLFIN, see: [Bitbucket](https://bitbucket.org/fenics-project/dolfin/src/8060a84e8ada0df018772497534092727b06bd56/python/test/unit/geometry/test_intersection.py?at=master#lines-80). However, it is not guaranteed to work (it does not for for other meshes than the “built-in” ones). You are recommended to use DOLFINx: [GitHub - FEniCS/dolfinx: Next generation FEniCS problem solving environment](https://github.com/FEniCS/dolfinx/) as has full support for hexes (also non-affine hexes)

---

_[View the full topic](https://fenicsproject.discourse.group/t/spatial-coordinate-local-values/11021)._
