Skip to content

Commit d9f1359

Browse files
committed
debug: avoid duplicate Hermitian wrappers
1 parent 68eb317 commit d9f1359

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

‎src/controller/construct.jl‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,10 @@ struct ControllerWeights{
8585
iszero_Ñ_Hc = [iszero(Ñ_Hc)]
8686
iszero_L_Hp = [iszero(L_Hp)]
8787
iszero_E = iszero(E)
88+
@show typeof(M_Hp)
89+
@show MW
90+
@show Hermitian{NT,MW}
91+
@show Hermitian{NT,NW}
8892
return new{NT,MW,NW,LW}(
8993
M_Hp, Ñ_Hc, L_Hp, E,
9094
iszero_M_Hp, iszero_Ñ_Hc, iszero_L_Hp, iszero_E, isinf_C
@@ -100,6 +104,10 @@ function ControllerWeights(
100104
M_Hp = eltype(M_Hp) == NT ? M_Hp : NT.(M_Hp)
101105
N_Hc = eltype(N_Hc) == NT ? N_Hc : NT.(N_Hc)
102106
L_Hp = eltype(L_Hp) == NT ? L_Hp : NT.(L_Hp)
107+
# Hermitian wrappers are added in the inner constructor, remove it to avoid duplicates:
108+
M_Hp = M_Hp isa Hermitian ? parent(M_Hp) : M_Hp
109+
N_Hc = N_Hc isa Hermitian ? parent(N_Hc) : N_Hc
110+
L_Hp = L_Hp isa Hermitian ? parent(L_Hp) : L_Hp
103111
return ControllerWeights{NT}(M_Hp, N_Hc, L_Hp, Cwt, Ewt)
104112
end
105113

0 commit comments

Comments
 (0)