Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import matplotlib
- matplotlib.use('Qt4Agg')
- import pylab
- import numpy
- import gdb
- buf = gdb.execute('b hdsim2d.cpp:332', to_string=True)
- buf = gdb.execute('r',to_string=True)
- tracer_number = gdb.parse_and_eval('tracer_.size()')
- x_list = []
- y_list = []
- t_list = []
- for i in range(tracer_number):
- if(i%1000==0):
- print(i)
- x_list.append(float(gdb.parse_and_eval('_tessellation.GetMeshPoint('+str(i)+').x')))
- y_list.append(float(gdb.parse_and_eval('_tessellation.GetMeshPoint('+str(i)+').y')))
- t_list.append(float(gdb.execute('p tracer_['+str(i)+'][1]',
- to_string=True).split()[-1]))
- pylab.tricontourf(x_list, y_list, t_list)
- pylab.colorbar()
- pylab.scatter(x_list, y_list)
- pylab.show()
- exit()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement