-
Notifications
You must be signed in to change notification settings - Fork 38
Open
Description
Hi,
I just stumbled over an issue which might lead to unexpected results for second order tensors with dimensions not equal to
To the best of my knowledge, the deviatoric part for a second order tensor
dev and mean could be changed to dim in order to make them applicable for general dimensions.
Lines 297 to 306 in 258540f
| @inline function dev(S::SecondOrderTensor) | |
| Tt = get_base(typeof(S)) | |
| trace = tr(S) / 3 | |
| Tt( | |
| @inline function(i, j) | |
| @inbounds v = i == j ? S[i,j] - trace : S[i,j] | |
| v | |
| end | |
| ) | |
| end |
Line 250 in 258540f
| Statistics.mean(S::SecondOrderTensor) = tr(S) / 3 |
If interested I could work on a PR.
termi-officialkoehlerson
Metadata
Metadata
Assignees
Labels
No labels