Hi Steven, Thanks for that, I confused with (output-dpwr bands) which can be called after the run command.
Regards, Fred On Jun 26 2007, Steven G. Johnson wrote: >On Fri, 22 Jun 2007, F.S.F. Brossard wrote: >> Continuing with the H1 cavity, the additional line below should output >> the energy density of all the bands, since the condition is "greater >> than 0" but nothing is generated (no error but no output). What is >> wrong? >> >> (run-zeven) >> >> (output-dpwr-in-objects output-dpwr 0 (make cylinder (center 0) >> (radius (- 1 r)) (height h) >> (material (make dielectric (epsilon eps))))) > >The result of (output-dpwr-in-objects ...) is a *function* which you have >to pass to run-zeven. That is, do > > (run-zeven (output-dpwr-in-objects ....)) > >The reason is that what you pass to run-zeven, and the other run >functions, are functions f(band) which are called for each band and let >you do whatever computations you want. output-dpwr-in-objects returns a >function f(band) that, given a band, checks whether the energy in the >given object is bigger than the threshold, and if so calls the given >output function. > >Your code, above, calls (output-dpwr-in-objects ...) to produce the >function, but doesn't actually call the function for any bands and hence >it doesn't do anything. > >See the section "Run functions" in the User Reference section of the MPB >manual. > >Regards, >Steven G. Johnson > >_______________________________________________ >mpb-discuss mailing list >[email protected] >http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/mpb-discuss > -- Frederic Brossard Hitachi Cambridge Laboratory Cavendish Laboratory J J Thomson Avenue Cambridge CB3 0HE _______________________________________________ mpb-discuss mailing list [email protected] http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/mpb-discuss
