meep

Vector3 in Meep in Python

拥有回忆 提交于 2020-01-02 23:14:45
问题 I'm getting 'module' object has no attribute 'Vector3' error in my simple python code. This is rightAngle.py file import meep as mp import math cell = mp.Vector3(16, 8, 0) geometry = [mp.Bloack(mp.Vector3(1e20, 1, 1e20), center = mp.Vector3(0, 0), material = mp.Medium(epsilon = 12))] sources = [mp.Source(mp.ContinuousSource(frequency = 0.15), component = mp.Ez, center = mp.Vector3(-7, 0))] pml_layers = [mp.PML(1.0)] resolution = 10 Compling using: python rightAngle.py >& rightAngle.out And

R5RS Scheme input-output: How to write/append text to an output file?

只谈情不闲聊 提交于 2019-12-20 02:56:14
问题 What is a simple way to output text to file in a R5RS compliant version of Scheme? I use MIT's MEEP (which uses Scheme for scripting) and I want to output text to file. I have found the following other answers on Stackoverflow: File I/O operations - Scheme How to append to a file using Scheme Append string to existing textfile [sic] in IronScheme But, they weren't exactly what I was looking for. 回答1: The answers by Charlie Martin, Ben Rudgers, and Vijay Mathew were very helpful, but I would

Vector3 in Meep in Python

試著忘記壹切 提交于 2019-12-07 15:40:35
I'm getting 'module' object has no attribute 'Vector3' error in my simple python code. This is rightAngle.py file import meep as mp import math cell = mp.Vector3(16, 8, 0) geometry = [mp.Bloack(mp.Vector3(1e20, 1, 1e20), center = mp.Vector3(0, 0), material = mp.Medium(epsilon = 12))] sources = [mp.Source(mp.ContinuousSource(frequency = 0.15), component = mp.Ez, center = mp.Vector3(-7, 0))] pml_layers = [mp.PML(1.0)] resolution = 10 Compling using: python rightAngle.py >& rightAngle.out And getting this output: Traceback (most recent call last): File "rightAngle.py", line 4, in <module> cell =

R5RS Scheme input-output: How to write/append text to an output file?

谁说我不能喝 提交于 2019-12-02 01:33:08
What is a simple way to output text to file in a R5RS compliant version of Scheme? I use MIT's MEEP (which uses Scheme for scripting) and I want to output text to file. I have found the following other answers on Stackoverflow: File I/O operations - Scheme How to append to a file using Scheme Append string to existing textfile [sic] in IronScheme But, they weren't exactly what I was looking for. ansebbian0 The answers by Charlie Martin, Ben Rudgers, and Vijay Mathew were very helpful, but I would like to give an answer which is simple and easy to understand for new Schemers, like myself :) ;