# Tensor Finite Element

**URL:** <https://fenicsproject.discourse.group/t/tensor-finite-element/7581>\
**Category:** mathematics\
**Created:** [February 1, 2022, 2:12am UTC](https://fenicsproject.discourse.group/t/tensor-finite-element/7581 "2022-02-01T02:12:27Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![kamensky](https://avatars.discourse-cdn.com/v4/letter/k/e95f7d/32.png) [@kamensky](https://fenicsproject.discourse.group/u/kamensky)\
**Post date:** [February 1, 2022, 3:48pm UTC](https://fenicsproject.discourse.group/t/tensor-finite-element/7581/2 "2022-02-01T15:48:28Z")

</div>

Firstly, the terminology “2-form” usually refers specifically to a [differential form](https://en.wikipedia.org/wiki/Differential_form) of rank 2, i.e., an _anti_-symmetric mapping from two vectors to a scalar. In finite element calculations, it is most common to represent differential forms via their classical vector calculus proxies, e.g., Tables 2.1–2.3 [here](https://www.sam.math.ethz.ch/sam_reports/reports_final/reports2011/2011-42_fp.pdf), for which special H(\operatorname{div})- and H(\operatorname{curl})-conforming elements are implemented in FEniCS (e.g., Raviart–Thomas and Nédélec elements).

However, since you mention that you want a symmetric tensor, I assume you mean an ordinary rank-2 tensor. FEniCS does nominally support `TensorElement`s, although forum discussions from a few years ago suggest that the option to enforce symmetry may be buggy. See, e.g., [this](https://fenicsproject.discourse.group/t/writing-symmetric-tensor-function-fails/1136) thread. Another option is to just use a `VectorElement` with the optional keyword argument `dim` set to the right number of unique scalar components. These components can then be manually packaged into a matrix before defining variational forms, using the UFL `as_matrix` function.

---

_[View the full topic](https://fenicsproject.discourse.group/t/tensor-finite-element/7581)._
