Issue with Projector

More
5 years 2 months ago #1879 by hvwahl
Issue with Projector was created by hvwahl
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
Attachments:
More
5 years 2 months ago #1880 by mneunteufel
Replied by mneunteufel on topic Issue with Projector
Hi Henry,

using
Code:
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
Code:
tmp = gfu.vec.CreateVector() tmp.data = projector*gfu.vec gfu.vec.data = tmp
should solve the problem.

Best,
Michael
More
5 years 2 months ago #1881 by hvwahl
Replied by hvwahl on topic Issue with Projector
Hi Michael,

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

Best wishes,
Henry
More
5 years 2 months ago #1882 by joachim
Replied by joachim on topic Issue with Projector
you can apply the projector inplace via
Code:
projector.Project(gfu.vec)

Joachim
More
5 years 2 months ago - 5 years 2 months ago #1883 by hvwahl
Replied by hvwahl on topic Issue with Projector
Hi Joachim,

thank you for the tip!

Best wishes,
Henry
Last edit: 5 years 2 months ago by hvwahl.
Time to create page: 0.101 seconds