Skip to content

Commit 622576c

Browse files
committed
using sqrt from gridap
1 parent c1ba357 commit 622576c

3 files changed

Lines changed: 4 additions & 17 deletions

File tree

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ AbstractTrees = "0.4.5"
2929
BlockArrays = "1.9.3"
3030
DrWatson = "2.19.1"
3131
ForwardDiff = "1.3.2"
32-
Gridap = "0.19.7"
32+
Gridap = "0.19.8"
3333
GridapDistributed = "0.4.10"
3434
GridapGmsh = "0.7.3"
3535
GridapPETSc = "0.5.6"

src/TensorAlgebra/Functions.jl

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,4 @@
11

2-
"""
3-
sqrt(A::TensorValue{3})::TensorValue{3}
4-
5-
Compute the square root of a 3x3 matrix by means of eigen decomposition.
6-
"""
7-
function sqrt(A::TensorValue{3})
8-
λ, Q = eigen(A)
9-
λ = sqrt.(λ)
10-
TensorValue{3}(λ[1]*Q[1:3]*Q[1:3]' + λ[2]*Q[4:6]*Q[4:6]' + λ[3]*Q[7:9]*Q[7:9]')
11-
end
12-
132

143
"""
154
cof(A::TensorValue)::TensorValue

src/TensorAlgebra/TensorAlgebra.jl

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ using StaticArrays
66
using LinearAlgebra
77
import Base: *
88
import Base: +
9-
import Base: sqrt
109

1110
export (*)
1211
export (×ᵢ⁴)
@@ -32,7 +31,6 @@ export δᵢₗδⱼₖ2D
3231
export δᵢⱼδₖₗ3D
3332
export δᵢₖδⱼₗ3D
3433
export δᵢₗδⱼₖ3D
35-
export sqrt
3634
export cof
3735
export contraction_IP_JPKL
3836
export contraction_IP_PJKL
@@ -42,9 +40,9 @@ export Ellipsoid
4240

4341
# outer ⊗ \otimes
4442
# inner ⊙ \odot
45-
# cross × \times
46-
# sum +
47-
# dot *
43+
# cross × \times
44+
# sum + +
45+
# dot *
4846

4947
include("FlatIndexing.jl")
5048

0 commit comments

Comments
 (0)