yade-users team mailing list archive
-
yade-users team
-
Mailing list archive
-
Message #13574
Re: [Question #372295]: specific number of spheres in randomDennsePack
Question #372295 on Yade changed:
https://answers.launchpad.net/yade/+question/372295
Status: Answered => Open
Elli is still having a problem:
Thanks Jan,
Based on what you have recommended; does below script achieve what I am
looking for?
import random
IdOfMaterial = range(10000)
random.shuffle(IdOfMaterial)
NewIdMat1 = []
NewIdMat2 = []
NewIdMat2=IdOfMaterial[:3000]
NewIdMat1=IdOfMaterial[3000:10000]
#Now the NewIdMat2 is a list of random values 3000 unique values between 0 to 9999
#and the other one is a random of rest of numbers i.e. 7000
#note that it has been sorted for the sake of simplicity
NewIdMat1.sort()
NewIdMat2.sort()
idparticulate1=NewIdMat1
idparticulate2=NewIdMat2
Thanks,
Elli
--
You received this question notification because your team yade-users is
an answer contact for Yade.