Adjustments to dispersion analysis to handle long time windows. Moved to analysing waveform over a multiple of pulse widths rather than entire time window.

这个提交包含在:
Craig Warren
2017-08-23 10:50:48 +01:00
父节点 6c0e18df4d
当前提交 b86935ae58
共有 3 个文件被更改,包括 39 次插入26 次删除

查看文件

@@ -89,14 +89,14 @@ class FDTDGrid(Grid):
# Get information about host machine
self.hostinfo = None
# CPU - OpenMP threads
self.nthreads = 0
# GPU
# Threads per block
self.tpb = (256, 1, 1)
# GPU object
self.gpu = None
@@ -238,8 +238,10 @@ def dispersion_analysis(G):
# Built-in waveform
else:
time = np.linspace(0, 1, G.iterations)
time *= (G.iterations * G.dt)
# Time to analyse waveform - 3*pulse_width as using entire
# time window can result in demanding FFT
waveform.calculate_coefficients()
time = np.arange(0, 3 * waveform.chi, G.dt)
waveformvalues = np.zeros(len(time))
timeiter = np.nditer(time, flags=['c_index'])