Skip to content

Commit d6e221c

Browse files
committed
Fix get_unknowns for GeneralStressState with no unknowns
1 parent 583c637 commit d6e221c

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/stressiterations.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -422,14 +422,14 @@ function get_unknowns(state::GeneralStressState{Nσ}, a::AbstractTensor{2,3,T})
422422
shear_factor = a isa SymmetricTensor ? T(2) : one(T)
423423
s(i,j) = i==j ? one(T) : shear_factor
424424
f(c) = ((i,j) = c; s(i,j)*(a[i,j]-state.σ[i,j]))
425-
return SVector{Nσ}((f(c) for c in state.σm_inds))
425+
return SVector{Nσ,T}((f(c) for c in state.σm_inds))
426426
end
427427

428428
function get_unknowns(state::GeneralStressState{Nσ}, a::AbstractTensor{4,3,T}) where {Nσ,T}
429429
shear_factor = T(2)
430430
s(i,j) = i==j ? one(T) : shear_factor
431431
f(c1,c2) = ((i,j) = c1; (k,l) = c2; a[i,j,k,l]*s(i,j)*s(k,l))
432-
return SMatrix{Nσ,Nσ}((f(c1,c2) for c1 in state.σm_inds, c2 in state.σm_inds))
432+
return SMatrix{Nσ,Nσ,T}((f(c1,c2) for c1 in state.σm_inds, c2 in state.σm_inds))
433433
end
434434

435435
# Extract each part of the stiffness tensor as SMatrix

0 commit comments

Comments
 (0)