Reducing the grid size fixed it thanks, though I had thought setting a low resolution would get around memory issues. The root of this problem brings up another question: it seems while I have a flux plane there, the resolution is set to 10 no matter what else I set it to. (Usually I would define my measurements in nanometers for convenicen then set the resolution to much less than 1 in order not to occupy too much memory.) Removing the flux plane allows me to change the resolution again. Is this forcing of the resolution to 10 when flux plains are used something required or built into MEEP?

Thanks,

Stephen.

On 26/05/2011 13:06, Georg Wachter wrote:
Hello,

I have had similar errors when the total number of grid points exceeded the domain of integers (~2e9). I would guess that it could be either that or you might run out of memory.

You could try to decrease the grid size of your simulation and / or decrease the parameters that are responsible for memory consumption in the flux-plane part.

Good luck!
  Georg

On Thu, May 26, 2011 at 11:50 AM, Stephen P. Begley <[email protected] <mailto:[email protected]>> wrote:

    Hi guys,

                   I've been using MEEP for a month or two now but I've
    come across an error I can't find a solution for when I'm trying
    to add
    flux planes to the model. They work fine in the tutorial, but when
    I try
    to run them with my code I get the error "meep: Cannot split
    -704118784
    grid points into 1 parts". This error disappears if I remove the flux
    plane, but I can't see what difference between my code and the
    tutorial
    code is breaking this. Adjusting the resolution or the size of the
    plane
    doesn't seem to help (or at least the number in the error doesn't
    change.) I have included my code in its entirity below. The flux plane
    is just added as a test  so isn't necessarily in a useful  position /
    configuration right now.


    (define-param scale 1)
    (define-param wy 120) ; size of waveguide thickness in Y direction
    (define-param wz 600) ; size of waveguide thickness in Z direction
    (set! wy (/ wy scale))
    (set! wz (/ wz scale))
    (define-param sx 8000) ; size of cell in X direction
    (set! sx (/ sx scale))
    (define-param sy (* 2 (+ wy 600))) ; size of cell in Y direction
    (define-param sz (* 2 (+ (* 2 wz) 800))) ; size of cell in Y direction
    (define-param wl 785) ; wavelength in length unit
    (define-param ric 1.434) ; refractive index of the cover n-hexadecane
    (define-param riw 2); refractive index of the high index waveguide
    (define-param f "./POWER")
    (define-param separation 60)
    (set! separation (/ separation (* scale 2)))
    (define-param r 1)
    (define-param t 320)

    (define eic (* ric ric)) ;epsilon of coverhepsiolon
    (define eiw (* riw riw)) ;epsilon of waveguide
    (define buff-ypos (* -0.25 sy))
    (define buff-ythick (* 0.5 sy))
    (define cover-ypos (* 0.25 sy))
    (define cover-ythick (* 0.5 sy))


    (set! geometry-lattice (make lattice (size sx sy sz)))

    (set! geometry (list

                   (make block (center 0 buff-ypos) (size infinity
    buff-ythick infinity)
                         (material (make dielectric (epsilon eic))))

                   (make block (center 0 cover-ypos) (size infinity
    cover-ythick infinity)
                         (material (make dielectric (epsilon eic))))

                  (make block (center 0 0 (+ separation (/ wz 2))) (size
    infinity wy wz) ; 120nm separation
                        (material (make dielectric (epsilon eiw))))

                   (make block (center 0 0 (* -1 (+ separation (/ wz 2))))
    (size infinity wy wz)
                         (material (make dielectric (epsilon eiw))))

    ))


    (set! force-complex-fields? true) ; this gives time averaged
    energy later
    (set! sources (list
                  (make source
                    (src (make continuous-src (wavelength 785)))
                    (component Ez)
                   (center (-  (/ sx 2) 150) 0 (* -1 (+ separation (/ wz
    2))));
           (size 0 wy wz ))))

    (define-param nfreq 100) ; number of frequencies at which to
    compute flux
    (define-param fcen 0.15)
    (define-param df 0.1)
    (define trans ; transmitted flux
         (add-flux fcen df nfreq
                   (make flux-region
                        (center 1 1 1) (size 0 1 1 ))
                       ))

    (set! symmetries (list (make mirror-sym (direction Y))))

    (set! pml-layers (list (make pml (thickness 150))))
    (set! resolution r)

    (use-output-directory f)

    (run-until t
              (at-beginning output-epsilon)
                (at-end  synchronized-magnetic output-poynting
    output-tot-pwr)
    )

    (display-fluxes trans)

    Thank-you for reading.

    Stephen.


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



--
---------------------------------------
DI Georg Wachter
Institute for Theoretical Physics
Vienna University of Technology
Wiedner Hauptstr. 8-10, A-1040 Austria

phone: +43-(0)1-58801-13627
fax:   +43-(0)1-58801-13699
---------------------------------------

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

Reply via email to