hc_020 wrote: > Dear Steven and meep users, > > The material type class in meep reference shows the latest meep > supports the property B-conductivity-diag [vector3], which is the > diagonal elements of "B-conductivity tensor", but it is out of hand in > meep. > > The problem is how to set the off-diagonal elements of "B-conductivity > tensor" in meep. So I define a new class medium as follows: > > ; define a new class medium > (define-class medium material-type > (define-property epsilon no-default 'number) > (define-property mu no-default 'number) > (define-property mu-tensor (matrix3x3 (vector3 1 0 0) (vector3 0 1 0) > (vector3 0 0 1)) 'matrix3x3) > (define-derived-property scaled-mu-tensor 'matrix3x3 > (lambda (object) > (matrix3x3* (object-property-value object 'mu) > (object-property-value object 'mu-tensor)))) > > And I have used the above class medium to simulate an example in meep > tutorial named "A 90??bend" > (http://ab-initio.mit.edu/wiki/index.php/Meep_Tutorial#A_90.C2.B0_bend), > at the same time I substituted "(material (make dielectric (epsilon > 12)))" to "(material Medium0)" in the ctl source code, which is in the > attachment. > > But keeping the diagonal elements of "B-conductivity tensor" > unchanged, the result of the simulation is the same one to all kinds > of off-diagonal elements. In fact the results show the off-diagonal > elements of "B-conductivity tensor" defined in medium don't effect at all. > > So, did I make any mistake or should I take some other methods to > resolve the problem? Thanks ahead! > > Regards, > > Huang > > > [????] ?????? ????????-???????? > <http://popme.163.com/link/003985_1010_7027.html> > > [????] ?????? ????????-???????? > <http://popme.163.com/link/003985_1010_7027.html> > ------------------------------------------------------------------------ > > _______________________________________________ > meep-discuss mailing list > [email protected] > http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss Hi, The scheme interface is just a wrapper for a bunch of C++ functions, which the meep cmd interface only makes you more easily call, so defining a class in .ctl cannot give one feature meep does not have due to the lack of the C++ code supports .
In my opinion, choosing one set of coordinates to diagonalize the matrix is better or you should rewrite some C++ codes in meep. Yours Zheng 2008-11-8
_______________________________________________ meep-discuss mailing list [email protected] http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/meep-discuss

