Issue with Projector

Hi everyone,

the projector object is behaving unexpectedly: It’s zeroing out everything. I’ve attached a MWE to illustrate this. Is this a bug or has the usage of the projector object changed?

Best wishes,
Henry

Attachment: mwe.py

Hi Henry,

using

gfu.vec.data = projector*gfu.vec

leads to undefined behavior as the gfu object appears on the left and right side.

Replacing the line with

tmp = gfu.vec.CreateVector()
tmp.data = projector*gfu.vec
gfu.vec.data = tmp

should solve the problem.

Best,
Michael

Hi Michael,

thank you for the quick reply! Thats solved the issue :).

Best wishes,
Henry

you can apply the projector inplace via

projector.Project(gfu.vec)

Joachim

Hi Joachim,

thank you for the tip!

Best wishes,
Henry