Karl-Johan,

It's possible that your package already has the feature Ardavan mentioned
(I haven't updated the nightly packages to reflect the new version yet). Go
ahead and try it. If it doesn't work, then you should be able to run `conda
update -c chogan/label/dev -c chogan -c conda-forge pymeep-parallel` to get
the latest (assuming you're using the parallel version. If you're using the
serial version, the new feature won't help).

Chris

On Tue, Feb 19, 2019 at 3:04 AM Karl-Johan Olofsson <[email protected]>
wrote:

> So the script finished in about 4 hours. So in order to install version
> 1.8, do I have to build it from source? If that's the case, is there any
> estimation when the conda pymeep package is uploaded (on conda-forge)?
>
> Karl-Johan
> ------------------------------
> *Från:* Karl-Johan Olofsson
> *Skickat:* den 18 februari 2019 19:11:07
> *Till:* Christopher Hogan
> *Kopia:* [email protected]
> *Ämne:* SV: [Meep-discuss] Far Field Flux using python flux function in 3D
>
>
> So all the volumes looks as following
>
>
> volx=mp.Volume(center=mp.Vector3(r,0,0),size=mp.Vector3(2*r,0,0),dims=3)
> ...
>
>
> I also set res_ff = 1
>
>
> The code finishes the time stepping but has been stuck calculating the far
> field flux for about 2 hours now for a sim cell (4,4,4) resolution=40 and
> time=5. So something seems to not be working properly.
>
>
> Karl-Johan
> ------------------------------
> *Från:* Christopher Hogan <[email protected]>
> *Skickat:* den 18 februari 2019 12:10:40
> *Till:* Karl-Johan Olofsson
> *Kopia:* [email protected]
> *Ämne:* Re: [Meep-discuss] Far Field Flux using python flux function in 3D
>
> Hi,
>
> Can you try passing an extra keyword argument, `dims=3` to the Volume
> constructors for volx, volmx, voly, etc.?
>
> Chris
>
> On Mon, Feb 18, 2019 at 6:53 AM Karl-Johan Olofsson <
> [email protected]> wrote:
>
> Hello! I downloaded pymeep 1.7.1 dev version recently from conda-forge and
> been trying to use the far field flux function but I can't get it to work
> in 3D. Here is a snipet of the relevant code:
>
>
>         nearfieldregion1=mp.Near2FarRegion(
>             center=mp.Vector3(0,0,-sz/2+2*padding),
>             size=mp.Vector3(sx/2-padding*2,sy/2-padding*2,0),
>             direction=mp.Z,
>             weight=-1)
>
>         nearfieldregion6=mp.Near2FarRegion(
>             center=mp.Vector3(0,0,sz/2-2*padding),
>             size=mp.Vector3(sx/2-padding*2,sy/2-padding*2,0),
>             direction=mp.Z)
>
>         nearfieldregion2=mp.Near2FarRegion(
>             center=mp.Vector3(sx/2-padding*2,0,0),
>             size=mp.Vector3(0,sy/2-padding*2,sz/2-padding*2),
>             direction=mp.X)
>
>         nearfieldregion3=mp.Near2FarRegion(
>             center=mp.Vector3(-sx/2+padding*2,0,0),
>             size=mp.Vector3(0,sy/2-padding*2,sz/2-padding*2),
>             direction=mp.X,
>             weight=-1)
>
>         nearfieldregion4=mp.Near2FarRegion(
>             center=mp.Vector3(0,sy/2-padding*2,0),
>             size=mp.Vector3(sx/2-padding*2,0,sz/2-padding*2),
>             direction=mp.Y)
>
>         nearfieldregion5=mp.Near2FarRegion(
>             center=mp.Vector3(0,-sy/2+padding*2,0),
>             size=mp.Vector3(sx/2-padding*2,0,sz/2-padding*2),
>             direction=mp.Y,
>             weight=-1)
>
>
>  
> nearfield=sim.add_near2far(fcen,df,nfreq,nearfieldregion1,nearfieldregion2,nearfieldregion3,
>         nearfieldregion4,nearfieldregion5,nearfieldregion6)
>
>  r=20
>
>     volx=mp.Volume(center=mp.Vector3(r,0,0),size=mp.Vector3(0,2*r,2*r))
>   volmx=mp.Volume(center=mp.Vector3(-r,0,0),size=mp.Vector3(0,2*r,2*r))
>     voly=mp.Volume(center=mp.Vector3(0,r,0),size=mp.Vector3(2*r,0,2*r))
>     volmy=mp.Volume(center=mp.Vector3(0,-r,0),size=mp.Vector3(2*r,0,2*r))
>     volz=mp.Volume(center=mp.Vector3(0,0,r),size=mp.Vector3(2*r,2*r,0))
>     volmz=mp.Volume(center=mp.Vector3(0,0,-r),size=mp.Vector3(2*r,2*r,0))
>
>     res_ff=5
>
>     ff_flux = nearfield1.flux(mp.X,volx,res_ff) -
> nearfield.flux(mp.X,volmx,res_ff)[0]+ nearfield.flux(mp.Y,voly,res_ff)[0]-
> nearfield.flux(mp.Y,volmy,res_ff)[0]+ nearfield.flux(mp.Z,volz,res_ff)[0]-
> nearfield.flux(mp.Z,volmz,res_ff)[0]
>
>  I get the error
> "meep: wrong dimensionality in green2d" when running the code.
>
> Warm greetings,
> Karl-Johan
>
>
>
> _______________________________________________
> meep-discuss mailing list
> [email protected]
> http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss
>
> _______________________________________________
> meep-discuss mailing list
> [email protected]
> http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss
_______________________________________________
meep-discuss mailing list
[email protected]
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss

Reply via email to