Ferrite-FEM / Ferrite-FEM/Tensors.jl

Deviatoric and volumetric part of second order tensor for dimension not equal to 3

Aperta
#214 10 commenti 2 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Julia
Stelle
182
Fork
40
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

Hi,
I just stumbled over an issue which might lead to unexpected results for second order tensors with dimensions not equal to $3$.

To the best of my knowledge, the deviatoric part for a second order tensor $X \in \mathbb{R}^{d \times d}$ is defined by
$$\mathrm{dev}_d (X) = X - \frac{1}{d} \mathrm{tr} (X) I_d$$ with $I_d \in \mathbb{R}^{d\times d}$ denoting the identity tensor. My guess is that the denominator $3$ in the functions `dev` and `mean` could be changed to `dim` in order to make them applicable for general dimensions.

https://github.com/Ferrite-FEM/Tensors.jl/blob/258540f0879d8e4af67700b135ffe8806eaa516e/src/math_ops.jl#L297-L306

https://github.com/Ferrite-FEM/Tensors.jl/blob/258540f0879d8e4af67700b135ffe8806eaa516e/src/math_ops.jl#L250

If interested I could work on a PR.

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.