Re: Re: How to calculate the surface bands of photonic crystal slab

"Steven G. Johnson" <[email protected]>
Newsgroups gmane.comp.science.photonic-bands
Message-ID <[email protected]>
On Mon, 27 Nov 2006, zhang hao wrote:
> ;make Left air area
> (set! geometry
>       (append  (list (make block (center (- (* (sqrt 2) -3.5) 0.25) (+
> (sqrt 2) 0.25) 0)
>       (material air) (size airwidth airhigh infinity)))))
>
> The problem is that the crossing is not duplicated. It seems that the
> "Apend" command doesnot work, why? Thanks a lot.

You aren't calling "append" correctly -- if you want to append a list of 
objects to the geometry you need to do:

 	(set! geometry (append geometry (list .....)))

The "append" command is a function that takes zero or more lists and 
returns the list formed by appending its arguments.  It is not specific to 
MPB and knows nothing about the geometry.    This is why you need to pass 
the geometry variable as one of the arguments if you want to append it 
with the new list you are passing, as opposed to replacing it.

Steven
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.