← Back to team overview

yade-dev team mailing list archive

Re: removing bodies in Yade?

 

Forget this. The problem is in one triax recorder, I'm going to fix...

On 14/10/11 19:07, Bruno Chareyre wrote:
> Hi,
>
> We have two bugs linked with removing bodies currently. Just curious, I
> tried to remove bodies in r2931 in a very simple case, and it actually
> crashes too (see below).
> Am I doing something wrong? Else I would say removing bodies is simply
> not supported.
>
> Also I don't understand the code below in InteractionContainer::erase().
> If b2 has been removed but b1 still exists and contains interaction
> (b1,b2), then we should not return. We should instead remove the
> interaction from b1.
>
>
> if((!b1) or (!b2)) return false;  // Bodies are vanished. Initially
> (before r2893) only b1 was checked on existence.
>                                     // But, it seems, that b2 also needs
> to be checked. The logic of the algorithm
>                                     // should be investigated. Bug-link
> https://bugs.launchpad.net/yade/+bug/813925
>
> Bruno
>
>
> Yade [1]: tt=TriaxialTest()
> Yade [2]: tt.generate('test.xml')
> Yade [3]: O.load('test.xml')
> Yade [4]: O.run(1000,True)
> Yade [5]: O.bodies.erase(20)
>  ->  [6]: True
> Yade [7]: O.bodies.erase(21)
>  ->  [7]: True
> Yade [8]: O.bodies.erase(22)
>  ->  [8]: True
> Yade [9]: O.bodies.erase(23)
>  ->  [9]: True
> Yade [10]: O.run(1000,True)
> Segmentation fault
>


-- 
_______________
Bruno Chareyre
Associate Professor
ENSE³ - Grenoble INP
11, rue des Mathématiques
BP 46
38402 St Martin d'Hères, France
Tél : +33 4 56 52 86 21
Fax : +33 4 76 82 70 43
________________



Follow ups

References