### there is FacetNormal, but why there is no FacetTangent?

132

views

1

by using

n=FacetNormal(mesh)

on can obtain the normal vectors of a given mesh, but why there is no such a function

FacetTangent(mesh)

?

n=FacetNormal(mesh)

on can obtain the normal vectors of a given mesh, but why there is no such a function

FacetTangent(mesh)

?

Community: FEniCS Project

-1

Then, how about 2-dimensional cases?

written
3 months ago by
Mingchao Cai

### 2 Answers

5

Because a facet tangent space of a three-dimensional cell is two-dimensional. A facet tangent of two-dimensional cell would have undefined direction.

More precisely, a facet tangent space is an Euclidian space of dimension

You can define your own tangents as you need:

There's no reason why any such definition should be preferred and denoted as

More precisely, a facet tangent space is an Euclidian space of dimension

`tdim-1`

, where `tdim`

is a topological dimension of underlying cell. So intended `FacetTangent`

could return basis of the space. This basis could be orthogonalized but that are no natural directions which would be invariant of numbering of entities or similar conventions. By contrast `FacetNormal`

has an invariant definition - **exterior unit normal**. Note that UFL is a language for describing variational forms in well-defined tensor algebra language.You can define your own tangents as you need:

```
mesh = UnitCubeMesh(2048, 2048, 2048)
n = FacetNormal(mesh)
t0 = as_vector((0, n[2], -n[1]))
t1 = as_vector((n[2], 0, -n[0]))
```

There's no reason why any such definition should be preferred and denoted as

`FacetTangents`

.
1

As Jan so eloquently pointed out, you have infinite choices for FacetTangent, namely those vectors lying on the tangent plane to the facet.

If you want the tangent vector, you can make one yourself using a vector of your choice, the normal vector, and linear algebra.

If you want the tangent vector, you can make one yourself using a vector of your choice, the normal vector, and linear algebra.

1

Let me add that if you need a projector you can build it from the normals, i.e. \(\boldsymbol{P}=\boldsymbol{I}-\boldsymbol{n}\otimes \boldsymbol{n}\)

written
3 months ago by
Marco Morandini

Please login to add an answer/comment or follow this question.