Beispiel #1
0
 def addAdrATParticle(self, pid, *args):
     if (self.particleExists(pid)):
         print "WARNING: Particle ", pid, " already exists. Therefore it was not added."
         return None
     else:
         pmi.call(self.pmiobject, 'addAdrATParticle', pid, *args)
         return Particle(pid, self)
Beispiel #2
0
 def addParticle(self, pid, pos, checkexist=True):
     if checkexist:
         if (self.particleExists(pid)):
             print "WARNING: Particle ", pid, " already exists. Therefore it was not added."
             return None
         else:
             pmi.call(self.pmiobject, 'addParticle', pid, pos)
             return Particle(pid, self)
     else:
         pmi.call(self.pmiobject, 'addParticle', pid, pos)
Beispiel #3
0
 def getParticle(self, pid):
     if (self.particleExists(pid)):
         return Particle(pid, self)
     else:
         print("WARNING: Particle ", pid, " does not exist")
         return None