Re: [Yade-users] [Question #676284]: avg Num Interactions

2018-12-15 Thread Luis Barbosa
Question #676284 on Yade changed:
https://answers.launchpad.net/yade/+question/676284

Status: Answered => Solved

Luis Barbosa confirmed that the question is solved:
Tks

-- 
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


Re: [Yade-users] [Question #676284]: avg Num Interactions

2018-12-13 Thread Bruno Chareyre
Question #676284 on Yade changed:
https://answers.launchpad.net/yade/+question/676284

Status: Open => Answered

Bruno Chareyre proposed the following answer:
Yes, it is currently the latest.
Bruno

-- 
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


Re: [Yade-users] [Question #676284]: avg Num Interactions

2018-12-13 Thread Luis Barbosa
Question #676284 on Yade changed:
https://answers.launchpad.net/yade/+question/676284

Status: Answered => Open

Luis Barbosa is still having a problem:
Hi Bruno,
Just to confirm, the last version you mean is:

yadedaily_2018.02b-28948d72e6~xenial-1

Right?

Luis

-- 
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


Re: [Yade-users] [Question #676284]: avg Num Interactions

2018-12-12 Thread Bruno Chareyre
Question #676284 on Yade changed:
https://answers.launchpad.net/yade/+question/676284

Status: Open => Answered

Bruno Chareyre proposed the following answer:
I couldn't trace back 2018.02b-1786828270~xenial I'm sorry.
Could you update yadedaily and report new version number (and confirm the bug)?
Bruno

-- 
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


Re: [Yade-users] [Question #676284]: avg Num Interactions

2018-12-11 Thread Luis Barbosa
Question #676284 on Yade changed:
https://answers.launchpad.net/yade/+question/676284

Status: Answered => Open

Luis Barbosa is still having a problem:
Followed above

-- 
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


Re: [Yade-users] [Question #676284]: avg Num Interactions

2018-12-07 Thread Bruno Chareyre
Question #676284 on Yade changed:
https://answers.launchpad.net/yade/+question/676284

Status: Open => Answered

Bruno Chareyre proposed the following answer:
Hi, Could you please provide more accurate version number and a minimal working 
script?
Bruno

-- 
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


Re: [Yade-users] [Question #676284]: avg Num Interactions

2018-12-07 Thread Luis Barbosa
Question #676284 on Yade changed:
https://answers.launchpad.net/yade/+question/676284

Luis Barbosa posted a new comment:
Hi Bruno I am using yadedaily  Yade 2018.02b-1786828270~xenial

Here follows the script:

#!/usr/bin/python
# -*- coding: utf-8 -*-

from yade import plot
from yade import pack
from yade import utils
from yade import bodiesHandling
import math
import random

# Spheres

O.materials.append(JCFpmMat(type=1,young=70e9,poisson=0.3,frictionAngle=radians(30),density=1600,tensileStrength=15e5,cohesion=15e5,jointNormalStiffness=1e5,jointShearStiffness=1e5,jointCohesion=15e5,jointFrictionAngle=radians(30),jointDilationAngle=0.0,label='spheres'))

ag=O.bodies.append(
#   pack.regularHexa(
pack.randomDensePack(

(pack.inSphere((0,0,0.055),0.055)),radius=rad,color=(0,1,0),rRelFuzz=0,material='spheres')
 # head
)

###

O.engines=[
  ForceResetter(),

InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Facet_Aabb()]),
InteractionLoop(
[Ig2_Sphere_Sphere_ScGeom(),Ig2_Facet_Sphere_ScGeom()],
[Ip2_JCFpmMat_JCFpmMat_JCFpmPhys(cohesiveTresholdIteration=1)],

[Law2_ScGeom_JCFpmPhys_JointedCohesiveFrictionalPM(smoothJoint=False, 
Key="Wei", recordCracks=True)]
),

  
GlobalStiffnessTimeStepper(active=1,timeStepUpdateInterval=500,timestepSafetyCoefficient=0.5),
  NewtonIntegrator(damping=0.1,gravity=[0,0,0]),
  PyRunner(command='AutoData()',iterPeriod=500,initRun=True),

]


##Coordination 
Number
def AutoData():

plot.addData(CN=avgNumInteractions(cutoff=0.,skipFree=True,considerClumps=False),
 i=O.iter)
O.run(2000,True)#80
plot.plots={'i':('CN')}
plot.plot()
plot.saveDataTxt('CN.txt')


from yade import qt
qt.View()
qt.Controller()


Thank you,
Luis

-- 
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


Re: [Yade-users] [Question #676284]: avg Num Interactions

2018-12-07 Thread Bruno Chareyre
Question #676284 on Yade changed:
https://answers.launchpad.net/yade/+question/676284

Bruno Chareyre proposed the following answer:
Can't reproduce:

bchareyre@lt-gmn018:~$ yadedaily
Welcome to Yade 2018.02b-288b5fbefc~xenial 
Yade [1]: nums,counts=bodyNumInteractionsHistogram(aabbExtrema(0))
Yade [2]:

-- 
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


Re: [Yade-users] [Question #676284]: avg Num Interactions

2018-12-07 Thread Luis Barbosa
Question #676284 on Yade changed:
https://answers.launchpad.net/yade/+question/676284

Status: Solved => Open

Luis Barbosa is still having a problem:
Hello everyone,

After the last yadedaily update in 12-05,  the same initial problem
reported here still persists.

Am I doing something wrong or is avgNumInteractions() not working yet?

Cheers,
Luis

-- 
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


Re: [Yade-users] [Question #676284]: avg Num Interactions

2018-11-23 Thread Luis Barbosa
Question #676284 on Yade changed:
https://answers.launchpad.net/yade/+question/676284

Status: Answered => Solved

Luis Barbosa confirmed that the question is solved:
Ok, tanks.

-- 
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


Re: [Yade-users] [Question #676284]: avg Num Interactions

2018-11-23 Thread Jérôme Duriez
Question #676284 on Yade changed:
https://answers.launchpad.net/yade/+question/676284

Status: Open => Answered

Jérôme Duriez proposed the following answer:
I do not know since you did not tell us which YADE you're using ;-)
yadedaily ? compiled from sources ?

If it's yadedaily (looking at your error messages), you will get the
update once

1. a new version of yadedaily package (including the changes of today's commit) 
is released to the world
2. you locally update your packages to adopt this update

-- 
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


Re: [Yade-users] [Question #676284]: avg Num Interactions

2018-11-23 Thread Luis Barbosa
Question #676284 on Yade changed:
https://answers.launchpad.net/yade/+question/676284

Status: Answered => Open

Luis Barbosa is still having a problem:
Nice job Jérôme.

but what do you mean by "When and how these changes will land in your computer 
depend on your use of YADE" ?
It will be automatically updated or do I need to change something?

Cheers,
Luis

-- 
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


Re: [Yade-users] [Question #676284]: avg Num Interactions

2018-11-23 Thread Jérôme Duriez
Question #676284 on Yade changed:
https://answers.launchpad.net/yade/+question/676284

Jérôme Duriez proposed the following answer:
Hi Luis,

This error meant that your call to avgNumInteractions() triggered a call
to bodyNumInteractionsHistogram() [1] with a Python list as an argument,
whereas the latter bodyNumInteractionsHistogram() (a Python function
inherited from C++ world thanks to boost::python) wants Python tuples as
arguments [2]. And Python list and Python tuples are different things
(but do not ask me why ;-) )


In more details bodyNumInteractionsHistogram had actually been called with the 
output of aabbExtrema() as an argument [1]. And, because of recent changes in 
the C++ world [3] (and because of the exact manner the C++ and the Python 
worlds are connected), the return type of aabbExtrema() in the Python world is 
now a list, whereas it used to be a tuple.


Hence the error, as my 1st paragraph said.


I just committed changes [4] that solve the bug, as well as the other following 
example maybe closer to your needs:

#
O.bodies.append(sphere((0,0,0),1,dynamic=False))
O.bodies.append(sphere((0,0,1.9),1,dynamic=False))
O.bodies.append(sphere((0.7,0,0.7),1,dynamic=False))
# 3 spheres example to avoid the "nan" case in avgNumInteractions(skipFree=True)

O.step()

print ''
print 'Avg Num Interactions', 
avgNumInteractions(cutoff=0.0,skipFree=True,considerClumps=False)
# (This could have been your MWE ;-) )


When and how these changes will land in your computer depend on your use of 
YADE. Thanks for reporting anyway,


Jérôme


[1] See File "/usr/lib/x86_64-linux-gnu/yadedaily/py/yade/utils.py", line 438, 
in avgNumInteractions, the command 
"nums,counts=bodyNumInteractionsHistogram(aabbExtrema(cutoff)"
[2] 
https://github.com/yade/trunk/blob/c14fd94f6be04f24e45daff0eed6ae6b8e737d4f/py/_utils.hpp#L29
[3] 
https://github.com/yade/trunk/commit/1db13fb1183b9e294dc9761da76cfa4fc2791cc1
[4] 
https://github.com/yade/trunk/commit/7c60d78bd9badfa174fb79a82af7b119abf81d5d

-- 
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


Re: [Yade-users] [Question #676284]: avg Num Interactions

2018-11-22 Thread Robert Caulk
Question #676284 on Yade changed:
https://answers.launchpad.net/yade/+question/676284

Robert Caulk posted a new comment:
if you want to track the progress:

https://bugs.launchpad.net/yade/+bug/1804621

-- 
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


Re: [Yade-users] [Question #676284]: avg Num Interactions

2018-11-22 Thread Jérôme Duriez
Question #676284 on Yade changed:
https://answers.launchpad.net/yade/+question/676284

Linked to bug: #180461
https://bugs.launchpad.net/bugs/180461
"2.6.24: amd64 slab-allocator local DoS"

-- 
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


Re: [Yade-users] [Question #676284]: avg Num Interactions

2018-11-22 Thread Jérôme Duriez
Question #676284 on Yade changed:
https://answers.launchpad.net/yade/+question/676284

Removed link to bug: #180461
https://bugs.launchpad.net/bugs/180461
"2.6.24: amd64 slab-allocator local DoS"

-- 
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


Re: [Yade-users] [Question #676284]: avg Num Interactions

2018-11-22 Thread Jérôme Duriez
Question #676284 on Yade changed:
https://answers.launchpad.net/yade/+question/676284

Linked to bug: #1804621
https://bugs.launchpad.net/bugs/1804621
"bodyNumInteractionsHistogram broken"

-- 
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


Re: [Yade-users] [Question #676284]: avg Num Interactions

2018-11-21 Thread Luis Barbosa
Question #676284 on Yade changed:
https://answers.launchpad.net/yade/+question/676284

Luis Barbosa posted a new comment:
Ok, let me know when you fix it.

Thanks,
Luis

-- 
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


Re: [Yade-users] [Question #676284]: avg Num Interactions

2018-11-21 Thread Robert Caulk
Question #676284 on Yade changed:
https://answers.launchpad.net/yade/+question/676284

Status: Open => Answered

Robert Caulk proposed the following answer:
I suspect this is a side effect of a recent improvement to the code [1].
bodyNumInteractionsHistogram [2] just needs to be updated to accept a
list instead of a tuple in the same way. I will try to fix as soon as
possible.

[1] 
https://github.com/yade/trunk/commit/1db13fb1183b9e294dc9761da76cfa4fc2791cc1#diff-b419764bcd75202d733c0952ac1fc88f
[2]https://github.com/yade/trunk/blob/c14fd94f6be04f24e45daff0eed6ae6b8e737d4f/py/_utils.cpp#L67

-- 
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