[Yade-users] [Question #700944]: VTKRecorder is not defined

2022-03-15 Thread Jeseung Moon
New question #700944 on Yade:
https://answers.launchpad.net/yade/+question/700944

The error messages is followed:
: yade-2022-01-18.git-4be27ac ../../05-3d-postprocessing.py
Welcome to Yade 2022-01-18.git-4be27ac
Using python version: 3.6.9 (default, Dec  8 2021, 21:08:43)
[GCC 8.4.0]
TCP python prompt on localhost:9000, auth cookie `yessud'
XMLRPC info provider on http://localhost:21000
Running script 
/home/jsmoon/download/trunk/doc/sphinx/tutorial/05-3d-postprocessing.py
Traceback (most recent call last):
  File "/usr/local/bin/yade-2022-01-18.git-4be27ac", line 343, in runScript
execfile(script,globals())
  File "/usr/lib/python3/dist-packages/past/builtins/misc.py", line 82, in 
execfile
exec_(code, myglobals, mylocals)
  File "../../trunk/doc/sphinx/tutorial/05-3d-postprocessing.py", line 26, in 

VTKRecorder(fileName='3d-vtk-', recorders=['all'], iterPeriod=1000),
NameError: name 'VTKRecorder' is not defined
[[ ^L clears screen, ^U kills line. F12 controller, F11 3D view (press "h" in 
3D view for help), F10 both, F9 generator, F8 plot. ]]


I set the enable VTK tab: on
//Enable VTK
ENABLE_VTK:BOOL=ON

How can I fixed it.

-- 
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 #700903]: How to call the set function again

2022-03-15 Thread 孙灿
Question #700903 on Yade changed:
https://answers.launchpad.net/yade/+question/700903

Status: Needs information => Open

孙灿 gave more information on the question:
I'm sorry the information I provided is not accurate enough.
Relevant codes are as follows:
def Output():
e22=-triax1.strain[1]
#particle info
f = open('./pdata/pInfo'+'{:.5f}'.format(e22-ini_e22a), 'w')
print (('Particle information at Iter %d' % O.iter),file=f)

f.write('Box position: \n')
print (('left wall: %.5f %.5f %.5f' % (O.bodies[2].state.pos[0], 
O.bodies[2].state.pos[1], O.bodies[2].state.pos[2])),file=f)
print (('right wall: %.5f %.5f %.5f' % (O.bodies[3].state.pos[0], 
O.bodies[3].state.pos[1], O.bodies[3].state.pos[2])),file=f)
print (('top wall: %.5f %.5f %.5f' % (O.bodies[1].state.pos[0], 
O.bodies[1].state.pos[1], O.bodies[1].state.pos[2])),file=f)
print (('bottom wall: %.5f %.5f %.5f' % (O.bodies[0].state.pos[0], 
O.bodies[0].state.pos[1], O.bodies[0].state.pos[2])),file=f)
print (('front wall: %.5f %.5f %.5f' % (O.bodies[5].state.pos[0], 
O.bodies[5].state.pos[1], O.bodies[5].state.pos[2])),file=f)
print (('back wall: %.5f %.5f %.5f' % (O.bodies[4].state.pos[0], 
O.bodies[4].state.pos[1], O.bodies[4].state.pos[2])),file=f)

f.write('ID x y z radius disx disy disz rotx roty rotz \n')
for b in O.bodies:
if isinstance(b.shape, Sphere):
print 
(b.id,b.state.pos[0],b.state.pos[1],b.state.pos[2],b.shape.radius,b.state.displ()[0],b.state.displ()[1],b.state.displ()[2],b.state.rot()[0],b.state.rot()[1],b.state.rot()[2],file=f)

f.close()

#contact info
g = open('./cdata/cInfo'+'{:.5f}'.format(e22-ini_e22a), 'w')
print (('Contact information at Iter %d' % O.iter),file=g)
g.write('ctype id1 id2 nfx nfy nfz tfx tfy tfz \n')

for k in O.interactions:
if isinstance(O.bodies[k.id1].shape,Sphere) and 
isinstance(O.bodies[k.id2].shape,Box):
print ('01',k.id1,k.id2,k.phys.normalForce[0], 
k.phys.normalForce[1],k.phys.normalForce[2],k.phys.shearForce[0],k.phys.shearForce[1],k.phys.shearForce[2],file=g)
elif isinstance(O.bodies[k.id1].shape,Box) and 
isinstance(O.bodies[k.id2].shape,Sphere):
print ('10',k.id1,k.id2,k.phys.normalForce[0], 
k.phys.normalForce[1],k.phys.normalForce[2],k.phys.shearForce[0],k.phys.shearForce[1],k.phys.shearForce[2],file=g)
elif isinstance(O.bodies[k.id1].shape,Sphere) and 
isinstance(O.bodies[k.id2].shape,Sphere):
print ('00',k.id1,k.id2,k.phys.normalForce[0], 
k.phys.normalForce[1],k.phys.normalForce[2],k.phys.shearForce[0],k.phys.shearForce[1],k.phys.shearForce[2],file=g)

g.close()
Output()


This string of code can get the particle information (ID, radius and 
coordinates). I only use it to get the particle information before the code 
runs, and I don't know how to use this string of code again to get the particle 
information (coordinates).

-- 
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 #700931]: How to colour in the particles in my own specific way (sequence)

2022-03-15 Thread Robert Caulk
Question #700931 on Yade changed:
https://answers.launchpad.net/yade/+question/700931

Status: Open => Needs information

Robert Caulk requested more information:
Hello,

What is "the diagonal?" What is "the other areas?" What is "the result I
wanted?"

Please review our forum guidelines: https://www.yade-
dem.org/wiki/Howtoask

Cheers,

Robert

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