Forum Message

 

 

We have moved the forum to https://forum.ngsolve.org . This is an archived version of the topics until 05/05/23. All the topics were moved to the new forum and conversations can be continued there. This forum is just kept as legacy to not invalidate old links. If you want to continue a conversation just look for the topic in the new forum.

Notice

The forum is in read only mode.

change of syntax?

More
5 years 5 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
5 years 5 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.100 seconds