NanoComp / meep

free finite-difference time-domain (FDTD) software for electromagnetic simulations
GNU General Public License v2.0
1.16k stars 596 forks source link

Changing mu_diag and mu_off_diag within a material function has no effect #2739

Open buckrogers99 opened 7 months ago

buckrogers99 commented 7 months ago

I am trying to create an inhomogeneous and anisotropic structure with a different permeability tensor at different positions. I have defined a function that takes a Vector3 and returns a Medium instance with values for mu_diag and mu_off_diag. However, this does not affect the simulation, which behaves as if it's just a homogeneous isotropic block.

(FYI I have tried a material function that changes mu based on position and this works)

oskooi commented 7 months ago

As a reference, take a look at Tutorial/Diffraction Spectrum of Liquid-Crystal Polarization Gratings which involves a position-dependent anisotropic $\varepsilon$ tensor.