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::WE::S::Haydock

VERSION

version 0.021

SYNOPSIS

    use Photonic::WE::S::Haydock;
    my $nr=Photonic::WE::S::Haydock->new(metric=>$g, polarization=>$p);
    $nr->iterate;
    say $nr->iteration;
    say $nr->current_a;
    say $nr->next_b2;
    my $state=$nr->next_state;

DESCRIPTION

Implements calculation of Haydock coefficients and Haydock states for the calculation of the retarded dielectric function of arbitrary periodic systems in arbitrary number of dimensions, one Haydock coefficient at a time. It uses the wave equation and the spinor representation.

Consumes Photonic::Roles::Haydock, Photonic::Roles::UseMask, Photonic::Roles::EpsFromGeometry - please see those for attributes.

ATTRIBUTES

  • metric Photonic::WE::S::Metric

    A Photonic::WE::S::Metric object defining the geometry of the system, the characteristic function, the wavenumber, wavevector and host dielectric function. Required in the initializer.

  • B ndims dims epsilon

    Accessors handled by metric (see Photonic::WE::S::Metric)

  • polarization complex PDL

    A non null vector defining the complex direction of the macroscopic field.

METHODS

  • applyMetric($psi)

    Returns the result of applying the metric to the state $psi.

ATTRIBUTES SUPPLIED FOR ROLE

  • applyOperator($psi_G)

    Apply the 'Hamiltonian' operator to state $psi_G. State is ri,xy,pn,nx,ny... The Hamiltonian is the metric followed by the dielectric esponse relative to the reference response.

  • innerProduct($left, $right)

    Returns the inner Euclidean product between states with the metric.

  • magnitude($psi)

    Returns the magnitude of a state as the square root of the magnitude of inner product of the state with itself.

  • changesign

    Returns 0, as there is no need to change sign.

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