Probable mistake: Data update using function updateElements in yade.utils

Asked by MikeZhao

I am working on renewing coordinates of Facet using function :setPositionsOfNodes and updateElements in yade.utils module and I have found out that there's something wrong with these functions.

The position of Facet is illustrated with a reference position and a local coordinate, as is defined in the yade.utils module. The reference position is the inscribed Circle Center of the global coordinates of the vertices of the facet. But the position update process provided by the function updateElements simply changes the reference position of a facet to [0,0,0] and changes the coordinates to the recent coordinates, using global system instead of local system.

If positions are updated this way, it can not be detected in contact searching process.

Question information

Language:
English Edit question
Status:
Answered
For:
Yade Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Jan Stránský (honzik) said :
#1

Hello,

The class UnstructuredGrid was implemented by me some 2 years ago as an
experimental version. The behavior you described was used on purpose, as it
was very simple and worked at that time (at least if I remember correctly).

I will have a look on the code and let you know if/what I will modify it.

cheers
Jan

2015-06-05 2:38 GMT+02:00 MikeZhao <email address hidden>:

> New question #267761 on Yade:
> https://answers.launchpad.net/yade/+question/267761
>
> I am working on renewing coordinates of Facet using function
> :setPositionsOfNodes and updateElements in yade.utils module and I have
> found out that there's something wrong with these functions.
>
> The position of Facet is illustrated with a reference position and a local
> coordinate, as is defined in the yade.utils module. The reference position
> is the inscribed Circle Center of the global coordinates of the vertices of
> the facet. But the position update process provided by the function
> updateElements simply changes the reference position of a facet to [0,0,0]
> and changes the coordinates to the recent coordinates, using global system
> instead of local system.
>
> If positions are updated this way, it can not be detected in contact
> searching process.
>
>
>
>
>
>
>
> --
> You received this question notification because you are a member of
> yade-users, which is an answer contact for Yade.
>
> _______________________________________________
> Mailing list: https://launchpad.net/~yade-users
> Post to : <email address hidden>
> Unsubscribe : https://launchpad.net/~yade-users
> More help : https://help.launchpad.net/ListHelp
>

Revision history for this message
MikeZhao (zhaoyang12) said :
#2

Eh......I am a freshman to Yade, so I am not quite clear. I can describe what I have encountered:

I have tried to use some new positions of vertices to update locations of facet, but after updating by using function updateElements, there will be not forces on the facets. And I tried to make some change: If I set the facet.state.pos to the inscribed Circle Center of the global coordinates of the vertices of facet and set facet.shape.vertice to the local position(global - inscribed Circle Center), there will be forces on the facet.

But making this change will cause some problem about the memory: Usage of memory will keep growing if I try to use function updateElements repeatedly by using 'for i in range(1000)'...

Hope to get some solution,

thanks.

Revision history for this message
Jan Stránský (honzik) said :
#3

Hi Mike,

it was indeed a bug, thanks for reporting. It works for special cases and I
only tested those special ones..
It should be fixed in the latest git version

The memory issues should be fixed by using Facet.setVertices method

cheers
Jan

2015-06-05 18:41 GMT+02:00 MikeZhao <email address hidden>:

> Question #267761 on Yade changed:
> https://answers.launchpad.net/yade/+question/267761
>
> Status: Answered => Open
>
> MikeZhao is still having a problem:
> Eh......I am a freshman to Yade, so I am not quite clear. I can describe
> what I have encountered:
>
> I have tried to use some new positions of vertices to update locations
> of facet, but after updating by using function updateElements, there
> will be not forces on the facets. And I tried to make some change: If I
> set the facet.state.pos to the inscribed Circle Center of the global
> coordinates of the vertices of facet and set facet.shape.vertice to the
> local position(global - inscribed Circle Center), there will be forces
> on the facet.
>
> But making this change will cause some problem about the memory: Usage
> of memory will keep growing if I try to use function updateElements
> repeatedly by using 'for i in range(1000)'...
>
> Hope to get some solution,
>
> thanks.
>
> --
> You received this question notification because you are a member of
> yade-users, which is an answer contact for Yade.
>
> _______________________________________________
> Mailing list: https://launchpad.net/~yade-users
> Post to : <email address hidden>
> Unsubscribe : https://launchpad.net/~yade-users
> More help : https://help.launchpad.net/ListHelp
>

Can you help with this problem?

Provide an answer of your own, or ask MikeZhao for more information if necessary.

To post a message you must log in.