|
my $nh =10;
my $rot =pdl[[ cos (2 *PI /3), - sin (2 *PI /3), 0],
[ sin (2 *PI /3), cos (2 *PI /3), 0],
[0, 0, 1]];
my $ea =(pdl[[2,0,0],
[0,1,0],
[0,0,1]])->r2C;
my $eb = $rot x $ea x $rot ->transpose;
my $ec = $rot x $eb x $rot ->transpose;
my $epsilon =pdl( $ea , $eb , $ec )
->(:,:,*1,*1);
my $epsilonRef =pdl(1);
my $geometry =Photonic::Geometry::FromEpsilonTensor->new(
epsilon => $epsilon );
my $wavenumber =pdl(.05);
my $wavevector =pdl(0,0,.02);
my $metric =Photonic::WE::ST::Metric->new(
geometry => $geometry , epsilon => $epsilonRef , wavenumber => $wavenumber , wavevector => $wavevector
);
my $greenObj =Photonic::WE::ST::Green->new( metric => $metric , nh => $nh );
my $green = $greenObj ->greenTensor;
say $green ;
my $epsM = $greenObj ->epsilonTensor;
say $epsM ;
|