New question #677658 on Yade: https://answers.launchpad.net/yade/+question/677658
Hi all, I am using the code [1] to check if a particle lose its cohesive contact and consequently belongs or not to a relative aggregate. But I am not quite sure if i.phys.breakOccurred is really checking if the cohesive break occurred. My question is: Inside O.engines should I activate the flag used to trigger retriangulation as soon as a cohesive bond breaks or not? Example (yes): O.engines=[ ForceResetter(), ... [Law2_ScGeom_JCFpmPhys_JointedCohesiveFrictionalPM(smoothJoint=False, Key="Wei", recordCracks=True, breakOccurred(=0))] ), ] Example (no): O.engines=[ ForceResetter(), ... [Law2_ScGeom_JCFpmPhys_JointedCohesiveFrictionalPM(smoothJoint=False, Key="Wei", recordCracks=True)] ), ] Thank you, Luis [1] def addBodyToAggreg(body,aggreg): # auxiliary function, add body [yade.Body instance] and all its neighbors into aggreg (python set instance) if body.id in aggreg: # do nothing if b is already in aggreg ... return aggreg.add(body.id) # ... otherwise add it to aggreg intrs = body.intrs() for i in intrs: # and add also all its neighbors ... if not isinstance(i.phys,JCFpmPhys): # ... but only that connected with JCFpmPhys interactions continue if i.phys.breakOccurred: # ... but only not yet broken continue i2 = i.id1 if i.id2==body.id else i.id2 # choose the other body of interaction b2 = O.bodies[i2] addBodyToAggreg(b2,aggreg) # and add it and all its neighbors to aggreg -- You received this question notification because your team yade-users is an answer contact for Yade. _______________________________________________ Mailing list: https://launchpad.net/~yade-users Post to : yade-users@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-users More help : https://help.launchpad.net/ListHelp