Thanks Steven, your help is greatly appreciated.

So if I understand well, using:

(define (f p)
        (if (> (vector3-y p) (/ (cos (* (vector3-x p) pix2)) (* 2 (/ 1 
pitch)))) nbeps
xeps))

then

(define (my-material-func p)
   (make dielectric
      (epsilon (f p))
      (polarizations
         (make polarizability
            (omega 0.59) (gamma 0.001) (delta-epsilon 0.35)))))

then the epsilon will change from nbeps to xeps depending on the position
vector-y.  Doesn't it mean though that the polarizations parameters will be
applied to both creating, depending on the position any of these two materials:

1.  (make dielectric
      (epsilon nbeps)
      (polarizations
         (make polarizability
            (omega 0.59) (gamma 0.001) (delta-epsilon 0.35))))

or

2.  (make dielectric
      (epsilon xeps)
      (polarizations
         (make polarizability
            (omega 0.59) (gamma 0.001) (delta-epsilon 0.35))))


In fact I'd like the function to return either 1. as above or 

2.  (make dielectric
      (epsilon xeps))

Perhaps doing something like this:
(define (my-material-func p)
        (if (> (vector3-y p) (/ (cos (* (vector3-x p) pix2)) (* 2 (/ 1 
pitch)))) (make
dielectric
      (epsilon nbeps)
      (polarizations
         (make polarizability
            (omega 0.59) (gamma 0.001) (delta-epsilon 0.35)))) xeps))

I'll give it a try in the mean time.  Thanks again for your important help.

Nic



_______________________________________________
meep-discuss mailing list
[email protected]
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss

Reply via email to