Re: [Meep-discuss] Output-png problem

2008-01-29 Thread Manoj Rajagopalan
You're welcome! :-)

BTW, for now you could also try this:

bsub -o meepout.out -eo meeperr.err -n 2 pam -mpi mpirun -np 2 env 
PATH= meep-mpi ctlfile.ctl

the 'env' command wraps around your meep-mpi command and runs it in a 
modified environment, in the process letting you define additional 
environment variables as NAME=VALUE pairs before the command+args to be 
executed.

cheers!
Manoj



Li, Jingjing wrote:
> Hi Manoj,
> 
> Thanks for your reply.  I'm consulting our system admin. Let me see what he 
> says about it.
> 
> Jingjing
> 
> --
> Jingjing Li, Ph.D
> Postdoc, Quantumn Science Research
> Hewlett-Packard Laboratories
> 1501 Page Mill Road, MS 1l23
> Palo Alto, CA 94304
> Phone: 650 857 5454
> 
> 
>> -Original Message-
>> From: Manoj Rajagopalan [mailto:[EMAIL PROTECTED]
>> Sent: Monday, January 28, 2008 8:29 AM
>> To: Li, Jingjing; 'meep-discuss@ab-initio.mit.edu'
>> Subject: Re: [Meep-discuss] Output-png problem
>>
>> Looks like the actual node that is running meep in your cluster isn't
>> seeing your PATH variable. Ask your sysadmin on which file
>> you must set
>> your path to so that the definition is propagaged.
>>
>> For now you could try to "man" your bsub command to see if it accepts
>> env variable arguments. Try,
>>
>> PATH=$PATH: bsub -o meepout.out 
>>
>> Note that the way you specify paths will change depending on
>> the shell.
>>
>> cheers!
>> Manoj
>>
>>
>> Li, Jingjing wrote:
>>> Hi all,
>>>
>>> I was trying to use the "Output-png" function, similar to
>> that in the online meep tutorial.  However, I did not get the
>> .png file as expected.  Rather, the program output a long
>> list of the same error as this:
>>> "sh: h5topng: command not found".
>>>
>>> And the program outputs a lot of h5 file, rather than the
>> .png file.  I can still generate the .png file correctly from
>> these .h5 file by using the h5topng command mannualy.
>>> The path of the h5utils is correctly set, as checked by
>> "echo $PATH". And actually I can use h5topng command to
>> generate figures from the h5 files manually thus the path
>> should not be a problem. The system is a HP-XC cluster, and
>> the job is submitted using the PAM feature of the LSF
>> applications as this:
>>> "bsub -o meepout.out -eo meeperr.err -n 2 pam -mpi mpirun
>> -np 2 meep-mpi ctlfile.ctl"
>>> The structure is actually very simple, a 2D waveguide
>> bounded in the +/- y direction by PEC, with three dielectric
>> slabs inside. The source code is attached below.
>>> Thank you for any suggestions.
>>>
>>> The code:
>>> -
>>>
>>> (define-param thick1 5); Thickness of the left slab layer
>>> (define-param thick2 5); Thickness of the right slab layer
>>> (define-param thick_diel 50); Thickness of the sandwitched
>> dielectrics
>>> (define-param thick_pml 200); Thickness of the PML
>>> (define-param thick_stack 200); Thickness of the stack
>> between the PML and
>>>   ; the dielectric slab
>>>
>>> (define-param sx (+ thick_pml
>>>  (+ thick_stack
>>>  (+ thick1
>>>  (+ thick_diel
>>>  (+ thick2
>>>  (+ thick_stack thick_pml)
>>>  )
>>>  ); The size along x-direction. Include the PML, the
>> distance between the
>>>   ; the PML and the layer, etc.
>>>
>>> (define-param sy (* thick1 5));
>>>
>>> (set! geometry-lattice (make lattice (size sx sy no-size)));
>>>
>>> (set! geometry (list (make block
>>>(center (- (- 0 (/ thick_diel
>> 2)) (/ thick1 2)) 0 0)
>>>(size thick1 sy infinity)
>>>(material (make dielectric (epsilon 3
>>>  (make block
>>> (center 0 0 0)
>>> (size thick_diel sy infinity)
>>> (material (make dielectric
>> (epsilon 1.0
>>>  (make block
>>> (center (+ (/ thick2 2) (/
>> thick_diel 2)) 0 0)
>>> (size thick2 sy infinity)
>>> (material (make dielectric
>>

Re: [Meep-discuss] Output-png problem

2008-01-28 Thread Manoj Rajagopalan
Looks like the actual node that is running meep in your cluster isn't 
seeing your PATH variable. Ask your sysadmin on which file you must set 
your path to so that the definition is propagaged.

For now you could try to "man" your bsub command to see if it accepts 
env variable arguments. Try,

PATH=$PATH: bsub -o meepout.out 

Note that the way you specify paths will change depending on the shell.

cheers!
Manoj


Li, Jingjing wrote:
> Hi all,
> 
> I was trying to use the "Output-png" function, similar to that in the online 
> meep tutorial.  However, I did not get the .png file as expected.  Rather, 
> the program output a long list of the same error as this:
> 
> "sh: h5topng: command not found".
> 
> And the program outputs a lot of h5 file, rather than the .png file.  I can 
> still generate the .png file correctly from these .h5 file by using the 
> h5topng command mannualy.
> 
> The path of the h5utils is correctly set, as checked by "echo $PATH". And 
> actually I can use h5topng command to generate figures from the h5 files 
> manually thus the path should not be a problem. The system is a HP-XC 
> cluster, and the job is submitted using the PAM feature of the LSF 
> applications as this:
> 
> "bsub -o meepout.out -eo meeperr.err -n 2 pam -mpi mpirun -np 2 meep-mpi 
> ctlfile.ctl"
> 
> The structure is actually very simple, a 2D waveguide bounded in the +/- y 
> direction by PEC, with three dielectric slabs inside. The source code is 
> attached below.
> 
> Thank you for any suggestions.
> 
> The code:
> -
> 
> (define-param thick1 5); Thickness of the left slab layer
> (define-param thick2 5); Thickness of the right slab layer
> (define-param thick_diel 50); Thickness of the sandwitched dielectrics
> (define-param thick_pml 200); Thickness of the PML
> (define-param thick_stack 200); Thickness of the stack between the PML and
>   ; the dielectric slab
> 
> (define-param sx (+ thick_pml
>  (+ thick_stack
>  (+ thick1
>  (+ thick_diel
>  (+ thick2
>  (+ thick_stack thick_pml)
>  )
>  ); The size along x-direction. Include the PML, the distance between the
>   ; the PML and the layer, etc.
> 
> (define-param sy (* thick1 5));
> 
> (set! geometry-lattice (make lattice (size sx sy no-size)));
> 
> (set! geometry (list (make block
>(center (- (- 0 (/ thick_diel 2)) (/ thick1 2)) 0 
> 0)
>(size thick1 sy infinity)
>(material (make dielectric (epsilon 3
>  (make block
> (center 0 0 0)
> (size thick_diel sy infinity)
> (material (make dielectric (epsilon 1.0
>  (make block
> (center (+ (/ thick2 2) (/ thick_diel 2)) 0 0)
> (size thick2 sy infinity)
> (material (make dielectric (epsilon 3
>));
> 
> (set! sources (list (make source
>   (src (make gaussian-src (frequency 0.01) (fwidth 
> 0.002)))
>   (component Ey)
>   (center (+ 100 (- 0 (+ (+ (/ thick_diel 2) (/ 
> thick1 2)) thick_stack))) 0 0)
>   (size 0 sy infinity)
>   )));
> 
> (set! pml-layers (list (make pml (thickness thick_pml) (direction X;
> (set! resolution 1);
> 
> (init-fields);
> (meep-fields-set-boundary fields High Y Metallic);
> (meep-fields-set-boundary fields Low Y Metallic);
> 
> (run-sources+
> (stop-when-fields-decayed 200 Ey
>(vector3 (- (* 0.5 sx) thick_pml 10) 0 0)
>1e-6));
> 
> 
> --
> Jingjing Li, Ph.D
> Postdoc, Quantumn Science Research
> Hewlett-Packard Laboratories
> 1501 Page Mill Road, MS 1l23
> Palo Alto, CA 94304
> Phone: 650 857 5454
> 
> ___
> meep-discuss mailing list
> meep-discuss@ab-initio.mit.edu
> http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss
> 
> 

___
meep-discuss mailing list
meep-discuss@ab-initio.mit.edu
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss


Re: [Meep-discuss] Meep output : Problem

2008-01-26 Thread Manoj Rajagopalan
hi shiv,

   Here is my best guess - someone correct me if I'm wrong. Try one or 
both of the following:

1. increase the width of the gaussian source. It seems to be a very 
tight spike: check if it is comparable to resolutions. The grid will 
propagate a pulse better if is spread out across more delta-t's. Of 
course, you are trying to simulate a pulse, I understand but this 
approach would be good for debugging. Discretization methods work best 
when the resolution is at least 1/20th the smallest feature size in your 
problem.

2. A point source radiates spherically about it, in your case, 
circularly. So the energy is dissipated along the circumference. The 
larger this is, the less you are going to see of the wave. So the wave 
might have dissipated esp. if it is a very tight spike.

Aside, you have many constants in your .ctl file that you are not using. 
If you are sending such a file to the group, please make sure to remove 
extraneous information and keep only what is strictly relevant to the 
problem. Makes it easier for others to read the problem and get to the 
point :-)

cheers!
Manoj



shiv chawla wrote:
> Hello Everyone
> 
> I am trying to  simulate the propagation of very short time pulse in a 
> waveguide. However, In my case I donot observe any significant field at 
> any point other than source. Please help me as I need this for Project. 
> Thank You.
> 
> (reset-meep)
> (define-param a 1e-6) ; base unit in meters (1e-6 = 
> 1 um)
> (define-param fequency-center 2e15) ; central frequency in hertz
> (define-param fequency-width 2e12)   ; consider picosecond pulse
> (define-param eps-hi 2.25) ; the slab dielectric constant
> (define-param eps-lo 1) ; the surrounding low-dielectric material
> (define-param w 2) ; the thickness of the slab (arbitrary units)
> (define-param l 50) ;the length of the slab
> 
> (define-param X 10) ; the size of the computational cell in the x direction
> (define-param Z 20) ; the size of the computational cell in the z direction
> 
> 
> 
> 
> ; Define the structure and the computational cell
> 
> ; Here we define the size of the computational cell.  Since it is 2d,
> ; it has no-size in the z direction.
> 
> (set! geometry-lattice (make lattice (size 200 10 no-size)))
> 
> ; the default-material is what fills space where we haven't placed objects
> (set! default-material (make dielectric (epsilon eps-lo)))
> 
> ; a list of geometric objects to create structures in our computational 
> cell:
> ; (in this case, we only have one object, a block to make the waveguide)
> (set! geometry
>   (list (make block ; a dielectric block (a rectangle)
>   (center 0 0 0) ; centered at origin
>   (size infinity w infinity) ; block is finite only y direction
>   (material (make dielectric (epsilon eps-hi))
> 
> 
> (set-param! resolution 10)
> 
> 
> (set! pml-layers (list (make pml (thickness 1) (direction X) (side High))
> (make pml (thickness 1) (direction X) (side Low))
> (make pml (thickness 0.1) (direction Y) (side Low))
>(make pml (thickness 0.1) (direction Y) (side 
> High
> 
> 
> (set! sources (list (make source
>   (src (make gaussian-src (frequency 1) (fwidth 0.001)))
>   (component Ez) (center -99 0
>  (use-output-directory "/home/shiv/Desktop/examples/FDTD/Output")
>  (define (Field)
>  (print "Field:, " (meep-time) ", "
>  (get-field-point Ez (vector3 -98 0 0)) ", " (get-field-point Ez 
> (vector3 0 0 0)) "\n"))  
> (run-until 2000  Field)
> 
> Regards
> Shiv
> IIT-Delhi
> 
> 
> 5, 50, 500, 5000 - Store N number of mails in your inbox. Click here. 
> 
>  
> 
> 
> 
> 
> 
> ___
> meep-discuss mailing list
> meep-discuss@ab-initio.mit.edu
> http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss

___
meep-discuss mailing list
meep-discuss@ab-initio.mit.edu
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss


Re: [Meep-discuss] Units in meep::Confused

2008-01-24 Thread Manoj Rajagopalan
Hi all,

   I'd posted this email on a different thread and now that the units 
thread has explicitly surfaced, I'm pasting my take on it so that others 
could comment on it and correct me where I'm wrong.

Length is specified as the "number of" 'a' units where 'a' is your
length-scale, usually a wavelength.

Velocities are specified as the "number" of c, where c is the speed
of light in vacuum.

These two scales therefore fix the time-scale - time is specified as
the "number of" a/c. So if a=1um, then time is specified as the "number
of" a/c=(1e-6/3e8) second intervals.

If you have a monochromatic source with time-period T expressed in
the Meep scale, i.e., T*a/c is the actual period in seconds, then 1/T is
the frequency in Meep units

Meep internally multiplies this by 2\pi to convert it to angular
frequency. We as users never need to explicitly provide this 2\pi value
because the actual frequency and angular frequency are equivalent
through this scaling transform. I believe the Meep documentation would
be much clearer if it avoids mentioning angular frequency when requiring
the real frequency as input.

The resolution is the number of intervals (Yee-cells) you want each
spatial unit 'a' to be divided into. Suppose you choose 'n' for your
resolution and your simulation "volume" to be v spatial units long. Then
you actually have n*v intervals in your simulation - the E and H fields
are distributed on the boundaries according to Yee's scheme.

Each Yee cell is therefore 1/n Meep units long which corresponds to
real length of a/n. In FDTD, no signal travels faster than speed of
light in vacuum, c. Therefore signals from one point can reach a
neighbouring point only at or after (a/n)/c = (a/cn) seconds. In Meep
units, divide by (a/c) to get 1/n to be this minimum time interval. So
you see how spatial resolution affects the time-resolution also.
Neighbouring points must be spaced so that this causality is respected.

Now, in FDTD, E fields affect H and H fields affect E. So the signal
relationships are actually between field values that are displaced by
half the extent of the Yee-cell (in each dim). So the dt now becomes
0.5/n instead of 1/n. Each FDTD iteration updates the H fields and then
updates the E fields. You could refer to this as two time steps with one
for H and one for E, or as one time-step with half for H and half for E.
   I'm not sure which convention Meep adopts.

For numerical stability a "Courant factor" multiples the 0.5/n. This
takes into account the deviation of the speed of light from its vaccuum
value of 'c' due to refractive index effects. So your time step now is
0.5S/n where S is the Courant factor.

My extrapolation of Meep units: absolute permittivity and
permeability are specified in units of \eps_0 and \mu_0, the values for
free-space. These quantities involve dimensions of mass and charge in
addition to length and time. Therefore, these units presumably fix the
mass-scale and charge-scale as well but since we don't explicitly deal
with these in usual FDTD problems, we don't "see" these scales.

cheers!
Manoj




shiv chawla wrote:
> Hello Everyone
> 
> 
> The thing which is puzzling me is units
> in meep. I have set the the meep parameter 'a' ,say to
> be,1 micrometer(1 um). Now, I donot understand about
> the base time units and frequency units. I think that
> a=1 um, sets, time = 1e-15 s. Am I interpreting it
> correctly? Also how resolution affects the time step
> and spatial step of yee's algroithm? Can you help me
> with this by an example.
> 
> Thanks
> 
> Regards
> Shiv 
> 
> 
> Forgot the famous last words? Access your message archive online. Click 
> here. 
> 
>  
> 
> 
> 
> 
> 
> ___
> meep-discuss mailing list
> meep-discuss@ab-initio.mit.edu
> http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss

___
meep-discuss mailing list
meep-discuss@ab-initio.mit.edu
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss


Re: [Meep-discuss] Units in meep::Confused

2008-01-24 Thread Manoj Rajagopalan
Hi all,

   I'd posted this email on a different thread and now that the units 
thread has explicitly surfaced, I'm pasting my take on it so that others 
could comment on it and correct me where I'm wrong.

Length is specified as the "number of" 'a' units where 'a' is your
length-scale, usually a wavelength.

Velocities are specified as the "number" of c, where c is the speed
of light in vacuum.

These two scales therefore fix the time-scale - time is specified as
the "number of" a/c. So if a=1um, then time is specified as the "number
of" a/c=(1e-6/3e8) second intervals.

If you have a monochromatic source with time-period T expressed in
the Meep scale, i.e., T*a/c is the actual period in seconds, then 1/T is
the frequency in Meep units

Meep internally multiplies this by 2\pi to convert it to angular
frequency. We as users never need to explicitly provide this 2\pi value
because the actual frequency and angular frequency are equivalent
through this scaling transform. I believe the Meep documentation would
be much clearer if it avoids mentioning angular frequency when requiring
the real frequency as input.

The resolution is the number of intervals (Yee-cells) you want each
spatial unit 'a' to be divided into. Suppose you choose 'n' for your
resolution and your simulation "volume" to be v spatial units long. Then
you actually have n*v intervals in your simulation - the E and H fields
are distributed on the boundaries according to Yee's scheme.

Each Yee cell is therefore 1/n Meep units long which corresponds to
real length of a/n. In FDTD, no signal travels faster than speed of
light in vacuum, c. Therefore signals from one point can reach a
neighbouring point only at or after (a/n)/c = (a/cn) seconds. In Meep
units, divide by (a/c) to get 1/n to be this minimum time interval. So
you see how spatial resolution affects the time-resolution also.
Neighbouring points must be spaced so that this causality is respected.

Now, in FDTD, E fields affect H and H fields affect E. So the signal
relationships are actually between field values that are displaced by
half the extent of the Yee-cell (in each dim). So the dt now becomes
0.5/n instead of 1/n. Each FDTD iteration updates the H fields and then
updates the E fields. You could refer to this as two time steps with one
for H and one for E, or as one time-step with half for H and half for E.
   I'm not sure which convention Meep adopts.

For numerical stability a "Courant factor" multiples the 0.5/n. This
takes into account the deviation of the speed of light from its vaccuum
value of 'c' due to refractive index effects. So your time step now is
0.5S/n where S is the Courant factor.

My extrapolation of Meep units: absolute permittivity and
permeability are specified in units of \eps_0 and \mu_0, the values for
free-space. These quantities involve dimensions of mass and charge in
addition to length and time. Therefore, these units presumably fix the
mass-scale and charge-scale as well but since we don't explicitly deal
with these in usual FDTD problems, we don't "see" these scales.

cheers!
Manoj




shiv chawla wrote:
> Hello Everyone
> 
> 
> The thing which is puzzling me is units
> in meep. I have set the the meep parameter 'a' ,say to
> be,1 micrometer(1 um). Now, I donot understand about
> the base time units and frequency units. I think that
> a=1 um, sets, time = 1e-15 s. Am I interpreting it
> correctly? Also how resolution affects the time step
> and spatial step of yee's algroithm? Can you help me
> with this by an example.
> 
> Thanks
> 
> Regards
> Shiv 
> 
> 
> Forgot the famous last words? Access your message archive online. Click 
> here. 
> 
>  
> 
> 
> 
> 
> 
> ___
> meep-discuss mailing list
> meep-discuss@ab-initio.mit.edu
> http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss

___
meep-discuss mailing list
meep-discuss@ab-initio.mit.edu
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss


Re: [Meep-discuss] HELP me with the output

2008-01-22 Thread Manoj Rajagopalan
hi Shiv,

   These are the functions I use to convert from real units to the meep 
system. cc-ing the Meep mailing list should anyone else want to comment 
or correct these:

(define C_0 299792458.0); m/s

(define (meepify-length real-length lscale) (/ real-length lscale))

(define (meepify-velocity real-velocity) (/ real-velocity C_0))

(define (meepify-time real-time lscale) (meepify-length (* C_0
real-time) lscale))

(define (meepify-ang-freq real-omega lscale) (/ (* real-omega lscale) (*
2.0 PI C_0))); actually expressed as real frequency \nu=1/T



   Length is specified as the "number of" 'a' units where 'a' is your 
length-scale, usually a wavelength.

   Velocities are specified as the "number" of c, where c is the speed 
of light in vacuum.

   These two scales therefore fix the time-scale - time is specified as 
the "number of" a/c. So if a=1um, then time is specified as the "number 
of" a/c=(1e-6/3e8) second intervals.

   If you have a monochromatic source with time-period T expressed in 
the Meep scale, i.e., T*a/c is the actual period in seconds, then 1/T is 
the frequency in Meep units

   Meep internally multiplies this by 2\pi to convert it to angular 
frequency. We as users never need to explicitly provide this 2\pi value 
because the actual frequency and angular frequency are equivalent 
through this scaling transform. I believe the Meep documentation would 
be much clearer if it avoids mentioning angular frequency when requiring 
the real frequency as input.

   The resolution is the number of intervals (Yee-cells) you want each 
spatial unit 'a' to be divided into. Suppose you choose 'n' for your 
resolution and your simulation "volume" to be v spatial units long. Then 
you actually have n*v intervals in your simulation - the E and H fields 
are distributed on the boundaries according to Yee's scheme.

   Each Yee cell is therefore 1/n Meep units long which corresponds to 
real length of a/n. In FDTD, no signal travels faster than speed of 
light in vacuum, c. Therefore signals from one point can reach a 
neighbouring point only at or after (a/n)/c = (a/cn) seconds. In Meep 
units, divide by (a/c) to get 1/n to be this minimum time interval. So 
you see how spatial resolution affects the time-resolution also. 
Neighbouring points must be spaced so that this causality is respected.

   Now, in FDTD, E fields affect H and H fields affect E. So the signal 
relationships are actually between field values that are displaced by 
half the extent of the Yee-cell (in each dim). So the dt now becomes 
0.5/n instead of 1/n. Each FDTD iteration updates the H fields and then 
updates the E fields. You could refer to this as two time steps with one 
for H and one for E, or as one time-step with half for H and half for E. 
  I'm not sure which convention Meep adopts.

   For numerical stability a "Courant factor" multiples the 0.5/n. This 
takes into account the deviation of the speed of light from its vaccuum 
value of 'c' due to refractive index effects. So your time step now is 
0.5S/n where S is the Courant factor.

   My extrapolation of Meep units: absolute permittivity and 
permeability are specified in units of \eps_0 and \mu_0, the values for 
free-space. These quantities involve dimensions of mass and charge in 
addition to length and time. Therefore, these units presumably fix the 
mass-scale and charge-scale as well but since we don't explicitly deal 
with these in usual FDTD problems, we don't "see" these scales.

cheers!
Manoj


shiv chawla wrote:
> Helo Manoj
> 
>   I now understand a fair amount of meep for my
> purpose. The next thing which is puzzling me is units
> in meep. I have set the the meep parameter 'a' ,say to
> be,1 micrometer(1 um). Now, I donot understand about
> the base time units and frequency units. I think that
> a=1 um, sets, time = 1e-15 s. Am I interpreting it
> correctly? Also how resolution affects the time step
> and spatial step of yee's algroithm? Can you help me
> with this by an example.
> 
> Thanks
> 
> Regards
> Shiv 


___
meep-discuss mailing list
meep-discuss@ab-initio.mit.edu
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss


Re: [Meep-discuss] HELP me with the output

2008-01-21 Thread Manoj Rajagopalan
One of the reasons for seeing a pulse multiple times could be 
reflections. In your case, your PML is 2 cells wide (thickness is 0.1 at 
resolution of 20). How about making your PML thickness 1.0 instead?

Your pulse could be bouncing back and forth between the two Y walls 
inside your dielectric.

Another thing you could do is to use

(at-every 50 (output-png Ez "-Zc dkbluered")) in your (run-until...) 
statement so that you can confirm this reflection hypothesis from the 
images.

If you use linux and/or cygwin and you have ImageMagick installed then 
you can animate your images using:

   animate -delay 10 -pause 2 -ez*.png


-- Manoj




shiv chawla wrote:
> Hello Everyone
> 
> I am trying to simulate propagation of gaussian pulse in a dielectric 
> slab. I have added PML boundary on the right edge (at the end of 
> computational domain)..I am interested in observing Electric Field at 
> any given point however I see the same pulse several times in the output 
> (the pulse should appear once at a point). This is my code
> 
> (
> 
> 
> 
> ; Define the structure and the computational cell
> 
> ; Here we define the size of the computational cell.  Since it is 2d,
> ; it has no-size in the z direction.
> 
> (set! geometry-lattice (make lattice (size 20 10 no-size)))
> 
> ; the default-material is what fills space where we haven't placed objects
> (set! default-material (make dielectric (epsilon 1)))
> 
> ; a list of geometric objects to create structures in our computational 
> cell:
> ; (in this case, we only have one object, a block to make the waveguide)
> (set! geometry
>   (list (make block ; a dielectric block (a rectangle)
>   (center 0 0 0) ; centered at origin
>   (size infinity 2 infinity)
>   (material (make dielectric (epsilon 2))
> 
> 
> (set-param! resolution 20)
> 
> 
> (set! pml-layers (list (make pml (thickness 0.1) (direction X) (side High)
>(make pml (thickness 0.1) (direction Y) (side Low))
>(make pml (thickness 0.1) (direction Y) (side 
> High)
>
> (define-param fcen 0.1)
> (define-param df 0.15)
> (set! sources (list (make source
>   (src (make gaussian-src (frequency fcen) (fwidth df)))
>   (component Ez) (center -9 0
> 
>  (define (Field)
>  (print "Field:, " (meep-time) ", "
>  (get-field-point Ez (vector3 5 0 0)) "\n"))
> 
> (run-until 1000 Field)
> 
> 
> 
> What should be done in order to observe pulse only once at any point???
> 
> Thanks
> 
> Regards
> Shiv
> IIT -Delhi
> 
> 
> Get the freedom to save as many mails as you wish. Click here to know 
> how. 
> 
>  
> 
> 
> 
> 
> 
> ___
> meep-discuss mailing list
> meep-discuss@ab-initio.mit.edu
> http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss

___
meep-discuss mailing list
meep-discuss@ab-initio.mit.edu
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss


Re: [Meep-discuss] About the "procedure cdr" and .ctl debugging

2008-01-19 Thread Manoj Rajagopalan
Hi Francisco,

   "car" and "cdr" are list-access/manipulation functions in 
Lisp/Scheme, if I remember my functional programming correctly. Try 
looking up references related to these to understand the error messages.

cheers
Manoj


Francisco Cordobés wrote:
> Dear list,
> 
> I've been wondering since I started using meep how I can debug a ctl 
> file, because meep just says that "such procedure" has an error or 
> something similar and doesn't give a clue about where to find the actual 
> error(a line number or something like that). When it is an "if" 
> procedure, I know where to look but now I'm getting "In procedure cdr" 
> error and I have no idea what that cdr means. I've found no mention to 
> cdr in Meep reference and I don't know where to look for it. Any idea?
> 
> By the way, I use vim, does anyone else uses it and has ctl/scheme files 
> support? I just get initial and final parenthesis highlighted and I 
> think it would be easier to work with it if I have full language support.
> 
> Thank you, Fco. Cordobés-Aguilar
> 
> 
> 
> 
> ___
> meep-discuss mailing list
> meep-discuss@ab-initio.mit.edu
> http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss

___
meep-discuss mailing list
meep-discuss@ab-initio.mit.edu
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss


[Meep-discuss] Units for polarizability components

2008-01-18 Thread Manoj Rajagopalan
Hi all,

Meep's polarizabilities are specified using omega, gamma, 
delta-epsilon, sigma etc. Should the gamma be specified in units of c/a 
or 2PI*c/a?

This doubt stems from the Johnson and Christy paper on optical 
constants for noble metals where gamma is specified as 1/tau where tau 
is the relaxation time. By this token gamma is just a frequency. But 
because it appears in an expression involving sums and products of 
angular frequencies, the question is if Meep treats gamma to be an 
angular frequency and applies the factor of 2PI internally as with 
normal angular frequencies.

Thanks
Manoj

___
meep-discuss mailing list
meep-discuss@ab-initio.mit.edu
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss


[Meep-discuss] MEEP: complex dielectric constant

2008-01-17 Thread Manoj Rajagopalan
Hi Dr. Johnson and other MEEP/FDTD knowledgeables,

   I was thinking about why MEEP should allow only a real dielectric 
constant. In the monochromatic case it would make sense to evaluate the 
dielectric function at the frequency-of-interest \omega_0 and plug that 
into Maxwell's equations, simplify, and solve but in the most general 
case, a complex value would be required.

   The magnitude of \eps(\omega_0) is absolute permittivity while the 
phase shows how much time the D field lags the E field by which is 
constrained to one time-period because the system is a forced 
oscillator). Please correct me if I am wrong here.

   Getting MEEP to support this would then entail a modification to the 
D-field data structure to store the values of the field for all previous 
time-steps that fall within the interval corresponding to the phase. Is 
this correct?

   How does the representation of the dielectric function in a 
Kramers-Kronig compatible manner ensure that we don't need so much 
memory? In MEEP's "sum-of-Lorentzians" model, each Lorentzian ensures 
that the K-K relations are satisfied. Also, they arise from damped 
harmonic oscillator equations so we can "get away with" storing 
polarizations for just two time steps in the past. So would a 
memory-efficient way to trick MEEP into performing a monochromatic 
simulation be fitting a fictitious Lorentzian to pass through our 
\eps(\omega_0) point? Would this obviate the need to specially implement 
the complex \eps constant case?

   Of course this would be done only if it is difficult to fit the real 
material function to a weighted sum of Lorentzians as is the case with 
transition metals like Au, Ag etc. Please correct me if I am wrong here.

___
meep-discuss mailing list
meep-discuss@ab-initio.mit.edu
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss


Re: [Meep-discuss] MEEP installation problem

2008-01-17 Thread Manoj Rajagopalan
Looks like a guile/guile-devel version mismatch to me. Your install
command failed because there was an existing version.

Instead of "yum install" try "yum update"

cheers
Manoj


Jiha Sung wrote:
> Dear MEEP Helper:
>  
> Recently I have been trying to install MEEP and related interfaces into 
> a Linux(Fedora 7). I followed the instructions in web pages and I think 
> everything was installed. Summary of my MEEP installation procedure is 
> listed at the end of this mail. However, when I tested the first example 
> in the MEEP tutorial page 
> (http://ab-initio.mit.edu/wiki/index.php/Meep_Tutorial ). I do not get 
> the right output. I wrote the input, outputs, and error messages below. 
> Can somebody tell me what is wrong?
>  
> Input file (ex1.ctl);
>   (reset-meep)
>   (set! geometry-lattice (make lattice (size 16 8 no-size)))
>   (set! geometry (list
>   (make block (center 0 0) (size infinity 1 infinity)
>   (material (make dielectric (epsilon 12))
>   (set! source (list
>   (make source
>   (src (make continuous-src (frequency 0.15)))
>   (component Ez)
>   (center -7 0
>   (set! pml-layers (list (make pml (thickness 1.0
>   (set! resolution 10)
>   (run-until 200
> (at-beginning output-epsilon)
> (at-end output-efield-z))
>  
> Output message:
>   ---
>Initializing structure...
>   Working in 2D dimensions.
> block, center = (0,0,0)
> size (1e+20,1,1e+20)
> axes (1,0,0), (0,1,0), (0,0,1)
>dielectric constant epsilon = 12
>  time for set_epsilon = 0.0223849 s
>  ---
>creating output file "./ex1-eps-00.00.h5"...
>creating output file "./ex1-ez-000200.00.h5"...
>run 0 finished at t = 200.0 (4000 timesteps)
>Elapsed run time = 0.191832 s
> Deprecated error message:
>   SCM_STRINGP is deprecated.  Use scm_is_string instead.
>   SCM_STRING_LENGTH is deprecated.  Use scm_c_string_length instead.
>   scm_must_malloc is deprecated.  Use scm_gc_malloc and scm_gc_free 
> instead.
>   SCM_STRING_CHARS is deprecated.  See the manual for alternatives.
>   scm_must_free is deprecated.  Use scm_gc_malloc and scm_gc_free 
> instead.
> Outputs:
> ex1-eps-00.00.h5 looks O.K.
> ex1-ez-000200.00.h5 shows all 0's (when converted using "h5totxt")
>  
> Thanks in advance.
>  
> Jiha
>  
> 
> Summary of MEEP installation (Jan. 8 – Jan. 12, 2007)
>  
> For the functions of the programs to be installed, please read the MEEP 
> installation page.
> (http://ab-initio.mit.edu/wiki/index.php/Meep_Installation )
> 1. Installing guile (This installation is not difficult)
> In any root directories,
> % yum list | grep guile
> % yum install guile-devel.x86.64
> % guile --version → It shows guile 1.8.1 is installed
> 2. Installing libctl (This installation is not difficult.)
> Downloaded “libctl-3.0.2.tar.tar” into /root/Download.
> In /root/Download,
> % tar –xvf libctl-3.0.2
> % mv libctl-3.0.2 ..
> % cd /root/libctl-3.0.2
> % ./configure
>   (If there comes error messages “Permission denied”,
> then “configure” file should be made executable;
> % chmod 744 configure
> % chmod 744 install-sh )
> % make
> % make install
>  This produced “gen-ctl-io” in /usr/local/bin,
> “libctl.a”, “libctlgeom.a”, “libctlgeom.1a”, libctl.la” 
> in /usr/local/lib
> “ctlgeom.h”, “ctl-geom-types.h”, “ctl.h” in 
> /usr/local/include
> “gen-ctl-io.1” in /usr/local/man/man1
>   many files in /usr/local/share/libctl/base and 
> /usr/local/share/libctl/utils
> 3. Installing hdf5 (This installation needs care.)
> I followed the instructions of SCI institute web page
>  
> (http://software.sci.utah.edu/doc/Installation/Guide/osx/sec.sr_hdf5_build.html
>  
> ).
> There are also instructions in CBLFS web pages 
> (http://cblfs.cross-lfs.org/index.php/HDF5 and 
> http://cblfs.cross-lfs.org/index.php/H5utils).
>  % Downloaded “hdf5-1.6.6.tar.gz” into /root/Download
>  In the /root/Download directory,
>  % gunzip < hdf5-1.6.6.tat.gz | tar xf
>  % cd /root/hdf5-1.6.6
>  % CC=gcc
>  % CXX=g++
>  % export CC CXX
>  % ./configure --enable-threadsafe --with-pthread=/usr --prefix=/usr/local
>  % make all
>  % make install
>  This produced files in /usr/local/bin, /usr/local/lib, /usr/local/doc.
> Finally, the followings are needed; check if there is a line 
> /usr/local/lib in
> /etc/ld.so.conf and run /sbin/ldconfig.
> 4. Installing libpng and libpng-devel
> This is needed to install “h5toping” in h5utils package. “libpng” is 
> usually installed in Linux systems, but the header files need to be 
> installed through “libpng-devel”.
>  % yum list | grep libpng

Re: [Meep-discuss] what does density of states mean?

2008-01-17 Thread Manoj Rajagopalan
Please correct me here if I am wrong:

How the EM case differs from the QM case is in the occupation of these 
modes. Since we are talking photons which are bosons, the occupation 
statistics for each mode will work differently - there can be any number 
of photons occupying a mode whereas in QM there can only be one electron 
occupying any mode (or 2 in "degenerate" approximations where we ignore 
spin).

If there can be any number of photons occupying a mode, how is the DOS 
information helpful? In cases where the DOS is zero, say in photonic 
crystals, we have an interpretation that no modes can exist.

Also, I just looked up the ED book by Jackson and he makes no mention of 
DOS. Is there any reference which introduces this concept and discusses 
how it is useful?

Thanks
Manoj



Robert Rehammar wrote:
> Means the same here. The number of modes available.
> 
> Regards,
> \\Robert Rehammar
> 
> On Thu, 2008-01-17 at 10:02 -0500, Manoj Rajagopalan wrote:
>> Hi all,
>>
>>Could someone clarify the meaning of this term? I'm aware of what it 
>> means in quantum mechanics.
>>
>> Any useful links/resources?
>>
>> thanks
>> Manoj
>>
>> ___
>> meep-discuss mailing list
>> meep-discuss@ab-initio.mit.edu
>> http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss

___
meep-discuss mailing list
meep-discuss@ab-initio.mit.edu
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss


[Meep-discuss] what does density of states mean?

2008-01-17 Thread Manoj Rajagopalan
Hi all,

   Could someone clarify the meaning of this term? I'm aware of what it 
means in quantum mechanics.

Any useful links/resources?

thanks
Manoj

___
meep-discuss mailing list
meep-discuss@ab-initio.mit.edu
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss


Re: [Meep-discuss] Hdf5 and meep -- hdf5 failing

2008-01-17 Thread Manoj Rajagopalan
You might have to tell mpirun (or whatever load-manager your cluster 
uses) the max file-size per node that you expect. I've run into issues 
in my cluster where we use a PBS script to submit jobs and we are 
required to tell PBS the upper limits on resources we expect to use so 
that the scheduler can work properly.

cheers
Manoj


Baker D.J. wrote:
> Hello,
> 
> I'm installing meep for one of the users of our HPC cluster, and we're 
> finding that one of the meep (test) examples fails for some reason. This is 
> very difficult -- I'm neither a parallel hdf5 or meep user. I can tell you 
> that I have compiled hdf5 and meep using the same version of (GNU compiled) 
> mpich (1.2.6). Running this test
> 
> mpirun -machinefile machinefile 
> /local/software/meep/0.10.1/gcc-3.4.4/bin/meep-mpi bend-flux.ctl
> 
> we find that hdf5 is failing to open a file for some reason -- or at least it 
> appears that way. We get the trace as shown below as part of the output of 
> the above command. Could anyone in the hdf5 or meep support 
> groups/communities please advise us regarding this issue.
> 
> Thanks & Regards -- David Baker.
> 
> HDF5-DIAG: Error detected in HDF5 library version: 1.6.6 MPI-process 0.  Back 
> trace follows.
>   #000: H5F.c line 2049 in H5Fopen(): unable to open file
> major(04): File interface
> minor(17): Unable to open file
>   #001: H5F.c line 1726 in H5F_open(): unable to open file
> major(04): File interface
> minor(17): Unable to open file
>   #002: H5FD.c line 1045 in H5FD_open(): open failed
> major(22): Virtual File Layer
> minor(29): Unable to initialize object
>   #003: H5FDsec2.c line 367 in H5FD_sec2_open(): unable to open file
> major(04): File interface
> minor(17): Unable to open file
>   #004: H5FDsec2.c line 367 in H5FD_sec2_open(): No such file or directory
> major(03): Internal HDF5 error
> minor(87): System error message
> meep: error on line 249 of h5file.cpp: error opening HDF5 input file
> [0] MPI Abort by user Aborting program !
> [0] Aborting program!
> p0_26999:  p4_error: : 1
> 
> 
> 
> 
> 
> 
> ___
> meep-discuss mailing list
> meep-discuss@ab-initio.mit.edu
> http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss
> 
> 

___
meep-discuss mailing list
meep-discuss@ab-initio.mit.edu
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss


Re: [Meep-discuss] unable to compile libctl

2008-01-17 Thread Manoj Rajagopalan
Do you have the guile-devel package installed?

-- Manoj


shiv chawla wrote:
> hello
> 
> I am trying to compile libctl on cygwin for usage in meep. I am unable 
> to do so.
> 
> It states something like this
> 
> 
> [EMAIL PROTECTED] /libctl-3.0.2
> $ ./configure --prefix=/usr/local
> checking for a BSD-compatible install... /usr/bin/install -c
> checking whether build environment is sane... yes
> checking for gawk... gawk
> checking whether make sets $(MAKE)... yes
> checking build system type... i686-pc-cygwin
> checking host system type... i686-pc-cygwin
> checking for style of include used by make... GNU
> checking for gcc... gcc
> checking for C compiler default output file name... a.exe
> checking whether the C compiler works... yes
> checking whether we are cross compiling... no
> checking for suffix of executables... .exe
> checking for suffix of object files... o
> checking whether we are using the GNU C compiler... yes
> checking whether gcc accepts -g... yes
> checking for gcc option to accept ANSI C... none needed
> checking dependency style of gcc... gcc3
> checking for a sed that does not truncate output... /usr/bin/sed
> checking for egrep... grep -E
> checking for ld used by gcc... /usr/i686-pc-cygwin/bin/ld.exe
> checking if the linker (/usr/i686-pc-cygwin/bin/ld.exe) is GNU ld... yes
> checking for /usr/i686-pc-cygwin/bin/ld.exe option to reload object 
> files... -r
> checking for BSD-compatible nm... /usr/bin/nm -B
> checking whether ln -s works... yes
> checking how to recognise dependent libraries... file_magic ^x86 archive 
> import|
> ^x86 DLL
> checking how to run the C preprocessor... gcc -E
> checking for ANSI C header files... yes
> checking for sys/types.h... yes
> checking for sys/stat.h... yes
> checking for stdlib.h... yes
> checking for string.h... yes
> checking for memory.h... yes
> checking for strings.h... yes
> checking for inttypes.h... yes
> checking for stdint.h... yes
> checking for unistd.h... yes
> checking dlfcn.h usability... yes
> checking dlfcn.h presence... yes
> checking for dlfcn.h... yes
> checking for g++... g++
> checking whether we are using the GNU C++ compiler... yes
> checking whether g++ accepts -g... yes
> checking dependency style of g++... gcc3
> checking how to run the C++ preprocessor... g++ -E
> checking for g77... g77
> checking whether we are using the GNU Fortran 77 compiler... yes
> checking whether g77 accepts -g... yes
> checking the maximum length of command line arguments... 8192
> checking command to parse /usr/bin/nm -B output from gcc object... ok
> checking for objdir... .libs
> checking for ar... ar
> checking for ranlib... ranlib
> checking for strip... strip
> checking if gcc static flag  works... yes
> checking if gcc supports -fno-rtti -fno-exceptions... no
> checking for gcc option to produce PIC...
> checking if gcc supports -c -o file.o... yes
> checking whether the gcc linker (/usr/i686-pc-cygwin/bin/ld.exe) 
> supports shared
>  libraries... yes
> checking dynamic linker characteristics... Win32 ld.exe
> checking how to hardcode library paths into programs... immediate
> checking whether stripping libraries is possible... yes
> checking if libtool supports shared libraries... yes
> checking whether to build shared libraries... no
> checking whether to build static libraries... yes
> configure: creating libtool
> appending configuration tag "CXX" to libtool
> checking for ld used by g++... /usr/i686-pc-cygwin/bin/ld.exe
> checking if the linker (/usr/i686-pc-cygwin/bin/ld.exe) is GNU ld... yes
> checking whether the g++ linker (/usr/i686-pc-cygwin/bin/ld.exe) 
> supports shared
>  libraries... yes
> checking for g++ option to produce PIC...
> checking if g++ supports -c -o file.o... yes
> checking whether the g++ linker (/usr/i686-pc-cygwin/bin/ld.exe) 
> supports shared
>  libraries... yes
> checking dynamic linker characteristics... Win32 ld.exe
> checking how to hardcode library paths into programs... immediate
> checking whether stripping libraries is possible... yes
> appending configuration tag "F77" to libtool
> checking if libtool supports shared libraries... yes
> checking whether to build shared libraries... no
> checking whether to build static libraries... yes
> checking for g77 option to produce PIC...
> checking if g77 supports -c -o file.o... yes
> checking whether the g77 linker (/usr/i686-pc-cygwin/bin/ld.exe) 
> supports shared
>  libraries... yes
> checking dynamic linker characteristics... Win32 ld.exe
> checking how to hardcode library paths into programs... immediate
> checking whether stripping libraries is possible... yes
> checking for gcc... (cached) gcc
> checking whether we are using the GNU C compiler... (cached) yes
> checking whether gcc accepts -g... (cached) yes
> checking for gcc option to accept ANSI C... (cached) none needed
> checking dependency style of gcc... (cached) gcc3
> checking for indent... no
> checking for gindent... no
> checking for ANSI C header files... (cached) yes
> 

Re: [Meep-discuss] What is "Geometric objects and scene"?

2008-01-16 Thread Manoj Rajagopalan
Objects such as blocks, cylinders, cones etc. are geometric objects. 
Look up the MEEP libctl reference for a list of allowed types.

A collection and arrangement of these in your simulation volume is the 
scene. You will find the term "scene" used in a similar manner in 
computer graphics (and movies!) as well.

Your waveguide will be composed of several simpler geometric objects. 
Write prototypes of your program with the libctl interface to see how 
you can couple material functions with geometric objects to build your 
waveguide.

The libctl interface is a nice, quick way to learn how to use MEEP and 
how its internal data structures would interact.

-- Manoj


Mani Chandra wrote:
> Hi!
>  What excatly is this feature "Geometric objects and scene"?Is this 
> necessary for setting up parameters such as waveguide dimensions etc...
> 
> Mani chandra
> 
> 
> 
> Get the freedom to save as many mails as you wish. Click here to know 
> how. 
> 
>  
> 
> 
> 
> 
> 
> ___
> meep-discuss mailing list
> meep-discuss@ab-initio.mit.edu
> http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss

___
meep-discuss mailing list
meep-discuss@ab-initio.mit.edu
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss


Re: [Meep-discuss] MEEP's C++ interfaces

2008-01-16 Thread Manoj Rajagopalan
I'm in the process of decrypting MEEP's C++ part. what I dig up I add to 
the C++ reference wiki page.

MEEP's interface with libctl is in the libctl/ subdir, not in the src/ 
subdir. Also, some of the header files are generated from basic 
specifications in the hsrc/ subdir using Haskell (ghc).

Scene management is done by libctl's C back-end. Look up the ctlgeom.h 
file in /usr/include or /usr/include/ctl on Fedora systems. If you have 
a handle on that API you can leverage that to manipulate your scene. 
There is one more file - ctlgeom-types.h.

I haven't yet found if there could be a replacement - it looks like we 
could use our custom scene-management library as long as we 
appropriately instantiate classes like structure, fields etc. This has 
been on my mind for sometime but I'm still lost somewhere inside the 
MEEP C++ code. Find me  :-)

As of now, the transfer of control from libctl to the C++ backend is 
still not clear to me.

cheers!
Manoj



Mani Chandra wrote:
> Hi!
>  It seems that there isn't a lot of info about the C++ interfaces for 
> MEEP.I did check the meep.pdf file and the links on the meep home page 
> but it looks like the libctl interface has much a better 
> documentation.Are the C++ interfaces similar to that of the libctl 
> interfaces,I mean do the functions in the .hpp files have the same names 
> and functionality as that of the libctl interfaces, so that I can refer 
> to the libctl's documentation.Also, in the C++ reference page it was 
> given that "geometric objects and scene" functionality is given by 
> libctl's functions.Does that mean that one cannot use this feature if 
> one compiles with the --without-libctl option?If not ,is there a 
> replacement?
> 
> regards,
> Mani chandra
> Physics sophomore
> IIT kanpur
> 
> 
> 
> Meet people who discuss and share your passions. Join them now. 
>  
> 
> 
> 
> 
> 
> ___
> meep-discuss mailing list
> meep-discuss@ab-initio.mit.edu
> http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss

___
meep-discuss mailing list
meep-discuss@ab-initio.mit.edu
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss


Re: [Meep-discuss] hdf5 error in meep: unable to create files.....

2008-01-15 Thread Manoj Rajagopalan
What about read/write permissions to the directories?

-- Manoj


shiv chawla wrote:
> hello
> 
> I am using kubuntu gutsy on intel32 machine. I have installed meep on my 
> computer. This works fine for 3r harmonic .ctl from examples however, it 
> fails for all other files in meep examples and gives error:
> 
> HDF5-DIAG: Error detected in HDF5 library version: 1.6.5 thread 
> 3067946688.  Back trace follows.
>   #000: ../../../src/H5F.c line 2048 in H5Fopen(): unable to open file
> major(04): File interface
> minor(17): Unable to open file
>   #001: ../../../src/H5F.c line 1725 in H5F_open(): unable to open file
> major(04): File interface
> minor(17): Unable to open file
>   #002: ../../../src/H5FD.c line 1044 in H5FD_open(): open failed
> major(22): Virtual File Layer
> minor(29): Unable to initialize object
>   #003: ../../../src/H5FDsec2.c line 366 in H5FD_sec2_open(): unable to 
> open file
> major(04): File interface
> minor(17): Unable to open file
>   #004: ../../../src/H5FDsec2.c line 366 in H5FD_sec2_open(): No such 
> file or directory
> major(03): Internal HDF5 error
> minor(87): System error message
> meep: error on line 243 of ../../../src/h5file.cpp: error opening HDF5 
> input file
> 
> Could you please help me with this problem? I thank you in anticipation 
> of a quick reply. I need to use meep urgently for my project.
> 
> Regards
> Shiv
> 
> 
> Get the freedom to save as many mails as you wish. Click here to know 
> how. 
> 
>  
> 
> 
> 
> 
> 
> ___
> meep-discuss mailing list
> meep-discuss@ab-initio.mit.edu
> http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss

___
meep-discuss mailing list
meep-discuss@ab-initio.mit.edu
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss


Re: [Meep-discuss] hdf5 error in meep: unable to create files.....

2008-01-15 Thread Manoj Rajagopalan
Are you out of disk space? Some HDF5 files can be huge.

-- Manoj


shiv chawla wrote:
> hello
> 
> I am using kubuntu gutsy on intel32 machine. I have installed meep on my 
> computer. This works fine for 3r harmonic .ctl from examples however, it 
> fails for all other files in meep examples and gives error:
> 
> HDF5-DIAG: Error detected in HDF5 library version: 1.6.5 thread 
> 3067946688.  Back trace follows.
>   #000: ../../../src/H5F.c line 2048 in H5Fopen(): unable to open file
> major(04): File interface
> minor(17): Unable to open file
>   #001: ../../../src/H5F.c line 1725 in H5F_open(): unable to open file
> major(04): File interface
> minor(17): Unable to open file
>   #002: ../../../src/H5FD.c line 1044 in H5FD_open(): open failed
> major(22): Virtual File Layer
> minor(29): Unable to initialize object
>   #003: ../../../src/H5FDsec2.c line 366 in H5FD_sec2_open(): unable to 
> open file
> major(04): File interface
> minor(17): Unable to open file
>   #004: ../../../src/H5FDsec2.c line 366 in H5FD_sec2_open(): No such 
> file or directory
> major(03): Internal HDF5 error
> minor(87): System error message
> meep: error on line 243 of ../../../src/h5file.cpp: error opening HDF5 
> input file
> 
> Could you please help me with this problem? I thank you in anticipation 
> of a quick reply. I need to use meep urgently for my project.
> 
> Regards
> Shiv
> 
> 
> Get the freedom to save as many mails as you wish. Click here to know 
> how. 
> 
>  
> 
> 
> 
> 
> 
> ___
> meep-discuss mailing list
> meep-discuss@ab-initio.mit.edu
> http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss

___
meep-discuss mailing list
meep-discuss@ab-initio.mit.edu
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss


Re: [Meep-discuss] (no subject)

2008-01-13 Thread Manoj Rajagopalan
This is my best guess:

You system probably has multi-threading enabled. gcc can compile to 
exploit that. I'm guessing the -pthread flag is passed to the compiler 
to invoke some pragmas that include bookkeeping essential for threading 
using the pthreads library and/or include the relevant header-files and 
  paths.

The -lpthread obviously tells gcc to link to the pthreads library.

I'm just surprised that your pkg-config files don't include this info.

Perhaps your HDF5 got built with pthreads and your main application that 
you are linking HDF5 to must include pthreads support to complete the 
dependency chain.

cheers!
Manoj


Mani Chandra wrote:
> Hey Manoj!
>  Thanks for that tip.It now works!..I thought I'd have to start 
> installing again on a clean slate but I guess I can start working 
> now.Though I still like to install everything into a directory and use 
> it from there cause I still dont have harminv etc..
> Could you tell me why adding -pthread and -lpthread worked??
> Thanks
> Mani chandra
> 
> --- On *Sun, 13/1/08, Manoj Rajagopalan /<[EMAIL PROTECTED]>/* wrote:
> 
> From: Manoj Rajagopalan <[EMAIL PROTECTED]>
> Subject: Re: [Meep-discuss] (no subject)
> To: meep-discuss@ab-initio.mit.edu
> Date: Sunday, 13 January, 2008, 8:21 PM
> 
> Try adding the -pthread and -lpthread options to your compilation 
> command line
> 
> -- Manoj
> 
> 
> Mani Chandra wrote:
> >
>  Hi!
> > After resolving the eps() issue the pthread thing cropped up 
> > again!...Initially I thought it was because I commented out some lines 
> > but this time it's appearing even when I try to compile the full
> program...
> > 
> > #include 
> > using namespace meep;
> > double eps(const vec &p);
> > int main(int argc,char **argv)
> > {
> > initialize mpi(argc,argv);
> > double resolution=20;
> > volume v = vol2d(5,10,resolution);
> > structure s(v,eps,pml(1.0));
> > fields f(&s);
> > 
> > f.output_hdf5(Dielectric,v.surroundings());
> > 
> > double freq = 0.3,fwidth=0.1;
> > gaussian_src_time src(freq,fwidth);
> > f.add_point_source(Ey,src,vec(1.1,2.3));
> > while (f.time() < f.last_source_time())
> > {
> > f.step();
> > }
> > 
> >
>  f.output_hdf5(Hz,v.surroundings());
> >
> > return 0;
> > }
> > 
> > double eps(const vec &p)
> > {
> > if (p.x() < 2 && p.y() < 3)
> > return 12.0;
> > return 1.0;
> > }
> > 
> > [EMAIL PROTECTED] /usr/home/mc/MEEP files]# g++ `pkg-config --cflags 
> meep` 
> > test1.cpp -o test1 `pkg-config --libs meep`
> > /usr/local/lib/libhdf5.so: undefined reference to `pthread_equal'
> > /usr/local/lib/libhdf5.so: undefined reference to
> `pthread_setcancelstate'
> > 
> > Thanks for all the help:)
> > Mani chandra
> > Physics sophomore
> > IIT Kanpur
> > 
> > 
> > 
> > Save all your chat conversations. Find them online. 
> >
> 
> <http://in.rd.yahoo.com/tagline_webmessenger_3/*http://in.messenger.yahoo.com/webmessengerpromo.php>
> 
> > 
> >
>  
> > 
> > 
> > 
> > ___
> > meep-discuss mailing list
> > meep-discuss@ab-initio.mit.edu
> > http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss
> 
> ___
> meep-discuss mailing list
> meep-discuss@ab-initio.mit.edu
> http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss
> 
> 
> 
> 5, 50, 500, 5000 - Store N number of mails in your inbox. Click here. 
> <http://in.rd.yahoo.com/tagline_mail_4/*http://help.yahoo.com/l/in/yahoo/mail/yahoomail/tools/tools-08.html/>
>  
> 
> 
> 
> 
> 
> ___
> meep-discuss mailing list
> meep-discuss@ab-initio.mit.edu
> http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss

___
meep-discuss mailing list
meep-discuss@ab-initio.mit.edu
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss


Re: [Meep-discuss] Help!

2008-01-13 Thread Manoj Rajagopalan
I forgot to add, setting CPPFLAGS etc on the command line should 
initialize the string of options passed to gcc during the make phase - 
these should be options first passed to the gcc invocation on the 
command line. You can confirm this by searching config.log for the exact 
line. So gcc should search the dirs you specified first before looking 
up the standard dirs.

-- Manoj



Manoj Rajagopalan wrote:
> In your meep "unpack" dir, run
> 
> ./configure --help
> 
> Look at the documentation for CFLAGS, CPPFLAGS, CXXFLAGS, LDFLAGS. You 
> might just need to set CPPFLAGS and LDFLAGS but if that doesn't work try 
> setting the others too to point to the structure inside your home dir.
> 
>On the gcc command line if you specify include and library-search 
> directories, gcc first searches those before looking inside the standard 
> directories  - I vaguely remember reading this somewhere. Look up the 
> GCC manual for accurate specifications.
> 
> In your case it is going to be hard to tell whether gcc actually 
> used your home dir files to link against or if it went to 
> /usr/local/{bin,lib}. I'd suggest you rename or remove the 
> /usr/local/bin files, compile and link to the ones in your home dir, and 
> restore them later.
> 
>Does someone know a better way of doing this?
> 
> cheers!
> Manoj
> 
> 
> 
> Mani Chandra wrote:
>> Hi
>> I'm trying to install all the requisite files,libs etc..into a directory 
>> in my home .Now suppose I installed HDF5 in this directory,how do I make 
>> the ./configure script of  h5utils search for the requisites in this 
>> particular folder and not my /usr/local/bin/... etc cause I've installed 
>> there too but I want to just start out the installation fresh and do 
>> everything in this particular directory.Also I want to make the 
>> ./configure script of meep too to search in this folder and not the 
>> standard folders cause I did the installation before and I messed things 
>> up...
>>
>> And while compiling files how do I make the compiler search only in this 
>> folder for the libs,include etc and not the standard locations?
>> Thx..
>> Mani chandra
>>
>>
>> 
>> Forgot the famous last words? Access your message archive online. Click 
>> here. 
>> <http://in.rd.yahoo.com/tagline_webmessenger_4/*http://in.messenger.yahoo.com/webmessengerpromo.php>
>>  
>>
>>
>>
>> 
>>
>> ___
>> meep-discuss mailing list
>> meep-discuss@ab-initio.mit.edu
>> http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss
> 
> ___
> meep-discuss mailing list
> meep-discuss@ab-initio.mit.edu
> http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss
> 
> 

___
meep-discuss mailing list
meep-discuss@ab-initio.mit.edu
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss


Re: [Meep-discuss] Help!

2008-01-13 Thread Manoj Rajagopalan
In your meep "unpack" dir, run

./configure --help

Look at the documentation for CFLAGS, CPPFLAGS, CXXFLAGS, LDFLAGS. You 
might just need to set CPPFLAGS and LDFLAGS but if that doesn't work try 
setting the others too to point to the structure inside your home dir.

   On the gcc command line if you specify include and library-search 
directories, gcc first searches those before looking inside the standard 
directories  - I vaguely remember reading this somewhere. Look up the 
GCC manual for accurate specifications.

In your case it is going to be hard to tell whether gcc actually 
used your home dir files to link against or if it went to 
/usr/local/{bin,lib}. I'd suggest you rename or remove the 
/usr/local/bin files, compile and link to the ones in your home dir, and 
restore them later.

   Does someone know a better way of doing this?

cheers!
Manoj



Mani Chandra wrote:
> Hi
> I'm trying to install all the requisite files,libs etc..into a directory 
> in my home .Now suppose I installed HDF5 in this directory,how do I make 
> the ./configure script of  h5utils search for the requisites in this 
> particular folder and not my /usr/local/bin/... etc cause I've installed 
> there too but I want to just start out the installation fresh and do 
> everything in this particular directory.Also I want to make the 
> ./configure script of meep too to search in this folder and not the 
> standard folders cause I did the installation before and I messed things 
> up...
> 
> And while compiling files how do I make the compiler search only in this 
> folder for the libs,include etc and not the standard locations?
> Thx..
> Mani chandra
> 
> 
> 
> Forgot the famous last words? Access your message archive online. Click 
> here. 
> 
>  
> 
> 
> 
> 
> 
> ___
> meep-discuss mailing list
> meep-discuss@ab-initio.mit.edu
> http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss

___
meep-discuss mailing list
meep-discuss@ab-initio.mit.edu
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss


Re: [Meep-discuss] (no subject)

2008-01-13 Thread Manoj Rajagopalan
Try adding the -pthread and -lpthread options to your compilation 
command line

-- Manoj


Mani Chandra wrote:
> Hi!
> After resolving the eps() issue the pthread thing cropped up 
> again!...Initially I thought it was because I commented out some lines 
> but this time it's appearing even when I try to compile the full program...
> 
> #include 
> using namespace meep;
> double eps(const vec &p);
> int main(int argc,char **argv)
> {
> initialize mpi(argc,argv);
> double resolution=20;
> volume v = vol2d(5,10,resolution);
> structure s(v,eps,pml(1.0));
> fields f(&s);
> 
> f.output_hdf5(Dielectric,v.surroundings());
> 
> double freq = 0.3,fwidth=0.1;
> gaussian_src_time src(freq,fwidth);
> f.add_point_source(Ey,src,vec(1.1,2.3));
> while (f.time() < f.last_source_time())
> {
> f.step();
> }
> 
> f.output_hdf5(Hz,v.surroundings());
>
> return 0;
> }
> 
> double eps(const vec &p)
> {
> if (p.x() < 2 && p.y() < 3)
> return 12.0;
> return 1.0;
> }
> 
> [EMAIL PROTECTED] /usr/home/mc/MEEP files]# g++ `pkg-config --cflags meep` 
> test1.cpp -o test1 `pkg-config --libs meep`
> /usr/local/lib/libhdf5.so: undefined reference to `pthread_equal'
> /usr/local/lib/libhdf5.so: undefined reference to `pthread_setcancelstate'
> 
> Thanks for all the help:)
> Mani chandra
> Physics sophomore
> IIT Kanpur
> 
> 
> 
> Save all your chat conversations. Find them online. 
> 
>  
> 
> 
> 
> 
> 
> ___
> meep-discuss mailing list
> meep-discuss@ab-initio.mit.edu
> http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss

___
meep-discuss mailing list
meep-discuss@ab-initio.mit.edu
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss


Re: [Meep-discuss] Help needed!

2008-01-12 Thread Manoj Rajagopalan
If you have super-user access to your machine then installing 
guile-devel, libctl and libctl-devel will correct dependency issues.

Using the MEEP libctl front-end is great for prototyping your program. 
If you want to bypass these because of issues with configure then try to 
look for libctl headers in /usr/include/ctl as opposed to /usr/include. 
I had this trouble with Fedora systems and I had to pass modified 
CPPFLAGS to my configure program. But till such time I figured this out 
I was strongly trying to do away with libctl.

After a little experience I've found the libctl front-end to be great.

cheers
Manoj



Mani Chandra wrote:
> Hi
>  how do I make ./confgure of MEEP to not use libctl and guile.Could 
> someone tell me if there are any switches that need to be added?
> 
> 
> 
> Get the freedom to save as many mails as you wish. Click here to know 
> how. 
> 
>  
> 
> 
> 
> 
> 
> ___
> meep-discuss mailing list
> meep-discuss@ab-initio.mit.edu
> http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss

___
meep-discuss mailing list
meep-discuss@ab-initio.mit.edu
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss


Re: [Meep-discuss] Trouble in ./configure of MEEP

2008-01-12 Thread Manoj Rajagopalan
Try the one or all of the following:
1. set the LD_LIBRARY_PATH environment variable to include /usr/local/lib
2. include on your configure command line:
  CPPFLAGS=-I/usr/local/include CXXFLAGS=-I/usr/local/include 
CFLAGS=-I/usr/local/include

Also, open config.log in your favourite editor and search for a 
substring of the error messages concerning HDF5, BLAS etc. config.log 
contains the command line used to invoke the corresponding test and the 
test program itself. You can examine this to see if the compiler is 
getting the correct flags (e.g. -lhdf5 -llapack -lblas etc.)


cheers!
Manoj


Mani Chandra wrote:
> Hi!
>I'm trying to install meep and though i have been successful,the 
> ./configure script does not seem to find the HDF5,GSL,BLAS,LAPACK libs 
> in my computer even though I've installed all of them in the standard 
> location /usr/local/lib etc...I'm using freebsd.Below is the output of 
> ./configure
> 
> [EMAIL PROTECTED] /usr/home/mc/Desktop/meep-0.10.1]# ./configure
> checking for a BSD-compatible install... /usr/bin/install -c
> checking whether build environment is sane... yes
> checking for a thread-safe mkdir -p... /usr/local/bin/gmkdir -p
> checking for gawk... gawk
> checking whether make sets $(MAKE)... yes
> checking whether to enable maintainer-specific portions of Makefiles... no
> checking for g++... g++
> checking for C++ compiler default output file name... a.out
> checking whether the C++ compiler works... yes
> checking whether we are cross compiling... no
> checking for suffix of executables...
> checking for suffix of object files... o
> checking whether we are using the GNU C++ compiler... yes
> checking whether g++ accepts -g... yes
> checking for style of include used by make... GNU
> checking dependency style of g++... gcc3
> checking build system type... i386-unknown-freebsd6.2
> checking host system type... i386-unknown-freebsd6.2
> checking for gcc... gcc
> checking whether we are using the GNU C compiler... yes
> checking whether gcc accepts -g... yes
> checking for gcc option to accept ISO C89... none needed
> checking dependency style of gcc... gcc3
> checking for a sed that does not truncate output... /usr/local/bin/gsed
> checking for grep that handles long lines and -e... /usr/bin/grep
> checking for egrep... /usr/bin/grep -E
> checking for ld used by gcc... /usr/bin/ld
> checking if the linker (/usr/bin/ld) is GNU ld... yes
> checking for /usr/bin/ld option to reload object files... -r
> checking for BSD-compatible nm... /usr/bin/nm -B
> checking whether ln -s works... yes
> checking how to recognise dependent libraries... pass_all
> checking how to run the C preprocessor... gcc -E
> checking for ANSI C header files... yes
> checking for sys/types.h... yes
> checking for sys/stat.h... yes
> checking for stdlib.h... yes
> checking for string.h... yes
> checking for memory.h... yes
> checking for strings.h... yes
> checking for inttypes.h... yes
> checking for stdint.h... yes
> checking for unistd.h... yes
> checking dlfcn.h usability... yes
> checking dlfcn.h presence... yes
> checking for dlfcn.h... yes
> checking how to run the C++ preprocessor... g++ -E
> checking for g77... no
> checking for xlf... no
> checking for f77... f77
> checking whether we are using the GNU Fortran 77 compiler... yes
> checking whether f77 accepts -g... yes
> checking the maximum length of command line arguments... 196608
> checking command to parse /usr/bin/nm -B output from gcc object... ok
> checking for objdir... .libs
> checking for ar... ar
> checking for ranlib... ranlib
> checking for strip... strip
> checking if gcc supports -fno-rtti -fno-exceptions... no
> checking for gcc option to produce PIC... -fPIC
> checking if gcc PIC flag -fPIC works... yes
> checking if gcc static flag -static works... yes
> checking if gcc supports -c -o file.o... yes
> checking whether the gcc linker (/usr/bin/ld) supports shared 
> libraries... yes
> checking dynamic linker characteristics... freebsd6.2 ld.so
> checking how to hardcode library paths into programs... immediate
> checking whether stripping libraries is possible... yes
> checking if libtool supports shared libraries... yes
> checking whether to build shared libraries... no
> checking whether to build static libraries... yes
> configure: creating libtool
> appending configuration tag "CXX" to libtool
> checking for ld used by g++... /usr/bin/ld
> checking if the linker (/usr/bin/ld) is GNU ld... yes
> checking whether the g++ linker (/usr/bin/ld) supports shared 
> libraries... yes
> checking for g++ option to produce PIC... -fPIC
> checking if g++ PIC flag -fPIC works... yes
> checking if g++ static flag -static works... yes
> checking if g++ supports -c -o file.o... yes
> checking whether the g++ linker (/usr/bin/ld) supports shared 
> libraries... yes
> checking dynamic linker characteristics... freebsd6.2 ld.so
> checking how to hardcode library paths into programs... immediate
> appending configuration tag "F77" 

Re: [Meep-discuss] Help needed!

2008-01-12 Thread Manoj Rajagopalan
./configure --without-libctl

This should work. This will only spit out libmeep.a and no meep 
executable in the libctl/ subdir.

cheers!
Manoj


Mani Chandra wrote:
> Hi
>  how do I make ./confgure of MEEP to not use libctl and guile.Could 
> someone tell me if there are any switches that need to be added?
> 
> 
> 
> Get the freedom to save as many mails as you wish. Click here to know 
> how. 
> 
>  
> 
> 
> 
> 
> 
> ___
> meep-discuss mailing list
> meep-discuss@ab-initio.mit.edu
> http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss

___
meep-discuss mailing list
meep-discuss@ab-initio.mit.edu
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss


[Meep-discuss] MEEP C++: polarization vs polarizability

2008-01-09 Thread Manoj Rajagopalan
Hi Dr. Johnson,

   I understand polarization to be the material property. So 
polarization would then be the state of the material with the given 
polarizability and under the influence of the sources at a particular 
time-step in the simulation?

   I also see a volume variable 'v' for polarizability. So I assume this 
is to constrain the property to a region. The corresponding polarization 
instance also seems to allocate only as much memory.

   Also, when you have time, could you please explain what the following 
variables represent? (specific questions follow the list)

class polarizability {
/*1*/  double *sigma;
/*2*/  double *s[NUM_FIELD_COMPONENTS];
/*3*/  double energy_saturation;
/*4*/  double saturated_sigma;
}

class polarization {
/*5*/  double *(P[NUM_FIELD_COMPONENTS][2]);
/*6*/  double *(energy[NUM_FIELD_COMPONENTS]);
/*7*/  double *(s[NUM_FIELD_COMPONENTS]);
}

If I understand correctly, #6 is just an organization of contributions 
to total electrical energy density from each polarization component for 
each cell in the polarization volume and that this declaration ensures 
that for a given cell location, contributions from all components are 
stored contiguously in memory.

Thanks
Manoj

___
meep-discuss mailing list
meep-discuss@ab-initio.mit.edu
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss


Re: [Meep-discuss] rotation utilities?

2008-01-06 Thread Manoj Rajagopalan
So the amp-func approach suggested below doesn't handle zero thickness 
objects, right?

Have you considered using a scenegraph? In computer graphics parlance 
this is nothing but a tree of objects, akin to what MEEP/ctlgeom uses 
except that the nodes in the graphs are not just geometric objects but 
also transformations. That way when we traverse the scenegraph from root 
to leaf, we also apply all the transformations along the path to 
generate the scene.

The scenegraph is technically a tree though it ends up becoming a 
directed acyclic graph because nodes/leaves can be shared. for example, 
we may have exactly one box as a leaf but two paths to it from the root 
- one direct and the other with a translation node (parameterized by a 
vector). This way the scene becomes two boxes at different locations.

I bet ctlgeom is already doing something like this. How would one 
include rotations into this tree? This approach would be more efficient 
in testing for inclusion of points inside the rotated source than the 
amp-func approach you have suggested. The latter will test for each 
point in the grid-aligned bounding bound whereas in the former approach 
we would apply a "modeling transform" to convert the "world" coordinate 
to the local coordinates of the rotated geometric object. Then inclusion 
test will be easy.

Since geometric objects accept vector3 parameters we only need consider 
sources now because they don't have orientation primitives. A scenegraph 
for this would be overkill. Simply adding an extra orientation parameter 
may be enough. But if we do this would it be able to handle obliquely 
oriented line and plane sources?

Thanks
Manoj


Steven G. Johnson wrote:
> On Sun, 6 Jan 2008, Manoj Rajagopalan wrote:
>> So right now is there a way to create a rotated box source? I only see a 
>> "size" parameter in the source, no hints for orientation
> 
> Well, you could do it by passing an amp-func parameter that is zero 
> outside the rotated box (or any other shape of your choice, for that 
> matter).  In this case the size/center parameters are just the bounding 
> box.
> 
> (The geometric_volume parameters themselves, as specified in the libctl 
> front-end by size/volume, are always boxes aligned with the grid.)
> 
> [Geometric objects (cylinders, blocks, etcetera) used to defined the 
> dielectric function etcetera can be oriented arbitrarily.]
> 
> Actually, it would be pretty easy to write a function for the front-end 
> that allowed the user to pass arbitrary geometric objects for the source 
> shape [the implementation would just use the amp-func method mentioned 
> above, internally, although I would probably want to do more sophisticated 
> averaging around object boundaries and handle zero-thickness objects], if 
> people were interested in such a feature.  I've never needed such a thing 
> myself.
> 
> Regards,
> Steven G. Johnson
> 
> ___
> meep-discuss mailing list
> meep-discuss@ab-initio.mit.edu
> http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss
> 
> 

___
meep-discuss mailing list
meep-discuss@ab-initio.mit.edu
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss


[Meep-discuss] rotation utilities?

2008-01-06 Thread Manoj Rajagopalan
Hi list

   Is there a function to rotate objects in meep? I see only a 
translation utility.

thanks
Manoj

___
meep-discuss mailing list
meep-discuss@ab-initio.mit.edu
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss


[Meep-discuss] flux-in-box

2008-01-05 Thread Manoj Rajagopalan
Hi all,

   Regarding the flux-in-box function, it needs a direction, and a 
box-shaped volume. I don't clearly understand this. The example in the 
documentation presents a y-z cross-section of unit size and defines 
'dir' to be X. I understand this to be a box whose x-length spans the 
simulation region along the x-axis.

   Suppose I provide a box that is bounded completely, say with (size 1 
1 1). Then what is the use of this 'dir' parameter?

Thanks
Manoj

___
meep-discuss mailing list
meep-discuss@ab-initio.mit.edu
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss


[Meep-discuss] MEEP C++: structure_chunk:: variables

2007-12-26 Thread Manoj Rajagopalan
Hi all,

   Does anyone know what these variables are used for in the structure_chunk 
class?

double *C[5][NUM_FIELD_COMPONENTS];
double *Cdecay[5][NUM_FIELD_COMPONENTS][5];

thanks
Manoj

___
meep-discuss mailing list
meep-discuss@ab-initio.mit.edu
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss


[Meep-discuss] MEEP C++: fields_chunk::variables

2007-12-26 Thread Manoj Rajagopalan
Hi all,

   Does anyone know what the following variables in the fields_chunk class are 
used for? I have 
attempted to understand them first and I have included my interpretation as 
doxygen-style comments 
for some I feel sure about.

   /// Stores pointers to (complex-valued) fields.
   /// E.g.: f[Ex][0] is a pointer to array of real-parts of the Ex field.
   ///   f[Hy][1] is a pointer to array of imaginary-parts of the Hy field.
   double *f[NUM_FIELD_COMPONENTS][2];
   /// ?
   double *f_backup[NUM_FIELD_COMPONENTS][2];
   /// ?
   double *f_p_pml[NUM_FIELD_COMPONENTS][2];
   /// ?
   double *f_m_pml[NUM_FIELD_COMPONENTS][2];
   /// ?
   double *f_backup_p_pml[NUM_FIELD_COMPONENTS][2];
   /// ?
   double *f_backup_m_pml[NUM_FIELD_COMPONENTS][2];
   /// ?
   int   num_each_direction [3]
   /// ?
   int   stride_each_direction [3]
   /// ?
   int   num_any_direction [5]
   /// ?
   int   stride_any_direction [5]
   /// ?
   polarization *olpol

Thanks
Manoj

___
meep-discuss mailing list
meep-discuss@ab-initio.mit.edu
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss


Re: [Meep-discuss] line defects in PhC

2007-12-24 Thread Manoj Rajagopalan
Hi Karel,

   I don't understand what you mean by a slab with a radius in your description 
below. Could you 
elaborate? Then I could go through your .ctl file.

cheers
Manoj


Karel Van Acoleyen wrote:
> Dear meep users,
>  
> A few weeks ago I sent a mail to try to simulate waveguide modes of line 
> defects in photonic crystal slabs. I now have a slab of thickness 0.5a, 
> radius 0.3a and just one missing row of holes. I fixed the previous 
> mentioned errors, but the band diagram stays the same. My mode is lying 
> between 0.2 and 0.3 normalized f, while it should be between 0.25 and 
> 0.35 as mentioned in articles and that is where my band gap is. I added 
> my ctl file again.
>  
> Thanks in advance,
> Karel
>  
> --
> (define silicon (make dielectric (index 3.5)))
> (define silica (make dielectric (index 1.45)))
> (define SiN (make dielectric (index 2)))
> (define-param h 0.5)
> (define-param r 0.3)
> (define-param h_air 2)
> (define-param h_Si 0.255)
> (define-param h_SiO2 0.61576)
> (define-param n_bragg 9)
> (define-param h_SiN 0.44643)
>  
> (set! geometry-lattice (make lattice (size 1 (* 13 (sqrt 3)) 3))) ;(+ (* 
> h_air 2) h (* 2 n_bragg (+ h_SiN h_SiO2)
> (set! default-material air) ; everything is air
> (define bragg_top (list
> (make block (center 0 0 (+ (/ h 2) (/ h_SiO2 2))) (size 25 25 h_SiO2) 
> (material silica))
> (make block (center 0 0 (+ (/ h 2) h_SiO2 (/ h_SiN 2))) (size 25 25 
> h_SiN) (material SiN
>  
> (set! geometry (append (list (make block (center 0 0 0) (size infinity 
> infinity h) (material silicon)))
> (geometric-object-duplicates (vector3 0 (sqrt 3) 0) 0 5 (make cylinder 
> (center 0 (sqrt 3) 0) (radius r) (height h) (material air)))
> (geometric-object-duplicates (vector3 0 (sqrt 3) 0) 0 5 (make cylinder 
> (center -0.5 (/ (sqrt 3) 2) 0) (radius r) (height h) (material air)))
> (geometric-object-duplicates (vector3 0 (sqrt 3) 0) 0 5 (make cylinder 
> (center 0.5 (/ (sqrt 3) 2) 0) (radius r) (height h) (material air)))
> (geometric-object-duplicates (vector3 0 (* -1 (sqrt 3)) 0) 0 5 (make 
> cylinder (center 0 (* -1 (sqrt 3)) 0) (radius r) (height h) (material air)))
> (geometric-object-duplicates (vector3 0 (* -1 (sqrt 3)) 0) 0 5 (make 
> cylinder (center -0.5 (/ (* -1 (sqrt 3)) 2) 0) (radius r) (height h) 
> (material air)))
> (geometric-object-duplicates (vector3 0 (* -1 (sqrt 3)) 0) 0 5 (make 
> cylinder (center 0.5 (/ (* -1 (sqrt 3)) 2) 0) (radius r) (height h) 
> (material air)))
> ;(geometric-objects-duplicates (vector3 0 0 (+ h_SiN h_SiO2)) 0 n_bragg 
> bragg_top)
> ))
>  
> (set! symmetries (list (make mirror-sym (direction Z) (phase -1)) (make 
> mirror-sym (direction Y) (phase -1
> (set! pml-layers (list (make pml (direction Y) (thickness 1)) (make pml 
> (direction Z) (thickness 1
>  
> (define-param fcen 0.30) ; pulse center frequency
> (define-param df 0.20) ; pulse freq. width
> (define randomnumber 0.13)
> (define-param k-interp 10)
> (set-param! resolution 16)
>  
> (set! sources (list
> (make source
> (src (make gaussian-src (frequency fcen) (fwidth df)))
> (component Hz) (center 0 0 0)
> )
> )
> )
> (run-k-points 300 (interpolate k-interp (list (vector3 0 0 0) (vector3 
> 0.5 0 0) )))
> 
> 
> Deel al je foto's met je vrienden! Maak je eigen online plek! Windows 
> Live Spaces 
> 
> 
> 
> 
> ___
> meep-discuss mailing list
> meep-discuss@ab-initio.mit.edu
> http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss

___
meep-discuss mailing list
meep-discuss@ab-initio.mit.edu
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss


[Meep-discuss] MEEP C++: frequency-dependence in geometric objects

2007-12-22 Thread Manoj Rajagopalan
Hi all,

   Does someone know where in the code are frequency-dependent material 
functions inside geometric 
objects are/can be handled?

   In my reading of the classic FDTD book by Taflove I found two methods 
mentioned for handling 
dispersive materials - the piecewise linear recursive convolution method and 
the auxiliary 
differential equation method. Is one of them being used in MEEP?

   If I have to implement a Drude model (without resorting to the approximation 
of small omega 
suggested on the MEEP page), what parts of MEEP would I have to touch?

Thanks
Manoj


___
meep-discuss mailing list
meep-discuss@ab-initio.mit.edu
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss


[Meep-discuss] MEEP C++ and geometric objects

2007-12-22 Thread Manoj Rajagopalan
Hi all,

   I was browsing the source code to see how geometric objects like spheres, 
cones, cylinders etc 
can be specified with dispersive materials and after spending many hours I'm 
still lost.

   Am I right in understanding that solid geometry primitives are handled by 
the interface to 
libctl? If so then how can I include such objects in a pure C++ program?

   One method seems to be to declare a "double eps(vec const&)" permittivity 
function which can 
contain information about the geometry of the "scene" but I don't think this 
helps with dispersive 
materials. If i understand correctly, this function will work only for simple 
dielectrics or for 
monochromatic excitations.

Thanks
Manoj

___
meep-discuss mailing list
meep-discuss@ab-initio.mit.edu
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss


[Meep-discuss] MEEP C++ field output filenames`

2007-12-20 Thread Manoj Rajagopalan
Hi,

   Does anyone know what outputs the *.00.h5 files store and what the 
*.50.h5 store? I have only one f.output_hdf5 statement in my program 
(fields f). Is one for the electric field and the other for the magnetic 
field since they are computed at different half-steps of each step?

Thanks
Manoj

___
meep-discuss mailing list
meep-discuss@ab-initio.mit.edu
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss


[Meep-discuss] MEEP C++: volume vs. geometric_volume

2007-12-18 Thread Manoj Rajagopalan
Hi all,

   Does anyone know their respective functionalities?

Thanks,
Manoj Rajagopalan

___
meep-discuss mailing list
meep-discuss@ab-initio.mit.edu
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss


[Meep-discuss] MEEP C++: the 'm' data member of the 'fields' data structure

2007-12-18 Thread Manoj Rajagopalan
HI all,

   Does anyone know what this integer variable represents?

Thanks
Manoj

___
meep-discuss mailing list
meep-discuss@ab-initio.mit.edu
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss


[Meep-discuss] MEEP C++ design: normal vs chunk data structures

2007-12-18 Thread Manoj Rajagopalan

Hi all,

   I was trying to understand the MEEP C++ interface by reading the
sources and I had a question:

   What is the "chunk" concept? How does the "fields" class differ from
the "fields_chunk" class, the "structure" class from the
"structure_chunk" class? What is "dft_chunk"?

Thanks,
Manoj



___
meep-discuss mailing list
meep-discuss@ab-initio.mit.edu
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss