foo
This commit is contained in:
parent
f5e3b2b4f3
commit
39436ea6d9
14
fdtd.py
14
fdtd.py
@ -1,15 +1,15 @@
|
||||
#!/usr/bin/env python3
|
||||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# From the Meep tutorial: plotting permittivity and fields of a bent waveguide
|
||||
from __future__ import division
|
||||
|
||||
import meep as mp
|
||||
import matplotlib.pyplot as plt
|
||||
#import matplotlib.pyplot as plt
|
||||
import os
|
||||
import sys
|
||||
import numpy as np
|
||||
from matplotlib import cm
|
||||
#from matplotlib import cm
|
||||
import pygame
|
||||
|
||||
mp.quiet(True)
|
||||
@ -67,11 +67,11 @@ def get_slice(sim):
|
||||
|
||||
def plot_dielectric(sim):
|
||||
val = sim.get_array(center=mp.Vector3(), size=cell, component=mp.Dielectric, arr=buffer)
|
||||
plt.figure()
|
||||
plt.imshow(val, interpolation='none', cmap='RdBu')
|
||||
#plt.figure()
|
||||
#plt.imshow(val, interpolation='none', cmap='RdBu')
|
||||
#plt.axis('off')
|
||||
plt.show()
|
||||
print()
|
||||
#plt.show()
|
||||
#print()
|
||||
|
||||
|
||||
#sim.run(mp.at_beginning(plot_dielectric), mp.at_every(0.6, get_slice), until=200)
|
||||
|
Loading…
Reference in New Issue
Block a user