← Back to team overview

yade-users team mailing list archive

Re: [Question #182459]: wrap a simulation to a class

 

Question #182459 on Yade changed:
https://answers.launchpad.net/yade/+question/182459

    Status: Answered => Open

ceguo is still having a problem:
Hi Chiara,

Thanks for your quick reply. But my ultimate goal is to wrap a
simulation to a class. Something like:

class triaxialTest():
   def __init__(self):
      self.__O=O
      self.__sp=pack.SpherePack()
      self.__sp.toSimulation()
      self.__stress=[]

   def isoConsolidation(self,pressure):
      self.__O.engines = []
      self.__O.run()
      self.__O.wait()
      self.__stress=[]

   def applyStrain(self, strain):
      self.__O.engines=[]
      self.__O.run()
      self.__O.wait()
      self.__stress=[]

   def getStress(self):
      return self.__stress

   ......

To achieve this, I need to know how these variables (e.g. O) are loaded
and from which library.

Ning

-- 
You received this question notification because you are a member of
yade-users, which is an answer contact for Yade.