add a particleInstance object to the particle history to store a single instance (in time) of this particle
(self, xyz=[-1.0,-1.0,-1.0],t=0.0,
dataValues=[])
| 183 | |
| 184 | |
| 185 | def addInstance(self, xyz=[-1.0,-1.0,-1.0],t=0.0, |
| 186 | dataValues=[]): |
| 187 | """ |
| 188 | add a particleInstance object to the particle history to |
| 189 | store a single instance (in time) of this particle |
| 190 | """ |
| 191 | |
| 192 | if (self.finalized == 1): |
| 193 | print "ERROR: particle data finalized before addInstance call" |
| 194 | sys.exit(2) |
| 195 | |
| 196 | |
| 197 | xyz = numpy.array(xyz) |
| 198 | dataValues = numpy.array(dataValues) |
| 199 | |
| 200 | |
| 201 | # add this particle instance to the particle history |
| 202 | self.history.append(particleInstance(xyz,t,dataValues)) |
| 203 | |
| 204 | self.numInstances += 1 |
| 205 | |
| 206 | |
| 207 |
no test coverage detected