Ejemplo n.º 1
0
		if args.c:
			try:
				filep = open(folder+"state"+str(i).zfill(4)+'.cs')
			except EnvironmentError:
				pl.next()
				continue
			with filep:
				x = np.array(filep.readline().split("; ")[:-1], dtype=float)
				y = np.array(filep.readline().split("; ")[:-1], dtype=float)
				s = np.array(filep.readline().split("; ")[:-1], dtype=float)
				v = np.array(filep.readline().split("; ")[:-1], dtype=float)
				neigh = filep.readline().split("; ")[:-1]
				nnlist = []
				for n in neigh:
					nnlist.append(set(n[1:-1].split(",")[:-1]))
			pl.setupFromArrays(x, y, s, v)
		else:
			try:
				filep = open(folder+"step"+str(i).zfill(4)+'.cs')
			except EnvironmentError:
				pl.next()
				continue
			with filep:
				cs = cp.load(filep)
			pl.setupCellSystem(cs)
		pl.plotCellSystem()
		pl.drawCellStates()
		pl.drawCellPressure()
		pl.drawPressureValues()
		pl.next()
		print "Done with step ", i