change of syntax?

More
6 years 2 months ago #1239 by sgomes
change of syntax? was created by sgomes
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
More
6 years 2 months ago #1240 by joachim
Replied by joachim on topic change of syntax?
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
Time to create page: 0.115 seconds