← Back to team overview

yade-users team mailing list archive

[Question #297855]: AttributeError: 'module' object has no attribute 'inGtsSurface'

 

New question #297855 on Yade:
https://answers.launchpad.net/yade/+question/297855

Hi all. I am currently taking some code that I developed on my office PC and using it on a HPC cluster. The code generated a volume of particles from a predicate determined by GTS and works correctly on the office computer, but when I tried to run the script on the HPC cluster, it gives "AttributeError: 'module' object has no attribute 'inGtsSurface'" despite (as far as I'm aware) all of the relevant modules being installed to the HPC, including python, boost, gts, and yade. Here is the relevant code section.

from yade import pack,plot,bodiesHandling, qt, utils
from math import tan,sin,cos,sqrt

internalfrictionangle=28*(pi/180)
externalfrictionangle=26*(pi/180)
width=.1
rampangle=60*(pi/180)
shutterheight=.2
factor=1
radius=.0025
cwidth=width
insertradius=.2464
shutterpoint=1.448+insertradius*tan(rampangle/2)
ramplength=shutterpoint+shutterheight/(tan(rampangle-internalfrictionangle))
runofflength=1.7
damp=0.015

finish=400000

O.materials.append(FrictMat(density=1730,young=65e6,poisson=.2,frictionAngle=internalfrictionangle,label='sand'))

#particle generation
#base points of wedge
v0=gts.Vertex(-.001+((cwidth-width)/2),cos(rampangle)*shutterpoint,-.001+sin(rampangle)*shutterpoint)
v1=gts.Vertex(-.001+((cwidth+width)/2),cos(rampangle)*shutterpoint,-.001+sin(rampangle)*shutterpoint)

#back top points of wedge
v2=gts.Vertex(-.001+((cwidth-width)/2),(cos(rampangle)*ramplength),-.001+(sin(rampangle)*ramplength))
v3=gts.Vertex(-.001+((cwidth+width)/2),(cos(rampangle)*ramplength),-.001+(sin(rampangle)*ramplength))

#front top points of wedge
v4=gts.Vertex(-.001+((cwidth-width)/2),(cos(rampangle)*shutterpoint)-(sin(rampangle)*shutterheight),-.001+(sin(rampangle)*shutterpoint)+(cos(rampangle)*shutterheight))
v5=gts.Vertex(-.001+((cwidth+width)/2),(cos(rampangle)*shutterpoint)-(sin(rampangle)*shutterheight),-.001+(sin(rampangle)*shutterpoint)+(cos(rampangle)*shutterheight))

e0=gts.Edge(v0,v1)
... and so on

f0=gts.Face(e0,e1,e2)
... and so on

surf=gts.Surface()
for f in (f0,f1,f2,f3,f4,f5,f6,f7):
   surf.add(f)

#surf.translate(0,0,0)
pred=pack.inGtsSurface(surf)
sp=pack.randomDensePack(pred,spheresInCell=1000,radius=radius,rRelFuzz=0.25,color=(0,0,1),returnSpherePack=True)
sp.toSimulation()

The actual error message is below:

Running script simulation.py
Traceback (most recent call last):
  File "/cm/shared/apps/yade-2016.06a/bin/yade", line 182, in runScript
    execfile(script,globals())
  File "simulation.py", line 70, in <module>
    pred=pack.inGtsSurface(surf)
AttributeError: 'module' object has no attribute 'inGtsSurface'

As far as I can tell this is some sort of problem with the GTS implementation, but I don't know what. Let me know if you can help me with this issue.

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.