The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Photonic::Roles::EpsTensor

VERSION

version 0.020

COPYRIGHT NOTICE

Photonic - A perl package for calculations on photonics and metamaterials.

Copyright (C) 2016 by W. Luis Mochán

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA

mochan@fis.unam.mx

Instituto de Ciencias Físicas, UNAM
Apartado Postal 48-3
62251 Cuernavaca, Morelos
México

SYNOPSIS

use Photonic::LE::S::EpsTensor;
my $eps=Photonic::LE::S::EpsTensor->new(
                  epsilon=>$e, geometry=>$g);
my $epsilonTensor=$eps->epsTensor;
(for developers)
package Photonic::LE::S::EpsTensor;
$Photonic::LE::S::EpsTensor::VERSION= '0.020';
use namespace::autoclean;
use Moose;
with 'Photonic::Roles::EpsTensor';
has...

DESCRIPTION

Role for classes that calculate the macroscopic dielectric tensor for a given fixed Photonic::Geometry structure as a function of the dielectric functions of the components.

The consuming class needs to supply these methods to inform lazy-building of haydock and epsL:

  • allh_class

  • allh_attrs

  • epsl_class

  • epsl_attrs

ATTRIBUTES

  • geometry

    Photonic::Geometry describing the structure

  • nh

    Maximum number of Haydock coefficients to use.

  • smallH and smallE

    Criteria of convergence (default 1e-7) for the Haydock coefficients and the tensor calculations. 0 means don't check. *Check last remark*

  • keepStates

    Flag to keep states in Haydock calculations (default 0)

  • haydock

    Array of Photonic::Role::Haydock structures, one for each direction (lazy-built from geometry if not given). Since this is expensive, once calculated you are encouraged to use the accessor to pass the value to construct other EpsTensor with different epsilon.

  • epsL

    Array of Photonic::Role::EpsL structures, one for each direction (lazy-built if not given).

  • epsTensor

    The macroscopic dielectric function for a given value of the dielectric functions of the host epsA and the particle epsB, calculated from previous two parameters.

  • nh

    The maximum number of Haydock coefficients to use.

  • converged

    Flags that the last calculation converged before using up all coefficients