Hi all, I am trying to use epsilon_input_file in PyMeep to define an arbitrary anisotropic geometry. But as per the document the HDF5 file can have only one dataset corresponding to a scalar dielectric function.
So I tried to load the files individually having data for the epsilon_diag and epsilon_offdiag elements to use them in the material or epsilon_func parameter. But both of them can only take closed formula and not numerical values (am I doing something wrong here?). So is there a way to load a function and use them as the components of the anisotropic material? For example, to check, I wrote something like for an isotropic material, where the eps_h5file contains an array of positive values varying both transversely and longitudinally def periodic_theta(): eps_h5file = h5py.File('isotropic_periodicz_transverse-eps- 000000.00.h5','r') theta1 = np.array(eps_h5file['eps']) # theta1=eps_h5file['eps'] # theta=np.transpose(theta1) theta=theta1 print(theta.shape) mat=meep.Medium(epsilon_diag=meep.Vector3(theta),\ epsilon_offdiag=meep.Vector3(0,0,0)) return mat geometry = [meep.Block(meep.Vector3(width_cell, wwidth, 1e20), center=meep.Vector3(width_cell/2-zin, 0), material=periodic_theta())] which always gives segmentation error, because material should be a function and I gave exact values. Is there a way that I can load exact values and give them as values for the diagonal and off-diagonal elements of epsilon? Thank you in advance!! Best regards, Jisha
_______________________________________________ meep-discuss mailing list firstname.lastname@example.org http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss