Photonic::LE::NR2::SHChiTensor
version 0.014
Photonic - A perl package for calculations on photonics and metamaterials.
Copyright (C) 1916 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
use Photonic::LE::NR2::SHChiTensor; my $chi=Photonic::LE::NR2::SHChiTensor->new(geometry=>$g, $densityA=>$dA, $densityB=>$dB, nh=>$nh, nhf=>$nhf, filter=>$f, filterflag=>$ff); my $chiTensor=$chi->evaluate($epsA1, $epsB1, $epsA2, $epsB2);
Calculates the second harmonic susceptibility tensor for a given fixed Photonic::Geometry structure as a function of the dielectric functions of the components.
new(geometry=>$g, densityA=>$da, densityB=>$db, nh=>$nh, nhf=>$nhf[, filter=>$ff][, smallH=>$smallH][, smallE=>$smallE])
Initializes the structure.
$g Photonic::Geometry describing the structure
$da, $db number densities for material A and B (in which units?)
$nh is the maximum number of Haydock coefficients to use.
$nhf is the maximum number of Haydock coefficients for the field calculation.
$ff is a (maybe smooth) cutoff function in reciprocal space to smothen the geometry.
$smallH and $smallE are the criteria of convergence (default 1e-7) for haydock coefficients and continued fraction.
evaluate($epsA1, $epsB1, $epsA2, $epsB2, [kind=>$kind,] [mask=>$mask] )
Returns the macroscopic second Harmonic susceptibility function for a given value of the dielectric functions of the host $epsA and the particle $epsB at the fundamental 1 and second harmonic 2 frequency. $kind is an optional letter for testing purposes with values 'd' for dipolar, 'q' for quadrupolar, 'e' for external and 'f' for full selfconsistent calculation (the default). Mask is a mask with ones and zeroes, to evaluate the contribution of certain regions to the susceptibility.
geometry
Photonic::Geometry structure describing the geometry of the metamaterial
B dims r G GNorm L scale f
Accesors handled by geometry.
densityA, densityB
Dipole entities density in mediums A and B
nhf
Maximum number of Haydock coefficients for field calculation
filter
Optional filter to multiply by in reciprocal space
epsA1, epsB1, epsA2, epsB2
Dielectric functions of components A and B at fundamental and SH frequency
nrshp
Array of Photonic::LE::NR2::SHP Haydock SH polarization calculators, one for each direction
chiTensor
The dielectric tensor
nh
The maximum number of Haydock coefficients to use.
converged
Flags that the last calculation converged before using up all coefficients
smallH smallE
Criteria of convergence for Haydock coefficients and for fields. 0 means don't check.
u1, u2
Spectral variables
To install Photonic, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Photonic
CPAN shell
perl -MCPAN -e shell install Photonic
For more information on module installation, please visit the detailed CPAN module installation guide.