Hello Jitendra

>  Hello Developers and Users,
>
>  I was experimenting with adaptive mesh resolution feature in MEEP with 
>  the bend-flux example. I am not sure about my procedure, but I am trying 
>  to accomplish 20-resolution in the y-direction of waveguide and the 
>  default 10-resolution for x-direction in the wave-guide. For rest of the 
>  part in the lattice, I am expecting 10-resolution in both the 
>  directions. To get this done I took Diagonal part of Jacobian as (1 0.5 
>  0)
That does not seem right. Even if you only do 2D calculations, the
Jacobian should have the full rank, i.e. in your case no diagonal
elements should be zero. The same goes for epsilon and mu. Especially
mu_zz = 0 looks very problematic to me, you probably want to use 1.

Without having read your code in detail (I don't use the libctl
interface, so my experience there is limited), I guess your definitions
lead to a component of the refractive index being smaller than 1 in some
areas, which leads to instabilities and is not what you want for
variable resolution. If you are REALLY sure that you want your epsilon
and mu that way, you should lower the courant-number, but I guess that
is not it. Just make sure that epsilon, mu and J make sense in all
directions, i.e. are not zero.

What I did was to rise epsilon and mu outside the region of maximal
resolution instead of lowering it inside, which saves me the hassle of
changing the courant number to keep the calculation stable.
> and scaled the epsilon and mu of the wave-guide and for the rest of 
>  the lattice, epsilon and mu are not changed. If I am doing it right, of 
>  which I am not sure, then why am I getting NAN values in the output. I 
>  tried with scaled default-material too, still no changes. Do I need to 
>  change anything more?
>  The part of the code that I changed is written below.
>
>
>  /////////////////////////////////////////////////////////////////////////
>
>  (set! resolution 10) ; the default value of example
>  (set! default-material (make dielectric (epsilon 1) (mu 1)))
>  ;(set! default-material (make dielectric (epsilon-diag 2 0.5 0) 
>  (mu-diag 2 0.5 0)))
>
>  ; J = diag(1 0.5 0)
>  ; epsilon = diag(24 6 0); default value of example was 12.
>  ; mu = diag(2 0.5 0); default value of example was 1.
>
>  (set! geometry
>       (if no-bend?
>           (list
>              (make block (center 0 wvg-ycen)
>                          (size infinity w infinity)
>                          (material (make dielectric (epsilon-diag  24 6 
> 0)(mu-diag  2 0.5 
>  0))))
>           )
>              (list
>                 (make block (center (* -0.5 pad) wvg-ycen)
>                          (size (- sx pad) w infinity)
>                          (material (make dielectric (epsilon-diag  24 6 
> 0)(mu-diag  2 0.5 
>  0))))
>                  (make block (center wvg-xcen (* 0.5 pad))
>                           (size w (- sy pad) infinity)
>                           (material (make dielectric (epsilon-diag  24 6 
> 0)(mu-diag  2 0.5 
>  0))))
>               )
>  ))
>
>  ////////////////////////////////////////////////////////////////////////
>
>  command-line param: no-bend?=true
>  -----------
>  Initializing structure...
>  Working in 2D dimensions.
>  Computational cell is 16 x 32 x 0 with resolution 10
>       block, center = (0,-11.5,0)
>            size (1e+20,1,1e+20)
>            axes (1,0,0), (0,1,0), (0,0,1)
>            dielectric constant epsilon diagonal = (24,6,0)
>  time for set_epsilon = 0.158105 s
>  time for set_mu = 0.158099 s
>  -----------
>  creating output file "./bend-eps-000000.00.h5"...
>  field decay(t = 50.050000000000004): +nan.0 / +nan.0 = +nan.0
>  field decay(t = 100.05000000000001): +nan.0 / +nan.0 = +nan.0
>  field decay(t = 150.1): +nan.0 / +nan.0 = +nan.0
>  field decay(t = 200.15): +nan.0 / +nan.0 = +nan.0
>  on time step 4884 (time=244.2), 0.000819087 s/step
>  field decay(t = 250.20000000000002): +nan.0 / +nan.0 = +nan.0
>  field decay(t = 300.2): +nan.0 / +nan.0 = +nan.0
>  field decay(t = 350.25): +nan.0 / +nan.0 = +nan.0
>
>  /////////////////////////////////////////////////////////////////////////
>
>  Thanking in anticipation.
>  Jitendra
>
>
>
> ------------------------------
>
> Subject: Digest Footer
>
> _______________________________________________
> meep-discuss mailing list
> meep-discuss@ab-initio.mit.edu
> http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss
>
> ------------------------------
>
> End of meep-discuss Digest, Vol 140, Issue 5
> ********************************************

-- 
Felix Schwarz
Technische Universität Ilmenau
FG Theoretische Physik I

Tel: +49 3677 69 3644


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

Reply via email to