Closed alexandre-pasco closed 1 year ago
Thanks for the bug report @alexandre-pasco. I believe the issue is in
which should be
V = op.apply_adjoint(range_basis).conj()
I'll fix this as soon as I have checked that I am not overlooking anything.
I think that this would fix the problem, however I also think that it would lead to another problem on line 135,
return VectorArrayOperator(V, adjoint=True, name=op.name)
, which already take the adjoint operator.
Thus, I think the fix should be on line 132, which would become
return NumpyMatrixOperator(V.to_numpy().conj(), source_id=op.source.id, name=op.name)
instead of
return NumpyMatrixOperator(V.to_numpy(), source_id=op.source.id, name=op.name)
.
Describe the bug When projecting a
LincombOperator
with complex coefficients onto somerange_basis
usingpymor.algorithms.projection.project
, the result is not the one expected.To Reproduce
Expected behavior I would expect
project
and `assemble' to commute (in some sense).System information:
Additional context in
pymor.algorithms.projection
, I think a.conj()
is missing. In particular, I think the line 122 should beinstead of
Indeed, the problem seems to be fixed when I insert a rule with the corresponding correction into ProjectRules.