change of syntax?

Hello,

I just wanted to ask, was there any change of syntax in the recent versions of netgen?

I have the following
u = GridFunction(fes)
u.components[0].data = 0

which used to work in version 1805, but now netgen complains about incompatible function arguments. Is there anything I should change with the newest versions?

Thanks!

Susana

Hi Susana,

you clear the vector by:

u.components[0].vec[:] = 0

With

u.componetns[0].data = 0

you have added an object named data to the GridFunction, but you did not clear the vector. Now, we have already an object ‘data’ within the GridFunction which you are not allowed to overwrite.

best, Joachim