@@ -138,14 +138,14 @@ Base.@propagate_inbounds function tovoigt!(v::AbstractMatrix{T}, A::SymmetricTen
138138end
139139
140140# default voigt order (faster than custom voigt order)
141- Base. @propagate_inbounds function _tovoigt! (v:: AbstractVecOrMat{T} , A:: SecondOrderTensor{dim,T } , :: Nothing ; offset= 0 , offdiagscale= one (T)) where {dim,T}
141+ Base. @propagate_inbounds function _tovoigt! (v:: AbstractVecOrMat{T} , A:: SecondOrderTensor{dim} , :: Nothing ; offset= 0 , offdiagscale= one (T)) where {dim,T}
142142 tuple_data, = _to_voigt_tuple (A, offdiagscale)
143143 for i in eachindex (tuple_data)
144144 v[offset+ i] = tuple_data[i]
145145 end
146146 return v
147147end
148- Base. @propagate_inbounds function _tovoigt! (v:: AbstractVecOrMat{T} , A:: SymmetricTensor{4,dim,T } , :: Nothing ; offdiagscale= one (T), offset_i= 0 , offset_j= 0 ) where {dim,T}
148+ Base. @propagate_inbounds function _tovoigt! (v:: AbstractVecOrMat{T} , A:: SymmetricTensor{4,dim} , :: Nothing ; offdiagscale= one (T), offset_i= 0 , offset_j= 0 ) where {dim,T}
149149 tuple_data, N = _to_voigt_tuple (A, offdiagscale)
150150 cartesian = CartesianIndices (((offset_i+ 1 ): (offset_i+ N), (offset_j+ 1 ): (offset_j+ N)))
151151 for i in eachindex (tuple_data)
@@ -154,7 +154,7 @@ Base.@propagate_inbounds function _tovoigt!(v::AbstractVecOrMat{T}, A::Symmetric
154154 return v
155155end
156156
157- Base. @propagate_inbounds function _tovoigt! (v:: AbstractVecOrMat{T} , A:: Tensor{4,dim,T } , :: Nothing ; kwargs... ) where {dim,T}
157+ Base. @propagate_inbounds function _tovoigt! (v:: AbstractVecOrMat{T} , A:: Tensor{4,dim} , :: Nothing ; kwargs... ) where {dim,T}
158158 return _tovoigt! (v, A, DEFAULT_VOIGT_ORDER[dim]; kwargs... )
159159end
160160
0 commit comments