[Meep-discuss] A few questions regarding to initialize_field() function

2009-12-25 Thread joe ertaba
Hi, I am trying to use initialize_field to initialize Hz fields in my 2D TE simulation, I have a few questions: Here is part of my c++ code: f.initialize_field (Ez, initializeField); // where initializeField is : complex initializeField(const vec &p) { return 1.0; } complex * = new comple

[Meep-discuss] Dispersive Material in C++

2009-12-26 Thread joe ertaba
Hi, I am trying to add dispersion to Meep's C++ interface. In Meep tutorial there is an example about dispersion: s.add_polarizability (one, 0.4, 0.01, 27.63); There is no matching function in C++ class: meep::structure::add_polarizability ( double sigmaconst vec &, field_type ft, double ome

[Meep-discuss] A close packed opal monolayer

2009-12-27 Thread joe ertaba
Dear Steven, In this example http://ab-initio.mit.edu/wiki/index.php/Meep_C-plus-plus_Tutorial#Calculating_the_flux_through_a_close_packed_opal_monolayer, in the part which dielectric function is declared, a new volume defined and the resulution is set to 100. Isnt it better to declare one global

[Meep-discuss] 2 Bug Reports

2009-12-28 Thread joe ertaba
Hi, In http://ab-initio.mit.edu/~meep/meep.pdf, in the section: Calculating the flux through a close packed opal monolayer there are 2 bugs 1. In second paragraph 2/sqrt(3)*r = a should be 2*sqrt(3)*r = a {In paragraph itself; the formula below it is correct} 2. Since diameter of spheres are 850n

[Meep-discuss] One more Bug Report

2009-12-28 Thread joe ertaba
Hi, I've found a new bug in http://ab-initio.mit.edu/wiki/index.php/Meep_C-plus-plus_Tutorial#Calculating_the_flux_through_a_close_packed_opal_monolayer , gaussian_src_time src((freq_min+freq_max)*0.5, 0.5/(freq_max-freq_min), 0, 5/(freq_max-freq_min)); should be gaussian_src_time src((freq_min+f

[Meep-discuss] One minor bug!

2009-12-28 Thread joe ertaba
Hi Steven, I've found a new minor bug in http://ab-initio.mit.edu/wiki/index.php/Meep_C-plus-plus_Tutorial#Calculating_the_flux_through_a_close_packed_opal_monolayer , In this line: while (f0.time() < nfreq / (freq_max-freq_min) / 2) f0.step(); Uncertainty principle is used; so deltaT * deltaF <

[Meep-discuss] Modes of a ring resonator

2009-12-30 Thread joe ertaba
Hi, I am trying to confirm whether a mode in "Modes of a ring resonator" http://ab-initio.mit.edu/wiki/index.php/Meep_Tutorial is degenerate or not. To do this I applied different symmetries to the structure. If two or more modes with different symmetries but with same frequency exist then It can

[Meep-discuss] Negative imaginary part of a complex Refractive index

2010-02-15 Thread joe ertaba
Hi, I have a special material which has a negative imaginary part refractive index ( e.g: n=4.2 - i * 0.5 ) is there any chance to use this material in simulation with Meep? I used conductivity part to simulate this material at given frequency ( http://ab-initio.mit.edu/wiki/index.php/Conductivit

[Meep-discuss] Plane-wave source

2010-04-29 Thread joe ertaba
Hi, I've checked the mailing list but I couldn't find any clear recipe to construct a Plane-wave source; What I am seeking for is a clean Plane-wave source with a *finite* spatial distribution (Something like a real plane-wave beam) (By spatial distribution I mean distribution in perpendicular dir

[Meep-discuss] Time averaging of data in C++

2010-05-20 Thread joe ertaba
Dear Steven and meep users, I need to time average |Ex|² over a period of time in C++ interface. Currently, I do this as follows, but IMO, this is not appropriate method when MPI is used. //Initialzing an array const double resolution_sampling = 0.2; const int total = int(x_width / resolu

[Meep-discuss] A problem with Material dispersion example

2010-06-07 Thread joe ertaba
Hi, I've tried to convert a simple example of http://ab-initio.mit.edu/wiki/index.php/Meep_Tutorial/Material_dispersioninto a C++ code. Attached is my simple code. I was wondering, although I use same variables as the example why I get wrong variables For K=[0.3, 0, 0] ctl file gives: freqs:, 1,

Re: [Meep-discuss] A problem with Material dispersion example

2010-06-07 Thread joe ertaba
On Mon, Jun 7, 2010 at 4:23 PM, joe ertaba wrote: > Hi, > > I've tried to convert a simple example of > http://ab-initio.mit.edu/wiki/index.php/Meep_Tutorial/Material_dispersioninto > a C++ code. > > Attached is my simple code. I was wondering, although I use same v

[Meep-discuss] Two questions about Bloch boundary condition

2010-06-09 Thread joe ertaba
Dear Steven and Meep users I have two questions about Bloch bounday condition 1. Lets assume that the entire region is filled with a dielectric material with eps 2. If I want to apply Bloch boundary condition should I use f.use_bloch(K)) or f.use_bloch(K.sqrt(2)). In first one it is assumed that

[Meep-discuss] M/I dispersion

2010-06-13 Thread joe ertaba
Dear Steven and Meep users, It is a while since I started to find the dispersion of a simple Metal/Insulator structure with Meep. BTW, I've reviewed the mailing list, but unfortunately nobody gives a complete solution to this open question yet. Anyway, My instruction is as follows: 1. Place a meta