diff --git a/src/Geometry/axistensors.jl b/src/Geometry/axistensors.jl index bf225e9b2b..a7bae11023 100644 --- a/src/Geometry/axistensors.jl +++ b/src/Geometry/axistensors.jl @@ -136,10 +136,7 @@ struct AxisTensor{ T, N, A <: NTuple{N, AbstractAxis}, - S <: Union{ - SimpleSymmetric{N, T}, - StaticArray{<:Tuple, T, N}, - }, + S <: Union{SimpleSymmetric{N, T}, StaticArray{<:Tuple, T, N}}, } <: AbstractArray{T, N} axes::A components::S @@ -150,10 +147,7 @@ AxisTensor( components::S, ) where { A <: Tuple{Vararg{AbstractAxis}}, - S <: Union{ - SimpleSymmetric{N, T}, - StaticArray{<:Tuple, T, N}, - }, + S <: Union{SimpleSymmetric{N, T}, StaticArray{<:Tuple, T, N}}, } where {T, N} = AxisTensor{T, N, A, S}(axes, components) AxisTensor(axes::Tuple{Vararg{AbstractAxis}}, components) = diff --git a/src/Geometry/localgeometry.jl b/src/Geometry/localgeometry.jl index 54034b67da..b5ccaaad34 100644 --- a/src/Geometry/localgeometry.jl +++ b/src/Geometry/localgeometry.jl @@ -60,7 +60,16 @@ struct LocalGeometry{I, C <: AbstractPoint, FT, S, N, L} gᵢⱼ = SimpleSymmetric(gᵢⱼ₀) L = triangular_nonzeros(S) N = size(components(gⁱʲ₀), 1) - return new{I, C, FT, S, N, L}(coordinates, J, WJ, Jinv, ∂x∂ξ, ∂ξ∂x, gⁱʲ, gᵢⱼ) + return new{I, C, FT, S, N, L}( + coordinates, + J, + WJ, + Jinv, + ∂x∂ξ, + ∂ξ∂x, + gⁱʲ, + gᵢⱼ, + ) end end diff --git a/src/Geometry/simple_symmetric.jl b/src/Geometry/simple_symmetric.jl index 755af73f46..edcd938586 100644 --- a/src/Geometry/simple_symmetric.jl +++ b/src/Geometry/simple_symmetric.jl @@ -53,7 +53,8 @@ StaticArrays.check_parameters( triangular_nonzeros(::SMatrix{N}) where {N} = Int(N * (N + 1) / 2) triangular_nonzeros(::Type{<:SMatrix{N}}) where {N} = Int(N * (N + 1) / 2) -tail_params(::Type{S}) where {N,T, S<:SMatrix{N,N,T}} = (T, S, N, triangular_nonzeros(S)) +tail_params(::Type{S}) where {N, T, S <: SMatrix{N, N, T}} = + (T, S, N, triangular_nonzeros(S)) # function SimpleSymmetric(A::SMatrix) # @assert size(A, 1) == size(A, 2) diff --git a/test/Geometry/unit_simple_symmetric.jl b/test/Geometry/unit_simple_symmetric.jl index 3b35fe8b90..629083b335 100644 --- a/test/Geometry/unit_simple_symmetric.jl +++ b/test/Geometry/unit_simple_symmetric.jl @@ -28,11 +28,12 @@ simple_symmetric(A::Matrix) = SimpleSymmetric(SMatrix{size(A)..., eltype(A)}(A)) A = @SMatrix [1 2; 2 4] @test SimpleSymmetric(A) / 2 === SimpleSymmetric(A / 2) @test_opt SimpleSymmetric(A) - @test Geometry.tail_params(typeof(@SMatrix Float32[1 2; 2 4])) == (Float32, SMatrix{2, 2, Float32, 4}, 2, 3) + @test Geometry.tail_params(typeof(@SMatrix Float32[1 2; 2 4])) == + (Float32, SMatrix{2, 2, Float32, 4}, 2, 3) end @testset "sizs" begin - for N in (1,2,3,5,8,10) - simple_symmetric(rand(N,N)) # pass in non-symmetric matrix - end + for N in (1, 2, 3, 5, 8, 10) + simple_symmetric(rand(N, N)) # pass in non-symmetric matrix + end end